47 :
z(Z), energies(points),
data(values), algorithm(interpolation)
49 numberOfBins = energies->size();
60 :
z(Z), algorithm(interpolation)
67 numberOfBins = energies->size();
89 size_t bin = FindBinLocation(e);
90 if (bin == numberOfBins)
118 size_t lowerBound = 0;
119 size_t upperBound = numberOfBins - 1;
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)
186 energies->push_back(e);
191 else if (k%nColumns == 0)
194 data->push_back(value);
208 size_t size = numberOfBins;
209 for (
size_t i=0; i<size; i++)
211 G4double e = (*energies)[i] / unit1;
212 G4double sigma = (*data)[i] / unit2 ;
215 <<
" - Data value : "