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,
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 
75 
76 protected:
77  // Special HB- correction
78  float hbminusCorrectionFactor(const HcalDetId& cell, 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,
87  int nSamplesToAdd);
88 
89  // "Method 0" rechit timing (original low-pileup QIE8 algorithm)
90  float m0Time(const HBHEChannelInfo& info, double reconstructedCharge, int nSamplesToExamine) const;
91 
92 private:
94 
97  float phaseNS_;
98  float timeShift_;
99  int runnum_;
100  bool corrFPC_;
102 
103  // "Metod 2" algorithm
104  std::unique_ptr<PulseShapeFitOOTPileupCorrection> psFitOOTpuCorr_;
105 
106  // "Metod 3" algorithm
107  std::unique_ptr<HcalDeterministicFit> hltOOTpuCorr_;
108 
109  // Mahi algorithm
110  std::unique_ptr<MahiFit> mahiOOTpuCorr_;
111 
113 };
114 
115 #endif // RecoLocalCalo_HcalRecAlgos_SimpleHBHEPhase1Algo_h_
SimpleHBHEPhase1Algo::~SimpleHBHEPhase1Algo
~SimpleHBHEPhase1Algo() override
Definition: SimpleHBHEPhase1Algo.h:53
HcalDeterministicFit.h
SimpleHBHEPhase1Algo::isCorrectingForPhaseContainment
bool isCorrectingForPhaseContainment() const
Definition: SimpleHBHEPhase1Algo.h:70
SimpleHBHEPhase1Algo::theHcalPulseShapes_
HcalPulseShapes theHcalPulseShapes_
Definition: SimpleHBHEPhase1Algo.h:112
SimpleHBHEPhase1Algo::psFitOOTpuCorr_
std::unique_ptr< PulseShapeFitOOTPileupCorrection > psFitOOTpuCorr_
Definition: SimpleHBHEPhase1Algo.h:104
AbsHBHEPhase1Algo.h
HcalPulseContainmentManager.h
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::Run
Definition: Run.h:45
HcalPulseShapes
Definition: HcalPulseShapes.h:22
HBHERecHit
Definition: HBHERecHit.h:13
SimpleHBHEPhase1Algo::firstSampleShift_
int firstSampleShift_
Definition: SimpleHBHEPhase1Algo.h:95
HLT_FULL_cff.applyLegacyHBMCorrection
applyLegacyHBMCorrection
Definition: HLT_FULL_cff.py:8429
SimpleHBHEPhase1Algo::endRun
void endRun() override
Definition: SimpleHBHEPhase1Algo.cc:54
HcalTimeSlew.h
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
MahiFit.h
castor_dqm_sourceclient-live_cfg.samplesToAdd
samplesToAdd
Definition: castor_dqm_sourceclient-live_cfg.py:62
SimpleHBHEPhase1Algo::getRunNumber
int getRunNumber() const
Definition: SimpleHBHEPhase1Algo.h:71
SimpleHBHEPhase1Algo::hltOOTpuCorr_
std::unique_ptr< HcalDeterministicFit > hltOOTpuCorr_
Definition: SimpleHBHEPhase1Algo.h:107
PulseShapeFitOOTPileupCorrection.h
HcalTimeSlew
Definition: HcalTimeSlew.h:19
HLT_FULL_cff.firstSampleShift
firstSampleShift
Definition: HLT_FULL_cff.py:8423
HcalRecoParam
Definition: HcalRecoParam.h:16
SimpleHBHEPhase1Algo::isConfigurable
bool isConfigurable() const override
Definition: SimpleHBHEPhase1Algo.h:59
SimpleHBHEPhase1Algo
Definition: SimpleHBHEPhase1Algo.h:18
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HcalCalibrations
Definition: HcalCalibrations.h:9
SimpleHBHEPhase1Algo::getTimeShift
float getTimeShift() const
Definition: SimpleHBHEPhase1Algo.h:69
SimpleHBHEPhase1Algo::getSamplesToAdd
int getSamplesToAdd() const
Definition: SimpleHBHEPhase1Algo.h:67
SimpleHBHEPhase1Algo::phaseNS_
float phaseNS_
Definition: SimpleHBHEPhase1Algo.h:97
SimpleHBHEPhase1Algo::hbminusCorrectionFactor
float hbminusCorrectionFactor(const HcalDetId &cell, float energy, bool isRealData) const
Definition: SimpleHBHEPhase1Algo.cc:149
SimpleHBHEPhase1Algo::mahiOOTpuCorr_
std::unique_ptr< MahiFit > mahiOOTpuCorr_
Definition: SimpleHBHEPhase1Algo.h:110
castor_dqm_sourceclient-live_cfg.correctForPhaseContainment
correctForPhaseContainment
Definition: castor_dqm_sourceclient-live_cfg.py:65
SimpleHBHEPhase1Algo::m0Time
float m0Time(const HBHEChannelInfo &info, double reconstructedCharge, int nSamplesToExamine) const
Definition: SimpleHBHEPhase1Algo.cc:183
HcalDetId
Definition: HcalDetId.h:12
SimpleHBHEPhase1Algo::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: SimpleHBHEPhase1Algo.cc:47
SimpleHBHEPhase1Algo::timeShift_
float timeShift_
Definition: SimpleHBHEPhase1Algo.h:98
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, edm::ConsumesCollector iC)
Definition: SimpleHBHEPhase1Algo.cc:22
SimpleHBHEPhase1Algo::getFirstSampleShift
int getFirstSampleShift() const
Definition: SimpleHBHEPhase1Algo.h:66
edm::EventSetup
Definition: EventSetup.h:57
edm::ESGetToken< HcalTimeSlew, HcalTimeSlewRecord >
SimpleHBHEPhase1Algo::hcalTimeSlew_delay_
const HcalTimeSlew * hcalTimeSlew_delay_
Definition: SimpleHBHEPhase1Algo.h:74
SimpleHBHEPhase1Algo::corrFPC_
bool corrFPC_
Definition: SimpleHBHEPhase1Algo.h:100
SimpleHBHEPhase1Algo::samplesToAdd_
int samplesToAdd_
Definition: SimpleHBHEPhase1Algo.h:96
SimpleHBHEPhase1Algo::runnum_
int runnum_
Definition: SimpleHBHEPhase1Algo.h:99
HcalPulseContainmentManager
Definition: HcalPulseContainmentManager.h:10
SimpleHBHEPhase1Algo::delayToken_
edm::ESGetToken< HcalTimeSlew, HcalTimeSlewRecord > delayToken_
Definition: SimpleHBHEPhase1Algo.h:73
SimpleHBHEPhase1Algo::applyLegacyHBMCorrection_
bool applyLegacyHBMCorrection_
Definition: SimpleHBHEPhase1Algo.h:101
SimpleHBHEPhase1Algo::reconstruct
HBHERecHit reconstruct(const HBHEChannelInfo &info, const HcalRecoParam *params, const HcalCalibrations &calibs, bool isRealData) override
Definition: SimpleHBHEPhase1Algo.cc:56
HLT_FULL_cff.timeShift
timeShift
Definition: HLT_FULL_cff.py:8481
SimpleHBHEPhase1Algo::m0Energy
float m0Energy(const HBHEChannelInfo &info, double reconstructedCharge, bool applyContainmentCorrection, double phaseNS, int nSamplesToAdd)
Definition: SimpleHBHEPhase1Algo.cc:162
SimpleHBHEPhase1Algo::pulseCorr_
HcalPulseContainmentManager pulseCorr_
Definition: SimpleHBHEPhase1Algo.h:93
AbsHBHEPhase1Algo
Definition: AbsHBHEPhase1Algo.h:27
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
SimpleHBHEPhase1Algo::getPhaseNS
float getPhaseNS() const
Definition: SimpleHBHEPhase1Algo.h:68
HBHEChannelInfo
Definition: HBHEChannelInfo.h:15