Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::BinaryCollisionAvatar Class Reference

#include <G4INCLBinaryCollisionAvatar.hh>

+ Inheritance diagram for G4INCL::BinaryCollisionAvatar:

Public Member Functions

 BinaryCollisionAvatar (G4double, G4double, G4INCL::Nucleus *, G4INCL::Particle *, G4INCL::Particle *)
 
virtual ~BinaryCollisionAvatar ()
 
G4INCL::IChannelgetChannel () const
 
ParticleList getParticles () const
 
virtual void preInteraction ()
 
virtual FinalStatepostInteraction (FinalState *)
 
std::string dump () const
 
- Public Member Functions inherited from G4INCL::InteractionAvatar
 InteractionAvatar (G4double, G4INCL::Nucleus *, G4INCL::Particle *)
 
 InteractionAvatar (G4double, G4INCL::Nucleus *, G4INCL::Particle *, G4INCL::Particle *)
 
virtual ~InteractionAvatar ()
 
- Public Member Functions inherited from G4INCL::IAvatar
 IAvatar ()
 
 IAvatar (G4double time)
 
virtual ~IAvatar ()
 
virtual G4INCL::IChannelgetChannel () const =0
 
G4INCL::FinalStategetFinalState ()
 
virtual void preInteraction ()=0
 
virtual FinalStatepostInteraction (FinalState *)=0
 
G4double getTime () const
 
virtual ParticleList getParticles () const =0
 
virtual std::string dump () const =0
 
AvatarType getType () const
 
G4bool isACollision () const
 
G4bool isADecay () const
 
void setType (AvatarType t)
 
long getID () const
 
std::string toString ()
 

Static Public Attributes

static const G4double cutNN = 1910
 
static const G4double cutNNSquared = cutNN*cutNN
 
- Static Public Attributes inherited from G4INCL::InteractionAvatar
static const G4double locEAccuracy = 1.E-4
 Target accuracy in the determination of the local-energy Q-value.
 
static const G4int maxIterLocE = 50
 Max number of iterations for the determination of the local-energy Q-value.
 

Additional Inherited Members

- Protected Member Functions inherited from G4INCL::InteractionAvatar
virtual G4INCL::IChannelgetChannel () const =0
 
G4bool bringParticleInside (Particle *const p)
 
void preInteractionLocalEnergy (Particle *const p)
 Apply local-energy transformation, if appropriate.
 
void preInteractionBlocking ()
 Store the state of the particles before the interaction.
 
void preInteraction ()
 
FinalStatepostInteraction (FinalState *)
 
void restoreParticles () const
 Restore the state of both particles.
 
G4bool shouldUseLocalEnergy () const
 true if the given avatar should use local energy
 
G4bool enforceEnergyConservation (FinalState *const fs)
 Enforce energy conservation.
 
- Protected Attributes inherited from G4INCL::InteractionAvatar
G4INCL::NucleustheNucleus
 
G4INCL::Particleparticle1
 
G4INCL::Particleparticle2
 
ThreeVector boostVector
 
ParticleType oldParticle1Type
 
ParticleType oldParticle2Type
 
G4double oldParticle1Energy
 
G4double oldParticle2Energy
 
G4double oldTotalEnergy
 
G4double oldXSec
 
G4double oldParticle1Potential
 
G4double oldParticle2Potential
 
G4double oldParticle1Mass
 
G4double oldParticle2Mass
 
G4double oldParticle1Helicity
 
G4double oldParticle2Helicity
 
ThreeVector oldParticle1Momentum
 
ThreeVector oldParticle2Momentum
 
ThreeVector oldParticle1Position
 
ThreeVector oldParticle2Position
 
G4bool isPiN
 
- Protected Attributes inherited from G4INCL::IAvatar
G4double theTime
 

Detailed Description

Definition at line 56 of file G4INCLBinaryCollisionAvatar.hh.

Constructor & Destructor Documentation

◆ BinaryCollisionAvatar()

G4INCL::BinaryCollisionAvatar::BinaryCollisionAvatar ( G4double  time,
G4double  crossSection,
G4INCL::Nucleus n,
G4INCL::Particle p1,
G4INCL::Particle p2 
)

Definition at line 68 of file G4INCLBinaryCollisionAvatar.cc.

70 : InteractionAvatar(time, n, p1, p2), theCrossSection(crossSection)
71 {
73 }
void setType(AvatarType t)
InteractionAvatar(G4double, G4INCL::Nucleus *, G4INCL::Particle *)
@ CollisionAvatarType

◆ ~BinaryCollisionAvatar()

G4INCL::BinaryCollisionAvatar::~BinaryCollisionAvatar ( )
virtual

Definition at line 75 of file G4INCLBinaryCollisionAvatar.cc.

75 {
76 }

Member Function Documentation

◆ dump()

std::string G4INCL::BinaryCollisionAvatar::dump ( ) const
virtual

Implements G4INCL::IAvatar.

Definition at line 211 of file G4INCLBinaryCollisionAvatar.cc.

211 {
212 std::stringstream ss;
213 ss << "(avatar " << theTime <<" 'nn-collision" << std::endl
214 << "(list " << std::endl
215 << particle1->dump()
216 << particle2->dump()
217 << "))" << std::endl;
218 return ss.str();
219 }
std::string dump() const

◆ getChannel()

G4INCL::IChannel * G4INCL::BinaryCollisionAvatar::getChannel ( ) const
virtual

Check again the distance of approach. In order for the avatar to be realised, we have to perform a check in the CM system. We define a distance four-vector as

\[ (0, \Delta\vec{x}), \]

where $\Delta\vec{x}$ is the distance vector of the particles at their minimum distance of approach (i.e. at the avatar time). By boosting this four-vector to the CM frame of the two particles and we obtain a new four vector

\[ (\Delta t', \Delta\vec{x}'), \]

with a non-zero time component (the collision happens simultaneously for the two particles in the lab system, but not in the CM system). In order for the avatar to be realised, we require that

\[ |\Delta\vec{x}'| \leq \sqrt{\sigma/\pi}.\]

Note that $|\Delta\vec{x}'|\leq|\Delta\vec{x}|$; thus, the condition above is more restrictive than the check that we perform in G4INCL::Propagation::StandardPropagationModel::generateBinaryCollisionAvatar. In other words, the avatar generation cannot miss any physical collision avatars.

Implements G4INCL::InteractionAvatar.

Definition at line 78 of file G4INCLBinaryCollisionAvatar.cc.

78 {
79 // We already check cutNN at avatar creation time, but we have to check it
80 // again here. For composite projectiles, we might have created independent
81 // avatars with no cutNN before any collision took place.
86 // Below a certain cut value we don't do anything:
87 if(energyCM2 < cutNNSquared) {
88 DEBUG("CM energy = sqrt(" << energyCM2 << ") MeV < sqrt(" << cutNNSquared
89 << ") MeV = cutNN" << "; returning a NULL channel" << std::endl);
91 return NULL;
92 }
93 }
94
95 /** Check again the distance of approach. In order for the avatar to be
96 * realised, we have to perform a check in the CM system. We define a
97 * distance four-vector as
98 * \f[ (0, \Delta\vec{x}), \f]
99 * where \f$\Delta\vec{x}\f$ is the distance vector of the particles at
100 * their minimum distance of approach (i.e. at the avatar time). By
101 * boosting this four-vector to the CM frame of the two particles and we
102 * obtain a new four vector
103 * \f[ (\Delta t', \Delta\vec{x}'), \f]
104 * with a non-zero time component (the collision happens simultaneously for
105 * the two particles in the lab system, but not in the CM system). In order
106 * for the avatar to be realised, we require that
107 * \f[ |\Delta\vec{x}'| \leq \sqrt{\sigma/\pi}.\f]
108 * Note that \f$|\Delta\vec{x}'|\leq|\Delta\vec{x}|\f$; thus, the condition
109 * above is more restrictive than the check that we perform in
110 * G4INCL::Propagation::StandardPropagationModel::generateBinaryCollisionAvatar.
111 * In other words, the avatar generation cannot miss any physical collision
112 * avatars.
113 */
114 ThreeVector minimumDistance = particle1->getPosition();
115 minimumDistance -= particle2->getPosition();
116 const G4double betaDotX = boostVector.dot(minimumDistance);
117 const G4double minDist = Math::tenPi*(minimumDistance.mag2() + betaDotX*betaDotX / (1.-boostVector.mag2()));
118 if(minDist > theCrossSection) {
119 DEBUG("CM distance of approach is too small: " << minDist << ">" <<
120 theCrossSection <<"; returning a NULL channel" << std::endl);
122 return NULL;
123 }
124
125 if(particle1->isNucleon() && particle2->isNucleon()) { // NN->NN
127 particle2);
129 particle2);
130
131 G4bool isElastic = true;
132 if(elasticCX/(elasticCX + deltaProductionCX) < Random::shoot()) {
133 // NN -> N Delta channel is chosen
134 isElastic = false;
135 }
136
137 if(isElastic) { // Elastic NN channel
138 DEBUG("NN interaction: elastic channel chosen" << std::endl);
139 return new ElasticChannel(theNucleus, particle1, particle2);
140 } else { // Delta production
141 // Inelastic NN channel
142 DEBUG("NN interaction: inelastic channel chosen" << std::endl);
143 return new DeltaProductionChannel(particle1, particle2, theNucleus);
144 }
145 } else if((particle1->isNucleon() && particle2->isDelta()) ||
148 particle2);
150 particle2);
151
152 G4bool isElastic = true;
153 if(elasticCX/(elasticCX + recombinationCX) < Random::shoot()) {
154 // N Delta -> NN channel is chosen
155 isElastic = false;
156 }
157
158 if(isElastic) { // Elastic N Delta channel
159 DEBUG("NDelta interaction: elastic channel chosen" << std::endl);
160 return new ElasticChannel(theNucleus, particle1, particle2);
161 } else { // Recombination
162 DEBUG("NDelta interaction: recombination channel chosen" << std::endl);
163 return new RecombinationChannel(theNucleus, particle1, particle2);
164 }
165 } else if(particle1->isDelta() && particle2->isDelta()) {
166 DEBUG("DeltaDelta interaction: elastic channel chosen" << std::endl);
167 return new ElasticChannel(theNucleus, particle1, particle2);
168 } else if((particle1->isNucleon() && particle2->isPion()) ||
169 (particle1->isPion() && particle2->isNucleon())) {
170 return new PionNucleonChannel(particle1, particle2, theNucleus, shouldUseLocalEnergy());
171 } else {
172 DEBUG("BinaryCollisionAvatar can only handle nucleons (for the moment)."
173 << std::endl
174 << particle1->print()
175 << std::endl
176 << particle2->print()
177 << std::endl);
179 return NULL;
180 }
181 }
#define DEBUG(x)
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67
G4int getAcceptedCollisions() const
Definition: G4INCLBook.hh:85
static G4double elastic(Particle const *const p1, Particle const *const p2)
static G4double deltaProduction(Particle const *const p1, Particle const *const p2)
static G4double recombination(Particle const *const p1, Particle const *const p2)
void restoreParticles() const
Restore the state of both particles.
G4bool shouldUseLocalEnergy() const
true if the given avatar should use local energy
static G4double squareTotalEnergyInCM(Particle const *const p1, Particle const *const p2)
Store * getStore() const
const G4INCL::ThreeVector & getPosition() const
G4bool isPion() const
Is this a pion?
std::string print() const
G4bool isDelta() const
Is it a Delta?
G4bool isNucleon() const
static G4double shoot()
Definition: G4INCLRandom.hh:99
Book * getBook()
Definition: G4INCLStore.hh:243
G4double dot(const ThreeVector &v) const
G4double mag2() const
const G4double tenPi

◆ getParticles()

ParticleList G4INCL::BinaryCollisionAvatar::getParticles ( ) const
inlinevirtual

Implements G4INCL::IAvatar.

Definition at line 61 of file G4INCLBinaryCollisionAvatar.hh.

61 {
62 ParticleList theParticleList;
63 theParticleList.push_back(particle1);
64 theParticleList.push_back(particle2);
65 return theParticleList;
66 };
std::list< G4INCL::Particle * > ParticleList

◆ postInteraction()

FinalState * G4INCL::BinaryCollisionAvatar::postInteraction ( FinalState fs)
virtual

Implements G4INCL::IAvatar.

Definition at line 187 of file G4INCLBinaryCollisionAvatar.cc.

187 {
188 // Call the postInteraction method of the parent class
189 // (provides Pauli blocking and enforces energy conservation)
191
192 switch(fs->getValidity()) {
193 case PauliBlockedFS:
195 break;
199 break;
200 case ValidFS:
206 }
207 }
208 return fs;
209 }
void incrementAcceptedCollisions()
Definition: G4INCLBook.hh:68
void incrementBlockedCollisions()
Definition: G4INCLBook.hh:69
void setFirstCollisionTime(G4double t)
Definition: G4INCLBook.hh:76
G4double getCurrentTime()
Definition: G4INCLBook.hh:83
void setFirstCollisionXSec(G4double x)
Definition: G4INCLBook.hh:79
FinalState * postInteraction(FinalState *)
@ ParticleBelowZeroFS
@ NoEnergyConservationFS
@ ParticleBelowFermiFS

◆ preInteraction()

void G4INCL::BinaryCollisionAvatar::preInteraction ( )
virtual

Member Data Documentation

◆ cutNN

const G4double G4INCL::BinaryCollisionAvatar::cutNN = 1910
static

Definition at line 73 of file G4INCLBinaryCollisionAvatar.hh.

◆ cutNNSquared

const G4double G4INCL::BinaryCollisionAvatar::cutNNSquared = cutNN*cutNN
static

The documentation for this class was generated from the following files: