Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4NeutronHPKallbachMannSyst.cc
Go to the documentation of this file.
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 // neutron_hp -- source file
27 // J.P. Wellisch, Nov-1996
28 // A prototype of the low energy neutron transport model.
29 //
30 // 080801 Protect div0 error, when theCompundFraction is 1 by T. Koi
31 //
33 #include "G4SystemOfUnits.hh"
34 #include "Randomize.hh"
35 #include "G4HadronicException.hh"
36 
38 {
39  G4double result;
40 
41  G4double zero = GetKallbachZero(anEnergy);
42  if(zero>1) zero=1.;
43  if(zero<-1)zero=-1.;
44  G4double max = Kallbach(zero, anEnergy);
45  double upper = Kallbach(1., anEnergy);
46  double lower = Kallbach(-1., anEnergy);
47  if(upper>max) max=upper;
48  if(lower>max) max=lower;
49  G4double value, random;
50  do
51  {
52  result = 2.*G4UniformRand()-1;
53  value = Kallbach(result, anEnergy)/max;
54  random = G4UniformRand();
55  }
56  while(random>value);
57 
58  return result;
59 }
60 
62 {
63  // Kallbach-Mann systematics without normalization.
64  G4double result;
65  G4double theX = A(anEnergy)*cosTh;
66  result = 0.5*(std::exp( theX)*(1+theCompoundFraction)
67  +std::exp(-theX)*(1-theCompoundFraction));
68  return result;
69 }
70 
72 {
73  G4double result;
74  if ( theCompoundFraction == 1 )
75  {
76  //G4cout << "080730b Adjust theCompoundFraction " << G4endl;
77  theCompoundFraction *= (1-1.0e-15);
78  }
79  result = 0.5 * (1./A(anEnergy)) * std::log((1-theCompoundFraction)/(1+theCompoundFraction));
80  return result;
81 }
82 
84 {
85  G4double result;
86  G4double C1 = 0.04/MeV;
87  G4double C2 = 1.8E-6/(MeV*MeV*MeV);
88  G4double C3 = 6.7E-7/(MeV*MeV*MeV*MeV);
89 
90  G4double epsa = anEnergy*theTargetMass/(theTargetMass+theIncidentMass);
91  G4int Ac = theTargetA+1;
92  G4int Nc = Ac - theTargetZ;
93  G4int AA = theTargetA;
94  G4int ZA = theTargetZ;
95  G4double ea = epsa+SeparationEnergy(Ac, Nc, AA, ZA);
96  G4double Et1 = 130*MeV;
97  G4double R1 = std::min(ea, Et1);
98  // theProductEnergy is still in CMS!!!
99  G4double epsb = theProductEnergy*(theProductMass+theResidualMass)/theResidualMass;
100  G4int AB = theResidualA;
101  G4int ZB = theResidualZ;
102  G4double eb = epsb+SeparationEnergy(Ac, Nc, AB, ZB );
103  G4double X1 = R1*eb/ea;
104  G4double Et3 = 41*MeV;
105  G4double R3 = std::min(ea, Et3);
106  G4double X3 = R3*eb/ea;
107  G4double Ma = 1;
108  G4double mb(0);
109  G4int productA = theTargetA+1-theResidualA;
110  G4int productZ = theTargetZ-theResidualZ;
111  if(productZ==0)
112  {
113  mb = 0.5;
114  }
115  else if(productZ==1)
116  {
117  mb = 1;
118  }
119  else if(productZ==2)
120  {
121  mb = 2;
122  if(productA==3) mb=1;
123  }
124  else
125  {
126  throw G4HadronicException(__FILE__, __LINE__, "Severe error in the sampling of Kallbach-Mann Systematics");
127  }
128 
129  result = C1*X1 + C2*std::pow(X1, 3.) + C3*Ma*mb*std::pow(X3, 4.);
130  return result;
131 }
132 
134 {
135  G4double result;
136  G4int NA = AA-ZA;
137  G4int Zc = Ac-Nc;
138  result = 15.68*(Ac-AA);
139  result += -28.07*((Nc-Zc)*(Nc-Zc)/Ac - (NA-ZA)*(NA-ZA)/AA);
140  result += -18.56*(std::pow(G4double(Ac), 2./3.) - std::pow(G4double(AA), 2./3.));
141  result += 33.22*((Nc-Zc)*(Nc-Zc)/std::pow(G4double(Ac), 4./3.) - (NA-ZA)*(NA-ZA)/std::pow(G4double(AA), 4./3.));
142  result += -0.717*(Zc*Zc/std::pow(G4double(Ac),1./3.)-ZA*ZA/std::pow(G4double(AA),1./3.));
143  result += 1.211*(Zc*Zc/Ac-ZA*ZA/AA);
144  G4double totalBinding(0);
145  G4int productA = theTargetA+1-theResidualA;
146  G4int productZ = theTargetZ-theResidualZ;
147  if(productZ==0&&productA==1) totalBinding=0;
148  if(productZ==1&&productA==1) totalBinding=0;
149  if(productZ==1&&productA==2) totalBinding=2.22;
150  if(productZ==1&&productA==3) totalBinding=8.48;
151  if(productZ==2&&productA==3) totalBinding=7.72;
152  if(productZ==2&&productA==4) totalBinding=28.3;
153  result += -totalBinding;
154  result *= MeV;
155  return result;
156 }