47 G4int low(0), high(0);
49 for (i0=0; i0<nEnergy; i0++)
52 if(theCoeff[i0].
GetEnergy()>anEnergy)
break;
54 low = std::max(0, high-1);
65 for(i0=0; i0<601; i0++)
72 try01 += (2.*l+1)/2.*theCoeff[low].
GetCoeff(m_tmp)*theLeg.
Evaluate(l, costh);
74 if(try01>max1) max1=try01;
79 try02 += (2.*l+1)/2.*theCoeff[high].
GetCoeff(m_tmp)*theLeg.
Evaluate(l, costh);
81 if(try02>max2) max2=try02;
108 if(0>=theNorm)
break;
110 while(random>value/theNorm);
122 G4int low(0), high(0);
124 for (i0=0; i0<nEnergy; i0++)
127 if(theCoeff[i0].
GetEnergy()>anEnergy)
break;
129 low = std::max(0, high-1);
140 for(i0=0; i0<601; i0++)
148 if(try01>max1) max1=try01;
154 if(try02>max2) max2=try02;
175 v1 = std::max(0.,v1);
176 v2 = std::max(0.,v2);
179 if(0>=theNorm)
break;
181 while(random>value/theNorm);
192 G4int low(0), high(0);
194 for (i0=0; i0<nEnergy; i0++)
197 if(theCoeff[i0].
GetEnergy()>anEnergy)
break;
199 low = std::max(0, high-1);
206 G4double try01=0, try02=0, try11=0, try12=0;
221 theNorm = std::max(try1, try2);
243 while(random>value/theNorm);
251 G4int low(0), high(0);
253 for (i0=0; i0<nEnergy; i0++)
257 if(theCoeff[i0].
GetEnergy()>energy)
break;
259 low = std::max(0, high-1);
268 for(i0=0; i0<601; i0++)
274 theBuffer.
SetData(i0, costh, y);
279 for (i0=1; i0<601; i0++)
282 if(rand < theBuffer.
GetY(i0)/theBuffer.
GetY(600))
break;
295 y1 = theBuffer.
GetX(it);
296 y2 = theBuffer.
GetX(it-1);