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