11 #include <utl/Reader.h>
12 #include <utl/ErrorLogger.h>
13 #include <utl/AugerException.h>
14 #include <utl/AugerUnits.h>
15 #include <utl/MathConstants.h>
16 #include <utl/TabulatedFunction.h>
17 #include <utl/PhysicalConstants.h>
18 #include <utl/PhysicalFunctions.h>
20 #include <fwk/CentralConfig.h>
22 #include <atm/ProfileResult.h>
23 #include <atm/ParametricXMLProfileModel.h>
49 vector<double> pressure;
50 vector<double> height;
51 vector<double> density;
52 vector<double> temperature;
53 vector<double> humidity;
61 if ((height.size()!=pressure.size())||
62 (height.size()!=density.size())||
63 (height.size()!=temperature.size())||
64 (height.size()!=humidity.size()))
66 ERROR(
"Dimensions of the atmosphere profile vectors are different. ");
79 const double minLog =
kLn10 * numeric_limits<double>::min_exponent10;
81 for (
unsigned int i = 0 ; i < height.size() ; i++) {
90 tabRIVsHeight.
PushBack(height[i], 0., refracIndex, 0.);
92 tabLogPressureVsHeight.
PushBack(height[i], 0., log(pressure[i]), minLog);
94 tabLogVaporPressureVsHeight.
PushBack(height[i], 0.,
95 (humidity[i] > 0.) ? log(humidity[i]) : minLog, minLog);
97 tabTemperatureVsHeight.
PushBack(height[i], 0., temperature[i], 0.);
99 tabLogDensityVsHeight.
PushBack(height[i], 0., log(density[i]), minLog);
103 for (
int i = height.size()-1 ; i >= 0 ; i--) {
108 INFO(
"CREATING PROFILE RESULTS");
132 INFO(
"DONE CREATING PROFILE RESULTS");
constexpr double atmosphere
const ProfileResult & EvaluateVaporPressureVsHeight() const
Table of H2O vapor pressure as a function of height.
ProfileResult * fTabRIVsHeight
virtual ~ParametricXMLProfileModel()
Destructor - should be virtual for base classes.
ProfileResult * fTabLogDepthVsHeight
constexpr double kOverburdenSeaLevel
#define INFO(message)
Macro for logging informational messages.
Base class for exceptions trying to access non-existing components.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
const atm::ProfileResult & EvaluateTemperatureVsHeight() const
Table of temperature as a function of height.
ProfileResult * fTabTemperatureVsHeight
const atm::ProfileResult & EvaluatePressureVsHeight() const
Table of air pressure as a function of height.
const atm::ProfileResult & EvaluateDepthVsHeight() const
Table of depth as a function of height.
Class representing a document branch.
const atm::ProfileResult & EvaluateRefractionIndexVsHeight() const
Tabl of refraction index as a function of height.
ParametricXMLProfileModel()
Class describing the Atmospheric profile.
ProfileResult * fTabLogVaporPressureVsHeight
ProfileResult * fTabLogDensityVsHeight
void PushBack(const double x, const double xErr, const double y, const double yErr)
void GetData(bool &b) const
Overloads of the GetData member template function.
const atm::ProfileResult & EvaluateDensityVsHeight() const
Table of density as a function of height.
double LorentzLorentz(const double verticalDepth)
Calculate the refraction index for a given depth.
ProfileResult * fTabLogPressureVsHeight
Main configuration utility.
ProfileResult * fTabHeightVsLogDepth
#define ERROR(message)
Macro for logging error messages.
utl::Branch GetTopBranch(const std::string &id)
Get top branch for moduleConfigLink with given id (XML files)
const atm::ProfileResult & EvaluateHeightVsDepth() const
Table of height as a function of depth.
Base class for a Profile Model.