ConstantFluorescenceModel.cc
Go to the documentation of this file.
1 
10 #include <utl/TabulatedFunction.h>
11 #include <utl/Reader.h>
12 #include <utl/ErrorLogger.h>
13 #include <utl/MathConstants.h>
14 #include <utl/Vector.h>
15 #include <utl/PhysicalConstants.h>
16 #include <utl/Transformation.h>
17 #include <utl/TabulatedFunctionErrors.h>
18 #include <atm/ConstantFluorescenceModel.h>
19 #include <fwk/CentralConfig.h>
20 #include <sstream>
21 
22 using namespace utl;
23 using namespace atm;
24 using namespace fwk;
25 using namespace std;
26 
27 
28 void
30 {
31  Branch topB =
32  CentralConfig::GetInstance()->GetTopBranch("ConstantFluorescenceModel");
33 
34  topB.GetChild("wavelength").GetData(fWavelength);
35  topB.GetChild("fluorescenceYield").GetData(fFluorescenceYield);
36  topB.GetChild("totalLight").GetData(fTotalLight);
37 
38  fSpectrumNormalization = 0.0;
39  for (unsigned int i = 0; i < fFluorescenceYield.size(); ++i)
40  fSpectrumNormalization += fFluorescenceYield[i];
41 }
42 
43 
44 const std::vector<double>&
45 ConstantFluorescenceModel::GetWavelengths()
46  const
47 {
48  return fWavelength;
49 }
50 
51 
53 ConstantFluorescenceModel::EvaluateFluorescenceYield(const double /*heightAboveSeaLevel*/)
54  const
55 {
56  // Normalizing to the total light
57  vector<double> normalizedFY = fFluorescenceYield;
58  double total = 0;
59 
60  for (int i = 0; i < int(fFluorescenceYield.size()); ++i)
61  total += fFluorescenceYield[i];
62 
63  fFluorescenceSpectrum.Clear();
64 
65  for (int i = 0; i < int(normalizedFY.size()); ++i) {
66  normalizedFY[i] *= fTotalLight/total;
67  fFluorescenceSpectrum.PushBack(fWavelength[i], normalizedFY[i]);
68  }
69 
70  return fFluorescenceSpectrum;
71 }
72 
73 
74 double
75 ConstantFluorescenceModel::GetdEdX0()
76  const
77 {
78  // Energy loss evaluated for an electron of 1.4 MeV at standard
79  // temperature and pressure.
80  // Value taken from the ESTAR program of NIST (2004)
81  // http://physics.nist.gov/Star
82  return 1.676*MeV/(g/cm2);
83 }
84 
85 
86 // Configure (x)emacs for this file ...
87 // Local Variables:
88 // mode: c++
89 // compile-command: "make -C .. -k"
90 // End:
Branch GetTopBranch() const
Definition: Branch.cc:63
Class to hold collection (x,y) points and provide interpolation between them.
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Definition: Branch.cc:211
constexpr double MeV
Definition: AugerUnits.h:184
Class representing a document branch.
Definition: Branch.h:107
constexpr double g
Definition: AugerUnits.h:200
void GetData(bool &b) const
Overloads of the GetData member template function.
Definition: Branch.cc:644
constexpr double cm2
Definition: AugerUnits.h:118

, generated on Tue Sep 26 2023.