DLECorrectionWG/DLECorrection.h
Go to the documentation of this file.
1 #ifndef _DLECorrectionWG_DLECorrection_h_
2 #define _DLECorrectionWG_DLECorrection_h_
3 
4 #include <fwk/VModule.h>
5 #include <evt/Event.h>
6 #include <utl/Trace-fwd.h>
7 #include <utl/TabulatedFunction.h>
8 
9 #include <vector>
10 #include <list>
11 #include <map>
12 //#include <utility>
13 
14 #include <sevt/Station.h>
15 #include <sevt/StationConstants.h>
16 #include <sevt/PMTRecData.h>
17 
18 // ROOT headers
19 #include <TFile.h>
20 #include <TFormula.h>
21 #include <TH1.h>
22 #include <TH1D.h>
23 
24 
25 namespace evt {
26  class Event;
27 }
28 
29 namespace sevt {
30  class PMT;
31  class PMTRecData;
32  class Station;
33 }
34 
35 
36 namespace DLECorrectionWG {
37 
53  class DLECorrection : public fwk::VModule {
54 
55  public:
56  DLECorrection() = default;
57  virtual ~DLECorrection() = default;
58 
59  fwk::VModule::ResultFlag Init() override;
60  fwk::VModule::ResultFlag Run(evt::Event& event) override;
62 
63  private:
64  void CorrectDLE(evt::Event& event) const;
65  void CorrectAverageDLE(sevt::Station& station,
66  const double theta, const double phi) const;
67  void CorrectIndividualDLE(sevt::Station& station) const;
68  double EstimateSignalFluct(const sevt::PMT& pmt,
69  const bool ishgsat, const int pos) const;
70  double GetFCorr(const int pmtId,
71  const double theta, const double phi) const;
72 
73  bool FlagNegBins(const sevt::PMT& pmt) const;
74  bool FlagOscBaselines(const sevt::PMT& pmt, const bool hgsat,
75  const int saturationValue) const;
76  bool SelectPMT(const sevt::PMT& pmt, const bool lgsat, const bool hgsat,
77  const unsigned int saturationValue) const;
78 
80  const unsigned int startIntegration,
81  const unsigned int endIntegration,
82  const double traceIntegral) const;
83 
84  unsigned int fTraceSize = 0;
85  double fBinSize = 0;
86 
87  // Variables read from the xml
88  bool fOverwriteVEMTrace = false;
90  std::pair<double, double> fRiseTimeFractions = { 0, 0 };
91  std::pair<double, double> fFallTimeFractions = { 0, 0 };
93  bool fDoCorrectionAverage = false;
94  bool fCorrectHGSat = false;
95  double fDLEFilterThreshold = 0;
96  double fDLESignalThreshold = 0;
97  int fDLEMinNPMTs = 0;
98  double fShiftPMT1 = 0;
99  double fShiftPMT2 = 0;
100  double fShiftPMT3 = 0;
101  std::string fAsymmParA;
102  std::string fAsymmParB;
103  std::vector<int> fExcludeStations;
104  bool fExcludeBadTraces = false;
105  bool fExcludeBadTracesCalc = false;
106  double fOscThrHG = 0;
107  double fOscThrLG = 0;
108  int fOscOffset = 0;
109  int fNegSignalThr = 0;
110 
111  // Derived quantities
114  TFormula* fFormulaDLEParA = nullptr;
115  TFormula* fFormulaDLEParB = nullptr;
116 
117  REGISTER_MODULE("DLECorrectionWG", DLECorrection);
118 
119  };
120 
121 }
122 
123 
124 #endif
bool FlagNegBins(const sevt::PMT &pmt) const
bool SelectPMT(const sevt::PMT &pmt, const bool lgsat, const bool hgsat, const unsigned int saturationValue) const
void CorrectDLE(evt::Event &event) const
class to hold data at PMT level
Definition: SEvent/PMT.h:28
sevt::StationConstants::SignalComponent fComponent
total (shower and background)
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
void ComputeCleanedRiseFall(sevt::PMTRecData &pmtRec, const unsigned int startIntegration, const unsigned int endIntegration, const double traceIntegral) const
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
REGISTER_MODULE("DLECorrectionWG", DLECorrection)
void CorrectIndividualDLE(sevt::Station &station) const
double GetFCorr(const int pmtId, const double theta, const double phi) const
class to hold data at Station level
class to hold reconstructed data at PMT level
Definition: PMTRecData.h:38
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
double EstimateSignalFluct(const sevt::PMT &pmt, const bool ishgsat, const int pos) const
std::pair< double, double > fFallTimeFractions
void CorrectAverageDLE(sevt::Station &station, const double theta, const double phi) const
Module to correct Direct Light Effects in the FADC traces.
Module interface.
Definition: VModule.h:53
std::pair< double, double > fRiseTimeFractions
bool FlagOscBaselines(const sevt::PMT &pmt, const bool hgsat, const int saturationValue) const
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
virtual ~DLECorrection()=default
sevt::StationConstants::SignalComponent fCleaned
Definition: XbArray.h:7

, generated on Tue Sep 26 2023.