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  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, float energy, bool isRealData) const;
77 
78  // "Method 0" rechit energy. Calls a non-const member of
79  // HcalPulseContainmentManager, so no const qualifier here.
80  // HB- correction is not applied inside this function.
81  float m0Energy(const HBHEChannelInfo& info,
82  double reconstructedCharge,
83  bool applyContainmentCorrection,
84  double phaseNS,
85  int nSamplesToAdd);
86 
87  // "Method 0" rechit timing (original low-pileup QIE8 algorithm)
88  float m0Time(const HBHEChannelInfo& info, double reconstructedCharge, int nSamplesToExamine) const;
89 
90 private:
92 
95  float phaseNS_;
96  float timeShift_;
97  int runnum_;
98  bool corrFPC_;
100 
101  // "Metod 2" algorithm
102  std::unique_ptr<PulseShapeFitOOTPileupCorrection> psFitOOTpuCorr_;
103 
104  // "Metod 3" algorithm
105  std::unique_ptr<HcalDeterministicFit> hltOOTpuCorr_;
106 
107  // Mahi algorithm
108  std::unique_ptr<MahiFit> mahiOOTpuCorr_;
109 
111 };
112 
113 #endif // RecoLocalCalo_HcalRecAlgos_SimpleHBHEPhase1Algo_h_
SimpleHBHEPhase1Algo::~SimpleHBHEPhase1Algo
~SimpleHBHEPhase1Algo() override
Definition: SimpleHBHEPhase1Algo.h:52
HcalDeterministicFit.h
SimpleHBHEPhase1Algo::isCorrectingForPhaseContainment
bool isCorrectingForPhaseContainment() const
Definition: SimpleHBHEPhase1Algo.h:69
SimpleHBHEPhase1Algo::theHcalPulseShapes_
HcalPulseShapes theHcalPulseShapes_
Definition: SimpleHBHEPhase1Algo.h:110
SimpleHBHEPhase1Algo::psFitOOTpuCorr_
std::unique_ptr< PulseShapeFitOOTPileupCorrection > psFitOOTpuCorr_
Definition: SimpleHBHEPhase1Algo.h:102
AbsHBHEPhase1Algo.h
HcalPulseContainmentManager.h
HLT_2018_cff.applyLegacyHBMCorrection
applyLegacyHBMCorrection
Definition: HLT_2018_cff.py:7111
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::Run
Definition: Run.h:45
HcalPulseShapes
Definition: HcalPulseShapes.h:21
HBHERecHit
Definition: HBHERecHit.h:13
SimpleHBHEPhase1Algo::firstSampleShift_
int firstSampleShift_
Definition: SimpleHBHEPhase1Algo.h:93
SimpleHBHEPhase1Algo::endRun
void endRun() override
Definition: SimpleHBHEPhase1Algo.cc:52
HcalTimeSlew.h
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
MahiFit.h
castor_dqm_sourceclient-live_cfg.samplesToAdd
samplesToAdd
Definition: castor_dqm_sourceclient-live_cfg.py:56
SimpleHBHEPhase1Algo::getRunNumber
int getRunNumber() const
Definition: SimpleHBHEPhase1Algo.h:70
SimpleHBHEPhase1Algo::hltOOTpuCorr_
std::unique_ptr< HcalDeterministicFit > hltOOTpuCorr_
Definition: SimpleHBHEPhase1Algo.h:105
PulseShapeFitOOTPileupCorrection.h
HcalTimeSlew
Definition: HcalTimeSlew.h:19
HcalRecoParam
Definition: HcalRecoParam.h:16
SimpleHBHEPhase1Algo::isConfigurable
bool isConfigurable() const override
Definition: SimpleHBHEPhase1Algo.h:58
SimpleHBHEPhase1Algo
Definition: SimpleHBHEPhase1Algo.h:18
SimpleHBHEPhase1Algo::SimpleHBHEPhase1Algo
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)
Definition: SimpleHBHEPhase1Algo.cc:20
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HcalCalibrations
Definition: HcalCalibrations.h:9
SimpleHBHEPhase1Algo::getTimeShift
float getTimeShift() const
Definition: SimpleHBHEPhase1Algo.h:68
SimpleHBHEPhase1Algo::getSamplesToAdd
int getSamplesToAdd() const
Definition: SimpleHBHEPhase1Algo.h:66
SimpleHBHEPhase1Algo::phaseNS_
float phaseNS_
Definition: SimpleHBHEPhase1Algo.h:95
SimpleHBHEPhase1Algo::hbminusCorrectionFactor
float hbminusCorrectionFactor(const HcalDetId &cell, float energy, bool isRealData) const
Definition: SimpleHBHEPhase1Algo.cc:147
SimpleHBHEPhase1Algo::mahiOOTpuCorr_
std::unique_ptr< MahiFit > mahiOOTpuCorr_
Definition: SimpleHBHEPhase1Algo.h:108
HLT_2018_cff.firstSampleShift
firstSampleShift
Definition: HLT_2018_cff.py:7106
castor_dqm_sourceclient-live_cfg.correctForPhaseContainment
correctForPhaseContainment
Definition: castor_dqm_sourceclient-live_cfg.py:59
SimpleHBHEPhase1Algo::m0Time
float m0Time(const HBHEChannelInfo &info, double reconstructedCharge, int nSamplesToExamine) const
Definition: SimpleHBHEPhase1Algo.cc:181
HcalDetId
Definition: HcalDetId.h:12
SimpleHBHEPhase1Algo::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: SimpleHBHEPhase1Algo.cc:43
SimpleHBHEPhase1Algo::timeShift_
float timeShift_
Definition: SimpleHBHEPhase1Algo.h:96
SimpleHBHEPhase1Algo::getFirstSampleShift
int getFirstSampleShift() const
Definition: SimpleHBHEPhase1Algo.h:65
edm::EventSetup
Definition: EventSetup.h:57
SimpleHBHEPhase1Algo::hcalTimeSlew_delay_
const HcalTimeSlew * hcalTimeSlew_delay_
Definition: SimpleHBHEPhase1Algo.h:72
SimpleHBHEPhase1Algo::corrFPC_
bool corrFPC_
Definition: SimpleHBHEPhase1Algo.h:98
SimpleHBHEPhase1Algo::samplesToAdd_
int samplesToAdd_
Definition: SimpleHBHEPhase1Algo.h:94
SimpleHBHEPhase1Algo::runnum_
int runnum_
Definition: SimpleHBHEPhase1Algo.h:97
HcalPulseContainmentManager
Definition: HcalPulseContainmentManager.h:10
SimpleHBHEPhase1Algo::applyLegacyHBMCorrection_
bool applyLegacyHBMCorrection_
Definition: SimpleHBHEPhase1Algo.h:99
SimpleHBHEPhase1Algo::reconstruct
HBHERecHit reconstruct(const HBHEChannelInfo &info, const HcalRecoParam *params, const HcalCalibrations &calibs, bool isRealData) override
Definition: SimpleHBHEPhase1Algo.cc:54
SimpleHBHEPhase1Algo::m0Energy
float m0Energy(const HBHEChannelInfo &info, double reconstructedCharge, bool applyContainmentCorrection, double phaseNS, int nSamplesToAdd)
Definition: SimpleHBHEPhase1Algo.cc:160
SimpleHBHEPhase1Algo::pulseCorr_
HcalPulseContainmentManager pulseCorr_
Definition: SimpleHBHEPhase1Algo.h:91
HLT_2018_cff.timeShift
timeShift
Definition: HLT_2018_cff.py:7169
AbsHBHEPhase1Algo
Definition: AbsHBHEPhase1Algo.h:27
SimpleHBHEPhase1Algo::getPhaseNS
float getPhaseNS() const
Definition: SimpleHBHEPhase1Algo.h:67
HBHEChannelInfo
Definition: HBHEChannelInfo.h:15