TelescopeData.h
Go to the documentation of this file.
1 #ifndef _TelescopeData_h_
2 #define _TelescopeData_h_
3 
4 #include <vector>
5 #include <map>
6 #include <fevt/FdConstants.h>
7 #include <utl/Point.h>
8 #include <utl/TabulatedFunction.h>
9 #include "ZetaPixel.h"
10 
11 namespace FdEnergyDepositFinderKG {
12 
13  //--------- variables of a time-bin relevant for CFM
15 
16  public:
17  TelescopeDataBin(const double minDepth, const double maxDepth,
18  const double hXmean,
19  const utl::Point& pFirst, const utl::Point& pLast,
20  const utl::Point& pXMean,
21  const double t, const double dt,
22  const double sig, const double sigErr, const double vbg,
23  const std::map<fevt::FdConstants::LightSource, double>&
24  lightEfficiencies, const int parentBin);
26 
27  double fMinDepth;
28  double fMaxDepth;
29  double fHeight;
33  double fTime;
35  double fSignal;
36  double fSignalErr;
39 
40  void AddZetaPixel(const ZetaPixel& pixel);
41 
42  double GetMaxZeta() const;
43  const std::vector<ZetaPixel>& GetZetaPixels() const;
45 
46  double GetMeanDepth() const;
47 
49  double GetEfficiency(fevt::FdConstants::LightSource source) const;
50 
51  private:
52  std::map<fevt::FdConstants::LightSource, double> fLightEfficiencies;
53  std::vector<ZetaPixel> fZetaPixels;
55  double fMaxZeta;
56  };
57 
58  inline bool operator<(const TelescopeDataBin& lhs,
59  const TelescopeDataBin& rhs)
60  {
61  if (lhs.fMinDepth == 0. || rhs.fMinDepth == 0.) {
62  if (lhs.fTime < rhs.fTime)
63  return true;
64  else
65  return false;
66  } else {
67  if (lhs.fMinDepth < rhs.fMinDepth)
68  return true;
69  else
70  return false;
71  }
72  }
73 
74 
75  //--------- collection of telescope data relevant for CFM
76  class TelescopeData {
77 
78  public:
79 
80  enum ETelDataType {
81  eAll = 0,
84  };
85 
86 
87  public:
88 
89  TelescopeData(int telId, ETelDataType type = eInsideFOV);
90 
91  void AddTelescopeDataBin(const TelescopeDataBin& telDataBin);
92 
93  unsigned int GetId() const;
94  ETelDataType GetType() const;
95  double GetMinDepth() const;
96  double GetMaxDepth() const;
97 
98  double GetPhotonToPhotoElectron() const
99  { return fPhotonToPhotoElectron; }
100  double GetGainVariance() const
101  { return fGainVariance; }
102  double GetDiaphragmArea() const
103  { return fDiaphragmArea; }
104 
105  double GetZeta() const
106  { return fZeta; }
107 
108  const std::vector<TelescopeDataBin>& GetTelescopeDataBins() const;
109  std::vector<TelescopeDataBin>::const_iterator TelDataBinsBegin() const;
110  std::vector<TelescopeDataBin>::const_iterator TelDataBinsEnd() const;
111 
112  void SortBins();
113  bool DepthInRange(const double depth) const;
114 
115  void SetTelescopeParameters(double peFactor, double gainVariance,
116  double diaArea);
117  void SetZeta(double val)
118  { fZeta=val; }
119 
120 
121  private:
122  TelescopeData();
125  std::vector<TelescopeDataBin> fTelescopeDataBins;
129  double fZeta;
130  };
131 
132 
133  // --- for sorting
134 
135  inline bool operator<(const TelescopeData& lhs, const TelescopeData& rhs)
136  {
137  if (lhs.GetMinDepth() < rhs.GetMinDepth())
138  return true;
139  else
140  return false;
141  }
142 
143  // --- predicate for iterating
145 
146  public:
147 
148 
149  public:
152  fFilterCriterion(type) {}
153 
154  bool operator()(const TelescopeData& tel) const
155  {
157  return true;
158  else
159  return tel.GetType() == fFilterCriterion;
160  }
161 
162  private:
164 
165  };
166 }
167 
168 #endif
bool operator<(const TelescopeDataBin &lhs, const TelescopeDataBin &rhs)
Definition: TelescopeData.h:58
Point object.
Definition: Point.h:32
bool DepthInRange(const double depth) const
Class to hold collection (x,y) points and provide interpolation between them.
utl::TabulatedFunction fArcLengthFunction
Definition: TelescopeData.h:54
std::vector< TelescopeDataBin >::const_iterator TelDataBinsBegin() const
std::vector< TelescopeDataBin >::const_iterator TelDataBinsEnd() const
TelescopeDataBin(const double minDepth, const double maxDepth, const double hXmean, const utl::Point &pFirst, const utl::Point &pLast, const utl::Point &pXMean, const double t, const double dt, const double sig, const double sigErr, const double vbg, const std::map< fevt::FdConstants::LightSource, double > &lightEfficiencies, const int parentBin)
LightSource
Possible light sources.
Definition: FdConstants.h:9
const std::vector< ZetaPixel > & GetZetaPixels() const
bool operator()(const TelescopeData &tel) const
std::vector< ZetaPixel > fZetaPixels
Definition: TelescopeData.h:53
void SetTelescopeParameters(double peFactor, double gainVariance, double diaArea)
bool HasEfficiency(fevt::FdConstants::LightSource source) const
std::vector< TelescopeDataBin > fTelescopeDataBins
TelescopeFilter(const TelescopeData::ETelDataType type=TelescopeData::eAll)
const std::vector< TelescopeDataBin > & GetTelescopeDataBins() const
TelescopeData::ETelDataType fFilterCriterion
void AddZetaPixel(const ZetaPixel &pixel)
double GetEfficiency(fevt::FdConstants::LightSource source) const
std::map< fevt::FdConstants::LightSource, double > fLightEfficiencies
Definition: TelescopeData.h:52
void AddTelescopeDataBin(const TelescopeDataBin &telDataBin)
const utl::TabulatedFunction & GetArcLengthFunction() const

, generated on Tue Sep 26 2023.