SDetector/PMT.h
Go to the documentation of this file.
1 #ifndef _sdet_PMT_h_
2 #define _sdet_PMT_h_
3 
4 #include <vector>
5 #include <string>
6 #include <utl/TabulatedFunction.h>
7 #include <utl/Point.h>
8 #include <utl/AugerException.h>
9 #include <det/VManager.h>
10 #include <det/Detector.h>
11 #include <sdet/PMTConstants.h>
12 
13 
14 namespace sdet {
15 
26  class PMT {
27 
28  public:
30  int GetId() const { return fPMTId; }
31 
32  // return PMT type (e.g. eWaterCherenkovLarge)
34 
36  const utl::Point& GetPosition() const;
37 
39  double GetWorkingGain() const;
40 
42  double GetCollectionEfficiency() const;
43 
46 
49 
52 
55 
56  const std::vector<double>& GetChargeProbabilityDistribution() const;
57 
59 
60  double GetMinCharge() const;
61 
62  double GetMaxCharge() const;
63 
70  double GetEffectiveArea() const;
71 
72  // --------------------
73  // Sim calibration info
74  // --------------------
75 
78 
80  double GetVEMPeak(const std::string& simulationIdentifier) const;
81 
83  double GetCompatibilityVEMPeak(const std::string& simulationIdentifier) const;
84 
86  double GetNominalVEMPeak() const;
87 
89  double GetVEMCharge(const std::string& simulationIdentifier) const;
90 
92  double GetNominalVEMCharge() const;
93 
95  double GetBaseline(const sdet::PMTConstants::PMTGain gain) const;
96 
99 
101  double GetGainRatio() const;
102 
104  //* This is not actually used at present, but it's included here to mimic CDAS. *//
105  double GetGainRatioRMS() const;
106 
107  double GetMultiplier(const sdet::PMTConstants::PMTGain gain) const;
108 
109  double GetCurrent2VoltageMultiplier() const;
110 
111  double GetVoltage2FADCMultiplier() const;
112 
113  double GetHighGainDelay() const;
114 
115  double GetTimeOffset() const;
116 
118 
119  private:
120  PMT(const int PMTId, const int stationId, const int isUUB,
122  ~PMT();
123 
124  PMT(const PMT&);
125  PMT& operator=(const PMT&);
126 
127  void Update() const;
128 
129  int fPMTId = 0;
130  int fStationId = 0;
131  bool fIsUUB = false;
133 
134  // Static quantities pertaining to the PMT (use lazy evaluation)
135  mutable double* fWorkingGain = nullptr;
136  mutable double* fCollectionEfficiency = nullptr;
138  mutable utl::Point* fPosition = nullptr;
142  mutable std::vector<double>* fChargeProbabilityDistribution = nullptr;
144  mutable double* fMinCharge = nullptr;
145  mutable double* fMaxCharge = nullptr;
146  mutable double* fEffectiveArea = nullptr;
147 
148  mutable double* fVEMPeak = nullptr;
149  mutable double* fVEMCharge = nullptr;
150 
151  mutable double* fBaselineLG = nullptr;
152  mutable double* fBaselineHG = nullptr;
153  mutable double* fBaselineLGRMS = nullptr;
154  mutable double* fBaselineHGRMS = nullptr;
155  mutable double* fGainRatio = nullptr;
156  mutable double* fGainRatioRMS = nullptr;
157  mutable double* fMultiplierLG = nullptr;
158  mutable double* fMultiplierHG = nullptr;
159  mutable double* fCurrent2VoltageMultiplier = nullptr;
160  mutable double* fVoltage2FADCMultiplier = nullptr;
161  mutable double* fHighGainDelay = nullptr;
162  mutable double* fTimeOffset = nullptr;
163 
164  friend class Station;
165 
167 
168  // Helper method to do the redundant work of preparing requests for PMT data,
169  // sending it to the manager and reporting any errors.
170  template<typename T>
171  inline
172  const T&
174  const std::string& property,
175  const std::string& component,
176  const std::string& errorMsg)
177  const
178  {
179  if (!data) {
180  data = new T;
181  const auto& m = det::Detector::GetInstance().GetSManagerRegister();
182  const auto status = m.GetData(*data, property, component, fIndexMap);
183  if (status == det::VManager::eNotFound)
184  NotFoundAndThrow(errorMsg);
185  }
186  return *data;
187  }
188 
189  void NotFoundAndThrow(const std::string& msg) const;
190 
191  };
192 
193 }
194 
195 
196 #endif
double * fBaselineHG
double GetMaxCharge() const
double GetBaseline(const sdet::PMTConstants::PMTGain gain) const
Get baseline level for the PMT (for simulations)
const T & GetPMTData(T *&data, const std::string &property, const std::string &component, const std::string &errorMsg) const
double GetGainRatioRMS() const
Get RMS of dynode anode ration for the PMT (for simulations)
double GetMultiplier(const sdet::PMTConstants::PMTGain gain) const
double * fBaselineLGRMS
double GetNominalVEMPeak() const
what HV setting tries to target in HG
Point object.
Definition: Point.h:32
utl::TabulatedFunction * fFaceRefractionIndex
const utl::TabulatedFunction & GetDomeRefractionIndex() const
Refraction index for the PMT dome.
Detector description interface for Station-related data.
const std::vector< double > & GetChargeProbabilityDistribution() const
Detector description interface for PMT-related data.
Definition: SDetector/PMT.h:26
utl::TabulatedFunction * fPulseShape
double * fMultiplierLG
utl::TabulatedFunction * fDomeRefractionIndex
PMT & operator=(const PMT &)
double * fGainRatio
Class to hold collection (x,y) points and provide interpolation between them.
double GetTimeOffset() const
double GetNominalVEMCharge() const
Get nominal value for the VEM charge.
double GetHighGainDelay() const
double GetCurrent2VoltageMultiplier() const
int GetId() const
return ID of the PMT
Definition: SDetector/PMT.h:30
double GetMinCharge() const
double * fGainRatioRMS
int gain
Definition: dump1090.h:241
double GetCompatibilityVEMPeak(const std::string &simulationIdentifier) const
Get VEM peak for the PMT (for simulations)
sdet::PMTConstants::PMTType GetType() const
Definition: SDetector/PMT.h:33
const utl::TabulatedFunction & GetPulseShape() const
double * fWorkingGain
double GetCollectionEfficiency() const
Collection efficiency.
double GetEffectiveArea() const
const PMTConstants::PMTType fType
PMT(const int PMTId, const int stationId, const int isUUB, const PMTConstants::PMTType ptype=PMTConstants::eWaterCherenkovLarge)
double * fVEMCharge
const utl::Point & GetPosition() const
PMT position.
det::VManager::IndexMap fIndexMap
utl::Point * fPosition
double * fBaselineHGRMS
double GetVEMPeak(const std::string &simulationIdentifier) const
Get VEM peak for the PMT (for simulations)
double * fEffectiveArea
double GetGainRatio() const
Get dynode to anode ratio for the PMT (for simulations)
double * fVoltage2FADCMultiplier
std::vector< double > * fChargeProbabilityDistribution
double * fMaxCharge
double * fVEMPeak
void NotFoundAndThrow(const std::string &msg) const
double GetWorkingGain() const
PMT Working Gain.
const utl::TabulatedFunction & GetQuantumEfficiency() const
Quantum efficiency.
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
uint16_t * data
Definition: dump1090.h:228
double * fHighGainDelay
double * fTimeOffset
utl::TabulatedFunction * fRTVRefractionIndex
utl::TabulatedFunction * fQuantumEfficiency
double GetVEMCharge(const std::string &simulationIdentifier) const
Get VEM charge for the PMT (for simulations)
const utl::TabulatedFunction & GetFaceRefractionIndex() const
Refraction index for the PMT face.
double * fMinCharge
double * fMultiplierHG
double GetVoltage2FADCMultiplier() const
constexpr double m
Definition: AugerUnits.h:121
const utl::TabulatedFunction & GetRTVRefractionIndex() const
Refraction index for the interface between PMT face and dome (RTV)
double * fBaselineLG
void Update() const
double * fCollectionEfficiency
double GetBaselineRMS(const sdet::PMTConstants::PMTGain gain) const
Get baseline noise for the PMT (for simulations)
double * fCurrent2VoltageMultiplier

, generated on Tue Sep 26 2023.