80 auto Z =
static_cast<G4int>(massCode / 1000);
81 auto A =
static_cast<G4int>(massCode - 1000 * Z);
99 if (Z == 2) result->SetDefinition(
G4He3::He3());
107 "G4ParticleHPLabAngularEnergy: Unknown ion case 2");
114 for (i = 0; i < nEnergies; i++) {
116 if (anEnergy < theEnergies[i])
break;
127 for (i = 0; i < nCosTh[it]; i++) {
128 theThVec.
SetX(i, theData[it][i].GetLabel());
129 theThVec.
SetY(i, theData[it][i].GetIntegral());
131 cosTh = theThVec.
Sample();
138 for (i = 1; i < nCosTh[it]; i++) {
140 if (cosTh < theData[it][i].GetLabel())
break;
144 x1 = theData[it][i1 - 1].
GetLabel();
149 E = theData[it][i1 - 1].
GetX(i);
150 y1 = theData[it][i1 - 1].
GetY(i);
151 y2 = theData[it][i1].
GetY(E);
152 y = theInt.
Interpolate(theSecondManager[it].GetScheme(i1), x, x1, x2, y1, y2);
158 E = theData[it][i1].
GetX(i);
159 y1 = theData[it][i1 - 1].
GetY(E);
160 y2 = theData[it][i1].
GetY(i);
161 y = theInt.
Interpolate(theSecondManager[it].GetScheme(i1), x, x1, x2, y1, y2);
165 theStore.
Merge(&theBuff1a, &theBuff2a);
166 secEnergy = theStore.
Sample();
167 currentMeanEnergy = theStore.
GetMeanX();
172 G4double x, x1, x2, y1, y2, y, tmp, E;
175 for (i = 0; i < nCosTh[it - 1]; i++) {
176 run1.
SetX(i, theData[it - 1][i].GetLabel());
177 run1.
SetY(i, theData[it - 1][i].GetIntegral());
180 for (i = 0; i < nCosTh[it]; i++) {
181 run2.
SetX(i, theData[it][i].GetLabel());
182 run2.
SetY(i, theData[it][i].GetIntegral());
186 x1 = theEnergies[it - 1];
187 x2 = theEnergies[it];
207 theThVec.
Merge(&thBuff1, &thBuff2);
208 cosTh = theThVec.
Sample();
234 for (i = 1; i < nCosTh[it - 1]; i++) {
236 if (cosTh < theData[it - 1][i].GetLabel())
break;
240 x1 = theData[it - 1][i1 - 1].
GetLabel();
241 x2 = theData[it - 1][i1].
GetLabel();
245 E = theData[it - 1][i1 - 1].
GetX(i);
246 y1 = theData[it - 1][i1 - 1].
GetY(i);
247 y2 = theData[it - 1][i1].
GetY(E);
248 y = theInt.
Interpolate(theSecondManager[it - 1].GetScheme(i1), x, x1, x2, y1, y2);
254 E = theData[it - 1][i1].
GetX(i);
255 y1 = theData[it - 1][i1 - 1].
GetY(E);
256 y2 = theData[it - 1][i1].
GetY(i);
257 y = theInt.
Interpolate(theSecondManager[it - 1].GetScheme(i1), x, x1, x2, y1, y2);
261 theStore1.
Merge(&theBuff1a, &theBuff2a);
265 for (i = 1; i < nCosTh[it]; i++) {
267 if (cosTh < theData[it][i2].GetLabel())
break;
269 x1 = theData[it][i2 - 1].
GetLabel();
274 E = theData[it][i2 - 1].
GetX(i);
275 y1 = theData[it][i2 - 1].
GetY(i);
276 y2 = theData[it][i2].
GetY(E);
277 y = theInt.
Interpolate(theSecondManager[it].GetScheme(i2), x, x1, x2, y1, y2);
288 E = theData[it][i2].
GetX(i);
289 y1 = theData[it][i2 - 1].
GetY(E);
290 y2 = theData[it][i2].
GetY(i);
291 y = theInt.
Interpolate(theSecondManager[it].GetScheme(i2), x, x1, x2, y1, y2);
295 theStore2.
Merge(&theBuff1b, &theBuff2b);
299 x1 = theEnergies[it - 1];
300 x2 = theEnergies[it];
304 E = theStore1.
GetX(i);
305 y1 = theStore1.
GetY(i);
306 y2 = theStore2.
GetY(E);
313 E = theStore2.
GetX(i);
314 y1 = theStore1.
GetY(E);
315 y2 = theStore2.
GetY(i);
320 theOne.
Merge(&theOne1, &theOne2);
322 secEnergy = theOne.
Sample();
323 currentMeanEnergy = theOne.
GetMeanX();
328 result->SetKineticEnergy(secEnergy);
333 G4double mtot = result->GetTotalMomentum();
334 G4ThreeVector tempVector(mtot * sinth * std::cos(phi), mtot * sinth * std::sin(phi),
335 mtot * std::cos(theta));
336 result->SetMomentum(tempVector);
G4double Interpolate(G4InterpolationScheme aScheme, G4double x, G4double x1, G4double x2, G4double y1, G4double y2) const
G4ReactionProduct * Sample(G4double anEnergy, G4double massCode, G4double mass) override
void Merge(G4ParticleHPVector *active, G4ParticleHPVector *passive)
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)