203 theNeutron.SetKineticEnergy( eKinetic );
222 G4double nEnergy = theNeutron.GetTotalEnergy();
230 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
231 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
237 boosted.
Lorentz(theNeutron, theTarget);
267 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::Init -- unusable number for repFlag");
269 if(cosTh<-1.1) {
return 0; }
278 theNeutron.Lorentz(theNeutron, theTarget);
279 G4double e0 = theNeutron.GetTotalEnergy();
280 G4double p0 = theNeutron.GetTotalMomentum();
284 G4double ap = (mT+eE)*(mT-eE) + (p0+mN)*(p0-mN);
285 G4double a = 4*(eE+p0*cosTh)*(eE-p0*cosTh);
288 G4double en = (-b+std::sqrt(b*b - 4*a*c) )/(2*a);
289 G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
290 theNeutron.SetMomentum(tempVector);
291 theNeutron.SetTotalEnergy(std::sqrt(en*en+theNeutron.GetMass()*theNeutron.GetMass()));
293 theNeutron.Lorentz(theNeutron, -1.*theTarget);
295 theNeutron.Lorentz(theNeutron, theCMS);
299 theNeutron.Lorentz(theNeutron, -1.*theCMS);
300 theTarget.
Lorentz(theTarget, -1.*theCMS);
302 if ( theNeutron.GetKineticEnergy() <= 0 ) theNeutron.SetTotalEnergy ( theNeutron.GetMass() * ( 1 +
G4Pow::GetInstance()->
powA( 10 , -15.65 ) ) );
307 theNeutron.Lorentz(theNeutron, theCMS);
308 theTarget.
Lorentz(theTarget, theCMS);
309 G4double en = theNeutron.GetTotalMomentum();
314 tempVector.
setX(std::cos(theta)*std::sin(cms_theta)*std::cos(cms_phi)
315 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::cos(cms_phi)
316 -std::sin(theta)*std::sin(phi)*std::sin(cms_phi) );
317 tempVector.
setY(std::cos(theta)*std::sin(cms_theta)*std::sin(cms_phi)
318 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::sin(cms_phi)
319 +std::sin(theta)*std::sin(phi)*std::cos(cms_phi) );
320 tempVector.
setZ(std::cos(theta)*std::cos(cms_theta)
321 -std::sin(theta)*std::cos(phi)*std::sin(cms_theta) );
323 theNeutron.SetMomentum(tempVector);
342 theNeutron.Lorentz(theNeutron, -1.*theCMS);
344 if ( theNeutron.GetKineticEnergy() <= 0 )
352 theTarget.
Lorentz(theTarget, -1.*theCMS);
365 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPElasticFS::ApplyYourSelf frameflag incorrect");
static G4Pow * GetInstance()
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
void Put(const value_type &val) const
G4ParticleHPPartial * theProbArray
G4Cache< G4HadFinalState *> theResult
void SetMomentum(const G4ThreeVector &momentum)
const G4Material * GetMaterial() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
const G4LorentzVector & Get4Momentum() const
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetStatusChange(G4HadFinalStateStatus aS)
void SetMass(const G4double mas)
G4GLOB_DLL std::ostream G4cout
G4double Sample(G4double x)
void SetTotalEnergy(const G4double en)
static const double twopi
G4ErrorTarget * theTarget
G4double GetTemperature() const
G4ParticleHPLegendreStore * theCoefficients
static G4IonTable * GetIonTable()
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
void SetEnergyChange(G4double anEnergy)
G4double SampleElastic(G4double anEnergy)
G4double GetKineticEnergy() const
G4double GetPDGMass() const
G4double GetTotalEnergy() const
G4double GetKineticEnergy() const
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
G4double powA(G4double A, G4double y) const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentumChange(const G4ThreeVector &aV)
G4ThreeVector GetMomentum() const