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

#include <G4INCLParticle.hh>

+ Inheritance diagram for G4INCL::Particle:

Public Member Functions

 Particle ()
 
 Particle (ParticleType t, G4double energy, ThreeVector const &momentum, ThreeVector const &position)
 
 Particle (ParticleType t, ThreeVector const &momentum, ThreeVector const &position)
 
virtual ~Particle ()
 
 Particle (const Particle &rhs)
 Copy constructor.
 
Particleoperator= (const Particle &rhs)
 Assignment operator.
 
G4INCL::ParticleType getType () const
 
virtual G4INCL::ParticleSpecies getSpecies () const
 Get the particle species.
 
void setType (ParticleType t)
 
G4bool isNucleon () const
 
ParticipantType getParticipantType () const
 
void setParticipantType (ParticipantType const p)
 
G4bool isParticipant () const
 
G4bool isTargetSpectator () const
 
G4bool isProjectileSpectator () const
 
virtual void makeParticipant ()
 
virtual void makeTargetSpectator ()
 
virtual void makeProjectileSpectator ()
 
G4bool isPion () const
 Is this a pion?
 
G4bool isEta () const
 Is this an eta?
 
G4bool isOmega () const
 Is this an omega?
 
G4bool isEtaPrime () const
 Is this an etaprime?
 
G4bool isPhoton () const
 Is this a photon?
 
G4bool isResonance () const
 Is it a resonance?
 
G4bool isDelta () const
 Is it a Delta?
 
G4bool isSigma () const
 Is this a Sigma?
 
G4bool isKaon () const
 Is this a Kaon?
 
G4bool isAntiKaon () const
 Is this an antiKaon?
 
G4bool isLambda () const
 Is this a Lambda?
 
G4bool isNucleonorLambda () const
 Is this a Nucleon or a Lambda?
 
G4bool isHyperon () const
 Is this an Hyperon?
 
G4bool isMeson () const
 Is this a Meson?
 
G4bool isBaryon () const
 Is this a Baryon?
 
G4bool isStrange () const
 Is this a Strange?
 
G4bool isXi () const
 Is this a Xi?
 
G4bool isAntiNucleon () const
 Is this an antinucleon?
 
G4bool isAntiSigma () const
 Is this an antiSigma?
 
G4bool isAntiXi () const
 Is this an antiXi?
 
G4bool isAntiLambda () const
 Is this an antiLambda?
 
G4bool isAntiHyperon () const
 Is this an antiHyperon?
 
G4bool isAntiBaryon () const
 Is this an antiBaryon?
 
G4bool isAntiNucleonorAntiLambda () const
 Is this an antiNucleon or an antiLambda?
 
G4int getA () const
 Returns the baryon number.
 
G4int getZ () const
 Returns the charge number.
 
G4int getS () const
 Returns the strangeness number.
 
G4double getBeta () const
 
ThreeVector boostVector () const
 
void boost (const ThreeVector &aBoostVector)
 
void lorentzContract (const ThreeVector &aBoostVector, const ThreeVector &refPos)
 Lorentz-contract the particle position around some center.
 
G4double getMass () const
 Get the cached particle mass.
 
G4double getINCLMass () const
 Get the INCL particle mass.
 
virtual G4double getTableMass () const
 Get the tabulated particle mass.
 
G4double getRealMass () const
 Get the real particle mass.
 
void setRealMass ()
 Set the mass of the Particle to its real mass.
 
void setTableMass ()
 Set the mass of the Particle to its table mass.
 
void setINCLMass ()
 Set the mass of the Particle to its table mass.
 
G4double getEmissionQValueCorrection (const G4int AParent, const G4int ZParent) const
 Computes correction on the emission Q-value.
 
G4double getEmissionPbarQvalueCorrection (const G4int AParent, const G4int ZParent, const G4bool Victim) const
 
G4double getTransferQValueCorrection (const G4int AFrom, const G4int ZFrom, const G4int ATo, const G4int ZTo) const
 Computes correction on the transfer Q-value.
 
G4double getEmissionQValueCorrection (const G4int AParent, const G4int ZParent, const G4int SParent) const
 Computes correction on the emission Q-value for hypernuclei.
 
G4double getTransferQValueCorrection (const G4int AFrom, const G4int ZFrom, const G4int SFrom, const G4int ATo, const G4int ZTo, const G4int STo) const
 Computes correction on the transfer Q-value for hypernuclei.
 
G4double getInvariantMass () const
 Get the the particle invariant mass.
 
G4double getKineticEnergy () const
 Get the particle kinetic energy.
 
G4double getPotentialEnergy () const
 Get the particle potential energy.
 
void setPotentialEnergy (G4double v)
 Set the particle potential energy.
 
G4double getEnergy () const
 
void setMass (G4double mass)
 
void setEnergy (G4double energy)
 
const G4INCL::ThreeVectorgetMomentum () const
 
virtual G4INCL::ThreeVector getAngularMomentum () const
 
virtual void setMomentum (const G4INCL::ThreeVector &momentum)
 
const G4INCL::ThreeVectorgetPosition () const
 
virtual void setPosition (const G4INCL::ThreeVector &position)
 
G4double getHelicity ()
 
void setHelicity (G4double h)
 
void propagate (G4double step)
 
G4int getNumberOfCollisions () const
 Return the number of collisions undergone by the particle.
 
void setNumberOfCollisions (G4int n)
 Set the number of collisions undergone by the particle.
 
void incrementNumberOfCollisions ()
 Increment the number of collisions undergone by the particle.
 
G4int getNumberOfDecays () const
 Return the number of decays undergone by the particle.
 
void setNumberOfDecays (G4int n)
 Set the number of decays undergone by the particle.
 
void incrementNumberOfDecays ()
 Increment the number of decays undergone by the particle.
 
void setOutOfWell ()
 Mark the particle as out of its potential well.
 
G4bool isOutOfWell () const
 Check if the particle is out of its potential well.
 
void setEmissionTime (G4double t)
 
G4double getEmissionTime ()
 
ThreeVector getTransversePosition () const
 Transverse component of the position w.r.t. the momentum.
 
ThreeVector getLongitudinalPosition () const
 Longitudinal component of the position w.r.t. the momentum.
 
const ThreeVectoradjustMomentumFromEnergy ()
 Rescale the momentum to match the total energy.
 
G4double adjustEnergyFromMomentum ()
 Recompute the energy to match the momentum.
 
G4bool isCluster () const
 
void setFrozenMomentum (const ThreeVector &momentum)
 Set the frozen particle momentum.
 
void setFrozenEnergy (const G4double energy)
 Set the frozen particle momentum.
 
ThreeVector getFrozenMomentum () const
 Get the frozen particle momentum.
 
G4double getFrozenEnergy () const
 Get the frozen particle momentum.
 
ThreeVector getPropagationVelocity () const
 Get the propagation velocity of the particle.
 
void freezePropagation ()
 Freeze particle propagation.
 
void thawPropagation ()
 Unfreeze particle propagation.
 
virtual void rotatePositionAndMomentum (const G4double angle, const ThreeVector &axis)
 Rotate the particle position and momentum.
 
virtual void rotatePosition (const G4double angle, const ThreeVector &axis)
 Rotate the particle position.
 
virtual void rotateMomentum (const G4double angle, const ThreeVector &axis)
 Rotate the particle momentum.
 
std::string print () const
 
std::string dump () const
 
long getID () const
 
ParticleList const * getParticles () const
 
G4double getReflectionMomentum () const
 Return the reflection momentum.
 
void setUncorrelatedMomentum (const G4double p)
 Set the uncorrelated momentum.
 
void rpCorrelate ()
 Make the particle follow a strict r-p correlation.
 
void rpDecorrelate ()
 Make the particle not follow a strict r-p correlation.
 
G4double getCosRPAngle () const
 Get the cosine of the angle between position and momentum.
 
G4double getParticleBias () const
 Get the particle bias.
 
void setParticleBias (G4double ParticleBias)
 Set the particle bias.
 
std::vector< G4intgetBiasCollisionVector () const
 Get the vector list of biased vertices on the particle path.
 
void setBiasCollisionVector (std::vector< G4int > BiasCollisionVector)
 Set the vector list of biased vertices on the particle path.
 
G4int getNumberOfKaon () const
 Number of Kaon inside de nucleus.
 
void setNumberOfKaon (const G4int NK)
 
G4int getParentResonancePDGCode () const
 
void setParentResonancePDGCode (const G4int parentPDGCode)
 
G4int getParentResonanceID () const
 
void setParentResonanceID (const G4int parentID)
 

Static Public Member Functions

static G4double getTotalBias ()
 General bias vector function.
 
static void setINCLBiasVector (std::vector< G4double > NewVector)
 
static void FillINCLBiasVector (G4double newBias)
 
static G4double getBiasFromVector (std::vector< G4int > VectorBias)
 
static std::vector< G4intMergeVectorBias (Particle const *const p1, Particle const *const p2)
 
static std::vector< G4intMergeVectorBias (std::vector< G4int > p1, Particle const *const p2)
 

Static Public Attributes

static std::vector< G4doubleINCLBiasVector
 Time ordered vector of all bias applied.
 
static G4ThreadLocal G4int nextBiasedCollisionID = 0
 

Protected Member Functions

void swap (Particle &rhs)
 Helper method for the assignment operator.
 

Protected Attributes

G4int theZ
 
G4int theA
 
G4int theS
 
ParticipantType theParticipantType
 
G4INCL::ParticleType theType
 
G4double theEnergy
 
G4doublethePropagationEnergy
 
G4double theFrozenEnergy
 
G4INCL::ThreeVector theMomentum
 
G4INCL::ThreeVectorthePropagationMomentum
 
G4INCL::ThreeVector theFrozenMomentum
 
G4INCL::ThreeVector thePosition
 
G4int nCollisions
 
G4int nDecays
 
G4double thePotentialEnergy
 
long ID
 
G4bool rpCorrelated
 
G4double uncorrelatedMomentum
 
G4double theParticleBias
 
G4int theNKaon
 The number of Kaons inside the nucleus (update during the cascade)
 
G4int theParentResonancePDGCode
 
G4int theParentResonanceID
 

Detailed Description

Definition at line 75 of file G4INCLParticle.hh.

Constructor & Destructor Documentation

◆ Particle() [1/4]

G4INCL::Particle::Particle ( )

Definition at line 59 of file G4INCLParticle.cc.

60 : theZ(0), theA(0), theS(0),
63 theEnergy(0.0),
66 theMomentum(ThreeVector(0.,0.,0.)),
69 thePosition(ThreeVector(0.,0.,0.)),
70 nCollisions(0),
71 nDecays(0),
73 rpCorrelated(false),
76 theNKaon(0),
77#ifdef INCLXX_IN_GEANT4_MODE
80#endif
81 theHelicity(0.0),
82 emissionTime(0.0),
83 outOfWell(false),
84 theMass(0.)
85 {
86 ID = nextID;
87 nextID++;
88 }
G4INCL::ThreeVector * thePropagationMomentum
G4INCL::ThreeVector theMomentum
ParticipantType theParticipantType
G4INCL::ParticleType theType
G4int theNKaon
The number of Kaons inside the nucleus (update during the cascade)
G4double uncorrelatedMomentum
G4double * thePropagationEnergy
G4INCL::ThreeVector thePosition
G4INCL::ThreeVector theFrozenMomentum

Referenced by G4INCL::ProjectileRemnant::reset(), and G4INCL::ProjectileRemnant::storeComponents().

◆ Particle() [2/4]

G4INCL::Particle::Particle ( ParticleType t,
G4double energy,
ThreeVector const & momentum,
ThreeVector const & position )

Definition at line 90 of file G4INCLParticle.cc.

92 : theEnergy(energy),
95 theMomentum(momentum),
99 nCollisions(0), nDecays(0),
101 rpCorrelated(false),
103 theParticleBias(1.),
104 theNKaon(0),
105#ifdef INCLXX_IN_GEANT4_MODE
108#endif
109 theHelicity(0.0),
110 emissionTime(0.0), outOfWell(false)
111 {
113 ID = nextID;
114 nextID++;
115 if(theEnergy <= 0.0) {
116 INCL_WARN("Particle with energy " << theEnergy << " created." << '\n');
117 }
118 setType(t);
120 }
#define INCL_WARN(x)
void setMass(G4double mass)
G4double getInvariantMass() const
Get the the particle invariant mass.
void setType(ParticleType t)

◆ Particle() [3/4]

G4INCL::Particle::Particle ( ParticleType t,
ThreeVector const & momentum,
ThreeVector const & position )

Definition at line 122 of file G4INCLParticle.cc.

125 theMomentum(momentum),
129 nCollisions(0), nDecays(0),
131 rpCorrelated(false),
133 theParticleBias(1.),
134 theNKaon(0),
135#ifdef INCLXX_IN_GEANT4_MODE
138#endif
139 theHelicity(0.0),
140 emissionTime(0.0), outOfWell(false)
141 {
143 ID = nextID;
144 nextID++;
145 setType(t);
146 if( isResonance() ) {
147 INCL_ERROR("Cannot create resonance without specifying its momentum four-vector." << '\n');
148 }
149 G4double energy = std::sqrt(theMomentum.mag2() + theMass*theMass);
152 }
#define INCL_ERROR(x)
double G4double
Definition G4Types.hh:83
G4bool isResonance() const
Is it a resonance?
G4double mag2() const
G4double energy(const ThreeVector &p, const G4double m)

◆ ~Particle()

virtual G4INCL::Particle::~Particle ( )
inlinevirtual

Definition at line 80 of file G4INCLParticle.hh.

80{}

◆ Particle() [4/4]

G4INCL::Particle::Particle ( const Particle & rhs)
inline

Copy constructor.

Does not copy the particle ID.

Definition at line 86 of file G4INCLParticle.hh.

86 :
87 theZ(rhs.theZ),
88 theA(rhs.theA),
89 theS(rhs.theS),
90 theParticipantType(rhs.theParticipantType),
91 theType(rhs.theType),
92 theEnergy(rhs.theEnergy),
93 theFrozenEnergy(rhs.theFrozenEnergy),
94 theMomentum(rhs.theMomentum),
95 theFrozenMomentum(rhs.theFrozenMomentum),
96 thePosition(rhs.thePosition),
97 nCollisions(rhs.nCollisions),
98 nDecays(rhs.nDecays),
99 thePotentialEnergy(rhs.thePotentialEnergy),
100 rpCorrelated(rhs.rpCorrelated),
101 uncorrelatedMomentum(rhs.uncorrelatedMomentum),
102 theParticleBias(rhs.theParticleBias),
103 theNKaon(rhs.theNKaon),
104#ifdef INCLXX_IN_GEANT4_MODE
105 theParentResonancePDGCode(rhs.theParentResonancePDGCode),
106 theParentResonanceID(rhs.theParentResonanceID),
107#endif
108 theHelicity(rhs.theHelicity),
109 emissionTime(rhs.emissionTime),
110 outOfWell(rhs.outOfWell),
111 theMass(rhs.theMass)
112 {
113 if(rhs.thePropagationEnergy == &(rhs.theFrozenEnergy))
115 else
117 if(rhs.thePropagationMomentum == &(rhs.theFrozenMomentum))
119 else
121 // ID intentionally not copied
122 ID = nextID++;
123
124 theBiasCollisionVector = rhs.theBiasCollisionVector;
125 }

Member Function Documentation

◆ adjustEnergyFromMomentum()

◆ adjustMomentumFromEnergy()

◆ boost()

void G4INCL::Particle::boost ( const ThreeVector & aBoostVector)
inline

Boost the particle using a boost vector.

Example (go to the particle rest frame): particle->boost(particle->boostVector());

Definition at line 505 of file G4INCLParticle.hh.

505 {
506 const G4double beta2 = aBoostVector.mag2();
507 const G4double gamma = 1.0 / std::sqrt(1.0 - beta2);
508 const G4double bp = theMomentum.dot(aBoostVector);
509 const G4double alpha = (gamma*gamma)/(1.0 + gamma);
510
511 theMomentum = theMomentum + aBoostVector * (alpha * bp - gamma * theEnergy);
512 theEnergy = gamma * (theEnergy - bp);
513 }
G4double dot(const ThreeVector &v) const

Referenced by G4INCL::Cluster::boost(), G4INCL::Nucleus::decayOutgoingPionResonances(), G4INCL::Nucleus::decayOutgoingSigmaZero(), G4INCL::PhaseSpaceKopylov::generate(), and G4INCL::InteractionAvatar::preInteraction().

◆ boostVector()

ThreeVector G4INCL::Particle::boostVector ( ) const
inline

Returns a three vector we can give to the boost() -method.

In order to go to the particle rest frame you need to multiply the boost vector by -1.0.

Definition at line 495 of file G4INCLParticle.hh.

495 {
496 return theMomentum / theEnergy;
497 }

Referenced by G4INCL::PhaseSpaceKopylov::generate(), G4INCL::StandardPropagationModel::shootComposite(), and G4INCL::StandardPropagationModel::shootParticle().

◆ dump()

std::string G4INCL::Particle::dump ( ) const
inline

Definition at line 1108 of file G4INCLParticle.hh.

1108 {
1109 std::stringstream ss;
1110 ss << "(particle " << ID << " ";
1112 ss << '\n'
1113 << thePosition.dump()
1114 << '\n'
1115 << theMomentum.dump()
1116 << '\n'
1117 << theEnergy << ")" << '\n';
1118 return ss.str();
1119 };
std::string dump() const
std::string getName(const ParticleType t)
Get the native INCL name of the particle.

Referenced by G4INCL::BinaryCollisionAvatar::dump(), G4INCL::DecayAvatar::dump(), G4INCL::ParticleEntryAvatar::dump(), and G4INCL::SurfaceAvatar::dump().

◆ FillINCLBiasVector()

void G4INCL::Particle::FillINCLBiasVector ( G4double newBias)
static

Definition at line 214 of file G4INCLParticle.cc.

214 {
215// assert(G4int(Particle::INCLBiasVector.size())==nextBiasedCollisionID);
216 //assert(G4int(Particle::INCLBiasVector.Size())==nextBiasedCollisionID);
217// assert(std::fabs(newBias - 1.) > 1E-6);
218 Particle::INCLBiasVector.push_back(newBias);
219 //Particle::INCLBiasVector.Push_back(newBias);
221 }
static std::vector< G4double > INCLBiasVector
Time ordered vector of all bias applied.
static G4ThreadLocal G4int nextBiasedCollisionID

Referenced by G4INCL::InteractionAvatar::postInteraction().

◆ freezePropagation()

void G4INCL::Particle::freezePropagation ( )
inline

Freeze particle propagation.

Make the particle use theFrozenMomentum and theFrozenEnergy for propagation. The normal state can be restored by calling the thawPropagation() method.

Definition at line 1048 of file G4INCLParticle.hh.

◆ getA()

◆ getAngularMomentum()

virtual G4INCL::ThreeVector G4INCL::Particle::getAngularMomentum ( ) const
inlinevirtual

Get the angular momentum w.r.t. the origin

Reimplemented in G4INCL::Cluster.

Definition at line 940 of file G4INCLParticle.hh.

941 {
943 };
ThreeVector vector(const ThreeVector &v) const

Referenced by G4INCL::Cluster::getAngularMomentum(), and G4INCL::StandardPropagationModel::shootParticle().

◆ getBeta()

G4double G4INCL::Particle::getBeta ( ) const
inline

Definition at line 484 of file G4INCLParticle.hh.

484 {
485 const G4double P = theMomentum.mag();
486 return P/theEnergy;
487 }

◆ getBiasCollisionVector()

std::vector< G4int > G4INCL::Particle::getBiasCollisionVector ( ) const
inline

Get the vector list of biased vertices on the particle path.

Definition at line 1178 of file G4INCLParticle.hh.

1178{ return theBiasCollisionVector; }

Referenced by G4INCL::ClusterDecay::decay(), G4INCL::Nucleus::decayMe(), G4INCL::Nucleus::decayOutgoingClusters(), G4INCL::Nucleus::decayOutgoingPionResonances(), G4INCL::Nucleus::decayOutgoingSigmaZero(), MergeVectorBias(), and MergeVectorBias().

◆ getBiasFromVector()

G4double G4INCL::Particle::getBiasFromVector ( std::vector< G4int > VectorBias)
static

Definition at line 223 of file G4INCLParticle.cc.

223 {
224 if(VectorBias.empty()) return 1.;
225
226 G4double ParticleBias = 1.;
227
228 for(G4int i=0; i<G4int(VectorBias.size()); i++){
229 ParticleBias *= Particle::INCLBiasVector[G4int(VectorBias[i])];
230 }
231
232 return ParticleBias;
233 }
int G4int
Definition G4Types.hh:85

Referenced by G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::ParticleList::getParticleListBias(), and setBiasCollisionVector().

◆ getCosRPAngle()

G4double G4INCL::Particle::getCosRPAngle ( ) const
inline

Get the cosine of the angle between position and momentum.

Definition at line 1154 of file G4INCLParticle.hh.

1154 {
1156 if(norm>0.)
1157 return thePosition.dot(*thePropagationMomentum) / std::sqrt(norm);
1158 else
1159 return 1.;
1160 }

◆ getEmissionPbarQvalueCorrection()

G4double G4INCL::Particle::getEmissionPbarQvalueCorrection ( const G4int AParent,
const G4int ZParent,
const G4bool Victim ) const
inline

Definition at line 740 of file G4INCLParticle.hh.

740 {
741 G4int SParent = 0;
742 G4int SDaughter = 0;
743 G4int ADaughter = AParent - 1;
744 G4int ZDaughter;
745 G4bool isProton = Victim;
746 if(isProton){ //proton is annihilated
747 ZDaughter = ZParent - 1;
748 }
749 else { //neutron is annihilated
750 ZDaughter = ZParent;
751 }
752
753 G4double theQValue; //same procedure as for normal case
754
755 const G4double massTableParent = ParticleTable::getTableMass(AParent,ZParent,SParent);
756 const G4double massTableDaughter = ParticleTable::getTableMass(ADaughter,ZDaughter,SDaughter);
757 const G4double massTableParticle = getTableMass();
758 theQValue = massTableParent - massTableDaughter - massTableParticle;
759
760 const G4double massINCLParent = ParticleTable::getINCLMass(AParent,ZParent,SParent);
761 const G4double massINCLDaughter = ParticleTable::getINCLMass(ADaughter,ZDaughter,SDaughter);
762 const G4double massINCLParticle = getINCLMass();
763
764 return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
765 }
bool G4bool
Definition G4Types.hh:86
G4double getINCLMass() const
Get the INCL particle mass.
virtual G4double getTableMass() const
Get the tabulated particle mass.
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4double getINCLMass(const G4int A, const G4int Z, const G4int S)
Get INCL nuclear mass (in MeV/c^2)

Referenced by G4INCL::PbarAtrestEntryChannel::makeMesonStar().

◆ getEmissionQValueCorrection() [1/2]

G4double G4INCL::Particle::getEmissionQValueCorrection ( const G4int AParent,
const G4int ZParent ) const
inline

Computes correction on the emission Q-value.

Computes the correction that must be applied to INCL particles in order to obtain the correct Q-value for particle emission from a given nucleus. For absorption, the correction is obviously equal to minus the value returned by this function.

Parameters
AParentthe mass number of the emitting nucleus
ZParentthe charge number of the emitting nucleus
Returns
the correction

Definition at line 715 of file G4INCLParticle.hh.

715 {
716 const G4int SParent = 0;
717 const G4int ADaughter = AParent - theA;
718 const G4int ZDaughter = ZParent - theZ;
719 const G4int SDaughter = 0;
720
721 // Note the minus sign here
722 G4double theQValue;
723 if(isCluster())
724 theQValue = -ParticleTable::getTableQValue(theA, theZ, theS, ADaughter, ZDaughter, SDaughter);
725 else {
726 const G4double massTableParent = ParticleTable::getTableMass(AParent,ZParent,SParent);
727 const G4double massTableDaughter = ParticleTable::getTableMass(ADaughter,ZDaughter,SDaughter);
728 const G4double massTableParticle = getTableMass();
729 theQValue = massTableParent - massTableDaughter - massTableParticle;
730 }
731
732 const G4double massINCLParent = ParticleTable::getINCLMass(AParent,ZParent,SParent);
733 const G4double massINCLDaughter = ParticleTable::getINCLMass(ADaughter,ZDaughter,SDaughter);
734 const G4double massINCLParticle = getINCLMass();
735
736 // The rhs corresponds to the INCL Q-value
737 return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
738 }
G4bool isCluster() const
G4double getTableQValue(const G4int A1, const G4int Z1, const G4int S1, const G4int A2, const G4int Z2, const G4int S2)
Get Q-value (in MeV/c^2)

Referenced by G4INCL::Nucleus::emitInsideKaon(), G4INCL::Nucleus::emitInsideLambda(), G4INCL::Nucleus::emitInsidePions(), G4INCL::Nucleus::emitInsideStrangeParticles(), G4INCL::ParticleEntryChannel::fillFinalState(), G4INCL::TransmissionChannel::fillFinalState(), and G4INCL::SurfaceAvatar::getTransmissionProbability().

◆ getEmissionQValueCorrection() [2/2]

G4double G4INCL::Particle::getEmissionQValueCorrection ( const G4int AParent,
const G4int ZParent,
const G4int SParent ) const
inline

Computes correction on the emission Q-value for hypernuclei.

Computes the correction that must be applied to INCL particles in order to obtain the correct Q-value for particle emission from a given nucleus. For absorption, the correction is obviously equal to minus the value returned by this function.

Parameters
AParentthe mass number of the emitting nucleus
ZParentthe charge number of the emitting nucleus
SParentthe strangess number of the emitting nucleus
Returns
the correction

Definition at line 818 of file G4INCLParticle.hh.

818 {
819 const G4int ADaughter = AParent - theA;
820 const G4int ZDaughter = ZParent - theZ;
821 const G4int SDaughter = SParent - theS;
822
823 // Note the minus sign here
824 G4double theQValue;
825 if(isCluster())
826 theQValue = -ParticleTable::getTableQValue(theA, theZ, theS, ADaughter, ZDaughter, SDaughter);
827 else {
828 const G4double massTableParent = ParticleTable::getTableMass(AParent,ZParent,SParent);
829 const G4double massTableDaughter = ParticleTable::getTableMass(ADaughter,ZDaughter,SDaughter);
830 const G4double massTableParticle = getTableMass();
831 theQValue = massTableParent - massTableDaughter - massTableParticle;
832 }
833
834 const G4double massINCLParent = ParticleTable::getINCLMass(AParent,ZParent,SParent);
835 const G4double massINCLDaughter = ParticleTable::getINCLMass(ADaughter,ZDaughter,SDaughter);
836 const G4double massINCLParticle = getINCLMass();
837
838 // The rhs corresponds to the INCL Q-value
839 return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
840 }

◆ getEmissionTime()

G4double G4INCL::Particle::getEmissionTime ( )
inline

Definition at line 1005 of file G4INCLParticle.hh.

1005{ return emissionTime; };

◆ getEnergy()

◆ getFrozenEnergy()

G4double G4INCL::Particle::getFrozenEnergy ( ) const
inline

Get the frozen particle momentum.

Definition at line 1037 of file G4INCLParticle.hh.

1037{ return theFrozenEnergy; }

◆ getFrozenMomentum()

ThreeVector G4INCL::Particle::getFrozenMomentum ( ) const
inline

Get the frozen particle momentum.

Definition at line 1034 of file G4INCLParticle.hh.

1034{ return theFrozenMomentum; }

◆ getHelicity()

G4double G4INCL::Particle::getHelicity ( )
inline

Definition at line 966 of file G4INCLParticle.hh.

966{ return theHelicity; };

◆ getID()

◆ getINCLMass()

G4double G4INCL::Particle::getINCLMass ( ) const
inline

Get the INCL particle mass.

Definition at line 537 of file G4INCLParticle.hh.

537 {
538 switch(theType) {
539 case Proton:
540 case Neutron:
541 case PiPlus:
542 case PiMinus:
543 case PiZero:
544 case Lambda:
545 case SigmaPlus:
546 case SigmaZero:
547 case SigmaMinus:
548 case antiProton:
549 case XiZero:
550 case XiMinus:
551 case antiNeutron:
552 case antiLambda:
553 case antiSigmaPlus:
554 case antiSigmaZero:
555 case antiSigmaMinus:
556 case antiXiZero:
557 case antiXiMinus:
558 case KPlus:
559 case KZero:
560 case KZeroBar:
561 case KShort:
562 case KLong:
563 case KMinus:
564 case Eta:
565 case Omega:
566 case EtaPrime:
567 case Photon:
569 break;
570
571 case DeltaPlusPlus:
572 case DeltaPlus:
573 case DeltaZero:
574 case DeltaMinus:
575 return theMass;
576 break;
577
578 case Composite:
580 break;
581
582 default:
583 INCL_ERROR("Particle::getINCLMass: Unknown particle type." << '\n');
584 return 0.0;
585 break;
586 }
587 }

Referenced by G4INCL::ParticleEntryChannel::fillFinalState(), getEmissionPbarQvalueCorrection(), getEmissionQValueCorrection(), getEmissionQValueCorrection(), and setINCLMass().

◆ getInvariantMass()

G4double G4INCL::Particle::getInvariantMass ( ) const
inline

Get the the particle invariant mass.

Uses the relativistic invariant

\[ m = \sqrt{E^2 - {\vec p}^2}\]

Definition at line 888 of file G4INCLParticle.hh.

888 {
889 const G4double mass = std::pow(theEnergy, 2) - theMomentum.dot(theMomentum);
890 if(mass < 0.0) {
891 INCL_ERROR("E*E - p*p is negative." << '\n');
892 return 0.0;
893 } else {
894 return std::sqrt(mass);
895 }
896 };

Referenced by G4INCL::Nucleus::finalizeProjectileRemnant(), and Particle().

◆ getKineticEnergy()

◆ getLongitudinalPosition()

ThreeVector G4INCL::Particle::getLongitudinalPosition ( ) const
inline

Longitudinal component of the position w.r.t. the momentum.

Definition at line 1013 of file G4INCLParticle.hh.

Referenced by getTransversePosition().

◆ getMass()

G4double G4INCL::Particle::getMass ( ) const
inline

Get the cached particle mass.

Definition at line 534 of file G4INCLParticle.hh.

534{ return theMass; }

Referenced by G4INCL::DeltaDecayChannel::computeDecayTime(), G4INCL::PionResonanceDecayChannel::computeDecayTime(), G4INCL::SigmaZeroDecayChannel::computeDecayTime(), G4INCL::Nucleus::emitInsideKaon(), G4INCL::Nucleus::emitInsideLambda(), G4INCL::Nucleus::emitInsidePions(), G4INCL::Nucleus::emitInsideStrangeParticles(), G4INCL::InteractionAvatar::enforceEnergyConservation(), G4INCL::CrossSectionsMultiPionsAndResonances::etaNToPiN(), G4INCL::DeltaDecayChannel::fillFinalState(), G4INCL::EtaNElasticChannel::fillFinalState(), G4INCL::EtaNToPiNChannel::fillFinalState(), G4INCL::NSToNLChannel::fillFinalState(), G4INCL::NSToNSChannel::fillFinalState(), G4INCL::OmegaNElasticChannel::fillFinalState(), G4INCL::OmegaNToPiNChannel::fillFinalState(), G4INCL::PionResonanceDecayChannel::fillFinalState(), G4INCL::RecombinationChannel::fillFinalState(), G4INCL::SigmaZeroDecayChannel::fillFinalState(), G4INCL::TransmissionChannel::fillFinalState(), G4INCL::Cluster::freezeInternalMotion(), G4INCL::PhaseSpaceKopylov::generate(), G4INCL::NuclearPotential::INuclearPotential::getFermiMomentum(), G4INCL::KinematicsUtils::getLocalEnergy(), G4INCL::SurfaceAvatar::getTransmissionProbability(), G4INCL::CrossSections::interactionDistanceKbarN(), G4INCL::CrossSections::interactionDistanceKN(), G4INCL::CrossSections::interactionDistanceNN(), G4INCL::CrossSections::interactionDistancePiN(), G4INCL::CrossSections::interactionDistanceYN(), G4INCL::Cluster::internalBoostToCM(), G4INCL::KinematicsUtils::momentumInCM(), G4INCL::KinematicsUtils::momentumInLab(), G4INCL::CrossSectionsINCL46::NDeltaToNN(), G4INCL::CrossSectionsMultiPions::NDeltaToNN(), G4INCL::CrossSectionsStrangeness::NNToNLK2pi(), G4INCL::CrossSectionsStrangeness::NNToNLKpi(), G4INCL::CrossSectionsStrangeness::NNToNSK2pi(), G4INCL::CrossSectionsStrangeness::NNToNSKpi(), G4INCL::CrossSectionsMultiPionsAndResonances::omegaNToPiN(), G4INCL::CrossSectionsMultiPionsAndResonances::piMinuspToEtaN(), G4INCL::CrossSectionsMultiPionsAndResonances::piMinuspToOmegaN(), G4INCL::Cluster::print(), G4INCL::ProjectileRemnant::ProjectileRemnant(), G4INCL::StandardPropagationModel::shootAtrest(), and G4INCL::StandardPropagationModel::shootParticle().

◆ getMomentum()

const G4INCL::ThreeVector & G4INCL::Particle::getMomentum ( ) const
inline

Get the momentum vector.

Definition at line 934 of file G4INCLParticle.hh.

935 {
936 return theMomentum;
937 };

Referenced by G4INCL::Cluster::addParticle(), G4INCL::ClusteringModelIntercomparison::clusterCanEscape(), G4INCL::SigmaZeroDecayChannel::computeDecayTime(), G4INCL::Nucleus::computeRecoilKinematics(), G4INCL::Nucleus::decayOutgoingPionResonances(), G4INCL::Nucleus::decayOutgoingSigmaZero(), G4INCL::Nucleus::fillEventInfo(), G4INCL::DeltaProductionChannel::fillFinalState(), G4INCL::ElasticChannel::fillFinalState(), G4INCL::NDeltaEtaProductionChannel::fillFinalState(), G4INCL::NDeltaOmegaProductionChannel::fillFinalState(), G4INCL::NNToNSKpiChannel::fillFinalState(), G4INCL::NpiToLK2piChannel::fillFinalState(), G4INCL::NpiToLKpiChannel::fillFinalState(), G4INCL::NpiToNKKbChannel::fillFinalState(), G4INCL::NpiToSK2piChannel::fillFinalState(), G4INCL::NpiToSKpiChannel::fillFinalState(), G4INCL::ParticleEntryChannel::fillFinalState(), G4INCL::ReflectionChannel::fillFinalState(), G4INCL::StrangeAbsorbtionChannel::fillFinalState(), G4INCL::PauliStandard::getBlockingProbability(), G4INCL::ClusteringModelIntercomparison::getCluster(), G4INCL::Nucleus::getConservationBalance(), G4INCL::KinematicsUtils::getLocalEnergy(), G4INCL::SurfaceAvatar::getTransmissionProbability(), G4INCL::NKbElasticChannel::KaonMomentum(), G4INCL::NKbToLpiChannel::KaonMomentum(), G4INCL::NKbToNKbChannel::KaonMomentum(), G4INCL::NKbToSpiChannel::KaonMomentum(), G4INCL::KinematicsUtils::makeBoostVector(), G4INCL::KinematicsUtils::momentumInCM(), G4INCL::BinaryCollisionAvatar::postInteraction(), G4INCL::InteractionAvatar::preInteraction(), G4INCL::ProjectileRemnant::removeParticle(), G4INCL::ParticleSampler::sampleParticlesIntoList(), G4INCL::StandardPropagationModel::shootComposite(), and G4INCL::StandardPropagationModel::shootParticle().

◆ getNumberOfCollisions()

G4int G4INCL::Particle::getNumberOfCollisions ( ) const
inline

Return the number of collisions undergone by the particle.

Definition at line 974 of file G4INCLParticle.hh.

974{ return nCollisions; }

Referenced by G4INCL::Cluster::addParticle().

◆ getNumberOfDecays()

G4int G4INCL::Particle::getNumberOfDecays ( ) const
inline

Return the number of decays undergone by the particle.

Definition at line 983 of file G4INCLParticle.hh.

983{ return nDecays; }

◆ getNumberOfKaon()

G4int G4INCL::Particle::getNumberOfKaon ( ) const
inline

Number of Kaon inside de nucleus.

Put in the Particle class in order to calculate the "correct" mass of composit particle.

Definition at line 1193 of file G4INCLParticle.hh.

1193{ return theNKaon; };

Referenced by G4INCL::ParticleEntryChannel::fillFinalState(), G4INCL::SurfaceAvatar::getChannel(), and G4INCL::BinaryCollisionAvatar::postInteraction().

◆ getParentResonanceID()

G4int G4INCL::Particle::getParentResonanceID ( ) const
inline

Definition at line 1199 of file G4INCLParticle.hh.

1199{ return theParentResonanceID; };

◆ getParentResonancePDGCode()

G4int G4INCL::Particle::getParentResonancePDGCode ( ) const
inline

Definition at line 1197 of file G4INCLParticle.hh.

1197{ return theParentResonancePDGCode; };

◆ getParticipantType()

ParticipantType G4INCL::Particle::getParticipantType ( ) const
inline

Definition at line 369 of file G4INCLParticle.hh.

369 {
370 return theParticipantType;
371 }

Referenced by G4INCL::StandardPropagationModel::generateBinaryCollisionAvatar().

◆ getParticleBias()

G4double G4INCL::Particle::getParticleBias ( ) const
inline

Get the particle bias.

Definition at line 1172 of file G4INCLParticle.hh.

1172{ return theParticleBias; };

◆ getParticles()

ParticleList const * G4INCL::Particle::getParticles ( ) const
inline

Return a NULL pointer

Definition at line 1126 of file G4INCLParticle.hh.

1126 {
1127 INCL_WARN("Particle::getParticles() method was called on a Particle object" << '\n');
1128 return 0;
1129 }

◆ getPosition()

const G4INCL::ThreeVector & G4INCL::Particle::getPosition ( ) const
inline

Set the position vector.

Definition at line 956 of file G4INCLParticle.hh.

957 {
958 return thePosition;
959 };

Referenced by G4INCL::Cluster::addParticle(), G4INCL::InteractionAvatar::bringParticleInside(), G4INCL::CoulombNone::bringToSurface(), G4INCL::ClusteringModelIntercomparison::clusterCanEscape(), G4INCL::DeltaDecayChannel::fillFinalState(), G4INCL::EtaNToPiPiNChannel::fillFinalState(), G4INCL::NDeltaEtaProductionChannel::fillFinalState(), G4INCL::NDeltaOmegaProductionChannel::fillFinalState(), G4INCL::NDeltaToDeltaSKChannel::fillFinalState(), G4INCL::NDeltaToNLKChannel::fillFinalState(), G4INCL::NDeltaToNNKKbChannel::fillFinalState(), G4INCL::NDeltaToNSKChannel::fillFinalState(), G4INCL::NKbToNKb2piChannel::fillFinalState(), G4INCL::NKToNK2piChannel::fillFinalState(), G4INCL::NNEtaToMultiPionsChannel::fillFinalState(), G4INCL::NNOmegaToMultiPionsChannel::fillFinalState(), G4INCL::NNToMissingStrangenessChannel::fillFinalState(), G4INCL::NNToMultiPionsChannel::fillFinalState(), G4INCL::NNToNLK2piChannel::fillFinalState(), G4INCL::NNToNLKChannel::fillFinalState(), G4INCL::NNToNLKpiChannel::fillFinalState(), G4INCL::NNToNNEtaChannel::fillFinalState(), G4INCL::NNToNNKKbChannel::fillFinalState(), G4INCL::NNToNNOmegaChannel::fillFinalState(), G4INCL::NNToNSK2piChannel::fillFinalState(), G4INCL::NNToNSKChannel::fillFinalState(), G4INCL::NNToNSKpiChannel::fillFinalState(), G4INCL::NpiToMissingStrangenessChannel::fillFinalState(), G4INCL::OmegaNToPiPiNChannel::fillFinalState(), G4INCL::PionResonanceDecayChannel::fillFinalState(), G4INCL::ReflectionChannel::fillFinalState(), G4INCL::SigmaZeroDecayChannel::fillFinalState(), G4INCL::StandardPropagationModel::generateBinaryCollisionAvatar(), G4INCL::PauliStandard::getBlockingProbability(), G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::ClusteringModelIntercomparison::getCluster(), G4INCL::KinematicsUtils::getLocalEnergy(), G4INCL::StandardPropagationModel::getReflectionTime(), G4INCL::StandardPropagationModel::getTime(), G4INCL::BinaryCollisionAvatar::postInteraction(), and G4INCL::ParticleSampler::sampleParticlesIntoList().

◆ getPotentialEnergy()

◆ getPropagationVelocity()

ThreeVector G4INCL::Particle::getPropagationVelocity ( ) const
inline

Get the propagation velocity of the particle.

Definition at line 1040 of file G4INCLParticle.hh.

1040{ return (*thePropagationMomentum)/(*thePropagationEnergy); }

Referenced by G4INCL::CoulombNone::bringToSurface(), G4INCL::StandardPropagationModel::getReflectionTime(), and G4INCL::StandardPropagationModel::getTime().

◆ getRealMass()

G4double G4INCL::Particle::getRealMass ( ) const
inline

Get the real particle mass.

Definition at line 643 of file G4INCLParticle.hh.

643 {
644 switch(theType) {
645 case Proton:
646 case Neutron:
647 case PiPlus:
648 case PiMinus:
649 case PiZero:
650 case Lambda:
651 case SigmaPlus:
652 case SigmaZero:
653 case SigmaMinus:
654 case antiProton:
655 case XiZero:
656 case XiMinus:
657 case antiNeutron:
658 case antiLambda:
659 case antiSigmaPlus:
660 case antiSigmaZero:
661 case antiSigmaMinus:
662 case antiXiZero:
663 case antiXiMinus:
664 case KPlus:
665 case KZero:
666 case KZeroBar:
667 case KShort:
668 case KLong:
669 case KMinus:
670 case Eta:
671 case Omega:
672 case EtaPrime:
673 case Photon:
675 break;
676
677 case DeltaPlusPlus:
678 case DeltaPlus:
679 case DeltaZero:
680 case DeltaMinus:
681 return theMass;
682 break;
683
684 case Composite:
686 break;
687
688 default:
689 INCL_ERROR("Particle::getRealMass: Unknown particle type." << '\n');
690 return 0.0;
691 break;
692 }
693 }
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)

Referenced by G4INCL::Cluster::getTableMass(), and setRealMass().

◆ getReflectionMomentum()

G4double G4INCL::Particle::getReflectionMomentum ( ) const
inline

Return the reflection momentum.

The reflection momentum is used by calls to getSurfaceRadius to compute the radius of the sphere where the nucleon moves. It is necessary to introduce fuzzy r-p correlations.

Definition at line 1137 of file G4INCLParticle.hh.

1137 {
1138 if(rpCorrelated)
1139 return theMomentum.mag();
1140 else
1141 return uncorrelatedMomentum;
1142 }

Referenced by G4INCL::KinematicsUtils::getLocalEnergy(), and G4INCL::Nucleus::getSurfaceRadius().

◆ getS()

◆ getSpecies()

virtual G4INCL::ParticleSpecies G4INCL::Particle::getSpecies ( ) const
inlinevirtual

Get the particle species.

Reimplemented in G4INCL::Cluster.

Definition at line 192 of file G4INCLParticle.hh.

192 {
193 return ParticleSpecies(theType);
194 };

Referenced by G4INCL::CoulombDistortion::maxImpactParameter(), and G4INCL::StandardPropagationModel::shootParticle().

◆ getTableMass()

virtual G4double G4INCL::Particle::getTableMass ( ) const
inlinevirtual

Get the tabulated particle mass.

Reimplemented in G4INCL::Cluster.

Definition at line 590 of file G4INCLParticle.hh.

590 {
591 switch(theType) {
592 case Proton:
593 case Neutron:
594 case PiPlus:
595 case PiMinus:
596 case PiZero:
597 case Lambda:
598 case SigmaPlus:
599 case SigmaZero:
600 case SigmaMinus:
601 case antiProton:
602 case XiZero:
603 case XiMinus:
604 case antiNeutron:
605 case antiLambda:
606 case antiSigmaPlus:
607 case antiSigmaZero:
608 case antiSigmaMinus:
609 case antiXiZero:
610 case antiXiMinus:
611 case KPlus:
612 case KZero:
613 case KZeroBar:
614 case KShort:
615 case KLong:
616 case KMinus:
617 case Eta:
618 case Omega:
619 case EtaPrime:
620 case Photon:
622 break;
623
624 case DeltaPlusPlus:
625 case DeltaPlus:
626 case DeltaZero:
627 case DeltaMinus:
628 return theMass;
629 break;
630
631 case Composite:
633 break;
634
635 default:
636 INCL_ERROR("Particle::getTableMass: Unknown particle type." << '\n');
637 return 0.0;
638 break;
639 }
640 }
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.

Referenced by G4INCL::Nucleus::decayOutgoingPionResonances(), G4INCL::Nucleus::decayOutgoingSigmaZero(), G4INCL::ParticleEntryChannel::fillFinalState(), G4INCL::TransmissionChannel::fillFinalState(), getEmissionPbarQvalueCorrection(), getEmissionQValueCorrection(), getEmissionQValueCorrection(), getTransferQValueCorrection(), getTransferQValueCorrection(), G4INCL::PbarAtrestEntryChannel::makeMesonStar(), and setTableMass().

◆ getTotalBias()

G4double G4INCL::Particle::getTotalBias ( )
static

General bias vector function.

Definition at line 312 of file G4INCLParticle.cc.

312 {
313 G4double TotalBias = 1.;
314 for(G4int i=0; i<G4int(INCLBiasVector.size());i++) TotalBias *= Particle::INCLBiasVector[i];
315 return TotalBias;
316 }

Referenced by G4INCL::Nucleus::emitInsideKaon(), G4INCL::Nucleus::emitInsideLambda(), G4INCL::Nucleus::emitInsidePions(), G4INCL::Nucleus::emitInsideStrangeParticles(), and G4INCL::EventInfo::remnantToParticle().

◆ getTransferQValueCorrection() [1/2]

G4double G4INCL::Particle::getTransferQValueCorrection ( const G4int AFrom,
const G4int ZFrom,
const G4int ATo,
const G4int ZTo ) const
inline

Computes correction on the transfer Q-value.

Computes the correction that must be applied to INCL particles in order to obtain the correct Q-value for particle transfer from a given nucleus to another.

Assumes that the receving nucleus is INCL's target nucleus, with the INCL separation energy.

Parameters
AFromthe mass number of the donating nucleus
ZFromthe charge number of the donating nucleus
ATothe mass number of the receiving nucleus
ZTothe charge number of the receiving nucleus
Returns
the correction

Definition at line 782 of file G4INCLParticle.hh.

782 {
783 const G4int SFrom = 0;
784 const G4int STo = 0;
785 const G4int AFromDaughter = AFrom - theA;
786 const G4int ZFromDaughter = ZFrom - theZ;
787 const G4int SFromDaughter = 0;
788 const G4int AToDaughter = ATo + theA;
789 const G4int ZToDaughter = ZTo + theZ;
790 const G4int SToDaughter = 0;
791 const G4double theQValue = ParticleTable::getTableQValue(AToDaughter,ZToDaughter,SToDaughter,AFromDaughter,ZFromDaughter,SFromDaughter,AFrom,ZFrom,SFrom);
792
793 const G4double massINCLTo = ParticleTable::getINCLMass(ATo,ZTo,STo);
794 const G4double massINCLToDaughter = ParticleTable::getINCLMass(AToDaughter,ZToDaughter,SToDaughter);
795 /* Note that here we have to use the table mass in the INCL Q-value. We
796 * cannot use theMass, because at this stage the particle is probably
797 * still off-shell; and we cannot use getINCLMass(), because it leads to
798 * violations of global energy conservation.
799 */
800 const G4double massINCLParticle = getTableMass();
801
802 // The rhs corresponds to the INCL Q-value for particle absorption
803 return theQValue - (massINCLToDaughter-massINCLTo-massINCLParticle);
804 }

◆ getTransferQValueCorrection() [2/2]

G4double G4INCL::Particle::getTransferQValueCorrection ( const G4int AFrom,
const G4int ZFrom,
const G4int SFrom,
const G4int ATo,
const G4int ZTo,
const G4int STo ) const
inline

Computes correction on the transfer Q-value for hypernuclei.

Computes the correction that must be applied to INCL particles in order to obtain the correct Q-value for particle transfer from a given nucleus to another.

Assumes that the receving nucleus is INCL's target nucleus, with the INCL separation energy.

Parameters
AFromthe mass number of the donating nucleus
ZFromthe charge number of the donating nucleus
SFromthe strangess number of the donating nucleus
ATothe mass number of the receiving nucleus
ZTothe charge number of the receiving nucleus
STothe strangess number of the receiving nucleus
Returns
the correction

Definition at line 859 of file G4INCLParticle.hh.

859 {
860 const G4int AFromDaughter = AFrom - theA;
861 const G4int ZFromDaughter = ZFrom - theZ;
862 const G4int SFromDaughter = SFrom - theS;
863 const G4int AToDaughter = ATo + theA;
864 const G4int ZToDaughter = ZTo + theZ;
865 const G4int SToDaughter = STo + theS;
866 const G4double theQValue = ParticleTable::getTableQValue(AToDaughter,ZToDaughter,SFromDaughter,AFromDaughter,ZFromDaughter,SToDaughter,AFrom,ZFrom,SFrom);
867
868 const G4double massINCLTo = ParticleTable::getINCLMass(ATo,ZTo,STo);
869 const G4double massINCLToDaughter = ParticleTable::getINCLMass(AToDaughter,ZToDaughter,SToDaughter);
870 /* Note that here we have to use the table mass in the INCL Q-value. We
871 * cannot use theMass, because at this stage the particle is probably
872 * still off-shell; and we cannot use getINCLMass(), because it leads to
873 * violations of global energy conservation.
874 */
875 const G4double massINCLParticle = getTableMass();
876
877 // The rhs corresponds to the INCL Q-value for particle absorption
878 return theQValue - (massINCLToDaughter-massINCLTo-massINCLParticle);
879 }

◆ getTransversePosition()

ThreeVector G4INCL::Particle::getTransversePosition ( ) const
inline

Transverse component of the position w.r.t. the momentum.

Definition at line 1008 of file G4INCLParticle.hh.

1008 {
1010 }
ThreeVector getLongitudinalPosition() const
Longitudinal component of the position w.r.t. the momentum.

Referenced by G4INCL::StandardPropagationModel::shootComposite(), and G4INCL::StandardPropagationModel::shootParticle().

◆ getType()

G4INCL::ParticleType G4INCL::Particle::getType ( ) const
inline

Get the particle type.

See also
G4INCL::ParticleType

Definition at line 187 of file G4INCLParticle.hh.

187 {
188 return theType;
189 };

Referenced by G4INCL::PionResonanceDecayChannel::computeDecayTime(), G4INCL::NuclearPotential::INuclearPotential::computeKaonPotentialEnergy(), G4INCL::NuclearPotential::INuclearPotential::computePionPotentialEnergy(), G4INCL::NuclearPotential::INuclearPotential::computePionResonancePotentialEnergy(), G4INCL::NuclearPotential::NuclearPotentialConstant::computePotentialEnergy(), G4INCL::NuclearPotential::NuclearPotentialIsospin::computePotentialEnergy(), G4INCL::CrossSectionsINCL46::elasticNNLegacy(), G4INCL::DeltaDecayChannel::fillFinalState(), G4INCL::DeltaProductionChannel::fillFinalState(), G4INCL::ElasticChannel::fillFinalState(), G4INCL::NDeltaEtaProductionChannel::fillFinalState(), G4INCL::NDeltaOmegaProductionChannel::fillFinalState(), G4INCL::NDeltaToDeltaLKChannel::fillFinalState(), G4INCL::NDeltaToDeltaSKChannel::fillFinalState(), G4INCL::NDeltaToNLKChannel::fillFinalState(), G4INCL::NDeltaToNNKKbChannel::fillFinalState(), G4INCL::NDeltaToNSKChannel::fillFinalState(), G4INCL::NKbToL2piChannel::fillFinalState(), G4INCL::NKbToLpiChannel::fillFinalState(), G4INCL::NKbToNKb2piChannel::fillFinalState(), G4INCL::NKbToNKbChannel::fillFinalState(), G4INCL::NKbToNKbpiChannel::fillFinalState(), G4INCL::NKbToS2piChannel::fillFinalState(), G4INCL::NKbToSpiChannel::fillFinalState(), G4INCL::NKToNK2piChannel::fillFinalState(), G4INCL::NKToNKChannel::fillFinalState(), G4INCL::NKToNKpiChannel::fillFinalState(), G4INCL::NNEtaToMultiPionsChannel::fillFinalState(), G4INCL::NNOmegaToMultiPionsChannel::fillFinalState(), G4INCL::NNToMissingStrangenessChannel::fillFinalState(), G4INCL::NNToMultiPionsChannel::fillFinalState(), G4INCL::NNToNLK2piChannel::fillFinalState(), G4INCL::NNToNLKChannel::fillFinalState(), G4INCL::NNToNLKpiChannel::fillFinalState(), G4INCL::NNToNNEtaChannel::fillFinalState(), G4INCL::NNToNNKKbChannel::fillFinalState(), G4INCL::NNToNNOmegaChannel::fillFinalState(), G4INCL::NNToNSK2piChannel::fillFinalState(), G4INCL::NNToNSKChannel::fillFinalState(), G4INCL::NNToNSKpiChannel::fillFinalState(), G4INCL::NpiToMissingStrangenessChannel::fillFinalState(), G4INCL::NSToNLChannel::fillFinalState(), G4INCL::NSToNSChannel::fillFinalState(), G4INCL::PionResonanceDecayChannel::fillFinalState(), G4INCL::RecombinationChannel::fillFinalState(), G4INCL::PauliStandard::getBlockingProbability(), G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::DecayAvatar::getChannel(), G4INCL::NuclearPotential::INuclearPotential::getFermiEnergy(), G4INCL::NuclearPotential::INuclearPotential::getFermiMomentum(), G4INCL::KinematicsUtils::getLocalEnergy(), G4INCL::NuclearPotential::INuclearPotential::getSeparationEnergy(), G4INCL::Nucleus::getSurfaceRadius(), G4INCL::NuclearDensity::getTransmissionRadius(), G4INCL::Nucleus::insertParticle(), G4INCL::ParticleConfig::isPair(), G4INCL::CrossSectionsStrangeness::NDeltaToDeltaLK(), G4INCL::CrossSectionsStrangeness::NDeltaToDeltaSK(), G4INCL::CrossSectionsStrangeness::NDeltaToNLK(), G4INCL::CrossSectionsINCL46::NDeltaToNN(), G4INCL::CrossSectionsMultiPions::NDeltaToNN(), G4INCL::CrossSectionsStrangeness::NDeltaToNNKKb(), G4INCL::CrossSectionsStrangeness::NDeltaToNSK(), G4INCL::CrossSectionsStrangeness::NKbToL2pi(), G4INCL::CrossSectionsStrangeness::NKbToLpi(), G4INCL::CrossSectionsStrangeness::NKbToNKb(), G4INCL::CrossSectionsStrangeness::NKbToNKb2pi(), G4INCL::CrossSectionsStrangeness::NKbToNKbpi(), G4INCL::CrossSectionsStrangeness::NKbToS2pi(), G4INCL::CrossSectionsStrangeness::NKbToSpi(), G4INCL::CrossSectionsStrangeness::NKToNK(), G4INCL::CrossSectionsStrangeness::NKToNK2pi(), G4INCL::CrossSectionsStrangeness::NKToNKpi(), G4INCL::CrossSectionsAntiparticles::NNbarCEX(), G4INCL::CrossSectionsAntiparticles::NNbarElastic(), G4INCL::CrossSectionsAntiparticles::NNbarToAnnihilation(), G4INCL::CrossSectionsAntiparticles::NNbarToLLbar(), G4INCL::CrossSectionsAntiparticles::NNbarToNNbar2pi(), G4INCL::CrossSectionsAntiparticles::NNbarToNNbar3pi(), G4INCL::CrossSectionsAntiparticles::NNbarToNNbarpi(), G4INCL::CrossSectionsMultiPions::NNElastic(), G4INCL::CrossSectionsMultiPions::NNOnePi(), G4INCL::CrossSectionsMultiPions::NNOnePiOrDelta(), G4INCL::CrossSectionsMultiPions::NNThreePi(), G4INCL::CrossSectionsStrangeness::NNToMissingStrangeness(), G4INCL::CrossSectionsINCL46::NNToNDelta(), G4INCL::CrossSectionsMultiPions::NNToNDelta(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNDeltaEta(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNDeltaOmega(), G4INCL::CrossSectionsStrangeness::NNToNLK(), G4INCL::CrossSectionsStrangeness::NNToNLK2pi(), G4INCL::CrossSectionsStrangeness::NNToNLKpi(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNEta(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNEtaExclu(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNEtaFourPi(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNEtaOnePi(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNEtaOnePiOrDelta(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNEtaThreePi(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNEtaTwoPi(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNEtaxPi(), G4INCL::CrossSectionsStrangeness::NNToNNKKb(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNOmega(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNOmegaExclu(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNOmegaFourPi(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNOmegaOnePi(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNOmegaOnePiOrDelta(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNOmegaThreePi(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNOmegaTwoPi(), G4INCL::CrossSectionsMultiPionsAndResonances::NNToNNOmegaxPi(), G4INCL::CrossSectionsStrangeness::NNToNSK(), G4INCL::CrossSectionsStrangeness::NNToNSK2pi(), G4INCL::CrossSectionsStrangeness::NNToNSKpi(), G4INCL::CrossSectionsMultiPions::NNTot(), G4INCL::CrossSectionsMultiPions::NNTwoPi(), G4INCL::CrossSectionsStrangeness::NpiToLK(), G4INCL::CrossSectionsStrangeness::NpiToLK2pi(), G4INCL::CrossSectionsStrangeness::NpiToLKpi(), G4INCL::CrossSectionsStrangeness::NpiToNKKb(), G4INCL::CrossSectionsStrangeness::NpiToSK(), G4INCL::CrossSectionsStrangeness::NpiToSK2pi(), G4INCL::CrossSectionsStrangeness::NpiToSKpi(), G4INCL::CrossSectionsStrangeness::NSToNL(), G4INCL::CrossSectionsStrangeness::NSToNS(), G4INCL::CrossSectionsStrangeness::p_pimToSzKz(), G4INCL::CrossSectionsINCL46::piNToDelta(), G4INCL::CrossSectionsMultiPions::piNToDelta(), G4INCL::CrossSectionsMultiPionsAndResonances::piNToEtaN(), G4INCL::CrossSectionsMultiPionsAndResonances::piNToOmegaN(), and G4INCL::CrossSectionsMultiPions::piNTot().

◆ getZ()

◆ incrementNumberOfCollisions()

void G4INCL::Particle::incrementNumberOfCollisions ( )
inline

Increment the number of collisions undergone by the particle.

Definition at line 980 of file G4INCLParticle.hh.

980{ nCollisions++; }

◆ incrementNumberOfDecays()

void G4INCL::Particle::incrementNumberOfDecays ( )
inline

Increment the number of decays undergone by the particle.

Definition at line 989 of file G4INCLParticle.hh.

989{ nDecays++; }

◆ isAntiBaryon()

G4bool G4INCL::Particle::isAntiBaryon ( ) const
inline

Is this an antiBaryon?

Definition at line 470 of file G4INCLParticle.hh.

470{ return (isAntiNucleon() || isAntiHyperon()); }
G4bool isAntiHyperon() const
Is this an antiHyperon?
G4bool isAntiNucleon() const
Is this an antinucleon?

◆ isAntiHyperon()

G4bool G4INCL::Particle::isAntiHyperon ( ) const
inline

Is this an antiHyperon?

Definition at line 467 of file G4INCLParticle.hh.

467{ return (isAntiLambda() || isAntiSigma() || isAntiXi()); }
G4bool isAntiSigma() const
Is this an antiSigma?
G4bool isAntiXi() const
Is this an antiXi?
G4bool isAntiLambda() const
Is this an antiLambda?

Referenced by isAntiBaryon().

◆ isAntiKaon()

◆ isAntiLambda()

G4bool G4INCL::Particle::isAntiLambda ( ) const
inline

Is this an antiLambda?

Definition at line 464 of file G4INCLParticle.hh.

464{ return (theType == antiLambda); }

Referenced by isAntiHyperon(), and isAntiNucleonorAntiLambda().

◆ isAntiNucleon()

◆ isAntiNucleonorAntiLambda()

G4bool G4INCL::Particle::isAntiNucleonorAntiLambda ( ) const
inline

Is this an antiNucleon or an antiLambda?

Definition at line 473 of file G4INCLParticle.hh.

473{ return (isAntiNucleon() || isAntiLambda()); }

◆ isAntiSigma()

G4bool G4INCL::Particle::isAntiSigma ( ) const
inline

Is this an antiSigma?

Definition at line 458 of file G4INCLParticle.hh.

Referenced by isAntiHyperon().

◆ isAntiXi()

G4bool G4INCL::Particle::isAntiXi ( ) const
inline

Is this an antiXi?

Definition at line 461 of file G4INCLParticle.hh.

461{ return (theType == antiXiZero || theType == antiXiMinus); }

Referenced by isAntiHyperon().

◆ isBaryon()

G4bool G4INCL::Particle::isBaryon ( ) const
inline

Is this a Baryon?

Definition at line 446 of file G4INCLParticle.hh.

446{ return (isNucleon() || isResonance() || isHyperon()); }
G4bool isHyperon() const
Is this an Hyperon?
G4bool isNucleon() const

Referenced by G4INCL::CDPP::processOneParticle().

◆ isCluster()

G4bool G4INCL::Particle::isCluster ( ) const
inline

◆ isDelta()

◆ isEta()

◆ isEtaPrime()

G4bool G4INCL::Particle::isEtaPrime ( ) const
inline

◆ isHyperon()

G4bool G4INCL::Particle::isHyperon ( ) const
inline

Is this an Hyperon?

Definition at line 440 of file G4INCLParticle.hh.

440{ return (isLambda() || isSigma() ); } //|| isXi()
G4bool isLambda() const
Is this a Lambda?
G4bool isSigma() const
Is this a Sigma?

Referenced by G4INCL::CrossSectionsAntiparticles::elastic(), G4INCL::CrossSectionsStrangeness::elastic(), isBaryon(), isStrange(), and G4INCL::CrossSectionsStrangeness::NYelastic().

◆ isKaon()

◆ isLambda()

◆ isMeson()

G4bool G4INCL::Particle::isMeson ( ) const
inline

Is this a Meson?

Definition at line 443 of file G4INCLParticle.hh.

443{ return (isPion() || isKaon() || isAntiKaon() || isEta() || isEtaPrime() || isOmega()); }
G4bool isEtaPrime() const
Is this an etaprime?
G4bool isOmega() const
Is this an omega?
G4bool isEta() const
Is this an eta?
G4bool isPion() const
Is this a pion?
G4bool isAntiKaon() const
Is this an antiKaon?
G4bool isKaon() const
Is this a Kaon?

Referenced by G4INCL::StandardPropagationModel::generateBinaryCollisionAvatar(), G4INCL::InteractionAvatar::preInteractionLocalEnergy(), G4INCL::CDPP::processOneParticle(), and G4INCL::StandardPropagationModel::shootParticle().

◆ isNucleon()

G4bool G4INCL::Particle::isNucleon ( ) const
inline

Is this a nucleon?

Definition at line 362 of file G4INCLParticle.hh.

362 {
364 return true;
365 else
366 return false;
367 };

Referenced by G4INCL::NuclearPotential::NuclearPotentialEnergyIsospin::computePotentialEnergy(), G4INCL::NuclearPotential::NuclearPotentialEnergyIsospinSmooth::computePotentialEnergy(), G4INCL::CrossSectionsAntiparticles::elastic(), G4INCL::CrossSectionsINCL46::elastic(), G4INCL::CrossSectionsMultiPions::elastic(), G4INCL::CrossSectionsMultiPionsAndResonances::elastic(), G4INCL::CrossSectionsStrangeness::elastic(), G4INCL::CrossSectionsTruncatedMultiPions::elastic(), G4INCL::CrossSectionsINCL46::elasticNNLegacy(), G4INCL::EtaNElasticChannel::fillFinalState(), G4INCL::EtaNToPiNChannel::fillFinalState(), G4INCL::EtaNToPiPiNChannel::fillFinalState(), G4INCL::NDeltaToNNKKbChannel::fillFinalState(), G4INCL::NKbElasticChannel::fillFinalState(), G4INCL::NKbToL2piChannel::fillFinalState(), G4INCL::NKbToLpiChannel::fillFinalState(), G4INCL::NKbToNKb2piChannel::fillFinalState(), G4INCL::NKbToNKbChannel::fillFinalState(), G4INCL::NKbToNKbpiChannel::fillFinalState(), G4INCL::NKbToS2piChannel::fillFinalState(), G4INCL::NKbToSpiChannel::fillFinalState(), G4INCL::NKElasticChannel::fillFinalState(), G4INCL::NKToNK2piChannel::fillFinalState(), G4INCL::NKToNKChannel::fillFinalState(), G4INCL::NKToNKpiChannel::fillFinalState(), G4INCL::NLToNSChannel::fillFinalState(), G4INCL::NNbarCEXChannel::fillFinalState(), G4INCL::NNbarElasticChannel::fillFinalState(), G4INCL::NNbarToAnnihilationChannel::fillFinalState(), G4INCL::NNbarToLLbarChannel::fillFinalState(), G4INCL::NNbarToNNbar2piChannel::fillFinalState(), G4INCL::NNbarToNNbar3piChannel::fillFinalState(), G4INCL::NNbarToNNbarpiChannel::fillFinalState(), G4INCL::NpiToLK2piChannel::fillFinalState(), G4INCL::NpiToLKChannel::fillFinalState(), G4INCL::NpiToLKpiChannel::fillFinalState(), G4INCL::NpiToNKKbChannel::fillFinalState(), G4INCL::NpiToSK2piChannel::fillFinalState(), G4INCL::NpiToSKChannel::fillFinalState(), G4INCL::NpiToSKpiChannel::fillFinalState(), G4INCL::NSToNLChannel::fillFinalState(), G4INCL::NSToNSChannel::fillFinalState(), G4INCL::NYElasticChannel::fillFinalState(), G4INCL::OmegaNElasticChannel::fillFinalState(), G4INCL::OmegaNToPiNChannel::fillFinalState(), G4INCL::OmegaNToPiPiNChannel::fillFinalState(), G4INCL::PiNElasticChannel::fillFinalState(), G4INCL::PiNToDeltaChannel::fillFinalState(), G4INCL::PiNToEtaChannel::fillFinalState(), G4INCL::PiNToMultiPionsChannel::fillFinalState(), G4INCL::PiNToOmegaChannel::fillFinalState(), G4INCL::StrangeAbsorbtionChannel::fillFinalState(), G4INCL::StandardPropagationModel::generateBinaryCollisionAvatar(), G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::DecayAvatar::getChannel(), G4INCL::Nucleus::getSurfaceRadius(), G4INCL::Nucleus::insertParticle(), isBaryon(), isNucleonorLambda(), G4INCL::CrossSectionsMultiPions::NNElastic(), G4INCL::CrossSectionsMultiPions::NNTot(), G4INCL::CrossSectionsMultiPions::piMinuspIne(), G4INCL::CrossSectionsMultiPions::piMinuspOnePi(), G4INCL::CrossSectionsMultiPions::piMinuspTwoPi(), G4INCL::CrossSectionsMultiPions::piNIne(), G4INCL::CrossSectionsMultiPions::piNOnePi(), G4INCL::CrossSectionsINCL46::piNToDelta(), G4INCL::CrossSectionsMultiPions::piNToxPiN(), G4INCL::CrossSectionsMultiPions::piNTwoPi(), G4INCL::CrossSectionsMultiPions::piPluspIne(), G4INCL::CrossSectionsMultiPions::piPluspOnePi(), G4INCL::CrossSectionsMultiPions::piPluspTwoPi(), G4INCL::CrossSectionsAntiparticles::total(), G4INCL::CrossSectionsINCL46::total(), G4INCL::CrossSectionsMultiPions::total(), G4INCL::CrossSectionsMultiPionsAndResonances::total(), and G4INCL::CrossSectionsStrangeness::total().

◆ isNucleonorLambda()

G4bool G4INCL::Particle::isNucleonorLambda ( ) const
inline

Is this a Nucleon or a Lambda?

Definition at line 437 of file G4INCLParticle.hh.

437{ return (isNucleon() || isLambda()); }

Referenced by G4INCL::ParticleEntryChannel::fillFinalState(), and G4INCL::SurfaceAvatar::getChannel().

◆ isOmega()

◆ isOutOfWell()

G4bool G4INCL::Particle::isOutOfWell ( ) const
inline

◆ isParticipant()

G4bool G4INCL::Particle::isParticipant ( ) const
inline

◆ isPhoton()

G4bool G4INCL::Particle::isPhoton ( ) const
inline

◆ isPion()

G4bool G4INCL::Particle::isPion ( ) const
inline

◆ isProjectileSpectator()

G4bool G4INCL::Particle::isProjectileSpectator ( ) const
inline

Definition at line 385 of file G4INCLParticle.hh.

385 {
387 }

Referenced by G4INCL::SurfaceAvatar::getChannel().

◆ isResonance()

◆ isSigma()

◆ isStrange()

G4bool G4INCL::Particle::isStrange ( ) const
inline

Is this a Strange?

Definition at line 449 of file G4INCLParticle.hh.

449{ return (isKaon() || isAntiKaon() || isHyperon()); }

◆ isTargetSpectator()

◆ isXi()

G4bool G4INCL::Particle::isXi ( ) const
inline

Is this a Xi?

Definition at line 452 of file G4INCLParticle.hh.

452{ return (theType == XiZero || theType == XiMinus); }

◆ lorentzContract()

void G4INCL::Particle::lorentzContract ( const ThreeVector & aBoostVector,
const ThreeVector & refPos )
inline

Lorentz-contract the particle position around some center.

Apply Lorentz contraction to the position component along the direction of the boost vector.

Parameters
aBoostVectorthe boost vector (velocity) [c]
refPosthe reference position

Definition at line 523 of file G4INCLParticle.hh.

523 {
524 const G4double beta2 = aBoostVector.mag2();
525 const G4double gamma = 1.0 / std::sqrt(1.0 - beta2);
526 const ThreeVector theRelativePosition = thePosition - refPos;
527 const ThreeVector transversePosition = theRelativePosition - aBoostVector * (theRelativePosition.dot(aBoostVector) / aBoostVector.mag2());
528 const ThreeVector longitudinalPosition = theRelativePosition - transversePosition;
529
530 thePosition = refPos + transversePosition + longitudinalPosition / gamma;
531 }

◆ makeParticipant()

virtual void G4INCL::Particle::makeParticipant ( )
inlinevirtual

Reimplemented in G4INCL::Cluster.

Definition at line 389 of file G4INCLParticle.hh.

389 {
391 }

Referenced by G4INCL::Store::loadParticles(), and G4INCL::Cluster::makeParticipant().

◆ makeProjectileSpectator()

virtual void G4INCL::Particle::makeProjectileSpectator ( )
inlinevirtual

◆ makeTargetSpectator()

virtual void G4INCL::Particle::makeTargetSpectator ( )
inlinevirtual

Reimplemented in G4INCL::Cluster.

Definition at line 393 of file G4INCLParticle.hh.

393 {
395 }

Referenced by G4INCL::Cluster::makeTargetSpectator().

◆ MergeVectorBias() [1/2]

std::vector< G4int > G4INCL::Particle::MergeVectorBias ( Particle const *const p1,
Particle const *const p2 )
static

Definition at line 235 of file G4INCLParticle.cc.

235 {
236 std::vector<G4int> MergedVectorBias;
237 std::vector<G4int> VectorBias1 = p1->getBiasCollisionVector();
238 std::vector<G4int> VectorBias2 = p2->getBiasCollisionVector();
239 G4int i = 0;
240 G4int j = 0;
241 if(VectorBias1.size()==0 && VectorBias2.size()==0) return MergedVectorBias;
242 else if(VectorBias1.size()==0) return VectorBias2;
243 else if(VectorBias2.size()==0) return VectorBias1;
244
245 while(i < G4int(VectorBias1.size()) || j < G4int(VectorBias2.size())){
246 if(VectorBias1[i]==VectorBias2[j]){
247 MergedVectorBias.push_back(VectorBias1[i]);
248 i++;
249 j++;
250 if(i == G4int(VectorBias1.size())){
251 for(;j<G4int(VectorBias2.size());j++) MergedVectorBias.push_back(VectorBias2[j]);
252 }
253 else if(j == G4int(VectorBias2.size())){
254 for(;i<G4int(VectorBias1.size());i++) MergedVectorBias.push_back(VectorBias1[i]);
255 }
256 } else if(VectorBias1[i]<VectorBias2[j]){
257 MergedVectorBias.push_back(VectorBias1[i]);
258 i++;
259 if(i == G4int(VectorBias1.size())){
260 for(;j<G4int(VectorBias2.size());j++) MergedVectorBias.push_back(VectorBias2[j]);
261 }
262 }
263 else {
264 MergedVectorBias.push_back(VectorBias2[j]);
265 j++;
266 if(j == G4int(VectorBias2.size())){
267 for(;i<G4int(VectorBias1.size());i++) MergedVectorBias.push_back(VectorBias1[i]);
268 }
269 }
270 }
271 return MergedVectorBias;
272 }

Referenced by G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::ParticleList::getParticleListBias(), and G4INCL::ParticleList::getParticleListBiasVector().

◆ MergeVectorBias() [2/2]

std::vector< G4int > G4INCL::Particle::MergeVectorBias ( std::vector< G4int > p1,
Particle const *const p2 )
static

Definition at line 274 of file G4INCLParticle.cc.

274 {
275 std::vector<G4int> MergedVectorBias;
276 std::vector<G4int> VectorBias = p2->getBiasCollisionVector();
277 G4int i = 0;
278 G4int j = 0;
279 if(p1.size()==0 && VectorBias.size()==0) return MergedVectorBias;
280 else if(p1.size()==0) return VectorBias;
281 else if(VectorBias.size()==0) return p1;
282
283 while(i < G4int(p1.size()) || j < G4int(VectorBias.size())){
284 if(p1[i]==VectorBias[j]){
285 MergedVectorBias.push_back(p1[i]);
286 i++;
287 j++;
288 if(i == G4int(p1.size())){
289 for(;j<G4int(VectorBias.size());j++) MergedVectorBias.push_back(VectorBias[j]);
290 }
291 else if(j == G4int(VectorBias.size())){
292 for(;i<G4int(p1.size());i++) MergedVectorBias.push_back(p1[i]);
293 }
294 } else if(p1[i]<VectorBias[j]){
295 MergedVectorBias.push_back(p1[i]);
296 i++;
297 if(i == G4int(p1.size())){
298 for(;j<G4int(VectorBias.size());j++) MergedVectorBias.push_back(VectorBias[j]);
299 }
300 }
301 else {
302 MergedVectorBias.push_back(VectorBias[j]);
303 j++;
304 if(j == G4int(VectorBias.size())){
305 for(;i<G4int(p1.size());i++) MergedVectorBias.push_back(p1[i]);
306 }
307 }
308 }
309 return MergedVectorBias;
310 }

◆ operator=()

Particle & G4INCL::Particle::operator= ( const Particle & rhs)
inline

Assignment operator.

Does not copy the particle ID.

Definition at line 177 of file G4INCLParticle.hh.

177 {
178 Particle temporaryParticle(rhs);
179 swap(temporaryParticle);
180 return *this;
181 }
void swap(Particle &rhs)
Helper method for the assignment operator.

Referenced by G4INCL::Cluster::operator=().

◆ print()

std::string G4INCL::Particle::print ( ) const
inline

◆ propagate()

void G4INCL::Particle::propagate ( G4double step)
inline

Definition at line 969 of file G4INCLParticle.hh.

969 {
970 thePosition += ((*thePropagationMomentum)*(step/(*thePropagationEnergy)));
971 };

Referenced by G4INCL::StandardPropagationModel::generateBinaryCollisionAvatar().

◆ rotateMomentum()

virtual void G4INCL::Particle::rotateMomentum ( const G4double angle,
const ThreeVector & axis )
inlinevirtual

Rotate the particle momentum.

Parameters
anglethe rotation angle
axisa unit vector representing the rotation axis

Reimplemented in G4INCL::Cluster.

Definition at line 1088 of file G4INCLParticle.hh.

1088 {
1089 theMomentum.rotate(angle, axis);
1090 theFrozenMomentum.rotate(angle, axis);
1091 }
void rotate(const G4double angle, const ThreeVector &axis)
Rotate the vector by a given angle around a given axis.

Referenced by G4INCL::Cluster::rotateMomentum(), and rotatePositionAndMomentum().

◆ rotatePosition()

virtual void G4INCL::Particle::rotatePosition ( const G4double angle,
const ThreeVector & axis )
inlinevirtual

Rotate the particle position.

Parameters
anglethe rotation angle
axisa unit vector representing the rotation axis

Reimplemented in G4INCL::Cluster.

Definition at line 1079 of file G4INCLParticle.hh.

1079 {
1080 thePosition.rotate(angle, axis);
1081 }

Referenced by G4INCL::Cluster::rotatePosition(), and rotatePositionAndMomentum().

◆ rotatePositionAndMomentum()

virtual void G4INCL::Particle::rotatePositionAndMomentum ( const G4double angle,
const ThreeVector & axis )
inlinevirtual

Rotate the particle position and momentum.

Parameters
anglethe rotation angle
axisa unit vector representing the rotation axis

Definition at line 1069 of file G4INCLParticle.hh.

1069 {
1070 rotatePosition(angle, axis);
1071 rotateMomentum(angle, axis);
1072 }
virtual void rotateMomentum(const G4double angle, const ThreeVector &axis)
Rotate the particle momentum.
virtual void rotatePosition(const G4double angle, const ThreeVector &axis)
Rotate the particle position.

◆ rpCorrelate()

void G4INCL::Particle::rpCorrelate ( )
inline

Make the particle follow a strict r-p correlation.

Definition at line 1148 of file G4INCLParticle.hh.

1148{ rpCorrelated = true; }

Referenced by G4INCL::InteractionAvatar::bringParticleInside(), G4INCL::ParticleEntryAvatar::postInteraction(), and G4INCL::SurfaceAvatar::postInteraction().

◆ rpDecorrelate()

void G4INCL::Particle::rpDecorrelate ( )
inline

Make the particle not follow a strict r-p correlation.

Definition at line 1151 of file G4INCLParticle.hh.

1151{ rpCorrelated = false; }

◆ setBiasCollisionVector()

void G4INCL::Particle::setBiasCollisionVector ( std::vector< G4int > BiasCollisionVector)
inline

Set the vector list of biased vertices on the particle path.

Definition at line 1181 of file G4INCLParticle.hh.

1181 {
1182 this->theBiasCollisionVector = BiasCollisionVector;
1183 this->setParticleBias(Particle::getBiasFromVector(BiasCollisionVector));
1184 }
void setParticleBias(G4double ParticleBias)
Set the particle bias.
static G4double getBiasFromVector(std::vector< G4int > VectorBias)

Referenced by G4INCL::Nucleus::decayOutgoingPionResonances(), G4INCL::Nucleus::decayOutgoingSigmaZero(), and G4INCL::SurfaceAvatar::postInteraction().

◆ setEmissionTime()

◆ setEnergy()

◆ setFrozenEnergy()

void G4INCL::Particle::setFrozenEnergy ( const G4double energy)
inline

Set the frozen particle momentum.

Definition at line 1031 of file G4INCLParticle.hh.

◆ setFrozenMomentum()

void G4INCL::Particle::setFrozenMomentum ( const ThreeVector & momentum)
inline

Set the frozen particle momentum.

Definition at line 1028 of file G4INCLParticle.hh.

1028{ theFrozenMomentum = momentum; }

◆ setHelicity()

◆ setINCLBiasVector()

void G4INCL::Particle::setINCLBiasVector ( std::vector< G4double > NewVector)
static

Definition at line 318 of file G4INCLParticle.cc.

318 {
319 Particle::INCLBiasVector = NewVector;
320 }

◆ setINCLMass()

void G4INCL::Particle::setINCLMass ( )
inline

Set the mass of the Particle to its table mass.

Definition at line 702 of file G4INCLParticle.hh.

702{ setMass(getINCLMass()); }

Referenced by G4INCL::Cluster::Cluster(), G4INCL::Cluster::Cluster(), setType(), and G4INCL::StandardPropagationModel::shootParticle().

◆ setMass()

◆ setMomentum()

◆ setNumberOfCollisions()

void G4INCL::Particle::setNumberOfCollisions ( G4int n)
inline

Set the number of collisions undergone by the particle.

Definition at line 977 of file G4INCLParticle.hh.

◆ setNumberOfDecays()

void G4INCL::Particle::setNumberOfDecays ( G4int n)
inline

Set the number of decays undergone by the particle.

Definition at line 986 of file G4INCLParticle.hh.

986{ nDecays = n; }

◆ setNumberOfKaon()

void G4INCL::Particle::setNumberOfKaon ( const G4int NK)
inline

◆ setOutOfWell()

void G4INCL::Particle::setOutOfWell ( )
inline

Mark the particle as out of its potential well.

This flag is used to control pions created outside their potential well in delta decay. The pion potential checks it and returns zero if it is true (necessary in order to correctly enforce energy conservation). The Nucleus::applyFinalState() method uses it to determine whether new avatars should be generated for the particle.

Definition at line 999 of file G4INCLParticle.hh.

999{ outOfWell = true; }

◆ setParentResonanceID()

void G4INCL::Particle::setParentResonanceID ( const G4int parentID)
inline

◆ setParentResonancePDGCode()

void G4INCL::Particle::setParentResonancePDGCode ( const G4int parentPDGCode)
inline

◆ setParticipantType()

void G4INCL::Particle::setParticipantType ( ParticipantType const p)
inline

Definition at line 373 of file G4INCLParticle.hh.

373 {
375 }

◆ setParticleBias()

void G4INCL::Particle::setParticleBias ( G4double ParticleBias)
inline

Set the particle bias.

Definition at line 1175 of file G4INCLParticle.hh.

1175{ this->theParticleBias = ParticleBias; }

Referenced by setBiasCollisionVector().

◆ setPosition()

◆ setPotentialEnergy()

◆ setRealMass()

void G4INCL::Particle::setRealMass ( )
inline

Set the mass of the Particle to its real mass.

Definition at line 696 of file G4INCLParticle.hh.

696{ setMass(getRealMass()); }
G4double getRealMass() const
Get the real particle mass.

Referenced by G4INCL::ClusterDecay::decay().

◆ setTableMass()

◆ setType()

void G4INCL::Particle::setType ( ParticleType t)
inline

Definition at line 196 of file G4INCLParticle.hh.

196 {
197 theType = t;
198 switch(theType)
199 {
200 case DeltaPlusPlus:
201 theA = 1;
202 theZ = 2;
203 theS = 0;
204 break;
205 case Proton:
206 case DeltaPlus:
207 theA = 1;
208 theZ = 1;
209 theS = 0;
210 break;
211 case Neutron:
212 case DeltaZero:
213 theA = 1;
214 theZ = 0;
215 theS = 0;
216 break;
217 case DeltaMinus:
218 theA = 1;
219 theZ = -1;
220 theS = 0;
221 break;
222 case PiPlus:
223 theA = 0;
224 theZ = 1;
225 theS = 0;
226 break;
227 case PiZero:
228 case Eta:
229 case Omega:
230 case EtaPrime:
231 case Photon:
232 theA = 0;
233 theZ = 0;
234 theS = 0;
235 break;
236 case PiMinus:
237 theA = 0;
238 theZ = -1;
239 theS = 0;
240 break;
241 case Lambda:
242 theA = 1;
243 theZ = 0;
244 theS = -1;
245 break;
246 case SigmaPlus:
247 theA = 1;
248 theZ = 1;
249 theS = -1;
250 break;
251 case SigmaZero:
252 theA = 1;
253 theZ = 0;
254 theS = -1;
255 break;
256 case SigmaMinus:
257 theA = 1;
258 theZ = -1;
259 theS = -1;
260 break;
261 case antiProton:
262 theA = -1;
263 theZ = -1;
264 theS = 0;
265 break;
266 case XiMinus:
267 theA = 1;
268 theZ = -1;
269 theS = -2;
270 break;
271 case XiZero:
272 theA = 1;
273 theZ = 0;
274 theS = -2;
275 break;
276 case antiNeutron:
277 theA = -1;
278 theZ = 0;
279 theS = 0;
280 break;
281 case antiLambda:
282 theA = -1;
283 theZ = 0;
284 theS = 1;
285 break;
286 case antiSigmaMinus:
287 theA = -1;
288 theZ = 1;
289 theS = 1;
290 break;
291 case antiSigmaPlus:
292 theA = -1;
293 theZ = -1;
294 theS = 1;
295 break;
296 case antiSigmaZero:
297 theA = -1;
298 theZ = 0;
299 theS = 1;
300 break;
301 case antiXiMinus:
302 theA = -1;
303 theZ = 1;
304 theS = 2;
305 break;
306 case antiXiZero:
307 theA = -1;
308 theZ = 0;
309 theS = 2;
310 break;
311 case KPlus:
312 theA = 0;
313 theZ = 1;
314 theS = 1;
315 break;
316 case KZero:
317 theA = 0;
318 theZ = 0;
319 theS = 1;
320 break;
321 case KZeroBar:
322 theA = 0;
323 theZ = 0;
324 theS = -1;
325 break;
326 case KShort:
327 theA = 0;
328 theZ = 0;
329// theS should not be defined
330 break;
331 case KLong:
332 theA = 0;
333 theZ = 0;
334// theS should not be defined
335 break;
336 case KMinus:
337 theA = 0;
338 theZ = -1;
339 theS = -1;
340 break;
341 case Composite:
342 // INCL_ERROR("Trying to set particle type to Composite! Construct a Cluster object instead" << '\n');
343 theA = 0;
344 theZ = 0;
345 theS = 0;
346 break;
347 case UnknownParticle:
348 theA = 0;
349 theZ = 0;
350 theS = 0;
351 INCL_ERROR("Trying to set particle type to Unknown!" << '\n');
352 break;
353 }
354
355 if( !isResonance() && t!=Composite )
356 setINCLMass();
357 }
void setINCLMass()
Set the mass of the Particle to its table mass.

Referenced by G4INCL::Cluster::Cluster(), G4INCL::Cluster::Cluster(), G4INCL::ClusterDecay::decay(), G4INCL::DeltaDecayChannel::fillFinalState(), G4INCL::DeltaProductionChannel::fillFinalState(), G4INCL::ElasticChannel::fillFinalState(), G4INCL::EtaNToPiNChannel::fillFinalState(), G4INCL::EtaNToPiPiNChannel::fillFinalState(), G4INCL::NDeltaEtaProductionChannel::fillFinalState(), G4INCL::NDeltaOmegaProductionChannel::fillFinalState(), G4INCL::NDeltaToDeltaLKChannel::fillFinalState(), G4INCL::NDeltaToDeltaSKChannel::fillFinalState(), G4INCL::NDeltaToNLKChannel::fillFinalState(), G4INCL::NDeltaToNNKKbChannel::fillFinalState(), G4INCL::NDeltaToNSKChannel::fillFinalState(), G4INCL::NeutralKaonDecayChannel::fillFinalState(), G4INCL::NKbToL2piChannel::fillFinalState(), G4INCL::NKbToLpiChannel::fillFinalState(), G4INCL::NKbToNKb2piChannel::fillFinalState(), G4INCL::NKbToNKbChannel::fillFinalState(), G4INCL::NKbToNKbpiChannel::fillFinalState(), G4INCL::NKbToS2piChannel::fillFinalState(), G4INCL::NKbToSpiChannel::fillFinalState(), G4INCL::NKToNK2piChannel::fillFinalState(), G4INCL::NKToNKChannel::fillFinalState(), G4INCL::NKToNKpiChannel::fillFinalState(), G4INCL::NNbarToNNbar2piChannel::fillFinalState(), G4INCL::NNEtaToMultiPionsChannel::fillFinalState(), G4INCL::NNOmegaToMultiPionsChannel::fillFinalState(), G4INCL::NNToMissingStrangenessChannel::fillFinalState(), G4INCL::NNToMultiPionsChannel::fillFinalState(), G4INCL::NNToNLK2piChannel::fillFinalState(), G4INCL::NNToNLKChannel::fillFinalState(), G4INCL::NNToNLKpiChannel::fillFinalState(), G4INCL::NNToNNEtaChannel::fillFinalState(), G4INCL::NNToNNKKbChannel::fillFinalState(), G4INCL::NNToNNOmegaChannel::fillFinalState(), G4INCL::NNToNSK2piChannel::fillFinalState(), G4INCL::NNToNSKChannel::fillFinalState(), G4INCL::NNToNSKpiChannel::fillFinalState(), G4INCL::NpiToMissingStrangenessChannel::fillFinalState(), G4INCL::NSToNLChannel::fillFinalState(), G4INCL::NSToNSChannel::fillFinalState(), G4INCL::OmegaNToPiNChannel::fillFinalState(), G4INCL::OmegaNToPiPiNChannel::fillFinalState(), G4INCL::PiNToMultiPionsChannel::fillFinalState(), G4INCL::PionResonanceDecayChannel::fillFinalState(), G4INCL::RecombinationChannel::fillFinalState(), G4INCL::SigmaZeroDecayChannel::fillFinalState(), G4INCL::StrangeAbsorbtionChannel::fillFinalState(), Particle(), and Particle().

◆ setUncorrelatedMomentum()

void G4INCL::Particle::setUncorrelatedMomentum ( const G4double p)
inline

Set the uncorrelated momentum.

Definition at line 1145 of file G4INCLParticle.hh.

1145{ uncorrelatedMomentum = p; }

◆ swap()

void G4INCL::Particle::swap ( Particle & rhs)
inlineprotected

Helper method for the assignment operator.

Definition at line 129 of file G4INCLParticle.hh.

129 {
130 std::swap(theZ, rhs.theZ);
131 std::swap(theA, rhs.theA);
132 std::swap(theS, rhs.theS);
133 std::swap(theParticipantType, rhs.theParticipantType);
134 std::swap(theType, rhs.theType);
135 if(rhs.thePropagationEnergy == &(rhs.theFrozenEnergy))
137 else
139 std::swap(theEnergy, rhs.theEnergy);
140 std::swap(theFrozenEnergy, rhs.theFrozenEnergy);
141 if(rhs.thePropagationMomentum == &(rhs.theFrozenMomentum))
143 else
145 std::swap(theMomentum, rhs.theMomentum);
146 std::swap(theFrozenMomentum, rhs.theFrozenMomentum);
147 std::swap(thePosition, rhs.thePosition);
148 std::swap(nCollisions, rhs.nCollisions);
149 std::swap(nDecays, rhs.nDecays);
150 std::swap(thePotentialEnergy, rhs.thePotentialEnergy);
151 // ID intentionally not swapped
152
153#ifdef INCLXX_IN_GEANT4_MODE
154 std::swap(theParentResonancePDGCode, rhs.theParentResonancePDGCode);
155 std::swap(theParentResonanceID, rhs.theParentResonanceID);
156#endif
157
158 std::swap(theHelicity, rhs.theHelicity);
159 std::swap(emissionTime, rhs.emissionTime);
160 std::swap(outOfWell, rhs.outOfWell);
161
162 std::swap(theMass, rhs.theMass);
163 std::swap(rpCorrelated, rhs.rpCorrelated);
164 std::swap(uncorrelatedMomentum, rhs.uncorrelatedMomentum);
165
166 std::swap(theParticleBias, rhs.theParticleBias);
167 std::swap(theBiasCollisionVector, rhs.theBiasCollisionVector);
168
169 }

Referenced by operator=(), and G4INCL::Cluster::swap().

◆ thawPropagation()

void G4INCL::Particle::thawPropagation ( )
inline

Unfreeze particle propagation.

Make the particle use theMomentum and theEnergy for propagation. Call this method to restore the normal propagation if the freezePropagation() method has been called.

Definition at line 1059 of file G4INCLParticle.hh.

Referenced by G4INCL::ReflectionChannel::fillFinalState().

Member Data Documentation

◆ ID

long G4INCL::Particle::ID
protected

◆ INCLBiasVector

std::vector< G4double > G4INCL::Particle::INCLBiasVector
static

Time ordered vector of all bias applied.

/!\ Caution /!\ methods Assotiated to G4VectorCache<T> are: Push_back(…), operator[], Begin(), End(), Clear(), Size() and Pop_back()

Definition at line 1218 of file G4INCLParticle.hh.

Referenced by FillINCLBiasVector(), getBiasFromVector(), getTotalBias(), G4INCL::INCL::processEvent(), and setINCLBiasVector().

◆ nCollisions

◆ nDecays

G4int G4INCL::Particle::nDecays
protected

◆ nextBiasedCollisionID

G4ThreadLocal G4int G4INCL::Particle::nextBiasedCollisionID = 0
static

◆ rpCorrelated

G4bool G4INCL::Particle::rpCorrelated
protected

Definition at line 1242 of file G4INCLParticle.hh.

Referenced by getReflectionMomentum(), rpCorrelate(), rpDecorrelate(), and swap().

◆ theA

◆ theEnergy

◆ theFrozenEnergy

G4double G4INCL::Particle::theFrozenEnergy
protected

◆ theFrozenMomentum

G4INCL::ThreeVector G4INCL::Particle::theFrozenMomentum
protected

◆ theMomentum

◆ theNKaon

G4int G4INCL::Particle::theNKaon
protected

The number of Kaons inside the nucleus (update during the cascade)

Definition at line 1247 of file G4INCLParticle.hh.

Referenced by G4INCL::Nucleus::emitInsideKaon(), getNumberOfKaon(), and setNumberOfKaon().

◆ theParentResonanceID

G4int G4INCL::Particle::theParentResonanceID
protected

Definition at line 1251 of file G4INCLParticle.hh.

Referenced by getParentResonanceID(), setParentResonanceID(), and swap().

◆ theParentResonancePDGCode

G4int G4INCL::Particle::theParentResonancePDGCode
protected

Definition at line 1250 of file G4INCLParticle.hh.

Referenced by getParentResonancePDGCode(), setParentResonancePDGCode(), and swap().

◆ theParticipantType

◆ theParticleBias

G4double G4INCL::Particle::theParticleBias
protected

Definition at line 1245 of file G4INCLParticle.hh.

Referenced by getParticleBias(), setParticleBias(), and swap().

◆ thePosition

◆ thePotentialEnergy

◆ thePropagationEnergy

G4double* G4INCL::Particle::thePropagationEnergy
protected

Definition at line 1231 of file G4INCLParticle.hh.

Referenced by freezePropagation(), Particle(), swap(), and thawPropagation().

◆ thePropagationMomentum

G4INCL::ThreeVector* G4INCL::Particle::thePropagationMomentum
protected

◆ theS

◆ theType

◆ theZ

◆ uncorrelatedMomentum

G4double G4INCL::Particle::uncorrelatedMomentum
protected

Definition at line 1243 of file G4INCLParticle.hh.

Referenced by getReflectionMomentum(), setUncorrelatedMomentum(), and swap().


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