79{
84 if(0 < Z) { ec = cb; }
85
86
87
88
89
90
91
92
95
96 if(idx == 0) {
97
98 if(resA < 40) { signor =0.7 + resA*0.0075; }
99 else if(resA > 210) { signor = 1. + (resA-210)*0.004; }
100 lambda = paramK[idx][3]/resA13 + paramK[idx][4];
101 mu = (paramK[idx][5] + paramK[idx][6]*resA13)*resA13;
102
103
104
105 nu = std::abs((paramK[idx][7]*resA + paramK[idx][8]*resA13)*resA13
106 + paramK[idx][9]);
107
108 } else {
109
110 if(idx == 1) {
111 if (resA <= 60) { signor = 0.92; }
112 else if (resA < 100) { signor = 0.8 + resA*0.002; }
113 }
114 lambda = paramK[idx][3]*resA + paramK[idx][4];
115 mu = paramK[idx][5]*amu1;
116 nu = amu1* (paramK[idx][7] + paramK[idx][8]*ec + paramK[idx][9]*ecsq);
117 }
118
119
120
121
122
123 if(elab < ec) {
125 if(0 < Z) { p += paramK[idx][1]/ec + paramK[idx][2]/ecsq; }
130 if (det > 0.0) { ecut = (std::sqrt(det) - a)/(2*p); }
131 else { ecut = -a/(2*p); }
132
133
134
135
136 if(0 == idx) {
137 sig = (
lambda*ec + mu + nu/ec)*signor*std::sqrt(elab/ec);
138 } else if(elab >= ecut) {
139 sig = (p*elab*elab + a*elab + b)*signor;
140
141
142 if(1 == idx) {
143
144
145 G4double cc = std::min(3.15, ec*0.5);
146 G4double signor2 = (ec - elab - cc) *3.15/ (0.7*cc);
147 sig /= (1. +
G4Exp(signor2));
148 }
149 }
150
151
152
153
154 } else {
155
156
157
158
161
162
163 static const G4double flow = 1.e-18;
164 static const G4double spill= 1.e+18;
165 if(0 < Z) {
166 etest = 0.0;
168 xnulam = std::min(xnulam, spill);
169 if (xnulam >= flow) {
170 if(1 == idx) { etest = std::sqrt(xnulam) + 7.; }
171 else { etest = 1.2 *std::sqrt(xnulam); }
172 }
173 }
174
175 sig = (
lambda*elab + mu + nu/elab)*signor;
176 if (xnulam >= flow && elab >= etest) {
178 geom = 1.23*resA13 + paramK[idx][10] + 4.573/geom;
179 geom = 31.416 * geom * geom;
180 sig = std::max(sig, geom);
181 }
182 }
183 sig = std::max(sig, 0.0);
184
185 return sig;
186}
double A(double temperature)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.