39 for (i = 0; i < nDistFunc; i++) {
40 if (anEnergy < theDistFunc[i].GetLabel())
break;
42 G4int low(0), high(0);
49 G4cerr <<
"No distribution functions to sample "
50 <<
"from in G4ParticleHPArbitaryTab::Sample" <<
G4endl;
53 return theDistFunc[0].
Sample();
70 G4double rval = (anEnergy - elow) / (ehigh - elow);
71 G4double eoutlow = theLowThreshold[low] + rval * (theLowThreshold[high] - theLowThreshold[low]);
73 theHighThreshold[low] + rval * (theHighThreshold[high] - theHighThreshold[low]);
77 Eout_1 = theDistFunc[low].
Sample();
79 + (Eout_1 - theLowThreshold[low]) * (eouthigh - eoutlow)
80 / (theHighThreshold[low] - theLowThreshold[low]);
83 Eout_1 = theDistFunc[high].
Sample();
85 + (Eout_1 - theLowThreshold[high]) * (eouthigh - eoutlow)
86 / (theHighThreshold[high] - theLowThreshold[high]);
G4double Sample(G4double anEnergy) override