#include <XrayFluoSiLiDetectorType.hh>
Definition at line 50 of file XrayFluoSiLiDetectorType.hh.
XrayFluoSiLiDetectorType::~XrayFluoSiLiDetectorType |
( |
| ) |
|
Definition at line 59 of file XrayFluoSiLiDetectorType.cc.
61 std::map<G4int,G4DataVector*,std::less<G4int> >::iterator
pos;
63 for (pos = energyMap.begin(); pos != energyMap.end(); pos++)
69 for (pos = dataMap.begin(); pos != dataMap.end(); pos++)
76 delete interpolation4;
static const G4double pos
G4String XrayFluoSiLiDetectorType::GetDetectorMaterial |
( |
| ) |
|
|
virtual |
Implements XrayFluoVDetectorType.
Definition at line 202 of file XrayFluoSiLiDetectorType.cc.
210 if (Z<zMin) {Z=zMin;}
211 if (Z>zMax) {Z=zMax;}
213 if (Z >= zMin && Z <= zMax)
215 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator
pos;
216 pos = energyMap.find(Z);
217 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posData;
218 posData = dataMap.find(Z);
221 if (pos!= energyMap.end())
225 G4int nData = energySet.size();
236 for (
G4int i = 0; i<nData; i++){
237 dataSum += dataSet[i];
240 G4double normRandom = random*dataSum;
243 while (normRandom> partSum)
246 partSum += dataSet[index];
251 if (index >= 0 && index < nData)
253 value = energySet[index];
const XML_Char int const XML_Char * value
static const G4double pos
Implements XrayFluoVDetectorType.
Definition at line 261 of file XrayFluoSiLiDetectorType.cc.
268 if (Z<zMin) {Z=zMin;}
269 if (Z>zMax) {Z=zMax;}
270 if (Z >= zMin && Z <= zMax)
272 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator
pos;
273 pos = energyMap.find(Z);
274 std::map<G4int,G4DataVector*,std::less<G4int> >::const_iterator posData;
275 posData = dataMap.find(Z);
276 if (pos!= energyMap.end())
280 G4int nData = energySet.size();
289 for (
G4int i = 0; i<nData; i++){
290 dataSum += dataSet[i];
293 G4double normRandom = random*dataSum;
296 while (normRandom> partSum)
298 partSum += dataSet[index];
303 if (index >= 0 && index < nData)
305 value = energySet[index];
const XML_Char int const XML_Char * value
static const G4double pos
void XrayFluoSiLiDetectorType::LoadEfficiencyData |
( |
G4String |
fileName | ) |
|
|
virtual |
Implements XrayFluoVDetectorType.
Definition at line 400 of file XrayFluoSiLiDetectorType.cc.
402 char* path = getenv(
"XRAYDATA");
406 dirFile = pathString +
"/" + fileName;
409 path = getenv(
"PWD");
411 dirFile = pathString +
"/" + fileName;
static constexpr double keV
void XrayFluoSiLiDetectorType::LoadResponseData |
( |
G4String |
fileName | ) |
|
|
virtual |
Implements XrayFluoVDetectorType.
Definition at line 311 of file XrayFluoSiLiDetectorType.cc.
313 std::ostringstream ost;
314 ost << fileName<<
".dat";
317 char* path = getenv(
"XRAYDATA");
322 dirFile = pathString +
"/" +
name;
325 path = getenv(
"PWD");
328 dirFile = pathString +
"/" +
name;
331 std::ifstream file(dirFile);
332 std::filebuf* lsdp = file.rdbuf();
334 if (! (lsdp->is_open()) )
337 execp <<
"XrayFluoSiLiDetectorType - data file: " + dirFile +
" not found";
338 G4Exception(
"XrayFluoSiLiDetectorType::LoadResponseData()",
"example-xray_fluorescence07",
358 energyMap[
Z] = energies;
385 energies->push_back(e);
388 else if (k%nColumns == 0)
std::ostringstream G4ExceptionDescription
std::vector< ExP01TrackerHit * > a
const XML_Char const XML_Char * data
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static constexpr double keV
Implements XrayFluoVDetectorType.
Definition at line 98 of file XrayFluoSiLiDetectorType.cc.
109 energyVector.push_back(1.486*
keV);
110 energyVector.push_back(1.740*
keV);
111 energyVector.push_back(3.688*
keV);
112 energyVector.push_back(4.510*
keV);
113 energyVector.push_back(5.414*
keV);
114 energyVector.push_back(6.404*
keV);
118 G4int energyNumber = 0;
124 for (
G4int i=0; i<(
G4int)energyVector.size(); i++){
127 infEnergy = energyVector[i];
128 supEnergy = energyVector[i+1];
140 value = (std::log10(infData)*std::log10(supEnergy/
energy) +
141 std::log10(supData)*std::log10(
energy/infEnergy)) /
142 std::log10(supEnergy/infEnergy);
143 value = std::pow(10,value);
192 efficiency = dataSet->
FindValue(value,
id);
193 if ( RandomNum>efficiency )
const XML_Char int const XML_Char * value
G4double GetInfData(G4double, G4double, G4int)
G4double GetSupData(G4double, G4double, G4int)
G4double energy(const ThreeVector &p, const G4double m)
G4double FindValue(G4double e, G4int) const
static constexpr double keV
The documentation for this class was generated from the following files: