125 G4double en = aHadron.GetTotalMomentum();
127 boosted.
Lorentz(*fCache.
Get().theProjectileRP, *fCache.
Get().theTarget);
138 else if(theAngularDistributionType == 1) {cosTh = theCoefficients->
SampleMax(kineticEnergy);}
139 else if(theAngularDistributionType == 2) {cosTh = theProbArray->
Sample(kineticEnergy);}
141 G4cout <<
"unknown distribution found for Angular: "<< theAngularDistributionType <<
G4endl;
142 throw G4HadronicException(__FILE__, __LINE__,
"unknown distribution needs implementation!!!");
148 G4ThreeVector temp(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
149 aHadron.SetMomentum( temp );
151 else if(frameFlag == 2)
154 boostedN.
Lorentz(*fCache.
Get().theProjectileRP, *fCache.
Get().theTarget);
166 else if(theAngularDistributionType == 1) {cosTh = theCoefficients->
SampleMax(kineticEnergy);}
167 else if(theAngularDistributionType == 2) {cosTh = theProbArray->
Sample(kineticEnergy);}
169 G4cout <<
"unknown distribution found for Angular: "<< theAngularDistributionType <<
G4endl;
170 throw G4HadronicException(__FILE__, __LINE__,
"unknown distribution needs implementation!!!");
201 G4ThreeVector temp(sinth*std::cos(phi), sinth*std::sin(phi), std::cos(theta) );
251 G4double QValue = aHadron.GetKineticEnergy() - kineticEnergy;
254 G4double kinE = (A1+1-A1prim)/(A1+1)/(A1+1)*(A1*kineticEnergy+(1+A1)*QValue);
255 G4double totalE = kinE + aHadron.GetMass();
256 G4double mom2 = totalE*totalE - aHadron.GetMass()*aHadron.GetMass();
258 if ( mom2 > 0.0 ) mom = std::sqrt( mom2 );
261 aHadron.SetMomentum( mom*temp );
262 aHadron.SetKineticEnergy(kinE);
266 boostedT.
Lorentz(*fCache.
Get().theTarget, *fCache.
Get().theTarget);
276 G4double cmsMom = std::sqrt(the3trafo*the3trafo);
277 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
281 aHadron.Lorentz(aHadron, trafo);
286 throw G4HadronicException(__FILE__, __LINE__,
"Tried to sample non isotropic neutron angular");
288 aHadron.Lorentz(aHadron, -1.*(*fCache.
Get().theTarget));
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double SampleMax(G4double energy)
static constexpr double twopi
void SetMass(const G4double mas)
G4GLOB_DLL std::ostream G4cout
G4double Sample(G4double x)
void SetTotalEnergy(const G4double en)
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const