33 #define INCLXX_IN_GEANT4_MODE 1
42 namespace KinematicsUtils {
60 INCL_WARN(
"Tried to evaluate local energy for a particle outside the maximum radius."
61 << std::endl << p->
print() << std::endl
70 if(kinE <= n->getPotential()->getFermiEnergy(t)) {
74 if(tf0<0.0)
return 0.0;
75 pfl0 = std::sqrt(tf0*(tf0 + 2.0*mass));
82 vloc = std::sqrt(pl*pl + mass*mass) - mass;
99 INCL_ERROR(
"squareTotalEnergyInCM: beta2 == " << beta2 <<
" > 1.0" << std::endl);
109 G4double pcm2 = (z*z-m1sq*m2sq)/(2*z+m1sq+m2sq);
111 INCL_ERROR(
"momentumInCM: pcm2 == " << pcm2 <<
" < 0.0" << std::endl);
114 return std::sqrt(pcm2);
118 return 0.5*std::sqrt((E*E - std::pow(M1 + M2, 2))
119 *(E*E - std::pow(M1 - M2, 2)))/E;
125 G4double plab2 = (s*s-2*s*(m1sq+m2sq)+(m1sq-m2sq)*(m1sq-m2sq))/(4*m2sq);
127 INCL_ERROR(
"momentumInLab: plab2 == " << plab2 <<
" < 0.0; m1sq == " << m1sq <<
"; m2sq == " << m2sq <<
"; s == " << s << std::endl);
130 return std::sqrt(plab2);
143 E += (*i)->getEnergy();
151 p += (*i)->getMomentum();
157 return std::sqrt(p.
mag2() + m*
m);
165 return E*E - p.
mag2();
174 return (1.+EKin/mass);
G4double getReflectionMomentum() const
Return the reflection momentum.
G4double getMass() const
Get the cached particle mass.
G4double getMinPFromR(const ParticleType t, const G4double r) const
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
G4double dot(const ThreeVector &v) const
void transformToLocalEnergyFrame(Nucleus const *const n, Particle *const p)
G4double getFermiMomentum(const Particle *const p) const
Return the Fermi momentum for a particle.
G4double squareTotalEnergyInCM(Particle const *const p1, Particle const *const p2)
ThreeVector sumMomenta(const ParticleList &)
const G4INCL::ThreeVector & getMomentum() const
std::string print() const
G4double getEnergy() const
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
ThreeVector makeBoostVector(Particle const *const p1, Particle const *const p2)
G4double getPotentialEnergy() const
Get the particle potential energy.
void setEnergy(G4double energy)
G4double gammaFromKineticEnergy(const ParticleSpecies &p, const G4double EKin)
G4double getSeparationEnergy(const Particle *const p) const
Return the separation energy for a particle.
G4double invariantMass(const G4double E, const ThreeVector &p)
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
G4INCL::ParticleType getType() const
NuclearDensity const * getDensity() const
Getter for theDensity.
G4double energy(const ThreeVector &p, const G4double m)
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
const G4INCL::ThreeVector & getPosition() const
G4double squareInvariantMass(const G4double E, const ThreeVector &p)
G4double getMaximumRadius() const
G4double getKineticEnergy() const
Get the particle kinetic energy.
G4double getUniverseRadius() const
Getter for theUniverseRadius.
G4double momentumInLab(Particle const *const p1, Particle const *const p2)
gives the momentum in the lab frame of two particles.
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
const ThreeVector & adjustMomentumFromEnergy()
Rescale the momentum to match the total energy.
G4double getMaxRFromP(const ParticleType t, const G4double p) const
Get the maximum allowed radius for a given momentum.
ParticleList::const_iterator ParticleIter
G4double sumTotalEnergies(const ParticleList &)
G4double getLocalEnergy(Nucleus const *const n, Particle *const p)