47 :energies(points), data(values), algorithm(interpolation)
60 : algorithm(interpolation)
118 size_t lowerBound = 0;
122 while (lowerBound <= upperBound)
124 size_t midBin = (lowerBound + upperBound)/2;
125 if ( energy < (*
energies)[midBin] ) upperBound = midBin-1;
126 else lowerBound = midBin+1;
146 path = getenv(
"XRAYDATA");
153 dirFile = pathString +
"/" + fileName +
".dat";
155 std::ifstream file(dirFile);
156 std::filebuf* lsdp = file.rdbuf();
158 if (! (lsdp->is_open()) )
161 execp <<
"XrayFluoDataSet - data file: " + dirFile +
" not found"<<
G4endl;
162 G4Exception(
"XrayFluoDataSet::LoadData()",
"example-xray_fluorescence01",
177 if (a == -1 || a == -2)
191 else if (k%nColumns == 0)
194 data->push_back(value);
209 for (
size_t i=0; i<size; i++)
215 <<
" - Data value : "
XrayFluoDataSet(G4int Z, G4DataVector *points, G4DataVector *values, const G4VDataSetAlgorithm *interpolation, G4double unitE=CLHEP::MeV, G4double unitData=CLHEP::barn)
std::ostringstream G4ExceptionDescription
virtual G4double Calculate(G4double point, G4int bin, const G4DataVector &energies, const G4DataVector &data) const =0
G4GLOB_DLL std::ostream G4cout
G4bool LoadData(const G4String &dataFile)
G4int FindBinLocation(G4double energy) const
const G4VDataSetAlgorithm * algorithm
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double energy(const ThreeVector &p, const G4double m)
G4double FindValue(G4double e, G4int) const