49 G4int low(0), high(0);
67 for(i0=0; i0<601; i0++)
76 if(try01>max1) max1=try01;
83 if(try02>max2) max2=try02;
90 G4int icounter_max=1024;
94 if ( icounter > icounter_max ) {
95 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
117 if(0>=theNorm)
break;
119 while(random>value/theNorm);
131 G4int low(0), high(0);
149 for(i0=0; i0<601; i0++)
157 if(try01>max1) max1=try01;
163 if(try02>max2) max2=try02;
170 G4int icounter_max=1024;
174 if ( icounter > icounter_max ) {
175 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
195 if(0>=theNorm)
break;
197 while(random>value/theNorm);
207 G4int low(0), high(0);
221 G4double try01=0, try02=0, try11=0, try12=0;
241 G4int icounter_max=1024;
245 if ( icounter > icounter_max ) {
246 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
265 while(random>value/theNorm);
273 G4int low(0), high(0);
290 for(i0=0; i0<601; i0++)
296 theBuffer.
SetData(i0, costh, y);
301 for (i0=1; i0<601; i0++)
304 if(rand < theBuffer.
GetY(i0)/theBuffer.
GetY(600))
break;
315 x1 = theBuffer.
GetY(it)/norm;
316 x2 = theBuffer.
GetY(it-1)/norm;
317 y1 = theBuffer.
GetX(it);
318 y2 = theBuffer.
GetX(it-1);
G4double Integrate(G4int l, G4double costh)
G4double GetEnergy(G4int i)
G4double Integrate(G4int k, G4double costh)
void SetData(G4int i, G4double x, G4double y)
G4double SampleMax(G4double energy)
G4double SampleDiscreteTwoBody(G4double anEnergy)
G4double GetCoeff(G4int i, G4int l)
G4GLOB_DLL std::ostream G4cout
G4InterpolationScheme GetScheme(G4int index) const
G4double GetX(G4int i) const
G4double GetY(G4double x)
G4double Interpolate(G4InterpolationScheme aScheme, G4double x, G4double x1, G4double x2, G4double y1, G4double y2) const
G4InterpolationManager theManager
G4double Sample(G4double energy)
G4double SampleElastic(G4double anEnergy)
G4ParticleHPLegendreTable * theCoeff
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double energy(const ThreeVector &p, const G4double m)
const G4double x[NPOINTSGL]
G4double Evaluate(G4int l, G4double costh)
G4double GetCoeff(G4int l)