File indexing completed on 2024-04-06 12:25:47
0001 #ifndef HCALSIMPLERECALGO_H
0002 #define HCALSIMPLERECALGO_H 1
0003
0004 #include <memory>
0005
0006 #include "DataFormats/HcalDigi/interface/QIE10DataFrame.h"
0007 #include "DataFormats/HcalDigi/interface/HFDataFrame.h"
0008 #include "DataFormats/HcalDigi/interface/HODataFrame.h"
0009 #include "DataFormats/HcalDigi/interface/ZDCDataFrame.h"
0010 #include "DataFormats/HcalDigi/interface/HcalCalibDataFrame.h"
0011 #include "DataFormats/HcalRecHit/interface/HFRecHit.h"
0012 #include "DataFormats/HcalRecHit/interface/HORecHit.h"
0013 #include "DataFormats/HcalRecHit/interface/ZDCRecHit.h"
0014 #include "DataFormats/HcalRecHit/interface/HcalCalibRecHit.h"
0015 #include "CalibFormats/HcalObjects/interface/HcalCoder.h"
0016 #include "CalibFormats/HcalObjects/interface/HcalCalibrations.h"
0017 #include "CalibCalorimetry/HcalAlgos/interface/HcalPulseContainmentManager.h"
0018 #include "CondFormats/HcalObjects/interface/AbsOOTPileupCorrection.h"
0019
0020 #include "CalibCalorimetry/HcalAlgos/interface/HcalTimeSlew.h"
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 class HcalSimpleRecAlgo {
0035 public:
0036
0037 HcalSimpleRecAlgo(bool correctForTimeslew, bool correctForContainment, float fixedPhaseNs, edm::ConsumesCollector iC);
0038
0039 void beginRun(edm::EventSetup const& es);
0040 void endRun();
0041
0042 void initPulseCorr(int toadd);
0043
0044
0045 void setRecoParams(
0046 bool correctForTimeslew, bool correctForPulse, bool setLeakCorrection, int pileupCleaningID, float phaseNS);
0047
0048
0049 void setLeakCorrection();
0050
0051
0052 void setHFPileupCorrection(std::shared_ptr<AbsOOTPileupCorrection> corr);
0053 void setHOPileupCorrection(std::shared_ptr<AbsOOTPileupCorrection> corr);
0054
0055
0056
0057 void setBXInfo(const BunchXParameter* info, unsigned lenInfo);
0058
0059 HFRecHit reconstruct(
0060 const HFDataFrame& digi, int first, int toadd, const HcalCoder& coder, const HcalCalibrations& calibs) const;
0061 HFRecHit reconstructQIE10(
0062 const QIE10DataFrame& digi, int first, int toadd, const HcalCoder& coder, const HcalCalibrations& calibs) const;
0063
0064 HORecHit reconstruct(
0065 const HODataFrame& digi, int first, int toadd, const HcalCoder& coder, const HcalCalibrations& calibs) const;
0066 HcalCalibRecHit reconstruct(const HcalCalibDataFrame& digi,
0067 int first,
0068 int toadd,
0069 const HcalCoder& coder,
0070 const HcalCalibrations& calibs) const;
0071
0072 private:
0073 bool correctForTimeslew_;
0074 bool correctForPulse_;
0075 float phaseNS_;
0076 const edm::ESGetToken<HcalTimeSlew, HcalTimeSlewRecord> delayToken_;
0077 std::unique_ptr<HcalPulseContainmentManager> pulseCorr_;
0078 int runnum_;
0079 bool setLeakCorrection_;
0080 int pileupCleaningID_;
0081 const BunchXParameter* bunchCrossingInfo_;
0082 unsigned lenBunchCrossingInfo_;
0083 std::shared_ptr<AbsOOTPileupCorrection> hbhePileupCorr_;
0084 std::shared_ptr<AbsOOTPileupCorrection> hfPileupCorr_;
0085 std::shared_ptr<AbsOOTPileupCorrection> hoPileupCorr_;
0086
0087 HcalPulseShapes theHcalPulseShapes_;
0088
0089 int puCorrMethod_;
0090
0091 const HcalTimeSlew* hcalTimeSlew_delay_;
0092 };
0093
0094 #endif