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,
48  std::unique_ptr<PulseShapeFitOOTPileupCorrection> m2,
49  std::unique_ptr<HcalDeterministicFit> detFit,
50  std::unique_ptr<MahiFit> mahi);
51 
52  inline ~SimpleHBHEPhase1Algo() override {}
53 
54  // Methods to override from the base class
55  void beginRun(const edm::Run&, const edm::EventSetup&) override;
56  void endRun() override;
57 
58  inline bool isConfigurable() const override {return false;}
59 
61  const HcalRecoParam* params,
62  const HcalCalibrations& calibs,
63  bool isRealData) override;
64  // Basic accessors
65  inline int getFirstSampleShift() const {return firstSampleShift_;}
66  inline int getSamplesToAdd() const {return samplesToAdd_;}
67  inline float getPhaseNS() const {return phaseNS_;}
68  inline float getTimeShift() const {return timeShift_;}
69  inline bool isCorrectingForPhaseContainment() const {return corrFPC_;}
70  inline int getRunNumber() const {return runnum_;}
71 
73 
74 protected:
75  // Special HB- correction
76  float hbminusCorrectionFactor(const HcalDetId& cell,
77  float energy, bool isRealData) const;
78 
79  // "Method 0" rechit energy. Calls a non-const member of
80  // HcalPulseContainmentManager, so no const qualifier here.
81  // HB- correction is not applied inside this function.
82  float m0Energy(const HBHEChannelInfo& info,
83  double reconstructedCharge,
84  bool applyContainmentCorrection,
85  double phaseNS, int nSamplesToAdd);
86 
87  // "Method 0" rechit timing (original low-pileup QIE8 algorithm)
88  float m0Time(const HBHEChannelInfo& info,
89  double reconstructedCharge,
90  const HcalCalibrations& calibs,
91  int nSamplesToExamine) const;
92 private:
94 
97  float phaseNS_;
98  float timeShift_;
99  int runnum_;
100  bool corrFPC_;
101 
102  // "Metod 2" algorithm
103  std::unique_ptr<PulseShapeFitOOTPileupCorrection> psFitOOTpuCorr_;
104 
105  // "Metod 3" algorithm
106  std::unique_ptr<HcalDeterministicFit> hltOOTpuCorr_;
107 
108  // Mahi algorithm
109  std::unique_ptr<MahiFit> mahiOOTpuCorr_;
110 
112 };
113 
114 #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, 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:43