33 #define INCLXX_IN_GEANT4_MODE 1
58 WARN(
"Tried to evaluate local energy for a particle outside the maximum radius."
59 << std::endl << p->
print() << std::endl
67 if(kinE <= n->getPotential()->getFermiEnergy(p->
getType())) {
71 if(tf0<0.0)
return 0.0;
72 pfl0 = std::sqrt(tf0*(tf0 + 2.0*mass));
75 vloc = std::sqrt(pl*pl + mass*mass) - mass;
92 ERROR(
"KinematicsUtils::squareTotalEnergyInCM: beta2 == " << beta2 <<
" > 1.0" << std::endl);
102 G4double pcm2 = (z*z-m1sq*m2sq)/(2*z+m1sq+m2sq);
104 ERROR(
"KinematicsUtils::momentumInCM: pcm2 == " << pcm2 <<
" < 0.0" << std::endl);
107 return std::sqrt(pcm2);
111 return 0.5*std::sqrt((E*E - std::pow(M1 + M2, 2))
112 *(E*E - std::pow(M1 - M2, 2)))/E;
118 G4double plab2 = (s*s-2*s*(m1sq+m2sq)+(m1sq-m2sq)*(m1sq-m2sq))/(4*m2sq);
120 ERROR(
"KinematicsUtils::momentumInLab: plab2 == " << plab2 <<
" < 0.0; m1sq == " << m1sq <<
"; m2sq == " << m2sq <<
"; s == " << s << std::endl);
123 return std::sqrt(plab2);
136 E += (*i)->getEnergy();
144 p += (*i)->getMomentum();
150 return std::sqrt(p.
mag2() + m*
m);
154 return std::sqrt(E*E - p.
mag2());
163 return (1.+EKin/mass);