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 public:
20  // Constructor arguments:
21  //
22  // firstSampleShift -- first TS w.r.t. SOI to use for "Method 0"
23  // reconstruction.
24  //
25  // samplesToAdd -- default number of samples to add for "Method 0"
26  // reconstruction. If, let say, SOI = 4,
27  // firstSampleShift = -1, and samplesToAdd = 3
28  // then the code will add time slices 3, 4, and 5.
29  //
30  // phaseNS -- default "phase" parameter for the pulse
31  // containment correction
32  //
33  // timeShift -- time shift for QIE11 TDC times
34  //
35  // correctForPhaseContainment -- default switch for applying pulse
36  // containment correction for "Method 0"
37  //
38  // m2 -- "Method 2" object
39  //
40  // detFit -- "Method 3" (a.k.a. "deterministic fit") object
41  //
43  int samplesToAdd,
44  float phaseNS,
45  float timeShift,
48  bool applyFixPCC,
49  std::unique_ptr<PulseShapeFitOOTPileupCorrection> m2,
50  std::unique_ptr<HcalDeterministicFit> detFit,
51  std::unique_ptr<MahiFit> mahi,
53 
54  inline ~SimpleHBHEPhase1Algo() override {}
55 
56  // Methods to override from the base class
57  void beginRun(const edm::Run&, const edm::EventSetup&) override;
58  void endRun() override;
59 
60  inline bool isConfigurable() const override { return false; }
61 
63  const HcalRecoParam* params,
64  const HcalCalibrations& calibs,
65  bool isRealData) override;
66  // Basic accessors
67  inline int getFirstSampleShift() const { return firstSampleShift_; }
68  inline int getSamplesToAdd() const { return samplesToAdd_; }
69  inline float getPhaseNS() const { return phaseNS_; }
70  inline float getTimeShift() const { return timeShift_; }
71  inline bool isCorrectingForPhaseContainment() const { return corrFPC_; }
72  inline int getRunNumber() const { return runnum_; }
73 
76 
77 protected:
78  // Special HB- correction
79  float hbminusCorrectionFactor(const HcalDetId& cell, float energy, bool isRealData) const;
80 
81  // "Method 0" rechit energy. Calls a non-const member of
82  // HcalPulseContainmentManager, so no const qualifier here.
83  // HB- correction is not applied inside this function.
84  float m0Energy(const HBHEChannelInfo& info,
85  double reconstructedCharge,
86  bool applyContainmentCorrection,
87  double phaseNS,
88  int nSamplesToAdd);
89 
90  // "Method 0" rechit timing (original low-pileup QIE8 algorithm)
91  float m0Time(const HBHEChannelInfo& info, double reconstructedCharge, int nSamplesToExamine) const;
92 
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
HcalPulseContainmentManager pulseCorr_
SimpleHBHEPhase1Algo(int firstSampleShift, int samplesToAdd, float phaseNS, float timeShift, bool correctForPhaseContainment, bool applyLegacyHBMCorrection, bool applyFixPCC, std::unique_ptr< PulseShapeFitOOTPileupCorrection > m2, std::unique_ptr< HcalDeterministicFit > detFit, std::unique_ptr< MahiFit > mahi, edm::ConsumesCollector iC)
edm::ESGetToken< HcalTimeSlew, HcalTimeSlewRecord > delayToken_
bool isConfigurable() const override
float hbminusCorrectionFactor(const HcalDetId &cell, float energy, bool isRealData) const
float m0Time(const HBHEChannelInfo &info, double reconstructedCharge, int nSamplesToExamine) const
std::unique_ptr< MahiFit > mahiOOTpuCorr_
HcalPulseShapes theHcalPulseShapes_
float m0Energy(const HBHEChannelInfo &info, double reconstructedCharge, bool applyContainmentCorrection, double phaseNS, int nSamplesToAdd)
bool isCorrectingForPhaseContainment() const
std::unique_ptr< PulseShapeFitOOTPileupCorrection > psFitOOTpuCorr_
Definition: Run.h:45