34{
35
37
38
39
40
41 G4int iZ = aTarg.GetZ_asInt();
42 G4int iA = aTarg.GetA_asInt();
43
45
46
49
52
55
56
59 theNeutron.SetKineticEnergy( ke );
60
61
62
64
66
67
70 , G4RandGauss::shoot() * std::sqrt( kT*mass )
71 , G4RandGauss::shoot() * std::sqrt( kT*mass ) );
72 theTarget.SetMomentum( v );
73
75 G4double nEnergy = theNeutron.GetTotalEnergy();
77 G4double tEnergy = theTarget.GetTotalEnergy();
82 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
83 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
86
87 theNeutron.Lorentz(theNeutron, theCMS);
88 theTarget.Lorentz(theTarget, theCMS);
89 G4double en = theNeutron.GetTotalMomentum();
94 tempVector.
setX( std::cos(theta)*std::sin(cms_theta)*std::cos(cms_phi)
95 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::cos(cms_phi)
96 -std::sin(theta)*std::sin(phi)*std::sin(cms_phi) );
97 tempVector.
setY( std::cos(theta)*std::sin(cms_theta)*std::sin(cms_phi)
98 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::sin(cms_phi)
99 +std::sin(theta)*std::sin(phi)*std::cos(cms_phi) );
100 tempVector.
setZ( std::cos(theta)*std::cos(cms_theta)
101 -std::sin(theta)*std::cos(phi)*std::sin(cms_theta) );
102 tempVector *= en;
103 theNeutron.SetMomentum(tempVector);
104 theTarget.SetMomentum(-tempVector);
105 G4double tP = theTarget.GetTotalMomentum();
107 theTarget.SetTotalEnergy(std::sqrt((tP+tM)*(tP+tM)-2.*tP*tM));
108
109
110 theNeutron.Lorentz(theNeutron, -1.*theCMS);
111
112
113 if ( theNeutron.GetKineticEnergy() <= 0 )
114 {
115 theNeutron.SetTotalEnergy ( theNeutron.GetMass() * ( 1 + std::pow( 10 , -15.65 ) ) );
116 }
117
118 theTarget.Lorentz(theTarget, -1.*theCMS);
119 if ( theTarget.GetKineticEnergy() < 0 )
120 {
121 theTarget.SetTotalEnergy ( theTarget.GetMass() * ( 1 + std::pow( 10 , -15.65 ) ) );
122 }
123
124
125 theTarget.Lorentz(theTarget, -1.*theCMS);
126
130
131
134
136
137 return theResult;
138
139}
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
double getElasticFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
void AddSecondary(G4DynamicParticle *aP)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4HadFinalState theParticleChange
G4int GetNucleusEncoding(G4int iZ, G4int iA)
std::map< G4int, G4LENDUsedTarget * > usedTarget_map
G4LENDManager * lend_manager
G4double GetTemperature() const
G4double GetPDGMass() const
G4ParticleDefinition * FindIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
static G4ParticleTable * GetParticleTable()
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
void SetMass(const G4double mas)