CMS 3D CMS Logo

SimpleHBHEPhase1Algo.h
Go to the documentation of this file.
1 #ifndef RecoLocalCalo_HcalRecAlgos_SimpleHBHEPhase1Algo_h_
2 #define RecoLocalCalo_HcalRecAlgos_SimpleHBHEPhase1Algo_h_
3 
4 #include <memory>
5 #include <vector>
6 
7 // Base class header
9 
10 // Other headers
12 
17 
19 {
20 public:
21  // Constructor arguments:
22  //
23  // firstSampleShift -- first TS w.r.t. SOI to use for "Method 0"
24  // reconstruction.
25  //
26  // samplesToAdd -- default number of samples to add for "Method 0"
27  // reconstruction. If, let say, SOI = 4,
28  // firstSampleShift = -1, and samplesToAdd = 3
29  // then the code will add time slices 3, 4, and 5.
30  //
31  // phaseNS -- default "phase" parameter for the pulse
32  // containment correction
33  //
34  // timeShift -- time shift for QIE11 TDC times
35  //
36  // correctForPhaseContainment -- default switch for applying pulse
37  // containment correction for "Method 0"
38  //
39  // m2 -- "Method 2" object
40  //
41  // detFit -- "Method 3" (a.k.a. "deterministic fit") object
42  //
44  int samplesToAdd,
45  float phaseNS,
46  float timeShift,
49  std::unique_ptr<PulseShapeFitOOTPileupCorrection> m2,
50  std::unique_ptr<HcalDeterministicFit> detFit,
51  std::unique_ptr<MahiFit> mahi);
52 
53  inline ~SimpleHBHEPhase1Algo() override {}
54 
55  // Methods to override from the base class
56  void beginRun(const edm::Run&, const edm::EventSetup&) override;
57  void endRun() override;
58 
59  inline bool isConfigurable() const override {return false;}
60 
62  const HcalRecoParam* params,
63  const HcalCalibrations& calibs,
64  bool isRealData) override;
65  // Basic accessors
66  inline int getFirstSampleShift() const {return firstSampleShift_;}
67  inline int getSamplesToAdd() const {return samplesToAdd_;}
68  inline float getPhaseNS() const {return phaseNS_;}
69  inline float getTimeShift() const {return timeShift_;}
70  inline bool isCorrectingForPhaseContainment() const {return corrFPC_;}
71  inline int getRunNumber() const {return runnum_;}
72 
74 
75 protected:
76  // Special HB- correction
77  float hbminusCorrectionFactor(const HcalDetId& cell,
78  float energy, bool isRealData) const;
79 
80  // "Method 0" rechit energy. Calls a non-const member of
81  // HcalPulseContainmentManager, so no const qualifier here.
82  // HB- correction is not applied inside this function.
83  float m0Energy(const HBHEChannelInfo& info,
84  double reconstructedCharge,
85  bool applyContainmentCorrection,
86  double phaseNS, int nSamplesToAdd);
87 
88  // "Method 0" rechit timing (original low-pileup QIE8 algorithm)
89  float m0Time(const HBHEChannelInfo& info,
90  double reconstructedCharge,
91  const HcalCalibrations& calibs,
92  int nSamplesToExamine) const;
93 private:
95 
98  float phaseNS_;
99  float timeShift_;
100  int runnum_;
101  bool corrFPC_;
103 
104  // "Metod 2" algorithm
105  std::unique_ptr<PulseShapeFitOOTPileupCorrection> psFitOOTpuCorr_;
106 
107  // "Metod 3" algorithm
108  std::unique_ptr<HcalDeterministicFit> hltOOTpuCorr_;
109 
110  // Mahi algorithm
111  std::unique_ptr<MahiFit> mahiOOTpuCorr_;
112 
114 };
115 
116 #endif // RecoLocalCalo_HcalRecAlgos_SimpleHBHEPhase1Algo_h_
HBHERecHit reconstruct(const HBHEChannelInfo &info, const HcalRecoParam *params, const HcalCalibrations &calibs, bool isRealData) override
const HcalTimeSlew * hcalTimeSlew_delay_
static const TGPicture * info(bool iBackgroundIsBlack)
std::unique_ptr< HcalDeterministicFit > hltOOTpuCorr_
void beginRun(const edm::Run &, const edm::EventSetup &) override
int getFirstSampleShift() const
HcalPulseContainmentManager pulseCorr_
float m0Time(const HBHEChannelInfo &info, double reconstructedCharge, const HcalCalibrations &calibs, int nSamplesToExamine) const
SimpleHBHEPhase1Algo(int firstSampleShift, int samplesToAdd, float phaseNS, float timeShift, bool correctForPhaseContainment, bool applyLegacyHBMCorrection, std::unique_ptr< PulseShapeFitOOTPileupCorrection > m2, std::unique_ptr< HcalDeterministicFit > detFit, std::unique_ptr< MahiFit > mahi)
float hbminusCorrectionFactor(const HcalDetId &cell, float energy, bool isRealData) const
std::unique_ptr< MahiFit > mahiOOTpuCorr_
HcalPulseShapes theHcalPulseShapes_
float m0Energy(const HBHEChannelInfo &info, double reconstructedCharge, bool applyContainmentCorrection, double phaseNS, int nSamplesToAdd)
bool isCorrectingForPhaseContainment() const
bool isConfigurable() const override
std::unique_ptr< PulseShapeFitOOTPileupCorrection > psFitOOTpuCorr_
Definition: Run.h:45