#include <XrayFluoHPGeDetectorType.hh>
Definition at line 50 of file XrayFluoHPGeDetectorType.hh.
XrayFluoHPGeDetectorType::~XrayFluoHPGeDetectorType |
( |
| ) |
|
Definition at line 60 of file XrayFluoHPGeDetectorType.cc.
62 std::map<G4int,G4DataVector*,std::less<G4int> >::iterator
pos;
64 for (pos = energyMap.begin(); pos != energyMap.end(); pos++)
70 for (pos = dataMap.begin(); pos != dataMap.end(); pos++)
77 delete interpolation4;
G4String XrayFluoHPGeDetectorType::GetDetectorMaterial |
( |
| ) |
|
|
virtual |
Implements XrayFluoVDetectorType.
Definition at line 165 of file XrayFluoHPGeDetectorType.cc.
References python.hepunit::keV.
Referenced by ResponseFunction().
173 if (Z<zMin) {Z=zMin;}
174 if (Z>zMax) {Z=zMax;}
176 if (Z >= zMin && Z <= zMax)
178 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator
pos;
179 pos = energyMap.find(Z);
180 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posData;
181 posData = dataMap.find(Z);
182 if (pos!= energyMap.end())
186 G4int nData = energySet.size();
191 while (random> partSum)
193 partSum += dataSet[index];
198 if (index >= 0 && index < nData)
200 value = energySet[index];
double precision function energy(A, Z)
const XML_Char int const XML_Char * value
Implements XrayFluoVDetectorType.
Definition at line 209 of file XrayFluoHPGeDetectorType.cc.
References python.hepunit::keV.
Referenced by ResponseFunction().
216 if (Z<zMin) {Z=zMin;}
217 if (Z>zMax) {Z=zMax;}
218 if (Z >= zMin && Z <= zMax)
220 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator
pos;
221 pos = energyMap.find(Z);
222 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posData;
223 posData = dataMap.find(Z);
224 if (pos!= energyMap.end())
228 G4int nData = energySet.size();
232 while (random> partSum)
234 partSum += dataSet[index];
239 if (index >= 0 && index < nData)
241 value = energySet[index];
double precision function energy(A, Z)
const XML_Char int const XML_Char * value
void XrayFluoHPGeDetectorType::LoadEfficiencyData |
( |
G4String |
fileName | ) |
|
|
virtual |
void XrayFluoHPGeDetectorType::LoadResponseData |
( |
G4String |
fileName | ) |
|
|
virtual |
Implements XrayFluoVDetectorType.
Definition at line 248 of file XrayFluoHPGeDetectorType.cc.
References test::a, FatalException, G4Exception(), and python.hepunit::keV.
250 std::ostringstream ost;
252 ost << fileName<<
".dat";
256 char* path = getenv(
"XRAYDATA");
260 std::ifstream file(dirFile);
261 std::filebuf* lsdp = file.rdbuf();
263 if (! (lsdp->is_open()) )
266 execp <<
"XrayFluoHPGeDetectorType - data file: " + dirFile +
" not found";
267 G4Exception(
"XrayFluoHPGeDetectorType::LoadResponseData()",
"example-xray_fluorescence02",
287 energyMap[Z] = energies;
314 energies->push_back(e);
317 else if (k%nColumns == 0)
std::ostringstream G4ExceptionDescription
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
const XML_Char const XML_Char * data
Implements XrayFluoVDetectorType.
Definition at line 98 of file XrayFluoHPGeDetectorType.cc.
References energy(), XrayFluoDataSet::FindValue(), G4UniformRand, GetInfData(), GetSupData(), and python.hepunit::keV.
122 value = (std::log10(infData)*std::log10(supEnergy/
energy) +
123 std::log10(supData)*std::log10(
energy/infEnergy)) /
124 std::log10(supEnergy/infEnergy);
125 value = std::pow(10,value);
134 value = (std::log10(infData)*std::log10(supEnergy/eMin) +
135 std::log10(supData)*std::log10(eMin/infEnergy)) /
136 std::log10(supEnergy/infEnergy);
137 value = std::pow(10,value);
138 value = value-eMin+
energy;
149 value = (std::log10(infData)*std::log10(supEnergy/eMax) +
150 std::log10(supData)*std::log10(eMax/infEnergy)) /
151 std::log10(supEnergy/infEnergy);
152 value = std::pow(10,value);
153 value = value+
energy- eMax;
157 efficiency = dataSet->
FindValue(value,
id);
158 if ( RandomNum>efficiency )
G4double GetSupData(G4double, G4double, G4int)
double precision function energy(A, Z)
G4double FindValue(G4double e, G4int) const
G4double GetInfData(G4double, G4double, G4int)
const XML_Char int const XML_Char * value
The documentation for this class was generated from the following files: