183 {
184
190 theNeutron.SetKineticEnergy( eKinetic );
191
192
193
198
199
200
201
202
203
204
205
206
208 G4double nEnergy = theNeutron.GetTotalEnergy();
210
216 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
217 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
220
221
223 boosted.
Lorentz(theNeutron, theTarget);
226 if(repFlag == 1)
227 {
229 }
230
231 else if (repFlag==2)
232 {
233 cosTh = theProbArray->
Sample(eKinetic);
234 }
235 else if (repFlag==3)
236 {
237 if ( eKinetic <= tE_of_repFlag3 )
238 {
240 }
241 else
242 {
243 cosTh = theProbArray->
Sample(eKinetic);
244 }
245 }
246 else if (repFlag==0)
247 {
249 }
250 else
251 {
252 G4cout <<
"unusable number for repFlag: repFlag="<<repFlag<<
G4endl;
253 throw G4HadronicException(__FILE__, __LINE__,
"G4NeutronHPElasticFS::Init -- unusable number for repFlag");
254 }
255 if(cosTh<-1.1) { return 0; }
259 if (frameFlag == 1)
260 {
261
262
263
264 theNeutron.Lorentz(theNeutron, theTarget);
265 G4double e0 = theNeutron.GetTotalEnergy();
266 G4double p0 = theNeutron.GetTotalMomentum();
270 G4double ap = (mT+eE)*(mT-eE) + (p0+mN)*(p0-mN);
271 G4double a = 4*(eE+p0*cosTh)*(eE-p0*cosTh);
274 G4double en = (-b+std::sqrt(b*b - 4*a*c) )/(2*a);
275 G4ThreeVector tempVector(en*sinth*std::cos(phi), en*sinth*std::sin(phi), en*std::cos(theta) );
276 theNeutron.SetMomentum(tempVector);
277 theNeutron.SetTotalEnergy(std::sqrt(en*en+theNeutron.GetMass()*theNeutron.GetMass()));
278
279 theNeutron.Lorentz(theNeutron, -1.*theTarget);
280
281 theNeutron.Lorentz(theNeutron, theCMS);
284
285 theNeutron.Lorentz(theNeutron, -1.*theCMS);
286 theTarget.
Lorentz(theTarget, -1.*theCMS);
287
288 if ( theNeutron.GetKineticEnergy() <= 0 ) theNeutron.SetTotalEnergy ( theNeutron.GetMass() * ( 1 + std::pow( 10 , -15.65 ) ) );
290 }
291 else if (frameFlag == 2)
292 {
293 theNeutron.Lorentz(theNeutron, theCMS);
294 theTarget.
Lorentz(theTarget, theCMS);
295 G4double en = theNeutron.GetTotalMomentum();
300 tempVector.
setX(std::cos(theta)*std::sin(cms_theta)*std::cos(cms_phi)
301 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::cos(cms_phi)
302 -std::sin(theta)*std::sin(phi)*std::sin(cms_phi) );
303 tempVector.
setY(std::cos(theta)*std::sin(cms_theta)*std::sin(cms_phi)
304 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::sin(cms_phi)
305 +std::sin(theta)*std::sin(phi)*std::cos(cms_phi) );
306 tempVector.
setZ(std::cos(theta)*std::cos(cms_theta)
307 -std::sin(theta)*std::cos(phi)*std::sin(cms_theta) );
308 tempVector *= en;
309 theNeutron.SetMomentum(tempVector);
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328 theNeutron.Lorentz(theNeutron, -1.*theCMS);
329
330 if ( theNeutron.GetKineticEnergy() <= 0 )
331 {
332
333
334
335 theNeutron.SetTotalEnergy ( theNeutron.GetMass() * ( 1 + std::pow( 10 , -15.65 ) ) );
336 }
337
338 theTarget.
Lorentz(theTarget, -1.*theCMS);
339
341 {
342
343
344
346 }
347 }
348 else
349 {
350 G4cout <<
"Value of frameFlag (1=LAB, 2=CMS): "<<frameFlag;
351 throw G4HadronicException(__FILE__, __LINE__,
"G4NeutronHPElasticFS::ApplyYourSelf frameflag incorrect");
352 }
353
354
358 if(targetMass<4.5)
359 {
360 if(targetMass<1)
361 {
362
364 }
365 else if(targetMass<2 )
366 {
367
369 }
370 else if(targetMass<2.999 )
371 {
372
374 }
375 else if(targetMass<3 )
376 {
377
379 }
380 else
381 {
382
384 }
385 }
386 else
387 {
390 }
393
394
397 }
G4DLLIMPORT std::ostream G4cout
static G4Deuteron * Deuteron()
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
void SetStatusChange(G4HadFinalStateStatus aS)
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
G4double GetTemperature() const
G4HadFinalState theResult
G4double SampleElastic(G4double anEnergy)
G4double Sample(G4double x)
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
static G4Proton * Proton()
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
G4double GetTotalMomentum() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetMass(const G4double mas)
static G4Triton * Triton()