Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4AntiNeutronAnnihilationAtRest.cc
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4AntiNeutronAnnihilationAtRest.cc 104961 2017-07-03 07:36:14Z gcosmo $
27 // G4AntiNeutronAnnihilationAtRest physics process
28 // Larry Felawka (TRIUMF), April 1998
29 //---------------------------------------------------------------------
30 
32 #include "G4SystemOfUnits.hh"
33 #include "G4DynamicParticle.hh"
34 #include "G4ParticleTypes.hh"
36 #include "G4HadronicDeprecate.hh"
37 #include "Randomize.hh"
38 #include "G4Exp.hh"
39 #include "G4Log.hh"
40 #include "G4Pow.hh"
41 
42 #define MAX_SECONDARIES 100
43 
44 // constructor
45 
47  G4ProcessType aType) :
48  G4VRestProcess (processName, aType), // initialization
49  massPionMinus(G4PionMinus::PionMinus()->GetPDGMass()/GeV),
50  massPionZero(G4PionZero::PionZero()->GetPDGMass()/GeV),
51  massPionPlus(G4PionPlus::PionPlus()->GetPDGMass()/GeV),
52  massGamma(G4Gamma::Gamma()->GetPDGMass()/GeV),
53  massAntiNeutron(G4AntiNeutron::AntiNeutron()->GetPDGMass()/GeV),
54  massNeutron(G4Neutron::Neutron()->GetPDGMass()/GeV),
55  pdefGamma(G4Gamma::Gamma()),
56  pdefPionPlus(G4PionPlus::PionPlus()),
57  pdefPionZero(G4PionZero::PionZero()),
58  pdefPionMinus(G4PionMinus::PionMinus()),
59  pdefProton(G4Proton::Proton()),
60  pdefNeutron(G4Neutron::Neutron()),
61  pdefAntiNeutron(G4AntiNeutron::AntiNeutron()),
62  pdefDeuteron(G4Deuteron::Deuteron()),
63  pdefTriton(G4Triton::Triton()),
64  pdefAlpha(G4Alpha::Alpha())
65 {
66  G4HadronicDeprecate("G4AntiNeutronAnnihilationAtRest");
67  if (verboseLevel>0) {
68  G4cout << GetProcessName() << " is created "<< G4endl;
69  }
74 
77  = evapEnergy3 = 0.0;
78  ngkine = ntot = 0;
79 }
80 
81 // destructor
82 
84 {
86  delete [] pv;
87  delete [] eve;
88  delete [] gkin;
89 }
90 
92 {
94 }
95 
97 {
99 }
100 
101 // methods.............................................................................
102 
104  const G4ParticleDefinition& particle
105  )
106 {
107  return ( &particle == pdefAntiNeutron );
108 
109 }
110 
111 // Warning - this method may be optimized away if made "inline"
113 {
114  return ( ngkine );
115 
116 }
117 
118 // Warning - this method may be optimized away if made "inline"
120 {
121  return ( &gkin[0] );
122 
123 }
124 
126  const G4Track& track,
128  )
129 {
130  // beggining of tracking
132 
133  // condition is set to "Not Forced"
134  *condition = NotForced;
135 
136  // get mean life time
137  currentInteractionLength = GetMeanLifeTime(track, condition);
138 
139  if ((currentInteractionLength <0.0) || (verboseLevel>2)){
140  G4cout << "G4AntiNeutronAnnihilationAtRestProcess::AtRestGetPhysicalInteractionLength ";
141  G4cout << "[ " << GetProcessName() << "]" <<G4endl;
142  track.GetDynamicParticle()->DumpInfo();
143  G4cout << " in Material " << track.GetMaterial()->GetName() <<G4endl;
144  G4cout << "MeanLifeTime = " << currentInteractionLength/ns << "[ns]" <<G4endl;
145  }
146 
148 
149 }
150 
152  const G4Track& track,
153  const G4Step&
154  )
155 //
156 // Handles AntiNeutrons at rest; an AntiNeutron can either create secondaries
157 // or do nothing (in which case it should be sent back to decay-handling
158 // section
159 //
160 {
161 
162 // Initialize ParticleChange
163 // all members of G4VParticleChange are set to equal to
164 // corresponding member in G4Track
165 
167 
168 // Store some global quantities that depend on current material and particle
169 
170  globalTime = track.GetGlobalTime()/s;
171  G4Material * aMaterial = track.GetMaterial();
172  const G4int numberOfElements = aMaterial->GetNumberOfElements();
173  const G4ElementVector* theElementVector = aMaterial->GetElementVector();
174 
175  const G4double* theAtomicNumberDensity = aMaterial->GetAtomicNumDensityVector();
176  G4double normalization = 0;
177  for ( G4int i1=0; i1 < numberOfElements; i1++ )
178  {
179  normalization += theAtomicNumberDensity[i1] ; // change when nucleon specific
180  // probabilities are included.
181  }
182  G4double runningSum= 0.;
183  G4double random = G4UniformRand()*normalization;
184  for ( G4int i2=0; i2 < numberOfElements; i2++ )
185  {
186  runningSum += theAtomicNumberDensity[i2]; // change when nucleon specific
187  // probabilities are included.
188  if (random<=runningSum)
189  {
190  targetCharge = G4double( ((*theElementVector)[i2])->GetZ());
191  targetAtomicMass = (*theElementVector)[i2]->GetN();
192  }
193  }
194  if (random>runningSum)
195  {
196  targetCharge = G4double( ((*theElementVector)[numberOfElements-1])->GetZ());
197  targetAtomicMass = (*theElementVector)[numberOfElements-1]->GetN();
198  }
199 
200  if (verboseLevel>1) {
201  G4cout << "G4AntiNeutronAnnihilationAtRest::AtRestDoIt is invoked " <<G4endl;
202  }
203 
204  G4ParticleMomentum momentum;
205  G4float localtime;
206 
208 
209  GenerateSecondaries(); // Generate secondaries
210 
212 
213  for ( G4int isec = 0; isec < ngkine; isec++ ) {
214  G4DynamicParticle* aNewParticle = new G4DynamicParticle;
215  aNewParticle->SetDefinition( gkin[isec].GetParticleDef() );
216  aNewParticle->SetMomentum( gkin[isec].GetMomentum() * GeV );
217 
218  localtime = globalTime + gkin[isec].GetTOF();
219 
220  G4Track* aNewTrack = new G4Track( aNewParticle, localtime*s, position );
221  aNewTrack->SetTouchableHandle(track.GetTouchableHandle());
222  aParticleChange.AddSecondary( aNewTrack );
223 
224  }
225 
227 
228  aParticleChange.ProposeTrackStatus(fStopAndKill); // Kill the incident AntiNeutron
229 
230 // clear InteractionLengthLeft
231 
233 
234  return &aParticleChange;
235 
236 }
237 
238 
240 {
241  G4int index;
242  G4int l;
243  G4int nopt;
244  G4int i;
245  // DHW 15 May 2011: unused: static G4ParticleDefinition* jnd;
246 
247  for (i = 1; i <= MAX_SECONDARIES; ++i) {
248  pv[i].SetZero();
249  }
250 
251 
252  ngkine = 0; // number of generated secondary particles
253  ntot = 0;
254  result.SetZero();
257  result.SetTOF( 0. );
259 
260  // *** SELECT PROCESS FOR CURRENT PARTICLE ***
261 
263 
264  // *** CHECK WHETHER THERE ARE NEW PARTICLES GENERATED ***
265  if (ntot != 0 || result.GetParticleDef() != pdefAntiNeutron) {
266  // *** CURRENT PARTICLE IS NOT THE SAME AS IN THE BEGINNING OR/AND ***
267  // *** ONE OR MORE SECONDARIES HAVE BEEN GENERATED ***
268 
269  // --- INITIAL PARTICLE TYPE HAS BEEN CHANGED ==> PUT NEW TYPE ON ---
270  // --- THE GEANT TEMPORARY STACK ---
271 
272  // --- PUT PARTICLE ON THE STACK ---
273  gkin[0] = result;
274  gkin[0].SetTOF( result.GetTOF() * 5e-11 );
275  ngkine = 1;
276 
277  // --- ALL QUANTITIES ARE TAKEN FROM THE GHEISHA STACK WHERE THE ---
278  // --- CONVENTION IS THE FOLLOWING ---
279 
280  // --- ONE OR MORE SECONDARIES HAVE BEEN GENERATED ---
281  for (l = 1; l <= ntot; ++l) {
282  index = l - 1;
283  // DHW 15 May 2011: unused: jnd = eve[index].GetParticleDef();
284 
285  // --- ADD PARTICLE TO THE STACK IF STACK NOT YET FULL ---
286  if (ngkine < MAX_SECONDARIES) {
287  gkin[ngkine] = eve[index];
288  gkin[ngkine].SetTOF( eve[index].GetTOF() * 5e-11 );
289  ++ngkine;
290  }
291  }
292  }
293  else {
294  // --- NO SECONDARIES GENERATED AND PARTICLE IS STILL THE SAME ---
295  // --- ==> COPY EVERYTHING BACK IN THE CURRENT GEANT STACK ---
296  ngkine = 0;
297  ntot = 0;
298  globalTime += result.GetTOF() * G4float(5e-11);
299  }
300 
301  // --- LIMIT THE VALUE OF NGKINE IN CASE OF OVERFLOW ---
303 
304 } // GenerateSecondaries
305 
306 
308 {
309  G4int i;
310  G4float r, p1, p2, p3;
311  G4int fivex;
312  G4float rr, ran, rrr, ran1;
313 
314  // *** GENERATION OF POISSON DISTRIBUTION ***
315  // *** NVE 16-MAR-1988 CERN GENEVA ***
316  // ORIGIN : H.FESEFELDT (27-OCT-1983)
317 
318  // --- USE NORMAL DISTRIBUTION FOR <X> > 9.9 ---
319  if (xav > G4float(9.9)) {
320  // ** NORMAL DISTRIBUTION WITH SIGMA**2 = <X>
321  Normal(&ran1);
322  ran1 = xav + ran1 * std::sqrt(xav);
323  *iran = G4int(ran1);
324  if (*iran < 0) {
325  *iran = 0;
326  }
327  }
328  else {
329  fivex = G4int(xav * G4float(5.));
330  *iran = 0;
331  if (fivex > 0) {
332  r = G4Exp(-G4double(xav));
333  ran1 = G4UniformRand();
334  if (ran1 > r) {
335  rr = r;
336  for (i = 1; i <= fivex; ++i) {
337  ++(*iran);
338  if (i <= 5) {
339  rrr = G4Pow::GetInstance()->powN(xav, i) / NFac(i);
340  }
341  // ** STIRLING' S FORMULA FOR LARGE NUMBERS
342  if (i > 5) {
343  rrr = G4Exp(i * G4Log(xav) -
344  (i + G4float(.5)) * G4Log(i * G4float(1.)) +
345  i - G4float(.9189385));
346  }
347  rr += r * rrr;
348  if (ran1 <= rr) {
349  break;
350  }
351  }
352  }
353  }
354  else {
355  // ** FOR VERY SMALL XAV TRY IRAN=1,2,3
356  p1 = xav * G4Exp(-G4double(xav));
357  p2 = xav * p1 / G4float(2.);
358  p3 = xav * p2 / G4float(3.);
359  ran = G4UniformRand();
360  if (ran >= p3) {
361  if (ran >= p2) {
362  if (ran >= p1) {
363  *iran = 0;
364  }
365  else {
366  *iran = 1;
367  }
368  }
369  else {
370  *iran = 2;
371  }
372  }
373  else {
374  *iran = 3;
375  }
376  }
377  }
378 
379 } // Poisso
380 
381 
383 {
384  G4int ret_val;
385 
386  G4int i, j;
387 
388  // *** NVE 16-MAR-1988 CERN GENEVA ***
389  // ORIGIN : H.FESEFELDT (27-OCT-1983)
390 
391  ret_val = 1;
392  j = n;
393  if (j > 1) {
394  if (j > 10) {
395  j = 10;
396  }
397  for (i = 2; i <= j; ++i) {
398  ret_val *= i;
399  }
400  }
401  return ret_val;
402 
403 } // NFac
404 
405 
407 {
408  // *** NVE 14-APR-1988 CERN GENEVA ***
409  // ORIGIN : H.FESEFELDT (27-OCT-1983)
410 
411  *ran = (G4float)(-6. + 12.*G4UniformRand());
412 } // Normal
413 
414 
416 {
417  G4float brr[3] = { G4float(.125),G4float(.25),G4float(.5) };
418 
419  G4float r__1;
420 
421  G4int i, ii, kk;
422  G4int nt;
423  G4float cfa, eka;
424  G4int ika, nbl;
425  G4float ran, pcm;
426  G4int isw;
427  G4float tex;
428  G4ParticleDefinition* ipa1;
429  G4float ran1, ran2, ekin, tkin;
430  G4float targ;
431  G4ParticleDefinition* inve;
432  G4float ekin1, ekin2, black;
433  G4float pnrat, rmnve1, rmnve2;
434  G4float ek, en;
435 
436  // *** ANTI NEUTRON ANNIHILATION AT REST ***
437  // *** NVE 04-MAR-1988 CERN GENEVA ***
438  // ORIGIN : H.FESEFELDT (09-JULY-1987)
439 
440  // NOPT=0 NO ANNIHILATION
441  // NOPT=1 ANNIH.IN PI+ PI-
442  // NOPT=2 ANNIH.IN PI0 PI0
443  // NOPT=3 ANNIH.IN PI+ PI0
444  // NOPT=4 ANNIH.IN GAMMA GAMMA
445 
446  pv[1].SetZero();
447  pv[1].SetMass( massAntiNeutron );
448  pv[1].SetKineticEnergyAndUpdate( 0. );
449  pv[1].SetTOF( result.GetTOF() );
451  isw = 1;
452  ran = G4UniformRand();
453  if (ran > brr[0]) {
454  isw = 2;
455  }
456  if (ran > brr[1]) {
457  isw = 3;
458  }
459  if (ran > brr[2]) {
460  isw = 4;
461  }
462  *nopt = isw;
463  // **
464  // ** EVAPORATION
465  // **
466  rmnve1 = massPionPlus;
467  rmnve2 = massPionMinus;
468  if (isw == 2) {
469  rmnve1 = massPionZero;
470  rmnve2 = massPionZero;
471  }
472  if (isw == 3) {
473  rmnve2 = massPionZero;
474  }
475  if (isw == 4) {
476  rmnve1 = massGamma;
477  rmnve2 = massGamma;
478  }
479  ek = massNeutron + massAntiNeutron - rmnve1 - rmnve2;
480  tkin = ExNu(ek);
481  ek -= tkin;
482  if (ek < G4float(1e-4)) {
483  ek = G4float(1e-4);
484  }
485  ek /= G4float(2.);
486  en = ek + (rmnve1 + rmnve2) / G4float(2.);
487  r__1 = en * en - rmnve1 * rmnve2;
488  pcm = r__1 > 0 ? std::sqrt(r__1) : 0;
489  pv[2].SetZero();
490  pv[2].SetMass( rmnve1 );
491  pv[3].SetZero();
492  pv[3].SetMass( rmnve2 );
493  if (isw > 3) {
494  pv[2].SetMass( 0. );
495  pv[3].SetMass( 0. );
496  }
497  pv[2].SetEnergyAndUpdate( std::sqrt(pv[2].GetMass()*pv[2].GetMass()+pcm*pcm) );
498  pv[2].SetTOF( result.GetTOF() );
499  pv[3].SetEnergy( std::sqrt(pv[3].GetMass()*pv[3].GetMass()+pcm*pcm) );
500  pv[3].SetMomentumAndUpdate( -pv[2].GetMomentum().x(), -pv[2].GetMomentum().y(), -pv[2].GetMomentum().z() );
501  pv[3].SetTOF( result.GetTOF() );
502  switch ((int)isw) {
503  case 1:
506  break;
507  case 2:
510  break;
511  case 3:
514  break;
515  case 4:
518  break;
519  }
520  nt = 3;
521  if (targetAtomicMass >= G4float(1.5)) {
522  cfa = (targetAtomicMass - G4float(1.)) / G4float(120.) *
523  G4float(.025) * G4Exp(-G4double(targetAtomicMass - G4float(1.)) /
524  G4float(120.));
525  targ = G4float(1.);
526  tex = evapEnergy1;
527  if (tex >= G4float(.001)) {
528  black = (targ * G4float(1.25) +
530  Poisso(black, &nbl);
531  if (G4float(G4int(targ) + nbl) > targetAtomicMass) {
532  nbl = G4int(targetAtomicMass - targ);
533  }
534  if (nt + nbl > (MAX_SECONDARIES - 2)) {
535  nbl = (MAX_SECONDARIES - 2) - nt;
536  }
537  if (nbl > 0) {
538  ekin = tex / nbl;
539  ekin2 = 0.0f;
540  for (i = 1; i <= nbl; ++i) {
541  if (nt == (MAX_SECONDARIES - 2)) {
542  continue;
543  }
544  if (ekin2 > tex) {
545  break;
546  }
547  ran1 = G4UniformRand();
548  Normal(&ran2);
549  ekin1 = -G4double(ekin) * G4Log(ran1) -
550  cfa * (ran2 * G4float(.5) + G4float(1.));
551  if (ekin1 < 0.0f) {
552  ekin1 = G4Log(ran1) * G4float(-.01);
553  }
554  ekin1 *= G4float(1.);
555  ekin2 += ekin1;
556  if (ekin2 > tex) {
557  ekin1 = tex - (ekin2 - ekin1);
558  }
559  if (ekin1 < 0.0f) {
560  ekin1 = G4float(.001);
561  }
562  ipa1 = pdefNeutron;
563  pnrat = G4float(1.) - targetCharge / targetAtomicMass;
564  if (G4UniformRand() > pnrat) {
565  ipa1 = pdefProton;
566  }
567  ++nt;
568  pv[nt].SetZero();
569  pv[nt].SetMass( ipa1->GetPDGMass()/GeV );
570  pv[nt].SetKineticEnergyAndUpdate( ekin1 );
571  pv[nt].SetTOF( result.GetTOF() );
572  pv[nt].SetParticleDef( ipa1 );
573  }
574  if (targetAtomicMass >= G4float(230.) && ek <= G4float(2.)) {
575  ii = nt + 1;
576  kk = 0;
577  eka = ek;
578  if (eka > G4float(1.)) {
579  eka *= eka;
580  }
581  if (eka < 0.1f) {
582  eka = 0.1f;
583  }
584  ika = G4int(G4float(3.6) / eka);
585  for (i = 1; i <= nt; ++i) {
586  --ii;
587  if (pv[ii].GetParticleDef() != pdefProton) {
588  continue;
589  }
590  ipa1 = pdefNeutron;
591  pv[ii].SetMass( ipa1->GetPDGMass()/GeV );
592  pv[ii].SetParticleDef( ipa1 );
593  ++kk;
594  if (kk > ika) {
595  break;
596  }
597  }
598  }
599  }
600  }
601  // **
602  // ** THEN ALSO DEUTERONS, TRITONS AND ALPHAS
603  // **
604  tex = evapEnergy3;
605  if (tex >= G4float(.001)) {
606  black = (targ * G4float(1.25) + G4float(1.5)) * evapEnergy3 /
608  Poisso(black, &nbl);
609  if (nt + nbl > (MAX_SECONDARIES - 2)) {
610  nbl = (MAX_SECONDARIES - 2) - nt;
611  }
612  if (nbl > 0) {
613  ekin = tex / nbl;
614  ekin2 = 0.0f;
615  for (i = 1; i <= nbl; ++i) {
616  if (nt == (MAX_SECONDARIES - 2)) {
617  continue;
618  }
619  if (ekin2 > tex) {
620  break;
621  }
622  ran1 = G4UniformRand();
623  Normal(&ran2);
624  ekin1 = -G4double(ekin) * G4Log(ran1) -
625  cfa * (ran2 * G4float(.5) + G4float(1.));
626  if (ekin1 < 0.0f) {
627  ekin1 = G4Log(ran1) * G4float(-.01);
628  }
629  ekin1 *= G4float(1.);
630  ekin2 += ekin1;
631  if (ekin2 > tex) {
632  ekin1 = tex - (ekin2 - ekin1);
633  }
634  if (ekin1 < 0.0f) {
635  ekin1 = G4float(.001);
636  }
637  ran = G4UniformRand();
638  inve = pdefDeuteron;
639  if (ran > G4float(.6)) {
640  inve = pdefTriton;
641  }
642  if (ran > G4float(.9)) {
643  inve = pdefAlpha;
644  }
645  ++nt;
646  pv[nt].SetZero();
647  pv[nt].SetMass( inve->GetPDGMass()/GeV );
648  pv[nt].SetKineticEnergyAndUpdate( ekin1 );
649  pv[nt].SetTOF( result.GetTOF() );
650  pv[nt].SetParticleDef( inve );
651  }
652  }
653  }
654  }
655  result = pv[2];
656  if (nt == 2) {
657  return;
658  }
659  for (i = 3; i <= nt; ++i) {
660  if (ntot >= MAX_SECONDARIES) {
661  return;
662  }
663  eve[ntot++] = pv[i];
664  }
665 
666 } // AntiNeutronAnnihilation
667 
668 
670 {
671  G4float ret_val, r__1;
672 
673  G4float cfa, gfa, ran1, ran2, ekin1, atno3;
674  G4int magic;
675  G4float fpdiv;
676 
677  // *** NUCLEAR EVAPORATION AS FUNCTION OF ATOMIC NUMBER ATNO ***
678  // *** AND KINETIC ENERGY EKIN OF PRIMARY PARTICLE ***
679  // *** NVE 04-MAR-1988 CERN GENEVA ***
680  // ORIGIN : H.FESEFELDT (10-DEC-1986)
681 
682  ret_val = 0.f;
683  if (targetAtomicMass >= G4float(1.5)) {
684  magic = 0;
685  if (G4int(targetCharge + 0.1f) == 82) {
686  magic = 1;
687  }
688  ekin1 = ek1;
689  if (ekin1 < 0.1f) {
690  ekin1 = 0.1f;
691  }
692  if (ekin1 > G4float(4.)) {
693  ekin1 = G4float(4.);
694  }
695  // ** 0.35 VALUE AT 1 GEV
696  // ** 0.05 VALUE AT 0.1 GEV
697  cfa = G4float(.13043478260869565);
698  cfa = cfa * G4Log(ekin1) + G4float(.35);
699  if (cfa < G4float(.15)) {
700  cfa = G4float(.15);
701  }
702  ret_val = cfa * G4float(7.716) * G4Exp(-G4double(cfa));
703  atno3 = targetAtomicMass;
704  if (atno3 > G4float(120.)) {
705  atno3 = G4float(120.);
706  }
707  cfa = (atno3 - G4float(1.)) /
708  G4float(120.) * G4Exp(-G4double(atno3 - G4float(1.)) / G4float(120.));
709  ret_val *= cfa;
710  r__1 = ekin1;
711  fpdiv = G4float(1.) - r__1 * r__1 * G4float(.25);
712  if (fpdiv < G4float(.5)) {
713  fpdiv = G4float(.5);
714  }
715  gfa = (targetAtomicMass - G4float(1.)) /
716  G4float(70.) * G4float(2.) *
718  evapEnergy1 = ret_val * fpdiv;
719  evapEnergy3 = ret_val - evapEnergy1;
720  Normal(&ran1);
721  Normal(&ran2);
722  if (magic == 1) {
723  ran1 = 0.0f;
724  ran2 = 0.0f;
725  }
726  evapEnergy1 *= ran1 * gfa + G4float(1.);
727  if (evapEnergy1 < 0.0f) {
728  evapEnergy1 = 0.0f;
729  }
730  evapEnergy3 *= ran2 * gfa + G4float(1.);
731  if (evapEnergy3 < 0.0f) {
732  evapEnergy3 = 0.0f;
733  }
734 
735  // Loop checking, 06-Aug-2015, Vladimir Ivanchenko
736  while ((ret_val = evapEnergy1 + evapEnergy3) >= ek1) {
737  evapEnergy1 *= G4float(1.) - G4UniformRand() * G4float(.5);
738  evapEnergy3 *= G4float(1.) - G4UniformRand() * G4float(.5);
739  }
740  }
741  return ret_val;
742 
743 } // ExNu
Float_t x
Definition: compare.C:6
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
G4double ek
virtual void ResetNumberOfInteractionLengthLeft()
Definition: G4VProcess.cc:96
void RegisterExtraProcess(G4VProcess *)
TString targ[ntarg]
Definition: Style.C:27
G4AntiNeutronAnnihilationAtRest(const G4AntiNeutronAnnihilationAtRest &)
#define G4endl
Definition: G4ios.hh:61
Float_t y
Definition: compare.C:6
const char * p
Definition: xmltok.h:285
void SetKineticEnergyAndUpdate(G4double ekin)
float G4float
Definition: G4Types.hh:77
Double_t z
void SetEnergyAndUpdate(G4double e)
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:191
const G4TouchableHandle & GetTouchableHandle() const
G4double condition(const G4ErrorSymMatrix &m)
G4double GetPDGMass() const
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double powN(G4double x, G4int n) const
Definition: G4Pow.cc:177
void AddSecondary(G4Track *aSecondary)
G4ParticleChange aParticleChange
Definition: G4VProcess.hh:289
G4double currentInteractionLength
Definition: G4VProcess.hh:297
const G4String & GetName() const
Definition: G4Material.hh:179
const XML_Char * s
Definition: expat.h:262
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
static G4Pow * GetInstance()
Definition: G4Pow.cc:57
G4double GetMeanLifeTime(const G4Track &, G4ForceCondition *)
void SetParticleDef(G4ParticleDefinition *c)
virtual void Initialize(const G4Track &)
G4ProcessType
void BuildPhysicsTable(const G4ParticleDefinition &)
#define G4UniformRand()
Definition: Randomize.hh:53
G4double GetGlobalTime() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
const G4String & GetProcessName() const
Definition: G4VProcess.hh:411
const G4ThreeVector & GetPosition() const
void PreparePhysicsTable(const G4ParticleDefinition &)
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
Definition: G4Step.hh:76
G4Material * GetMaterial() const
void PrintInfo(const G4ParticleDefinition *)
static G4HadronicProcessStore * Instance()
void SetMomentumAndUpdate(G4ParticleMomentum mom)
void DeRegisterExtraProcess(G4VProcess *)
std::vector< G4Element * > G4ElementVector
int G4int
Definition: G4Types.hh:78
G4int verboseLevel
Definition: G4VProcess.hh:371
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:435
G4ForceCondition
void SetMomentum(const G4ThreeVector &momentum)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4GLOB_DLL std::ostream G4cout
#define G4HadronicDeprecate(name)
Char_t n[5]
const G4double * GetAtomicNumDensityVector() const
Definition: G4Material.hh:217
G4ParticleDefinition * GetParticleDef()
G4double theNumberOfInteractionLengthLeft
Definition: G4VProcess.hh:293
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void DumpInfo(G4int mode=0) const
void ProposeTrackStatus(G4TrackStatus status)
static constexpr double GeV
Definition: G4SIunits.hh:217
#define ns
Definition: xmlparse.cc:614
const G4DynamicParticle * GetDynamicParticle() const
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
size_t GetNumberOfElements() const
Definition: G4Material.hh:187
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
#define MAX_SECONDARIES
G4bool IsApplicable(const G4ParticleDefinition &)
void SetNumberOfSecondaries(G4int totSecondaries)