50 detectorMaterial(
"HPGe"),efficiencySet(0)
60 std::map<G4int,G4DataVector*,std::less<G4int> >::iterator
pos;
110 if (energy>=eMin && energy <=eMax)
120 value = (std::log10(infData)*std::log10(supEnergy/energy) +
121 std::log10(supData)*std::log10(energy/infEnergy)) /
122 std::log10(supEnergy/infEnergy);
123 value = std::pow(10,value);
125 else if (energy<eMin)
132 value = (std::log10(infData)*std::log10(supEnergy/eMin) +
133 std::log10(supData)*std::log10(eMin/infEnergy)) /
134 std::log10(supEnergy/infEnergy);
135 value = std::pow(10,value);
136 value = value-eMin+
energy;
140 else if (energy>eMax)
147 value = (std::log10(infData)*std::log10(supEnergy/eMax) +
148 std::log10(supData)*std::log10(eMax/infEnergy)) /
149 std::log10(supEnergy/infEnergy);
150 value = std::pow(10,value);
151 value = value+energy- eMax;
155 efficiency = dataSet->
FindValue(value,
id);
156 if ( RandomNum>efficiency )
171 if (Z<zMin) {Z=zMin;}
172 if (Z>zMax) {Z=zMax;}
174 if (Z >= zMin && Z <= zMax)
176 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator
pos;
178 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posData;
184 G4int nData = energySet.size();
189 while (random> partSum)
191 partSum += dataSet[index];
196 if (index >= 0 && index < nData)
198 value = energySet[index];
214 if (Z<zMin) {Z=zMin;}
215 if (Z>zMax) {Z=zMax;}
216 if (Z >= zMin && Z <= zMax)
218 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator
pos;
220 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posData;
226 G4int nData = energySet.size();
230 while (random> partSum)
232 partSum += dataSet[index];
237 if (index >= 0 && index < nData)
239 value = energySet[index];
248 std::ostringstream ost;
250 ost << fileName<<
".dat";
254 char* path = std::getenv(
"XRAYDATA");
258 std::ifstream
file(dirFile);
259 std::filebuf* lsdp = file.rdbuf();
261 if (! (lsdp->is_open()) )
264 execp <<
"XrayFluoHPGeDetectorType - data file: " + dirFile +
" not found";
265 G4Exception(
"XrayFluoHPGeDetectorType::LoadResponseData()",
"example-xray_fluorescence02",
312 energies->push_back(e);
315 else if (k%nColumns == 0)