ModuleRecData.h
Go to the documentation of this file.
1 #ifndef _mevt_ModuleRecData_h_
2 #define _mevt_ModuleRecData_h_
3 
4 #include <utl/ErrorLogger.h>
5 #include <utl/Trace.h>
6 #include <utl/TimeStamp.h>
7 #include <utl/ShadowPtr.h>
8 
9 
10 namespace mevt {
11 
12  class Module;
13 
14 
29  class ModuleRecData {
30 
31  public:
42  const utl::TraceUI& GetChannelsOn() const;
43 
44  void MakeChannelsOn();
45  bool HasChannelsOn() const;
46 
47  /*
48  * GetNumberOfChannelsOn() takes into account inhibition windows (ie it can be greater than 64)
49  * GetTotalNumberOfChannelsOn() yields the number of channels with at least one muon pattern
50  * (i.e. is never greater than 64)
51  */
52  unsigned int GetNumberOfChannelsOn() const;
53  unsigned int GetTotalNumberOfChannelsOn() const { return fTotalNumberOfChannelsOn; }
54  unsigned int GetMaxChannelsOn() const;
55 
57  const utl::TraceUI& GetChannelsInhibited() const;
58 
59  void MakeChannelsInhibited();
60  bool HasChannelsInhibited() const;
61 
62  unsigned int GetNumberOfChannelsInhibited() const;
63 
65  const utl::TraceD& GetMeanMuonsVsTime() const;
66 
67  void MakeMeanMuonsVsTime();
68  bool HasMeanMuonsVsTime() const;
69 
71  const utl::TraceD& GetNumberOfMuonsVsTime() const;
72 
74  bool HasNumberOfMuonsVsTime() const;
75 
76 
77 
78  bool IsEmpty() const { return !GetMaxChannelsOn(); }
79  bool IsGood() const { return 0 < GetMaxChannelsOn() && GetMaxChannelsOn() < fSegmentation; }
80 
81  bool IsADCCalibratedLG() const { return fMeanChargeMuonLG > 0; }
82  bool IsADCCalibratedHG() const { return fMeanChargeMuonHG > 0; }
83 
84  void SetSaturated(const bool sat) {fSaturated = sat; }
85  bool IsSaturated() const { return fSaturated; }
94  void SetSaturationFlag(const bool satFlag) { fSaturationFlag = satFlag; }
95  bool SaturationFlag() const { return fSaturationFlag; }
96 
114  bool HasChannelsOnStartTime() const { return bool(fChannelsOnStartTime); }
115 
119  void SetTotalNumberOfChannelsOn(const unsigned int n) { fTotalNumberOfChannelsOn = n; }
132 
135 
136  void SetNumberOfMuonsErrorLow(const double e) { fNumberOfMuonsErrorLow = e; }
138 
139  void SetMeanMuons(const double m) { fMeanMuons = m; }
140  double GetMeanMuons() const { return fMeanMuons; }
141 
142  void SetMeanMuonsErrorHigh(const double e) { fMeanMuonsErrorHigh = e; }
143  double GetMeanMuonsErrorHigh() const { return fMeanMuonsErrorHigh; }
144 
145  void SetMeanMuonsErrorLow(const double e) { fMeanMuonsErrorLow = e; }
146  double GetMeanMuonsErrorLow() const { return fMeanMuonsErrorLow; }
147 
158  double GetMeanChargeMuonLG() const { return fMeanChargeMuonLG; }
159  void SetMeanChargeMuonLG(const double charge){ fMeanChargeMuonLG = charge; }
160  double GetStdDevChargeMuonLG() const { return fStdDevChargeMuonLG; }
161  void SetStdDevChargeMuonLG(const double charge){ fStdDevChargeMuonLG = charge; }
162 
163  double GetMeanChargeMuonHG() const { return fMeanChargeMuonHG; }
164  void SetMeanChargeMuonHG(const double charge){ fMeanChargeMuonHG = charge; }
165  double GetStdDevChargeMuonHG() const { return fStdDevChargeMuonHG; }
166  void SetStdDevChargeMuonHG(const double charge){ fStdDevChargeMuonHG = charge; }
167 
168  void SetTotalChargeLG(const double charge) { fTotalChargeLG = charge; }
169  double GetTotalChargeLG() const { return fTotalChargeLG; }
170 
171  void SetTotalChargeHG(const double charge) { fTotalChargeHG = charge; }
172  double GetTotalChargeHG() const { return fTotalChargeHG; }
173 
174 
186 
189 
192 
195 
198 
201 
210  void SetNumberOfMuonsLowLimit(const double e) { fNumberOfMuonsLowLimit = e; }
212 
213  void SetMeanMuonsLowLimit(const double e) { fMeanMuonsLowLimit = e; }
214  double GetMeanMuonsLowLimit() const { return fMeanMuonsLowLimit; }
215 
228  // Get and set active area
229 
230  void SetActiveArea(const double area) { fActiveArea = area; }
231  double GetActiveArea() const { return fActiveArea; }
232 
243 
244  double GetMeanMuonDensity() const { return fMeanMuons / fActiveArea; }
247 
251 
255 
256  void SetSegmentation(const size_t nm) { fSegmentation = nm; }
257  size_t GetSegmentation() const { return fSegmentation; }
258 
259  void SetWindowSize(const unsigned int ws) { fWindowSize = ws; }
260  unsigned int GetWindowSize() const { return fWindowSize; }
261 
262  void SetLDFResidual(const double ldfResidual) { fLDFResidual = ldfResidual; }
263  double GetLDFResidual() const { return fLDFResidual; }
264 
265  // Methods to access the pattern matches vector
266  const std::vector<double>& GetPatternMatchTimes() const { return fPatternMatchTimes; }
267  std::vector<double>& GetPatternMatchTimes() { return fPatternMatchTimes; }
268  void AddPatternMatchTime(const double t) { fPatternMatchTimes.push_back(t); }
269 
272 
273  void SetSPDistance(const double r) { fSPDistance = r; }
274  double GetSPDistance() const { return fSPDistance; }
275 
276 
277  private:
280 
288  double fActiveArea = 0;
289  /*
290  * Number of scintillator with a signal per time window
291  * from this field the numbers of windows on and estimated muons are calculated
292  */
298 
306  std::vector<double> fPatternMatchTimes;
307 
308  // Number of active channels
309  size_t fSegmentation = 0;
310  // Length of the inhibition window in number of bins of a channel trace
311  unsigned int fWindowSize = 0;
312  double fLDFResidual = 0;
313  bool fSaturated = false;
314  bool fSaturationFlag = false;
315 
316  // The estimated parameter "mu" of a Poisson distribution, a parameter of the shower
317  // See GAP2022_001 for more details
318  double fMeanMuons = 0;
320  double fMeanMuonsErrorLow = 0;
321  double fMeanMuonsLowLimit = 0;
322 
323  // The estimated number of muons at the module
324  // See GAP2022_001 for more details
329 
333 
337 
338  double fMeanChargeMuonLG = 0;
340  double fMeanChargeMuonHG = 0;
342 
343  double fTotalChargeLG = 0;
344  double fTotalChargeHG = 0;
345 
346  unsigned int fTotalNumberOfChannelsOn = 0;
348 
349  double fSPDistance = 0;
350 
354  friend class Module;
355 
362 
363  };
364 
365 }
366 
367 
368 #endif
double GetMeanMuonDensityErrorHigh() const
double GetCornerClippingProbability() const
Module level reconstruction data. This class contains all data required by the muon reconstruction...
Definition: ModuleRecData.h:29
void SetMeanMuonsErrorLow(const double e)
double fNumberOfMuonsADCErrorLowHG
void SetSaturated(const bool sat)
Definition: ModuleRecData.h:84
double GetMuonDensityErrorHigh() const
unsigned int GetNumberOfChannelsInhibited() const
bool HasChannelsInhibited() const
double GetMeanMuonsErrorHigh() const
utl::TraceD & GetNumberOfMuonsVsTime()
void SetMeanChargeMuonHG(const double charge)
double fCornerClippingProbability
unsigned int fTotalNumberOfChannelsOn
double GetMeanMuons() const
void SetStdDevChargeMuonHG(const double charge)
double GetNumberOfMuonsADCErrorHighHG() const
void SetNumberOfMuonsADCErrorHighHG(const double e)
**void SetActiveArea(const double area)
bool IsEmpty() const
Definition: ModuleRecData.h:78
void SetNumberOfMuonsADCErrorLowHG(const double e)
void SetNumberOfMuonsLowLimit(const double e)
The lower limit to the number of muons in a module.
unsigned int fWindowSize
double GetNumberOfMuonsErrorLow() const
double GetMuonDensityErrorLowLG() const
const std::vector< double > & GetPatternMatchTimes() const
double GetMuonDensityErrorHighHG() const
double GetNumberOfEstimatedMuonsADCHG() const
double GetMeanMuonsErrorLow() const
double GetTotalChargeLG() const
double GetNumberOfEstimatedMuons() const
double GetActiveArea() const
void AddPatternMatchTime(const double t)
double GetSPDistance() const
double fNumberOfMuonsADCErrorHighHG
void SetTotalChargeLG(const double charge)
double fNumberOfMuonsADCErrorHighLG
double GetMeanMuonDensity() const
bool IsGood() const
Definition: ModuleRecData.h:79
double GetLDFResidual() const
double GetTotalChargeHG() const
void SetMeanMuons(const double m)
utl::ShadowPtr< utl::TraceD > fMeanMuonsVsTime
bool SaturationFlag() const
Definition: ModuleRecData.h:95
utl::ShadowPtr< utl::TraceUI > fChannelsOn
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
double GetMuonDensityErrorLowHG() const
double GetMeanMuonsLowLimit() const
double fNumberOfMuonsADCErrorLowLG
void SetMeanChargeMuonLG(const double charge)
std::vector< double > fPatternMatchTimes
The pattern match times vector stores the times of all matches in the module found by the counting al...
double GetMuonDensity() const
double fNumberOfEstimatedMuonsADCLG
utl::TraceUI & GetChannelsInhibited()
double GetMuonDensityHG() const
double fActiveArea
The module detection area.
bool HasChannelsOnStartTime() const
Check for the presence of the time stamp.
void SetStdDevChargeMuonLG(const double charge)
utl::ShadowPtr< utl::TraceD > fNumberOfMuonsVsTime
void SetMeanMuonsErrorHigh(const double e)
Module level event data.
Definition: MEvent/Module.h:41
utl::TraceUI & GetChannelsOn()
Number of windows with a signal in a module.
Definition: ModuleRecData.cc:9
bool HasChannelsOn() const
bool HasMeanMuonsVsTime() const
void SetNumberOfMuonsADCErrorLowLG(const double e)
void SetNumberOfMuonsErrorHigh(const double e)
void SetTotalChargeHG(const double charge)
double fNumberOfEstimatedMuons
void SetNumberOfEstimatedMuons(const double m)
Number of estimated muons in a module.
void SetSPDistance(const double r)
double GetNumberOfMuonsErrorHigh() const
void SetNumberOfMuonsADCErrorHighLG(const double e)
double GetNumberOfEstimatedMuonsADCLG() const
void SetWindowSize(const unsigned int ws)
unsigned int GetTotalNumberOfChannelsOn() const
Definition: ModuleRecData.h:53
unsigned int GetMaxChannelsOn() const
void SetNumberOfEstimatedMuonsADCHG(const double m)
std::vector< double > & GetPatternMatchTimes()
double fNumberOfEstimatedMuonsADCHG
void SetSegmentation(const size_t nm)
void SetNumberOfEstimatedMuonsADCLG(const double m)
Number of estimated muons in a module with ADC channel.
unsigned int GetWindowSize() const
utl::TimeStamp GetChannelsOnStartTime() const
Return the timestamp associated with the start of the ChannelsOn trace.
bool HasNumberOfMuonsVsTime() const
Template class for a FADC data or calibrated data container. Use the typedefs (TraceD, TraceI, etc.) defined in Trace-fwd.h.
Definition: Trace-fwd.h:19
bool IsADCCalibratedLG() const
Definition: ModuleRecData.h:81
double GetMuonDensityLG() const
void SetChannelsOnStartTime(const utl::TimeStamp &t)
Sets the timestamp associated with the start of the ChannelsOn trace.
double GetNumberOfMuonsADCErrorHighLG() const
size_t GetSegmentation() const
double GetStdDevChargeMuonHG() const
unsigned int GetNumberOfChannelsOn() const
double GetNumberOfMuonsADCErrorLowHG() const
double GetMuonDensityErrorHighLG() const
double GetNumberOfMuonsADCErrorLowLG() const
double GetMeanChargeMuonLG() const
Calibration of ADC channel.
double fNumberOfMuonsErrorHigh
void SetTotalNumberOfChannelsOn(const unsigned int n)
Total number of channels with at least one pattern match (it cannot be greater than 64) ...
utl::ShadowPtr< utl::TraceUI > fChannelsInhibited
double GetMuonDensityErrorLow() const
constexpr double m
Definition: AugerUnits.h:121
double GetMeanChargeMuonHG() const
bool IsADCCalibratedHG() const
Definition: ModuleRecData.h:82
double GetMeanMuonDensityErrorLow() const
void SetLDFResidual(const double ldfResidual)
utl::TraceD & GetMeanMuonsVsTime()
double GetStdDevChargeMuonLG() const
void SetNumberOfMuonsErrorLow(const double e)
void SetCornerClippingProbability(const double p)
bool IsSaturated() const
Definition: ModuleRecData.h:85
void SetSaturationFlag(const bool satFlag)
Return user defined saturation limit.
Definition: ModuleRecData.h:94
utl::ShadowPtr< utl::TimeStamp > fChannelsOnStartTime
double GetNumberOfMuonsLowLimit() const
void SetMeanMuonsLowLimit(const double e)

, generated on Tue Sep 26 2023.