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 <utl/AugerException.h>
19 #include <det/Detector.h>
20 #include <atm/Atmosphere.h>
21 #include <atm/ProfileResult.h>
22 #include <atm/Kakimoto1996FluorescenceModel.h>
23 #include <fwk/CentralConfig.h>
36 CentralConfig::GetInstance()->
GetTopBranch(
"Kakimoto1996FluorescenceModel");
44 for (
int i = 0; i < int(fWavelength.size()-1); ++i)
45 if (fWavelength[i] < line && line < fWavelength[i+1]) {
48 if ((line - fWavelength[i]) < (fWavelength[i+1] - line)) {
58 string msg(
"Supplied Fluorescence spectrum misses wavelength for 391.4 nm");
65 for (
int i = 0; i < int(fFluorescenceYield.size()); ++i)
66 fTotalLight += fFluorescenceYield[i];
70 const std::vector<double>&
71 Kakimoto1996FluorescenceModel::GetWavelengths()
79 Kakimoto1996FluorescenceModel::EvaluateFluorescenceYield(
const double heightAboveSeaLevel)
82 const Atmosphere& atmo = det::Detector::GetInstance().GetAtmosphere();
85 const double temperature = tempProfile.
Y(heightAboveSeaLevel);
86 const double density = densityProfile.
Y(heightAboveSeaLevel);
88 const double rho = density / (
g/
cm3);
94 const double a1 = 0.929071;
95 const double b1 = 1850.0;
96 const double a2 = 0.574145;
97 const double b2 = 6500.0;
98 const double f = 1.0439e-5;
101 const double k2 = fFluorescenceYield[fBin391];
102 const double k = fTotalLight - k2;
104 const double waveLengthBin391 = fWavelength[fBin391];
106 fFluorescenceSpectrum.Clear();
108 it != seaLevelFluorescenceSpectrum.
End(); ++it) {
110 const double wavelength = it->X();
111 const double seaLevelFluorescenceYield = it->Y();
113 double fluorescenceYield;
114 if (wavelength != waveLengthBin391)
115 fluorescenceYield = seaLevelFluorescenceYield*rho*a1 /
116 ((1 + rho*b1*
sqrt(temperature))*k*f);
118 fluorescenceYield = seaLevelFluorescenceYield*rho*a2 /
119 ((1 + rho*b2*
sqrt(temperature))*k2*f);
121 fFluorescenceSpectrum.PushBack(wavelength, fluorescenceYield);
124 return fFluorescenceSpectrum;
128 double Kakimoto1996FluorescenceModel::GetdEdX0()
const {
Branch GetTopBranch() const
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.
#define FATAL(message)
Macro for logging fatal messages.
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
double Y(const double x) const
Get the Y value (coordinate) for given X (ordinate)
constexpr double nanometer
Class representing a document branch.
Class describing the Atmospheric profile.
void GetData(bool &b) const
Overloads of the GetData member template function.
const atm::ProfileResult & EvaluateTemperatureVsHeight() const
Tabulated function giving Y=temperature as a function of X=height.