FDetector/Pixel.h
Go to the documentation of this file.
1 #ifndef _fdet_Pixel_h_
2 #define _fdet_Pixel_h_
3 
14 #include <string>
15 
16 #include <det/ValidityStamp.h>
17 
18 #include <utl/ErrorLogger.h>
19 #include <utl/Vector.h>
20 #include <utl/CoordinateSystem.h>
21 #include <utl/TabulatedFunction.h>
22 
23 
24 namespace fdet {
25 
26  class Telescope;
27 
28 
39  class Pixel {
40 
41  public:
42  enum Status {
43  eGood = 0,
46  };
47 
48  void Update();
49 
50  unsigned int GetRow(const unsigned int pixelid) const;
51  unsigned int GetColumn(const unsigned int pixelid) const;
52 
54  const utl::Vector& GetDirection() const;
55 
57 
65 
67 
75  double GetEndToEndCalibration(const double wavelength) const;
77  double GetEndToEndCalibrationConstant(const double wavelength) const;
79  double GetOpticalEfficiencyCorrection(const double wavelength) const;
80 
82  double GetSimulatedEndToEndCalibration(const std::string& configSignature) const;
83  double GetSimulatedDiaPhoton2ADC(const std::string& configSignature, const double wavelength) const;
84 
86  Status GetStatus() const;
88 
90  double GetTimeOffset() const;
91 
93  unsigned int GetId() const { return fPixelId; }
94  unsigned int GetChannelId() const;
95  bool IsMismatched() const { return (GetChannelId() != GetId()); }
97  unsigned int GetTelescopeId() const { return fTelescopeId; }
99  unsigned int GetEyeId() const { return fEyeId; }
100 
101  unsigned int GetRow() const { return GetRow(fPixelId); }
102  unsigned int GetColumn() const { return GetColumn(fPixelId); }
103 
105  double GetSolidAngle() const;
106 
108  const utl::TabulatedFunction& GetQEfficiency() const;
109 
110  //In Reconstruction do not! call this with configSignature. This only exists in Simulation!
111  double GetDiaPhoton2PEFactor(const double wavelength, const std::string& configSignature = "") const;
112 
114  float GetCloudFraction() const;
115  bool HasCloudFraction() const;
116 
117  bool IsObscuredByCloud() const { return GetCloudIndex() > 0; }
118 
120  const Telescope& GetTelescope() const;
121 
122  private:
123  Pixel(const unsigned int eyeId, const unsigned int telescopeId,
124  const unsigned int pixelId,
125  const std::string& physEyeIdString,
126  const std::string& physTelIdString);
127  ~Pixel();
128  // prevent copying
129  Pixel(const Pixel&);
130  Pixel& operator=(const Pixel&);
131 
134 
135  mutable utl::TabulatedFunction fWavelengthCalib; // filled by Telescope
137 
138  mutable double* fTimeOffset;
141  mutable double* fSimulatedEndToEnd;
142 
143  unsigned int fEyeId;
144  unsigned int fTelescopeId;
145  unsigned int fPixelId;
146 
147  std::string fPhysicalEyeIdString;
149  std::string fPixelIdString;
150 
151  mutable double* fSolidAngle;
153 
154  mutable int fCloudIndex;
156 
157  template<typename T>
158  const T&
159  GetPixelData(T*& requestedData,
160  const std::string& property,
161  const std::string& component,
162  const std::string& errorMsg,
163  const std::string& extraIndex = "") const;
164 
165  template<typename T>
166  void
167  GetPixelData(T& requestedData,
168  const std::string& property,
169  const std::string& component,
170  const std::string& errorMsg,
171  const std::string& extraIndex = "") const;
172 
173  template<typename T>
174  const T&
175  GetPixelDataDiaphragm(T*& requestedData,
176  const std::string& property,
177  const std::string& component,
178  const std::string& errorMsg) const;
179 
180  template<typename T>
181  void
182  GetPixelDataDiaphragm(T& requestedData,
183  const std::string& property,
184  const std::string& component,
185  const std::string& errorMsg) const;
186 
188  int GetCloudIndex() const;
189 
190  friend class fdet::Telescope;
191 
192  };
193 
194 }
195 
196 
197 #endif
198 
199 // Configure (x)emacs for this file ...
200 // Local Variables:
201 // mode: c++
202 // compile-command: "make -C .. FDetector/Pixel.o -k"
203 // End:
Status GetStatus() const
Get the pixel status flag.
unsigned int GetId() const
By default from 1..440.
const utl::Vector & GetDirection() const
pointing direction of this pixel
utl::Vector fDirection
unsigned int GetRow() const
utl::CoordinateSystemPtr fCoordinateSystem
unsigned int GetTelescopeId() const
1..6 for normal FD, 1..3 for HEAT
const T & GetPixelDataDiaphragm(T *&requestedData, const std::string &property, const std::string &component, const std::string &errorMsg) const
const utl::TabulatedFunction & GetEndToEndCalibrationConstant() const
end to end calibration function
Class to hold collection (x,y) points and provide interpolation between them.
utl::TabulatedFunction fWavelengthOpticalEfficiencyCorrection
bool HasCloudFraction() const
double * fTimeOffset
double GetSimulatedEndToEndCalibration(const std::string &configSignature) const
for the simulated end-to-end calibration constant
Status fPixelOpticalEfficiencyStatus
std::string fPhysicalTelescopeIdString
double GetEndToEndCalibration(const double wavelength) const
multiplication of calA(+drum) constant and optical efficiency correction is returned ...
double GetEndToEndCalibrationAtReferenceWavelength() const
int GetCloudIndex() const
Cloud index in strange units. To access please use GetCloudFraction()
utl::TabulatedFunction fWavelengthCalib
det::ValidityStamp fCloudValidityStamp
std::string fPhysicalEyeIdString
double GetEndToEndCalibrationConstantAtReferenceWavelength() const
calA(+drum) constant is returned
std::string fPixelIdString
utl::TabulatedFunction * fQEfficiency
double GetSolidAngle() const
The solid angle viewed by this pixel.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
bool IsObscuredByCloud() const
unsigned int GetChannelId() const
const utl::TabulatedFunction & GetQEfficiency() const
Average quantum efficiency as a function of the wavelength.
unsigned int fTelescopeId
Pixel(const unsigned int eyeId, const unsigned int telescopeId, const unsigned int pixelId, const std::string &physEyeIdString, const std::string &physTelIdString)
double * fSolidAngle
const Telescope & GetTelescope() const
Access the telescope this Pixel belongs to.
Status fPixelStatus
bool IsMismatched() const
const utl::CoordinateSystemPtr & GetPixelCoordinateSystem() const
double * fSimulatedEndToEnd
float GetCloudFraction() const
how much of pixel is obscured by clouds
Detector description interface for Telescope-related data.
unsigned int GetColumn() const
Description of a pixel.
const utl::TabulatedFunction & GetOpticalEfficiencyCorrection() const
optical efficiency correction is returned as a function of wavelength
Vector object.
Definition: Vector.h:30
double GetTimeOffset() const
pixel time offset
Object to keep track of whether data are valid, or have expired.
Definition: ValidityStamp.h:29
double GetSimulatedDiaPhoton2ADC(const std::string &configSignature, const double wavelength) const
const T & GetPixelData(T *&requestedData, const std::string &property, const std::string &component, const std::string &errorMsg, const std::string &extraIndex="") const
double GetDiaPhoton2PEFactor(const double wavelength, const std::string &configSignature="") const
unsigned int GetEyeId() const
1..5 (4x normal FD, 1x HEAT)
Status GetOpticalEfficiencyStatus() const
unsigned int fPixelId
unsigned int fEyeId
Pixel & operator=(const Pixel &)
double GetOpticalEfficiencyCorrectionAtReferenceWavelength() const
optical efficiency correction is returned

, generated on Tue Sep 26 2023.