LongitudinalXmaxScanner.h
Go to the documentation of this file.
1 #ifndef _RecDataWriterNG_LongitudinalXmaxScanner_h_
2 #define _RecDataWriterNG_LongitudinalXmaxScanner_h_
3 
4 #include <utl/PhysicalConstants.h>
5 #include <vector>
6 #include <array>
7 
8 
9 class RecEvent;
10 class FDEvent;
11 
12 namespace utl {
13  class TabulatedFunctionErrors;
14  class TabulatedFunction;
15  class Point;
16  class Vector;
17 }
18 
19 namespace otoa {
20 
22  public:
24 
25  void
26  AddScanResult(double depth, double error, double minViewAngle)
27  {
28  fDepth.push_back(depth);
29  fXiXmax.push_back(error);
30  fMinViewingAngle.push_back(minViewAngle);
31  }
32 
33  const std::vector<double>& GetDepthVector() const { return fDepth; }
34 
35  const std::vector<double>& GetXiXmaxVector() const { return fXiXmax; }
36 
37  const std::vector<double>& GetMinViewingAngleVector() const { return fMinViewingAngle; }
38 
39  private:
40  std::vector<double> fDepth;
41  std::vector<double> fXiXmax;
42  std::vector<double> fMinViewingAngle;
43  };
44 
45 
47  public:
49 
50  void EstimateXmaxErrors(const RecEvent& theRecEvent);
51 
52  const std::vector<LongitudinalScan>& GetLongitudinalScan() const
53  { return fLongitudinalScan; }
54 
55  const std::vector<double>& GetErrorAtXmax() const
56  { return fErrorAtXmax; }
57 
58  // use BGLoop variances for NSB?
59  void SetUseBGLoop(const bool use) { fUseBGLoop = use; }
60 
61  private:
62  bool FillLightFactors(const FDEvent&);
63 
64  void CalculateXmaxUncertainties(const FDEvent&);
65 
66  double CalculateLightFactor(const utl::Point& pos1,
67  const utl::Point& pos2,
68  const unsigned int eyeId) const;
69 
70  double CalculateTimeLength(const utl::Point& pos1,
71  const utl::Point& pos2,
72  const unsigned int eyeId) const;
73 
74  double CalculateTotalError(const double geomVar,
75  const double profVar,
76  const FDEvent& fdEvent);
77 
78  std::vector<unsigned short> CalculatePixelTrigger(const std::vector<double>&) const;
79 
80  bool IsTriggered(double dT, double dAng, double npe) const;
81 
82  void GetTelescopeProperties(unsigned int);
83 
84  double PropagateProfileUncertainty(const FDEvent&, const double X);
85 
86  void PropagateGeometryUncertainty(const FDEvent&);
87 
88  std::vector<double> GetChangedDepth(const FDEvent&,
89  double,double,double,double,double);
90 
91  void PrintCurrentVariables(const FDEvent&) const;
92 
93  std::array<unsigned int, 2> GetTelescopeAndPixelId(const utl::Vector& dir,
94  const unsigned int eyeId) const;
95 
96  bool IsNearBorder(const utl::Vector& direction,
97  const unsigned int eyeId,
98  const unsigned int tekId,
99  const double zeta) const;
100 
101  double EstimateXmaxVariance(const std::vector<double>& X,
102  const std::vector<double>& ghFunc,
103  const std::vector<double>& eY,
104  const double nMax,
105  const double xMax,
106  const double X0,
107  const double lambda) const;
108 
109  // ErrorCalculator settings
110  int fVerbosity = 0;
112 
113  // detector properties
114  double fGainVariance = 0;
116  double fPixelSize = 0;
117 
118  // data from ADSTs
122  double fXmax = 0;
123 
124  // estimated event properties along shower axis
125  std::vector<double> fDepth;
126  std::vector<double> fGeomVariance;
127  std::vector<double> fTime;
128  std::vector<double> fViewingAngle;
129  std::vector<double> fDeltaAngle;
130  std::vector<double> fDeltaTime;
131  std::vector<double> fPhotoElectronFactor;
132  std::vector<double> fNoiseVariance;
133  std::vector<bool> fCloseToBoundary;
134  std::vector<bool> fOutsideTelescope;
135 
136  // current track parameters
137  unsigned int fBins = 0;
138  double fTrackMin = 0;
139  double fTrackMax = 0;
140  double fMinViewingAngle = 0;
141  double fAngularLength = 0;
142  double fGeomVarScaleFac = 0;
143 
144  // result at X=Xmax
145  double fXmaxGeomVar = 0;
146  double fXmaxProfVar = 0;
147  double fXmaxTotErr = 0;
148  double fXmaxAngularLength = 0;
149 
150  bool fUseBGLoop = false;
151 
152  // final results
153  std::vector<LongitudinalScan> fLongitudinalScan;
154  std::vector<double> fErrorAtXmax;
155  };
156 
157 }
158 
159 
160 #endif
std::vector< LongitudinalScan > fLongitudinalScan
Point object.
Definition: Point.h:32
bool IsNearBorder(const utl::Vector &direction, const unsigned int eyeId, const unsigned int tekId, const double zeta) const
std::vector< double > GetChangedDepth(const FDEvent &, double, double, double, double, double)
const std::vector< double > & GetXiXmaxVector() const
double CalculateTotalError(const double geomVar, const double profVar, const FDEvent &fdEvent)
void CalculateXmaxUncertainties(const FDEvent &)
const std::vector< double > & GetDepthVector() const
const std::vector< double > & GetMinViewingAngleVector() const
void PrintCurrentVariables(const FDEvent &) const
std::vector< unsigned short > CalculatePixelTrigger(const std::vector< double > &) const
double EstimateXmaxVariance(const std::vector< double > &X, const std::vector< double > &ghFunc, const std::vector< double > &eY, const double nMax, const double xMax, const double X0, const double lambda) const
void EstimateXmaxErrors(const RecEvent &theRecEvent)
double PropagateProfileUncertainty(const FDEvent &, const double X)
const std::vector< double > & GetErrorAtXmax() const
std::array< unsigned int, 2 > GetTelescopeAndPixelId(const utl::Vector &dir, const unsigned int eyeId) const
std::vector< double > fMinViewingAngle
constexpr double g
Definition: AugerUnits.h:200
std::vector< double > fDepth
double CalculateTimeLength(const utl::Point &pos1, const utl::Point &pos2, const unsigned int eyeId) const
Vector object.
Definition: Vector.h:30
std::vector< double > fXiXmax
void PropagateGeometryUncertainty(const FDEvent &)
double CalculateLightFactor(const utl::Point &pos1, const utl::Point &pos2, const unsigned int eyeId) const
std::vector< double > fPhotoElectronFactor
const std::vector< LongitudinalScan > & GetLongitudinalScan() const
bool IsTriggered(double dT, double dAng, double npe) const
void AddScanResult(double depth, double error, double minViewAngle)
constexpr double cm2
Definition: AugerUnits.h:118

, generated on Tue Sep 26 2023.