35 #include "PrimaryGeneratorAction.hh"
66 G4double sinAlpha = std::sqrt(1. - cosAlpha*cosAlpha);
95 { 0.000, 0.077, 0.380, 2.044, 5.535, 15.077, 12.443, 14.766,
96 17.644, 18.518, 17.772, 14.776, 8.372, 3.217, 0.194, 0.000 };
103 fX[j] = xx[j];
fY[j] = yy[j];
109 fSlp.resize(fNPoints);
110 for (
G4int j=0; j<fNPoints-1; j++) {
116 fYC.resize(fNPoints);
130 G4double Xrndm = 0., Yrndm = 0., Yinter = -1.;
132 while (Yrndm > Yinter) {
138 while ((
fX[j] > Xrndm) && (j > 0)) j--;
140 Yinter =
fY[j] +
fSlp[j]*(Xrndm -
fX[j]);
157 while ((
fYC[j] > Yrndm) && (j > 0)) j--;
165 Xrndm += sign*std::sqrt(delta) -
b;
166 }
else if (
fY[j] > 0.) {
167 Xrndm += (Yrndm -
fYC[j])/
fY[j];