Nagano2004FluorescenceModel.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 <det/Detector.h>
19 #include <atm/Atmosphere.h>
20 #include <atm/ProfileResult.h>
21 #include <atm/Nagano2004FluorescenceModel.h>
22 #include <fwk/CentralConfig.h>
23 #include <sstream>
24 
25 using namespace utl;
26 using namespace atm;
27 using namespace fwk;
28 using namespace std;
29 
30 
31 
33  CentralConfig* cc = CentralConfig::GetInstance();
34 
35  Branch topB =
36  cc->GetTopBranch("Nagano2004FluorescenceModel");
37 
38  topB.GetChild("wavelength").GetData(fWavelength);
39  topB.GetChild("naganoA").GetData(fNaganoA);
40  topB.GetChild("naganoAError").GetData(fNaganoAError);
41  topB.GetChild("naganoB").GetData(fNaganoB);
42  topB.GetChild("naganoBError").GetData(fNaganoBError);
43 }
44 
45 
46 const std::vector<double>&
47 Nagano2004FluorescenceModel::GetWavelengths() const{
48 
49  return fWavelength;
50 
51 }
52 
53 
55 Nagano2004FluorescenceModel::EvaluateFluorescenceYield
56 (const double heightAboveSeaLevel) const{
57 
58  double fluorescenceYield = 0;
59 
60  const Atmosphere& atmo = det::Detector::GetInstance().GetAtmosphere();
61  const ProfileResult& tempProfile = atmo.EvaluateTemperatureVsHeight();
62  const ProfileResult& densityProfile = atmo.EvaluateDensityVsHeight();
63  const double temperature = tempProfile.Y(heightAboveSeaLevel);
64  const double density = densityProfile.Y(heightAboveSeaLevel);
65 
66 
67 
68  fFluorescenceSpectrum.Clear();
69  for (unsigned int iwl=0; iwl<fWavelength.size(); iwl++){
70 
71  double wavelength = fWavelength[iwl];
72 
73  fluorescenceYield = fNaganoA[iwl]*density/(1.+ density*fNaganoB[iwl]
74  *sqrt(temperature));
75 
76  fFluorescenceSpectrum.PushBack(wavelength, fluorescenceYield);
77 
78  }
79 
80  return fFluorescenceSpectrum;
81 
82 }
83 
84 double Nagano2004FluorescenceModel::GetdEdX0() const {
85 
86  // Energy loss evaluated for an electron of .85 MeV at standard
87  // temperature and pressure.
88  // Value taken from the ESTAR program of NIST (2004)
89  // http://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html
90 
91  return 1.675*MeV/(g/cm/cm);
92 }
93 
94 // Configure (x)emacs for this file ...
95 // Local Variables:
96 // mode:c++
97 // compile-command: "make -C .. -k"
98 // End:
Top of the interface to Atmosphere information.
Class to hold collection (x,y) points and provide interpolation between them.
const atm::ProfileResult & EvaluateDensityVsHeight() const
Tabulated function giving Y=density as a function of X=height.
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Definition: Branch.cc:211
double Y(const double x) const
Get the Y value (coordinate) for given X (ordinate)
constexpr double MeV
Definition: AugerUnits.h:184
Class representing a document branch.
Definition: Branch.h:107
Class describing the Atmospheric profile.
Definition: ProfileResult.h:25
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 cm
Definition: AugerUnits.h:117
Main configuration utility.
Definition: CentralConfig.h:51
utl::Branch GetTopBranch(const std::string &id)
Get top branch for moduleConfigLink with given id (XML files)
const atm::ProfileResult & EvaluateTemperatureVsHeight() const
Tabulated function giving Y=temperature as a function of X=height.

, generated on Tue Sep 26 2023.