34 #ifndef G4ParticleHPVector_h
35 #define G4ParticleHPVector_h 1
243 Init(aDataFile, total, ux, uy);
273 G4int s_tmp = 0, n=0, m_tmp=0;
290 if ( !( xa == 0 ) && std::abs(std::abs(xp-xa)/xa)<0.001 ) p++;
353 if(std::abs((y2-y1)/y2)<0.0000001)
358 result =
theLin.
Lin(rand, x1, x2, y1, y2);
388 if (std::abs(x1-x0) > std::abs(x1*0.0000001) )
402 if(!_finite(integ)){integ=0;}
403 #elif defined __IBMCPP__
404 if(isinf(integ)||isnan(integ)){integ=0;}
406 if(std::isinf(integ)||std::isnan(integ)){integ=0;}
440 sum+= 0.5*(y2+y1)*(x2-x1);
445 G4double b = (y2-y1)/(std::log(x2)-std::log(x1));
446 sum+= (a-b)*(x2-x1) + b*(x2*std::log(x2)-x1*std::log(x1));
451 G4double b = (std::log(y2)-std::log(y1))/(x2-x1);
452 sum += (std::exp(a)/b)*(std::exp(b*x2)-std::exp(b*x1));
461 G4double b = (std::log(y2)-std::log(y1))/(std::log(x2)-std::log(x1));
462 sum += (std::exp(a)/(b+1))*(std::pow(x2,b+1)-std::pow(x1,b+1));
466 throw G4HadronicException(__FILE__, __LINE__,
"Unknown interpolation scheme in G4ParticleHPVector::Integrate");
519 result = weighted / running;
void SetData(G4double e, G4double x)
G4double GetEnergy(G4int i) const
G4double Get15percentBorder()
G4int GetVectorLength() const
std::vector< G4double > GetBlocked()
G4double the15percentBorderCash
G4double Lin(G4double x, G4double x1, G4double x2, G4double y1, G4double y2)
void SetEnergy(G4int i, G4double e)
G4double GetXsec(G4double e, G4int min)
void Init(G4int aScheme, G4int aRange)
void SetData(G4int i, G4double x, G4double y)
void InitInterpolation(std::istream &aDataFile)
G4ParticleHPInterpolator theInt
void SetInterpolationManager(const G4InterpolationManager &aManager)
G4ParticleHPVector & operator=(const G4ParticleHPVector &right)
G4double GetXsec(G4int i)
void SetData(G4int index, G4double x, G4double y)
G4InterpolationManager theManager
void SetY(G4int i, G4double x)
void AppendScheme(G4int aPoint, const G4InterpolationScheme &aScheme)
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
G4ParticleHPDataPoint * theData
G4InterpolationScheme GetScheme(G4int index) const
void Times(G4double factor)
G4double GetY(G4int i) const
void Merge(G4ParticleHPVector *active, G4ParticleHPVector *passive)
friend G4ParticleHPVector & operator+(G4ParticleHPVector &left, G4ParticleHPVector &right)
G4double GetX(G4int i) const
void SetPoint(G4int i, const G4ParticleHPDataPoint &it)
G4double GetY(G4double x)
void IntegrateAndNormalise()
G4double GetWeightedBinIntegral(const G4InterpolationScheme &aScheme, const G4double x1, const G4double x2, const G4double y1, const G4double y2)
G4double Interpolate(G4InterpolationScheme aScheme, G4double x, G4double x1, G4double x2, G4double y1, G4double y2) const
G4bool IsBlocked(G4double aX)
void Init(std::istream &aDataFile, G4double ux=1., G4double uy=1.)
G4double the50percentBorderCash
std::vector< G4double > GetBuffered()
static const G4double factor
G4double total(Particle const *const p1, Particle const *const p2)
void SetVerbose(G4int ff)
std::vector< G4double > theBlocked
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
const G4InterpolationManager & GetInterpolationManager() const
void SetXsec(G4int i, G4double x)
G4ParticleHPInterpolator theLin
G4double GetBinIntegral(const G4InterpolationScheme &aScheme, const G4double x1, const G4double x2, const G4double y1, const G4double y2)
std::vector< G4double > theBuffered
G4InterpolationScheme GetScheme(G4int anIndex)
const G4ParticleHPDataPoint & GetPoint(G4int i) const
void SetX(G4int i, G4double e)
void SetScheme(G4int aPoint, const G4InterpolationScheme &aScheme)
void SetLabel(G4double aLabel)
void ThinOut(G4double precision)
G4double Get50percentBorder()
void SetInterpolationManager(G4InterpolationManager &aMan)