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