12 #include <evt/Event.h>
13 #include <fwk/CentralConfig.h>
14 #include <det/Detector.h>
15 #include <utl/ErrorLogger.h>
18 #include <utl/UTMPoint.h>
19 #include <utl/Point.h>
20 #include <utl/Vector.h>
21 #include <fwk/CoordinateSystemRegistry.h>
22 #include <utl/CoordinateSystemPtr.h>
25 #include <atm/Atmosphere.h>
26 #include <atm/ProfileResult.h>
37 using namespace AtmosphericProfileNS;
39 AtmosphericProfile::AtmosphericProfile(){}
41 AtmosphericProfile::~AtmosphericProfile(){}
55 TFile
file(
"profiles.root",
"RECREATE");
60 const Atmosphere& theAtm = det::Detector::GetInstance().GetAtmosphere();
67 const Point corePosition(0,0,0,pampaCS);
68 const UTMPoint utm_core(corePosition, ReferenceEllipsoid::eWGS84);
69 const double z_ground = depthVsHeight.
Y(utm_core.
GetHeight());
73 TGraph* depthVsZenith =
new TGraph();
74 TGraph* depthVsZenith2 =
new TGraph();
75 for (
double zenith = 0; zenith < 80*
deg; zenith += 5*
deg) {
77 CoordinateSystem::RotationY(zenith,
78 CoordinateSystem::RotationZ(azimuth,
80 const Vector showerDirection(0,0,-1, showerCs);
86 const double x_ground = slantProfile_DepthVsDistance.
Y(0);
88 depthVsZenith->SetPoint(depthVsZenith->GetN(), zenith/
deg, x_ground/(
g/
cm2));
89 depthVsZenith2->SetPoint(depthVsZenith->GetN(), zenith/
deg, z_ground/(
g/
cm2)/cos(zenith));
91 depthVsZenith->Write(
"depthVsZenithCurveAtm");
92 depthVsZenith2->Write(
"depthVsZenithFlatAtm");
94 const double maxh = 30*
km;
95 const double minh = 0*
m;
96 const unsigned int N = 200;
97 const double dh = (maxh - minh)/N;
98 TGraph* verticalDepthProfile =
new TGraph();
99 for (
unsigned int i = 0; i != N; ++i) {
100 const double h = minh+dh*i;
101 const double depth = depthVsHeight.
Y(h)/(
g/
cm2);
102 verticalDepthProfile->SetPoint(i, h/
km, depth);
104 verticalDepthProfile->Write(
"verticalDepthProfile");
107 CoordinateSystemPtr showerCs = CoordinateSystem::RotationY(85*deg, CoordinateSystem::RotationZ(azimuth, pampaCS));
108 Vector showerDirection(0,0,-1, showerCs);
112 TGraph* slantDepthPlot =
new TGraph();
113 const double dmax = maxh/cos(85.*
utl::deg);
114 for (
int i = 0; i != int(dmax/dh); ++i) {
116 slantDepthPlot->SetPoint(i, i*dh/
km, slantProfile_DepthVsDistance.
Y(-i*dh)/
g*
cm2);
118 slantDepthPlot->Write(
"slantDepthProfile");
127 AtmosphericProfile::Finish(){
Top of the interface to Atmosphere information.
void InitSlantProfileModel(const utl::Point &core, const utl::Vector &dir, const double deltaX) const
Class to hold and convert a point in geodetic coordinates.
void Init()
Initialise the registry.
double Y(const double x) const
Get the Y value (coordinate) for given X (ordinate)
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
double GetHeight() const
Get the height.
Class describing the Atmospheric profile.
const atm::ProfileResult & EvaluateDepthVsHeight() const
Tabulated function giving Y=depth as a function of X=height.
ResultFlag
Flag returned by module methods to the RunController.
utl::CoordinateSystemPtr Get(const std::string &id)
Get a well-known Coordinate System.
const atm::ProfileResult & EvaluateSlantDepthVsDistance() const