52 aDataFile >> nEnergies;
53 theManager.
Init(aDataFile);
54 theEnergies =
new G4double[nEnergies];
55 nCosTh =
new G4int[nEnergies];
58 for(
G4int i=0; i<nEnergies; i++)
60 aDataFile >> theEnergies[i];
62 aDataFile >> nCosTh[i];
63 theSecondManager[i].
Init(aDataFile);
66 for(
G4int ii=0; ii<nCosTh[i]; ii++)
70 theData[i][ii].
Init(aDataFile, eV);
111 throw G4HadronicException(__FILE__, __LINE__,
"G4ParticleHPLabAngularEnergy: Unknown ion case 2");
118 for(i=0; i<nEnergies; i++)
121 if ( anEnergy < theEnergies[i] )
break;
131 for(i=0; i<nCosTh[it]; i++)
133 theThVec.
SetX(i, theData[it][i].GetLabel());
134 theThVec.
SetY(i, theData[it][i].GetIntegral());
143 for(i=1; i<nCosTh[it]; i++)
146 if(cosTh<theData[it][i].GetLabel())
break;
156 E = theData[it][i1-1].
GetX(i);
157 y1 = theData[it][i1-1].
GetY(i);
158 y2 = theData[it][i1].
GetY(E);
159 y = theInt.
Interpolate(theSecondManager[it].GetScheme(i1), x, x1,x2,y1,y2);
166 E = theData[it][i1].
GetX(i);
167 y1 = theData[it][i1-1].
GetY(E);
168 y2 = theData[it][i1].
GetY(i);
169 y = theInt.
Interpolate(theSecondManager[it].GetScheme(i1), x, x1,x2,y1,y2);
173 theStore.
Merge(&theBuff1a, &theBuff2a);
174 secEnergy = theStore.
Sample();
175 currentMeanEnergy = theStore.
GetMeanX();
180 G4double x, x1, x2, y1, y2, y, tmp, E;
183 for(i=0;i<nCosTh[it-1]; i++)
185 run1.
SetX(i, theData[it-1][i].GetLabel());
186 run1.
SetY(i,theData[it-1][i].GetIntegral());
189 for(i=0;i<nCosTh[it]; i++)
191 run2.
SetX(i, theData[it][i].GetLabel());
192 run2.
SetY(i, theData[it][i].GetIntegral());
196 x1 = theEnergies[it-1];
197 x2 = theEnergies[it];
219 theThVec.
Merge(&thBuff1 ,&thBuff2);
247 for(i=1; i<nCosTh[it-1]; i++)
250 if(cosTh<theData[it-1][i].GetLabel())
break;
254 x1 = theData[it-1][i1-1].
GetLabel();
260 E = theData[it-1][i1-1].
GetX(i);
261 y1 = theData[it-1][i1-1].
GetY(i);
262 y2 = theData[it-1][i1].
GetY(E);
263 y = theInt.
Interpolate(theSecondManager[it-1].GetScheme(i1), x, x1,x2,y1,y2);
270 E = theData[it-1][i1].
GetX(i);
271 y1 = theData[it-1][i1-1].
GetY(E);
272 y2 = theData[it-1][i1].
GetY(i);
273 y = theInt.
Interpolate(theSecondManager[it-1].GetScheme(i1), x, x1,x2,y1,y2);
277 theStore1.
Merge(&theBuff1a, &theBuff2a);
281 for(i=1; i<nCosTh[it]; i++)
284 if(cosTh<theData[it][i2].GetLabel())
break;
292 E = theData[it][i2-1].
GetX(i);
293 y1 = theData[it][i2-1].
GetY(i);
294 y2 = theData[it][i2].
GetY(E);
295 y = theInt.
Interpolate(theSecondManager[it].GetScheme(i2), x, x1,x2,y1,y2);
307 E = theData[it][i2].
GetX(i);
308 y1 = theData[it][i2-1].
GetY(E);
309 y2 = theData[it][i2].
GetY(i);
310 y = theInt.
Interpolate(theSecondManager[it].GetScheme(i2), x, x1,x2,y1,y2);
314 theStore2.
Merge(&theBuff1b, &theBuff2b);
318 x1 = theEnergies[it-1];
319 x2 = theEnergies[it];
324 E = theStore1.
GetX(i);
325 y1 = theStore1.
GetY(i);
326 y2 = theStore2.
GetY(E);
334 E = theStore2.
GetX(i);
335 y1 = theStore1.
GetY(E);
336 y2 = theStore2.
GetY(i);
341 theOne.
Merge(&theOne1, &theOne2);
343 secEnergy = theOne.
Sample();
344 currentMeanEnergy = theOne.
GetMeanX();
355 G4ThreeVector tempVector(mtot*sinth*std::cos(phi), mtot*sinth*std::sin(phi), mtot*std::cos(theta) );
static G4Deuteron * Deuteron()
static G4Electron * Electron()
void Init(G4int aScheme, G4int aRange)
G4InterpolationScheme GetScheme(G4int index) const
static G4Neutron * Neutron()
G4double Interpolate(G4InterpolationScheme aScheme, G4double x, G4double x1, G4double x2, G4double y1, G4double y2) const
void Init(std::istream &aDataFile)
G4ReactionProduct * Sample(G4double anEnergy, G4double massCode, G4double mass)
void SetY(G4int i, G4double x)
void SetX(G4int i, G4double e)
void SetData(G4int i, G4double x, G4double y)
const G4InterpolationManager & GetInterpolationManager() const
void SetLabel(G4double aLabel)
void SetInterpolationManager(const G4InterpolationManager &aManager)
G4double GetY(G4double x)
G4double GetX(G4int i) const
void Merge(G4ParticleHPVector *active, G4ParticleHPVector *passive)
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
G4int GetVectorLength() const
static G4Positron * Positron()
static G4Proton * Proton()
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double GetTotalMomentum() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)
static G4Triton * Triton()