File indexing completed on 2024-04-06 12:25:47
0001 #ifndef RecoLocalCalo_HcalRecAlgos_SimpleHBHEPhase1Algo_h_
0002 #define RecoLocalCalo_HcalRecAlgos_SimpleHBHEPhase1Algo_h_
0003
0004 #include <memory>
0005 #include <vector>
0006
0007
0008 #include "RecoLocalCalo/HcalRecAlgos/interface/AbsHBHEPhase1Algo.h"
0009
0010
0011 #include "CalibCalorimetry/HcalAlgos/interface/HcalPulseContainmentManager.h"
0012
0013 #include "RecoLocalCalo/HcalRecAlgos/interface/PulseShapeFitOOTPileupCorrection.h"
0014 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalDeterministicFit.h"
0015 #include "RecoLocalCalo/HcalRecAlgos/interface/MahiFit.h"
0016 #include "CalibCalorimetry/HcalAlgos/interface/HcalTimeSlew.h"
0017
0018 class SimpleHBHEPhase1Algo : public AbsHBHEPhase1Algo {
0019 public:
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 SimpleHBHEPhase1Algo(int firstSampleShift,
0043 int samplesToAdd,
0044 float phaseNS,
0045 float timeShift,
0046 bool correctForPhaseContainment,
0047 bool applyLegacyHBMCorrection,
0048 bool applyFixPCC,
0049 std::unique_ptr<PulseShapeFitOOTPileupCorrection> m2,
0050 std::unique_ptr<HcalDeterministicFit> detFit,
0051 std::unique_ptr<MahiFit> mahi,
0052 edm::ConsumesCollector iC);
0053
0054 inline ~SimpleHBHEPhase1Algo() override {}
0055
0056
0057 void beginRun(const edm::Run&, const edm::EventSetup&) override;
0058 void endRun() override;
0059
0060 inline bool isConfigurable() const override { return false; }
0061
0062 HBHERecHit reconstruct(const HBHEChannelInfo& info,
0063 const HcalRecoParam* params,
0064 const HcalCalibrations& calibs,
0065 bool isRealData) override;
0066
0067 inline int getFirstSampleShift() const { return firstSampleShift_; }
0068 inline int getSamplesToAdd() const { return samplesToAdd_; }
0069 inline float getPhaseNS() const { return phaseNS_; }
0070 inline float getTimeShift() const { return timeShift_; }
0071 inline bool isCorrectingForPhaseContainment() const { return corrFPC_; }
0072 inline int getRunNumber() const { return runnum_; }
0073
0074 edm::ESGetToken<HcalTimeSlew, HcalTimeSlewRecord> delayToken_;
0075 const HcalTimeSlew* hcalTimeSlew_delay_;
0076
0077 protected:
0078
0079 float hbminusCorrectionFactor(const HcalDetId& cell, float energy, bool isRealData) const;
0080
0081
0082
0083
0084 float m0Energy(const HBHEChannelInfo& info,
0085 double reconstructedCharge,
0086 bool applyContainmentCorrection,
0087 double phaseNS,
0088 int nSamplesToAdd);
0089
0090
0091 float m0Time(const HBHEChannelInfo& info, double reconstructedCharge, int nSamplesToExamine) const;
0092
0093 private:
0094 HcalPulseContainmentManager pulseCorr_;
0095
0096 int firstSampleShift_;
0097 int samplesToAdd_;
0098 float phaseNS_;
0099 float timeShift_;
0100 int runnum_;
0101 bool corrFPC_;
0102 bool applyLegacyHBMCorrection_;
0103
0104
0105 std::unique_ptr<PulseShapeFitOOTPileupCorrection> psFitOOTpuCorr_;
0106
0107
0108 std::unique_ptr<HcalDeterministicFit> hltOOTpuCorr_;
0109
0110
0111 std::unique_ptr<MahiFit> mahiOOTpuCorr_;
0112
0113 HcalPulseShapes theHcalPulseShapes_;
0114 };
0115
0116 #endif