2 #ifndef HBHE_PULSESHAPE_FLAG_H_IKAJHGEWRHIGKHAWFIKGHAWIKGH 3 #define HBHE_PULSESHAPE_FLAG_H_IKAJHGEWRHIGKHAWFIKGHAWIKGH 56 bool setLegacyFlags =
true);
63 template <
class Dataframe>
65 const Dataframe& digi,
97 double DualNominalFitSingleTry(
const std::vector<double>& Charge,
int Offset,
int Distance,
bool newCharges =
true);
102 bool CheckPassFilter(
double Charge,
double Discriminant, std::vector<std::pair<double, double> >& Cuts,
int Side);
115 template <
class Dataframe>
117 const Dataframe& digi,
131 if (abseta == 28 || abseta == 29)
138 const unsigned nRead = digi.size();
141 double TotalCharge = 0.0;
142 for (
unsigned i = 0;
i < nRead; ++
i) {
152 double NominalChi2 = 0;
175 double TS4Left = 1000;
176 double TS4Right = 1000;
184 if (TS4Left > 1000 || TS4Left < -1000)
186 if (TS4Right > 1000 || TS4Right < -1000)
203 int soi = digi.presamples();
std::vector< double > f1_
double mMinimumChargeThreshold
std::vector< std::pair< double, double > > mLambdaLinearCut
HBHEPulseShapeFlagSetter(double MinimumChargeThreshold, double TS4TS5ChargeThreshold, double TS3TS4ChargeThreshold, double TS3TS4UpperChargeThreshold, double TS5TS6ChargeThreshold, double TS5TS6UpperChargeThreshold, double R45PlusOneRange, double R45MinusOneRange, unsigned int TrianglePeakTS, const std::vector< double > &LinearThreshold, const std::vector< double > &LinearCut, const std::vector< double > &RMS8MaxThreshold, const std::vector< double > &RMS8MaxCut, const std::vector< double > &LeftSlopeThreshold, const std::vector< double > &LeftSlopeCut, const std::vector< double > &RightSlopeThreshold, const std::vector< double > &RightSlopeCut, const std::vector< double > &RightSlopeSmallThreshold, const std::vector< double > &RightSlopeSmallCut, const std::vector< double > &TS4TS5UpperThreshold, const std::vector< double > &TS4TS5UpperCut, const std::vector< double > &TS4TS5LowerThreshold, const std::vector< double > &TS4TS5LowerCut, bool UseDualFit, bool TriangleIgnoreSlow, bool setLegacyFlags=true)
void SetPulseShapeFlags(HBHERecHit &hbhe, const Dataframe &digi, const HcalCoder &coder, const HcalCalibrations &calib)
double mTS5TS6UpperChargeThreshold
std::vector< double > f2_
double mTS3TS4ChargeThreshold
HcalDetId id() const
get the id
double CalculateRMS8Max(const std::vector< double > &Charge)
std::vector< std::pair< double, double > > mTS4TS5LowerCut
double PerformNominalFit(const std::vector< double > &Charge)
double DualNominalFitSingleTry(const std::vector< double > &Charge, int Offset, int Distance, bool newCharges=true)
double PerformDualNominalFit(const std::vector< double > &Charge)
~HBHEPulseShapeFlagSetter()
constexpr void setFlagField(uint32_t value, int base, int width=1)
double PerformLinearFit(const std::vector< double > &Charge)
std::vector< std::pair< double, double > > mLeftSlopeCut
TriangleFitResult PerformTriangleFit(const std::vector< double > &Charge)
double mTS4TS5ChargeThreshold
std::vector< std::pair< double, double > > mRightSlopeCut
bool CheckPassFilter(double Charge, double Discriminant, std::vector< std::pair< double, double > > &Cuts, int Side)
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0
int ietaAbs() const
get the absolute value of the cell ieta
std::vector< double > mCharge
constexpr double pedestal(int fCapId) const
get pedestal for capid=0..3
std::vector< std::pair< double, double > > mRightSlopeSmallCut
double mTS3TS4UpperChargeThreshold
double mTS5TS6ChargeThreshold
std::vector< double > errors_
std::vector< double > CumulativeIdealPulse
std::vector< std::pair< double, double > > mLambdaRMS8MaxCut
std::vector< std::pair< double, double > > mTS4TS5UpperCut
TS3TS4UpperChargeThreshold
TS5TS6UpperChargeThreshold