FTimeFitModel.cc
Go to the documentation of this file.
1 #include <utl/PhysicalConstants.h>
2 #include <utl/ErrorLogger.h>
3 #include <utl/UTMPoint.h>
4 #include <det/Detector.h>
5 #include <fdet/FDetector.h>
6 #include <fdet/Eye.h>
7 #include <fdet/Telescope.h>
8 #include <utl/Point.h>
9 #include <fdet/FTimeFitModel.h>
10 #include <atm/Atmosphere.h>
11 
12 using namespace utl;
13 using namespace fdet;
14 using namespace atm;
15 
16 double
17 FTimeFitModel::GetTimeAtAperture(const double t0, const double rp, const double chi0,
18  const double chi_i, const double thetaSDP, const int eye, const int tel) const
19 {
20 
21  switch (fModel) {
22 
23  case eRealisticAtm:
24  case eRealisticAtmNoDeex:
25  {
26  const Atmosphere& theAtmosphere =
27  det::Detector::GetInstance().GetAtmosphere();
28 
29 
30  const Point& telposition =
31  det::Detector::GetInstance().GetFDetector().GetEye(eye).GetTelescope(tel).GetPosition();
32  const UTMPoint eyeUTM(telposition,ReferenceEllipsoid::GetWGS84());
33  const double telescopeHeight = eyeUTM.GetHeight(); //height of telescope a.s.l
34 
35  const double lSDP = rp / std::sin(chi0 - chi_i); //see Fig. 6.18 of GAP-2007-099
36  const double height = lSDP * std::sin(chi_i) * std::sin(thetaSDP); //height above telescope
37  const double height_asl = height + telescopeHeight; //height above sea level
38  const double sinAlpha = height/lSDP; //see GAP-2007-099 Fig. 6.18
39 
40  const double verticalTOF = theAtmosphere.GetVerticalTimeOfFlight(telescopeHeight,
41  height_asl);
42 
43  const double showerFrontTime = t0 - rp/kSpeedOfLight/std::tan(chi0 - chi_i);
44 
45  const double propagationTime = verticalTOF/sinAlpha;
46 
47  const double lifeTime = theAtmosphere.GetDeExcitationTime(height_asl);
48 
49  return propagationTime + showerFrontTime + ((fModel == eRealisticAtm) ? lifeTime : 0.);
50 
51  }
52  case eVacuumAtm:
53  return t0 + rp/kSpeedOfLight * std::tan((chi0 - chi_i) /2.);
54  }
55 
56  return 0.;
57 
58 }
59 
60 std::string FTimeFitModel::GetModelName() const {
61 
62  switch (fModel) {
63 
64  case eRealisticAtm:
65  return std::string("realistic speed of light");
66  break;
67  case eVacuumAtm:
68  return std::string("vacuum speed of light");
69  break;
70  default:
71  return std::string("unknown");
72  break;
73 
74  }
75 }
Top of the interface to Atmosphere information.
Point object.
Definition: Point.h:32
Class to hold and convert a point in geodetic coordinates.
Definition: UTMPoint.h:40
double GetHeight() const
Get the height.
Definition: UTMPoint.h:212
double GetDeExcitationTime(const double height) const
get fluorescence de-excitation time
static const ReferenceEllipsoid & GetWGS84()
Get the auger standard ellipsoid: wgs84.
constexpr double kSpeedOfLight
double GetVerticalTimeOfFlight(const double height1, const double height2) const
Evaluate light signal time-of-flight between two altitudes.

, generated on Tue Sep 26 2023.