167{
168
170
171
172
173
174 G4int iZ = aTarg.GetZ_asInt();
175 G4int iA = aTarg.GetA_asInt();
176
178
180
182
184
187
188
191 theNeutron.SetKineticEnergy( ke );
192
194
196
197
199 G4ThreeVector v ( G4RandGauss::shoot() * std::sqrt( kT*mass )
200 , G4RandGauss::shoot() * std::sqrt( kT*mass )
201 , G4RandGauss::shoot() * std::sqrt( kT*mass ) );
202
203 theTarget.SetMomentum( v );
204
205
207 G4double nEnergy = theNeutron.GetTotalEnergy();
209 G4double tEnergy = theTarget.GetTotalEnergy();
214 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
215 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
218
219 theNeutron.Lorentz(theNeutron, theCMS);
220 theTarget.Lorentz(theTarget, theCMS);
221 G4double en = theNeutron.GetTotalMomentum();
226 tempVector.
setX(std::cos(theta)*std::sin(cms_theta)*std::cos(cms_phi)
227 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::cos(cms_phi)
228 -std::sin(theta)*std::sin(phi)*std::sin(cms_phi) );
229 tempVector.
setY(std::cos(theta)*std::sin(cms_theta)*std::sin(cms_phi)
230 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::sin(cms_phi)
231 +std::sin(theta)*std::sin(phi)*std::cos(cms_phi) );
232 tempVector.
setZ(std::cos(theta)*std::cos(cms_theta)
233 -std::sin(theta)*std::cos(phi)*std::sin(cms_theta) );
234 tempVector *= en;
235 theNeutron.SetMomentum(tempVector);
236 theTarget.SetMomentum(-tempVector);
237 G4double tP = theTarget.GetTotalMomentum();
239 theTarget.SetTotalEnergy(std::sqrt((tP+tM)*(tP+tM)-2.*tP*tM));
240 theNeutron.Lorentz(theNeutron, -1.*theCMS);
241 theTarget.Lorentz(theTarget, -1.*theCMS);
242
246
249
251
252 return theResult;
253
254}
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
G4int GetNucleusEncoding(G4int iZ, G4int iA)
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)