14#include <G4ThreeVector.hh>
29 void setData(
const std::vector<G4double>& pX,
const std::vector<G4double>& pY, G4String pName);
31 void setUnits(G4double pX, G4double pY);
38 std::vector<G4double> m_X;
39 std::vector<G4double> m_Y;
40 std::vector<G4double> m_slopes;
41 std::vector<G4double> m_CDF;
43 TGraph *m_interpolator =
nullptr;
63 std::pair<std::string, std::string>
getFileNames(
int value);
64 G4double
sampleEnergy(G4double Emean, G4double Emean2, G4double& alpha);
65 G4double
getAlpha(G4double Emean,G4double Emean2);
69 std::vector <G4double> m_DOMpos;
Utility class for sampling from a given distribution using the inverse cumulative function and interp...
Definition OMSimSNTools.hh:24
G4double interpolate(G4double pX)
Interpolates distribution using TGraph (ROOT)
Definition OMSimSNTools.cc:320
void setData(const std::vector< G4double > &pX, const std::vector< G4double > &pY, G4String pName)
Sets data for the distribution.
Definition OMSimSNTools.cc:266
void calculateSlopesAndCDF()
Calculates the slopes and cumulative function of a dataset for the inverse cumulative algorithm.
Definition OMSimSNTools.cc:294
G4double sampleFromDistribution()
Samples values from a given distribution using the Inverse CDF algorithm.
Definition OMSimSNTools.cc:224
void setUnits(G4double pX, G4double pY)
Sets units for the x and y data points of the distribution.
Definition OMSimSNTools.cc:337
void makeInterpolator()
Initializes the interpolator using TGraph.
Definition OMSimSNTools.cc:281