#include <G4INCLKinematicsUtils.hh>
Static Public Member Functions | |
static void | transformToLocalEnergyFrame (Nucleus const *const n, Particle *const p) |
static G4double | getLocalEnergy (Nucleus const *const n, Particle *const p) |
static ThreeVector | makeBoostVector (Particle const *const p1, Particle const *const p2) |
static G4double | totalEnergyInCM (Particle const *const p1, Particle const *const p2) |
static G4double | squareTotalEnergyInCM (Particle const *const p1, Particle const *const p2) |
static G4double | momentumInCM (Particle const *const p1, Particle const *const p2) |
gives the momentum in the CM frame of two particles. | |
static G4double | momentumInCM (const G4double E, const G4double M1, const G4double M2) |
static G4double | momentumInLab (Particle const *const p1, Particle const *const p2) |
gives the momentum in the lab frame of two particles. | |
static G4double | momentumInLab (const G4double s, const G4double m1, const G4double m2) |
static G4double | sumTotalEnergies (const ParticleList &) |
static ThreeVector | sumMomenta (const ParticleList &) |
static G4double | energy (const ThreeVector &p, const G4double m) |
static G4double | invariantMass (const G4double E, const ThreeVector &p) |
static G4double | gammaFromKineticEnergy (const ParticleSpecies &p, const G4double EKin) |
Definition at line 47 of file G4INCLKinematicsUtils.hh.
G4double G4INCL::KinematicsUtils::energy | ( | const ThreeVector & | p, | |
const G4double | m | |||
) | [static] |
G4double G4INCL::KinematicsUtils::gammaFromKineticEnergy | ( | const ParticleSpecies & | p, | |
const G4double | EKin | |||
) | [static] |
Definition at line 157 of file G4INCLKinematicsUtils.cc.
References G4INCL::Composite, G4INCL::ParticleTable::getTableMass, G4INCL::ParticleTable::getTableParticleMass, G4INCL::ParticleSpecies::theA, G4INCL::ParticleSpecies::theType, and G4INCL::ParticleSpecies::theZ.
00157 { 00158 G4double mass; 00159 if(p.theType==Composite) 00160 mass = ParticleTable::getTableMass(p.theA, p.theZ); 00161 else 00162 mass = ParticleTable::getTableParticleMass(p.theType); 00163 return (1.+EKin/mass); 00164 }
G4double G4INCL::KinematicsUtils::getLocalEnergy | ( | Nucleus const *const | n, | |
Particle *const | p | |||
) | [static] |
Definition at line 49 of file G4INCLKinematicsUtils.cc.
References G4INCL::Particle::getKineticEnergy(), G4INCL::Particle::getMass(), G4INCL::Particle::getPosition(), G4INCL::Particle::getPotentialEnergy(), G4INCL::Particle::getType(), G4INCL::ThreeVector::mag(), CLHEP::detail::n, G4INCL::Particle::print(), and WARN.
Referenced by transformToLocalEnergyFrame().
00049 { 00050 // assert(!p->isPion()); // No local energy for pions 00051 00052 G4double vloc = 0.0; 00053 const G4double r = p->getPosition().mag(); 00054 const G4double mass = p->getMass(); 00055 00056 // Local energy is constant outside the surface 00057 if(r > n->getUniverseRadius()) { 00058 WARN("Tried to evaluate local energy for a particle outside the maximum radius." 00059 << std::endl << p->print() << std::endl 00060 << "Maximum radius = " << n->getDensity()->getMaximumRadius() << std::endl 00061 << "Universe radius = " << n->getUniverseRadius() << std::endl); 00062 return 0.0; 00063 } 00064 00065 G4double pfl0 = 0.0; 00066 const G4double kinE = p->getKineticEnergy(); 00067 if(kinE <= n->getPotential()->getFermiEnergy(p->getType())) { 00068 pfl0 = n->getPotential()->getFermiMomentum(p); 00069 } else { 00070 const G4double tf0 = p->getPotentialEnergy() - n->getPotential()->getSeparationEnergy(p); 00071 if(tf0<0.0) return 0.0; 00072 pfl0 = std::sqrt(tf0*(tf0 + 2.0*mass)); 00073 } 00074 const G4double pl = pfl0*n->getDensity()->getMaxTFromR(r); 00075 vloc = std::sqrt(pl*pl + mass*mass) - mass; 00076 00077 return vloc; 00078 }
G4double G4INCL::KinematicsUtils::invariantMass | ( | const G4double | E, | |
const ThreeVector & | p | |||
) | [static] |
ThreeVector G4INCL::KinematicsUtils::makeBoostVector | ( | Particle const *const | p1, | |
Particle const *const | p2 | |||
) | [static] |
Definition at line 80 of file G4INCLKinematicsUtils.cc.
References G4INCL::Particle::getEnergy(), and G4INCL::Particle::getMomentum().
Referenced by G4INCL::InteractionAvatar::preInteraction(), and squareTotalEnergyInCM().
00080 { 00081 const G4double totalEnergy = p1->getEnergy() + p2->getEnergy(); 00082 return ((p1->getMomentum() + p2->getMomentum())/totalEnergy); 00083 }
G4double G4INCL::KinematicsUtils::momentumInCM | ( | const G4double | E, | |
const G4double | M1, | |||
const G4double | M2 | |||
) | [static] |
Definition at line 110 of file G4INCLKinematicsUtils.cc.
00110 { 00111 return 0.5*std::sqrt((E*E - std::pow(M1 + M2, 2)) 00112 *(E*E - std::pow(M1 - M2, 2)))/E; 00113 }
G4double G4INCL::KinematicsUtils::momentumInCM | ( | Particle const *const | p1, | |
Particle const *const | p2 | |||
) | [static] |
gives the momentum in the CM frame of two particles.
The formula is the following:
where is the scalar product of the momentum four-vectors:
p1 | pointer to particle 1 | |
p2 | pointer to particle 2 |
Definition at line 98 of file G4INCLKinematicsUtils.cc.
References G4INCL::ThreeVector::dot(), ERROR, G4INCL::Particle::getEnergy(), G4INCL::Particle::getMass(), and G4INCL::Particle::getMomentum().
Referenced by G4INCL::DeltaDecayChannel::computeDecayTime(), G4INCL::Nucleus::decayOutgoingDeltas(), G4INCL::RecombinationChannel::getFinalState(), G4INCL::DeltaProductionChannel::getFinalState(), and G4INCL::DeltaDecayChannel::getFinalState().
00098 { 00099 const G4double m1sq = std::pow(p1->getMass(),2); 00100 const G4double m2sq = std::pow(p2->getMass(),2); 00101 const G4double z = p1->getEnergy()*p2->getEnergy() - p1->getMomentum().dot(p2->getMomentum()); 00102 G4double pcm2 = (z*z-m1sq*m2sq)/(2*z+m1sq+m2sq); 00103 if(pcm2 < 0.0) { 00104 ERROR("KinematicsUtils::momentumInCM: pcm2 == " << pcm2 << " < 0.0" << std::endl); 00105 pcm2 = 0.0; 00106 } 00107 return std::sqrt(pcm2); 00108 }
G4double G4INCL::KinematicsUtils::momentumInLab | ( | const G4double | s, | |
const G4double | m1, | |||
const G4double | m2 | |||
) | [static] |
Definition at line 115 of file G4INCLKinematicsUtils.cc.
References ERROR.
00115 { 00116 const G4double m1sq = m1*m1; 00117 const G4double m2sq = m2*m2; 00118 G4double plab2 = (s*s-2*s*(m1sq+m2sq)+(m1sq-m2sq)*(m1sq-m2sq))/(4*m2sq); 00119 if(plab2 < 0.0) { 00120 ERROR("KinematicsUtils::momentumInLab: plab2 == " << plab2 << " < 0.0; m1sq == " << m1sq << "; m2sq == " << m2sq << "; s == " << s << std::endl); 00121 plab2 = 0.0; 00122 } 00123 return std::sqrt(plab2); 00124 }
G4double G4INCL::KinematicsUtils::momentumInLab | ( | Particle const *const | p1, | |
Particle const *const | p2 | |||
) | [static] |
gives the momentum in the lab frame of two particles.
Assumes particle 1 carries all the momentum and particle 2 is at rest.
The formula is the following:
p1 | pointer to particle 1 | |
p2 | pointer to particle 2 |
Definition at line 126 of file G4INCLKinematicsUtils.cc.
References G4INCL::Particle::getMass(), and squareTotalEnergyInCM().
Referenced by G4INCL::CrossSections::deltaProduction(), G4INCL::ElasticChannel::getFinalState(), G4INCL::DeltaProductionChannel::getFinalState(), and G4INCL::CrossSections::recombination().
00126 { 00127 const G4double m1 = p1->getMass(); 00128 const G4double m2 = p2->getMass(); 00129 const G4double s = squareTotalEnergyInCM(p1, p2); 00130 return KinematicsUtils::momentumInLab(s, m1, m2); 00131 }
G4double G4INCL::KinematicsUtils::squareTotalEnergyInCM | ( | Particle const *const | p1, | |
Particle const *const | p2 | |||
) | [static] |
Definition at line 89 of file G4INCLKinematicsUtils.cc.
References ERROR, G4INCL::Particle::getEnergy(), G4INCL::ThreeVector::mag2(), and makeBoostVector().
Referenced by G4INCL::StandardPropagationModel::generateBinaryCollisionAvatar(), G4INCL::BinaryCollisionAvatar::getChannel(), G4INCL::ElasticChannel::getFinalState(), momentumInLab(), G4INCL::CrossSections::recombination(), and totalEnergyInCM().
00089 { 00090 G4double beta2 = KinematicsUtils::makeBoostVector(p1, p2).mag2(); 00091 if(beta2 > 1.0) { 00092 ERROR("KinematicsUtils::squareTotalEnergyInCM: beta2 == " << beta2 << " > 1.0" << std::endl); 00093 beta2 = 0.0; 00094 } 00095 return (1.0 - beta2)*std::pow(p1->getEnergy() + p2->getEnergy(), 2); 00096 }
ThreeVector G4INCL::KinematicsUtils::sumMomenta | ( | const ParticleList & | ) | [static] |
Definition at line 141 of file G4INCLKinematicsUtils.cc.
00141 { 00142 ThreeVector p(0.0, 0.0, 0.0); 00143 for(ParticleIter i = pl.begin(); i != pl.end(); ++i) { 00144 p += (*i)->getMomentum(); 00145 } 00146 return p; 00147 }
G4double G4INCL::KinematicsUtils::sumTotalEnergies | ( | const ParticleList & | ) | [static] |
Definition at line 133 of file G4INCLKinematicsUtils.cc.
00133 { 00134 G4double E = 0.0; 00135 for(ParticleIter i = pl.begin(); i != pl.end(); ++i) { 00136 E += (*i)->getEnergy(); 00137 } 00138 return E; 00139 }
G4double G4INCL::KinematicsUtils::totalEnergyInCM | ( | Particle const *const | p1, | |
Particle const *const | p2 | |||
) | [static] |
Definition at line 85 of file G4INCLKinematicsUtils.cc.
References squareTotalEnergyInCM().
Referenced by G4INCL::CrossSections::deltaProduction(), G4INCL::RecombinationChannel::getFinalState(), G4INCL::DeltaProductionChannel::getFinalState(), and G4INCL::CrossSections::pionNucleon().
00085 { 00086 return std::sqrt(squareTotalEnergyInCM(p1,p2)); 00087 }
void G4INCL::KinematicsUtils::transformToLocalEnergyFrame | ( | Nucleus const *const | n, | |
Particle *const | p | |||
) | [static] |
Definition at line 42 of file G4INCLKinematicsUtils.cc.
References G4INCL::Particle::adjustMomentumFromEnergy(), G4INCL::Particle::getEnergy(), getLocalEnergy(), CLHEP::detail::n, and G4INCL::Particle::setEnergy().
Referenced by G4INCL::StandardPropagationModel::generateBinaryCollisionAvatar(), and G4INCL::InteractionAvatar::preInteractionLocalEnergy().
00042 { 00043 const G4double localEnergy = KinematicsUtils::getLocalEnergy(n, p); 00044 const G4double localTotalEnergy = p->getEnergy() - localEnergy; 00045 p->setEnergy(localTotalEnergy); 00046 p->adjustMomentumFromEnergy(); 00047 }