CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
15 
16 
18 {
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  //
42  SimpleHBHEPhase1Algo(int firstSampleShift,
43  int samplesToAdd,
44  float phaseNS,
45  float timeShift,
47  std::unique_ptr<PulseShapeFitOOTPileupCorrection> m2,
48  std::unique_ptr<HcalDeterministicFit> detFit);
49 
50  inline virtual ~SimpleHBHEPhase1Algo() {}
51 
52  // Methods to override from the base class
53  virtual void beginRun(const edm::Run&, const edm::EventSetup&) override;
54  virtual void endRun() override;
55 
56  inline virtual bool isConfigurable() const override {return false;}
57 
59  const HcalRecoParam* params,
60  const HcalCalibrations& calibs,
61  bool isRealData) override;
62  // Basic accessors
63  inline int getFirstSampleShift() const {return firstSampleShift_;}
64  inline int getSamplesToAdd() const {return samplesToAdd_;}
65  inline float getPhaseNS() const {return phaseNS_;}
66  inline float getTimeShift() const {return timeShift_;}
67  inline bool isCorrectingForPhaseContainment() const {return corrFPC_;}
68  inline int getRunNumber() const {return runnum_;}
69 
70 protected:
71  // Special HB- correction
72  float hbminusCorrectionFactor(const HcalDetId& cell,
73  float energy, bool isRealData) const;
74 
75  // "Method 0" rechit energy. Calls a non-const member of
76  // HcalPulseContainmentManager, so no const qualifier here.
77  // HB- correction is not applied inside this function.
78  float m0Energy(const HBHEChannelInfo& info,
79  double reconstructedCharge,
80  bool applyContainmentCorrection,
81  double phaseNS, int nSamplesToAdd);
82 
83  // "Method 0" rechit timing (original low-pileup QIE8 algorithm)
84  float m0Time(const HBHEChannelInfo& info,
85  double reconstructedCharge,
86  const HcalCalibrations& calibs,
87  int nSamplesToExamine) const;
88 private:
90 
93  float phaseNS_;
94  float timeShift_;
95  int runnum_;
96  bool corrFPC_;
97 
98  // "Metod 2" algorithm
99  std::unique_ptr<PulseShapeFitOOTPileupCorrection> psFitOOTpuCorr_;
100 
101  // "Metod 3" algorithm
102  std::unique_ptr<HcalDeterministicFit> hltOOTpuCorr_;
103 
105 };
106 
107 #endif // RecoLocalCalo_HcalRecAlgos_SimpleHBHEPhase1Algo_h_
virtual HBHERecHit reconstruct(const HBHEChannelInfo &info, const HcalRecoParam *params, const HcalCalibrations &calibs, bool isRealData) override
static const TGPicture * info(bool iBackgroundIsBlack)
std::unique_ptr< HcalDeterministicFit > hltOOTpuCorr_
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
int getFirstSampleShift() const
HcalPulseContainmentManager pulseCorr_
virtual bool isConfigurable() const override
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)
float hbminusCorrectionFactor(const HcalDetId &cell, float energy, bool isRealData) const
virtual void endRun() override
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:42