34 #define INCLXX_IN_GEANT4_MODE 1
75 isParticle1Spectator(false),
76 isParticle2Spectator(false),
96 <<
") MeV = cutNN" <<
"; returning a NULL channel" <<
'\n');
126 INCL_DEBUG(
"CM distance of approach is too small: " << minDist <<
">" <<
144 if(elasticCX > rChannel) {
147 INCL_DEBUG(
"NN interaction: elastic channel chosen" <<
'\n');
149 }
else if((elasticCX + deltaProductionCX) > rChannel) {
152 INCL_DEBUG(
"NN interaction: Delta channel chosen" <<
'\n');
154 }
else if(elasticCX + deltaProductionCX + onePiProductionCX > rChannel) {
157 INCL_DEBUG(
"NN interaction: one Pion channel chosen" <<
'\n');
159 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX > rChannel) {
162 INCL_DEBUG(
"NN interaction: two Pions channel chosen" <<
'\n');
164 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX > rChannel) {
167 INCL_DEBUG(
"NN interaction: three Pions channel chosen" <<
'\n');
169 }
else if (elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX > rChannel) {
172 INCL_DEBUG(
"NN interaction: four Pions channel chosen" <<
'\n');
175 INCL_WARN(
"inconsistency with NN Cross Sections: returning an elastic channel" <<
'\n');
186 if(elasticCX/(elasticCX + recombinationCX) <
Random::shoot()) {
193 INCL_DEBUG(
"NDelta interaction: elastic channel chosen" <<
'\n');
197 INCL_DEBUG(
"NDelta interaction: recombination channel chosen" <<
'\n');
204 INCL_DEBUG(
"DeltaDelta interaction: elastic channel chosen" <<
'\n');
219 if(elasticCX > rChannel) {
222 INCL_DEBUG(
"PiN interaction: elastic channel chosen" <<
'\n');
224 }
else if(elasticCX + deltaProductionCX > rChannel) {
227 INCL_DEBUG(
"PiN interaction: Delta channel chosen" <<
'\n');
229 }
else if(elasticCX + deltaProductionCX + onePiProductionCX > rChannel) {
232 INCL_DEBUG(
"PiN interaction: one Pion channel chosen" <<
'\n');
234 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX > rChannel) {
237 INCL_DEBUG(
"PiN interaction: two Pions channel chosen" <<
'\n');
239 }
else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX > rChannel) {
242 INCL_DEBUG(
"PiN interaction: three Pions channel chosen" <<
'\n');
245 INCL_WARN(
"inconsistency with PiN Cross Sections: returning an elastic channel" <<
'\n');
250 INCL_DEBUG(
"BinaryCollisionAvatar can only handle nucleons (for the moment)."
292 INCL_ERROR(
"First collision must be within a target spectator and a non-target spectator");
310 std::stringstream ss;
311 ss <<
"(avatar " <<
theTime <<
" 'nn-collision" <<
'\n'
FinalStateValidity getValidity() const
void incrementBlockedCollisions()
G4double dot(const ThreeVector &v) const
Dot product.
Channel generates a final state of an avatar.
G4int getAcceptedCollisions() const
G4double squareTotalEnergyInCM(Particle const *const p1, Particle const *const p2)
void postInteraction(FinalState *)
G4bool isTargetSpectator() const
const G4INCL::ThreeVector & getMomentum() const
Get the momentum vector.
G4bool isDelta() const
Is it a Delta?
std::string print() const
G4double NDeltaToNN(Particle const *const p1, Particle const *const p2)
virtual void postInteraction(FinalState *)
G4double mag2() const
Get the square of the length.
static G4ThreadLocal Particle * backupParticle2
G4bool isParticle2Spectator
void incrementAcceptedCollisions()
Final state of an interaction.
void setType(AvatarType t)
Book & getBook()
Return the pointer to the Book object which keeps track of various counters.
void setFirstCollisionXSec(const G4double x)
static G4ThreadLocal Particle * backupParticle1
G4double NNToNDelta(Particle const *const p1, Particle const *const p2)
void setFirstCollisionTime(const G4double t)
static G4ThreadLocal G4double cutNNSquared
static G4ThreadLocal G4double cutNN
Delta-nucleon recombination channel.
G4double total(Particle const *const p1, Particle const *const p2)
G4INCL::IChannel * getChannel()
const G4INCL::ThreeVector & getPosition() const
Set the position vector.
virtual void preInteraction()
G4double piNToDelta(Particle const *const p1, Particle const *const p2)
G4bool isNucleon() const
Is this a nucleon?
G4double shoot()
Generate flat distribution of random numbers.
virtual ~BinaryCollisionAvatar()
G4bool isParticle1Spectator
G4double piNToxPiN(const G4int xpi, Particle const *const p1, Particle const *const p2)
void restoreParticles() const
Restore the state of both particles.
G4double mag() const
Get the length of the vector.
BinaryCollisionAvatar(G4double, G4double, G4INCL::Nucleus *, G4INCL::Particle *, G4INCL::Particle *)
G4double getCurrentTime() const
void setFirstCollisionIsElastic(const G4bool e)
G4double NNToxPiNN(const G4int xpi, Particle const *const p1, Particle const *const p2)
void setFirstCollisionSpectatorMomentum(const G4double x)
G4double elastic(Particle const *const p1, Particle const *const p2)
void setFirstCollisionSpectatorPosition(const G4double x)