|
|
Go to the documentation of this file.
19 constexpr
float PulseContainmentFractionalError = 0.002f;
28 std::unique_ptr<PulseShapeFitOOTPileupCorrection>
m2,
29 std::unique_ptr<HcalDeterministicFit> detFit,
30 std::unique_ptr<MahiFit> mahi,
33 pulseCorr_(PulseContainmentFractionalError, iC),
42 hltOOTpuCorr_(
std::
move(detFit)),
43 mahiOOTpuCorr_(
std::
move(mahi)) {
63 float m0t = 0.f, m0E = 0.f;
69 const double fc_ampl =
info.chargeInWindow(ibeg, ibeg + nSamplesToAdd);
72 m0E =
m0Energy(
info, fc_ampl, applyContainment, phasens, nSamplesToAdd);
78 float m2t = 0.f, m2E = 0.f,
chi2 = -1.f;
79 bool useTriple =
false;
91 float m3t = 0.f, m3E = 0.f;
100 float m4E = 0.f, m4chi2 = -1.f;
102 bool m4UseTriple =
false;
123 }
else if (method2) {
127 }
else if (method3) {
131 float tdcTime =
info.soiRiseTime();
134 rh =
HBHERecHit(channelId, rhE, rht, tdcTime);
143 if (useTriple || m4UseTriple)
151 const bool isRealData)
const {
163 const double fc_ampl,
164 const bool applyContainmentCorrection,
165 const double phaseNs,
166 const int nSamplesToAdd) {
170 double e =
info.energyInWindow(ibeg, ibeg + nSamplesToAdd);
174 double corrFactor = 1.0;
175 if (applyContainmentCorrection)
176 corrFactor =
pulseCorr_.
get(
info.id(), nSamplesToAdd, phaseNs)->getCorrection(fc_ampl);
184 const double fc_ampl,
185 const int nSamplesToExamine)
const {
186 float time = -9999.f;
190 const int soi =
info.soi();
196 unsigned maxI =
info.peakEnergyTS((
unsigned)ibeg, (
unsigned)iend);
209 if (nSamplesToExamine < (
int)
nSamples)
213 if (emax0 > 0.
f && emax1 > 0.
f)
214 time += 25.f * emax1 / (emax0 + emax1);
HcalPulseShapes theHcalPulseShapes_
std::unique_ptr< PulseShapeFitOOTPileupCorrection > psFitOOTpuCorr_
constexpr bool isSpecial(const float t)
constexpr void setAuxEnergy(const float en)
constexpr static void setAux(const HBHEChannelInfo &info, HBHERecHit *rechit)
constexpr int iphi() const
get the cell iphi
void phase1Apply(const HBHEChannelInfo &channelData, float &reconstructedEnergy, float &reconstructedTime, const HcalTimeSlew *hcalTimeSlew_delay) const
void phase1Apply(const HBHEChannelInfo &channelData, float &reconstructedEnergy, float &reconstructedTime, bool &useTriple, float &chi2) const
std::unique_ptr< HcalDeterministicFit > hltOOTpuCorr_
const HcalPulseContainmentCorrection * get(const HcalDetId &detId, int toAdd, float fixedphase_ns)
float delay(float fC, BiasSetting bias=Medium) const
Returns the amount (ns) by which a pulse of the given number of fC will be delayed by the timeslew ef...
void phase1Apply(const HBHEChannelInfo &channelData, float &reconstructedEnergy, float &reconstructedTime, bool &useTriple, float &chi2) const
const Shape & getShape(int shapeType) const
constexpr void setChiSquared(const float chi2)
constexpr void setRawEnergy(const float en)
float hbminusCorrectionFactor(const HcalDetId &cell, float energy, bool isRealData) const
std::unique_ptr< MahiFit > mahiOOTpuCorr_
constexpr int ieta() const
get the cell ieta
correctForPhaseContainment
float m0Time(const HBHEChannelInfo &info, double reconstructedCharge, int nSamplesToExamine) const
static int position[264][3]
constexpr HcalSubdetector subdet() const
get the subdetector
void beginRun(const edm::Run &, const edm::EventSetup &) override
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)
const HcalTimeSlew * hcalTimeSlew_delay_
bool getData(T &iHolder) const
float hbminus_special_ecorr(int ieta, int iphi, double energy, int runnum)
Special energy correction for some HB- cells.
static const unsigned MAXSAMPLES
edm::ESGetToken< HcalTimeSlew, HcalTimeSlewRecord > delayToken_
bool applyLegacyHBMCorrection_
HBHERecHit reconstruct(const HBHEChannelInfo &info, const HcalRecoParam *params, const HcalCalibrations &calibs, bool isRealData) override
constexpr void setFlagField(uint32_t value, int base, int width=1)
float m0Energy(const HBHEChannelInfo &info, double reconstructedCharge, bool applyContainmentCorrection, double phaseNS, int nSamplesToAdd)
HcalPulseContainmentManager pulseCorr_
void beginRun(edm::EventSetup const &es)