195{
202 theNeutron.SetKineticEnergy(eKinetic);
203
208 theTarget =
210
211
212
213
215 G4double nEnergy = theNeutron.GetTotalEnergy();
222 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
223 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
226
227
229 boosted.
Lorentz(theNeutron, theTarget);
232
233 if (repFlag == 1) {
235
236 } else if (repFlag == 2) {
237 cosTh = theProbArray->
Sample(eKinetic);
238
239 } else if (repFlag == 3) {
240 if (eKinetic <= tE_of_repFlag3) {
242 } else {
243 cosTh = theProbArray->
Sample(eKinetic);
244 }
245
246 } else if (repFlag == 0) {
248
249 } else {
250 G4cout <<
"Unusable number for repFlag: repFlag=" << repFlag <<
G4endl;
252 "G4ParticleHPElasticFS::Init -- unusable number for repFlag");
253 }
254
255 if (cosTh < -1.1) { return 0; }
256
262
263 if (frameFlag == 1) {
264
265
266
267
268 theNeutron.Lorentz(theNeutron, theTarget);
270 G4double Pinit = theNeutron.GetTotalMomentum();
271 G4double Einit = theNeutron.GetTotalEnergy();
273
275 G4double sqt = std::sqrt(ratio*ratio - 1.0 + cosTh*cosTh);
277 G4double denom = 1. - beta*beta*cosTh*cosTh;
278 G4double term1 = cosTh*(Einit*ratio + mN)/(mN*ratio + Einit);
279 G4double pN = beta*mN*(term1 + sqt)/denom;
280
281
286
288 pcmRot.
setX(px*cosTh*cosPhi - py*sinPhi + pz*sinth*cosPhi);
289 pcmRot.
setY(px*cosTh*sinPhi + py*cosPhi + pz*sinth*sinPhi);
290 pcmRot.
setZ(-px*sinth + pz*cosTh);
291 theNeutron.SetMomentum(pcmRot);
292 G4double eN = std::sqrt(pN*pN + mN*mN);
293 theNeutron.SetTotalEnergy(eN);
294
295
300
301
302 theNeutron.Lorentz(theNeutron, toLab);
303 theTarget.
Lorentz(theTarget, toLab);
304
305
306 if (theNeutron.GetKineticEnergy() <= 0)
310
311 } else if (frameFlag == 2) {
312
313
317 proj.boost(boostToCM);
318 targ.boost(boostToCM);
319
320
321
322
326
328 pcmRot.
setX(px*cosTh*cosPhi - py*sinPhi + pz*sinth*cosPhi);
329 pcmRot.
setY(px*cosTh*sinPhi + py*cosPhi + pz*sinth*sinPhi);
330 pcmRot.
setZ(-px*sinth + pz*cosTh);
331 proj.setVect(pcmRot);
332 targ.setVect(-pcmRot);
333
334
335 proj.boost(-boostToCM);
336 targ.boost(-boostToCM);
337
338 theNeutron.SetMomentum(proj.vect() );
339 theNeutron.SetTotalEnergy(proj.e() );
340
343
344
345 if (theNeutron.GetKineticEnergy() <= 0) {
347 }
348
349
352 }
353
354 } else {
355 G4cout <<
"Value of frameFlag (1=LAB, 2=CMS): " << frameFlag;
357 "G4ParticleHPElasticFS::ApplyYourSelf frameflag incorrect");
358 }
359
360
361
364
365
371
372
375}
G4GLOB_DLL std::ostream G4cout
void Put(const value_type &val) const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
static G4IonTable * GetIonTable()
G4double GetTemperature() const
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
G4double GetPDGMass() const
G4Cache< G4HadFinalState * > theResult
G4double SampleElastic(G4double anEnergy)
G4double Sample(G4double x)
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetMass(const G4double mas)