105 for (i = 0; i < 31; i++)
106 theNbin[i] = 1 + 200 * (i + 1);
117 if (l > 30)
return regularIntegrate(l, costh);
118 G4int bin = GetBin(l, costh);
121 y1 = integral[l][bin];
122 y2 = integral[l][bin + 1];
124 return Interpolate(bin, l, y1, y2, costh);
129 if (l > 30)
return regularEvaluate(l, costh);
131 G4int bin = GetBin(l, costh);
132 if (bin != theNbin[l] - 1) {
135 y2 = value[l][bin + 1];
136 result = Interpolate(bin, l, y1, y2, costh);
139 result = value[l][bin];
145 G4double regularEvaluate(
int l,
double x);
146 G4double regularIntegrate(
int l,
double x);
151 bin =
G4int((theNbin[l] - 1) * (costh + 1) / 2.);
152 if (bin == theNbin[l] - 1) bin--;
158 G4double slope = 0, off = 0, x2 = 0, x1mx2;
159 G4int half = (theNbin[l] - 1) / 2;
161 x2 = (bin + 1 - half) /
G4double(half);
162 x1mx2 = 1. /
G4double((theNbin[l] - 1) / 2);
164 slope = (y2 - y1) / x1mx2;
165 off = y2 - x2 * slope;
166 return x * slope + off;
G4double Evaluate(G4int l, G4double costh)
G4double Integrate(G4int l, G4double costh)
G4ParticleHPFastLegendre()
~G4ParticleHPFastLegendre()