Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4PreCompoundFragment.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: G4PreCompoundFragment.cc 108685 2018-02-27 07:58:38Z gcosmo $
27 //
28 // J. M. Quesada (August 2008).
29 // Based on previous work by V. Lara
30 //
31 // Modified:
32 // 06.09.2008 JMQ Also external choice has been added for:
33 // - superimposed Coulomb barrier (if useSICB=true)
34 // 20.08.2010 V.Ivanchenko cleanup
35 //
36 
37 #include "G4PreCompoundFragment.hh"
38 #include "G4KalbachCrossSection.hh"
40 #include "Randomize.hh"
41 
43  G4VCoulombBarrier* aCoulBarrier)
44  : G4VPreCompoundFragment(p, aCoulBarrier)
45 {
46  muu = probmax = 0.0;
47  if(0 == theZ) { index = 0; }
48  else if(1 == theZ) { index = theA; }
49  else { index = theA + 1; }
50 }
51 
53 {}
54 
57 {
58  //G4cout << theCoulombBarrier << " " << GetMaximalKineticEnergy() << G4endl;
59  // If theCoulombBarrier effect is included in the emission probabilities
60  // Coulomb barrier is the lower limit of integration over kinetic energy
61 
63 
64  if (theMaxKinEnergy <= theMinKinEnergy) { return 0.0; }
65 
66  // compute power once
67  if(0 < index) {
69  }
70 
73  /*
74  G4cout << "## G4PreCompoundFragment::CalcEmisProb "
75  << "Z= " << aFragment.GetZ_asInt()
76  << " A= " << aFragment.GetA_asInt()
77  << " Elow= " << LowerLimit/MeV
78  << " Eup= " << UpperLimit/MeV
79  << " prob= " << theEmissionProbability
80  << G4endl;
81  */
83 }
84 
87  const G4Fragment & aFragment)
88 {
89  static const G4double den = 1.0/CLHEP::MeV;
90  G4double del = (up - low);
91  G4int nbins = std::max(3,(G4int)(del*den));
92  del /= (G4double)nbins;
93  G4double e = low + 0.5*del;
95  //G4cout << " 0. e= " << e << " y= " << probmax << G4endl;
96 
98  for (G4int i=1; i<nbins; ++i) {
99  e += del;
100  G4double y = ProbabilityDistributionFunction(e, aFragment);
101  probmax = std::max(probmax, y);
102  sum += y;
103  if(y < sum*0.01) { break; }
104  //G4cout << " " << i << ". e= " << e << " y= " << y << " sum= " << sum << G4endl;
105  }
106  sum *= del;
107  //G4cout << "Evap prob: " << sum << " probmax= " << probmax << G4endl;
108  return sum;
109 }
110 
112 {
113  G4double res;
114  if(OPTxs == 0) {
115  res = GetOpt0(ekin);
116 
117  } else if(OPTxs <= 2) {
119  theResA13, muu,
120  index, theZ, theResA);
121 
122  } else {
124  theResA13, muu,
125  index, theZ, theA, theResA);
126  }
127  return res;
128 }
129 
130 // *********************** OPT=0 : Dostrovski's cross section ***************
132 {
134  // cross section is now given in mb (r0 is in mm) for the sake of consistency
135  //with the rest of the options
136  return 1.e+25*CLHEP::pi*r0*r0*theResA13*GetAlpha()*(1.+GetBeta()/ekin);
137 }
138 
140 {
142  static const G4double toler = 1.25;
143  probmax *= toler;
144  G4double prob, T(0.0);
145  CLHEP::HepRandomEngine* rndm = G4Random::getTheEngine();
146  G4int i;
147  for(i=0; i<100; ++i) {
148  T = theMinKinEnergy + delta*rndm->flat();
149  prob = ProbabilityDistributionFunction(T, fragment);
150  /*
151  if(prob > probmax) {
152  G4cout << "G4PreCompoundFragment WARNING: prob= " << prob
153  << " probmax= " << probmax << G4endl;
154  G4cout << "i= " << i << " Z= " << theZ << " A= " << theA
155  << " resZ= " << theResZ << " resA= " << theResA << "\n"
156  << " T= " << T << " Tmax= " << theMaxKinEnergy
157  << " Tmin= " << limit
158  << G4endl;
159  for(G4int i=0; i<N; ++i) { G4cout << " " << probability[i]; }
160  G4cout << G4endl;
161  }
162  */
163  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
164  if(probmax*rndm->flat() <= prob) { break; }
165  }
166  /*
167  G4cout << "G4PreCompoundFragment: i= " << i << " Z= " << theZ << " A= " << theA
168  <<" T(MeV)= " << T << " Emin(MeV)= " << theMinKinEnergy << " Emax= "
169  << theMaxKinEnergy << G4endl;
170  */
171  return T;
172 }
173 
G4double SampleKineticEnergy(const G4Fragment &aFragment)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4DeexPrecoParameters * theParameters
static G4double ComputeCrossSection(G4double K, G4double cb, G4double resA13, G4double amu1, G4int idx, G4int Z, G4int A, G4int resA)
virtual G4double GetAlpha() const =0
Float_t den
virtual G4double ProbabilityDistributionFunction(G4double K, const G4Fragment &aFragment)=0
Float_t y
Definition: compare.C:6
const char * p
Definition: xmltok.h:285
static G4double ComputeCrossSection(G4double K, G4double cb, G4double resA13, G4double amu1, G4int idx, G4int Z, G4int resA)
G4double CrossSection(G4double ekin) const
double G4double
Definition: G4Types.hh:76
virtual double flat()=0
static constexpr double MeV
G4double IntegrateEmissionProbability(G4double Low, G4double Up, const G4Fragment &aFragment)
G4PreCompoundFragment(const G4ParticleDefinition *, G4VCoulombBarrier *aCoulombBarrier)
virtual G4double GetBeta() const =0
int G4int
Definition: G4Types.hh:78
G4double CalcEmissionProbability(const G4Fragment &aFragment)
static G4double ComputePowerParameter(G4int resA, G4int idx)
G4double GetOpt0(G4double ekin) const
static constexpr double pi
Definition: SystemOfUnits.h:54