2 #ifndef HBHE_PULSESHAPE_FLAG_H_IKAJHGEWRHIGKHAWFIKGHAWIKGH
3 #define HBHE_PULSESHAPE_FLAG_H_IKAJHGEWRHIGKHAWFIKGHAWIKGH
33 double TS4TS5ChargeThreshold,
34 double TS3TS4ChargeThreshold,
35 double TS3TS4UpperChargeThreshold,
36 double TS5TS6ChargeThreshold,
37 double TS5TS6UpperChargeThreshold,
38 double R45PlusOneRange,
39 double R45MinusOneRange,
40 unsigned int TrianglePeakTS,
41 const std::vector<double>& LinearThreshold,
42 const std::vector<double>& LinearCut,
43 const std::vector<double>& RMS8MaxThreshold,
44 const std::vector<double>& RMS8MaxCut,
45 const std::vector<double>& LeftSlopeThreshold,
46 const std::vector<double>& LeftSlopeCut,
47 const std::vector<double>& RightSlopeThreshold,
48 const std::vector<double>& RightSlopeCut,
49 const std::vector<double>& RightSlopeSmallThreshold,
50 const std::vector<double>& RightSlopeSmallCut,
51 const std::vector<double>& TS4TS5UpperThreshold,
52 const std::vector<double>& TS4TS5UpperCut,
53 const std::vector<double>& TS4TS5LowerThreshold,
54 const std::vector<double>& TS4TS5LowerCut,
56 bool TriangleIgnoreSlow,
57 bool setLegacyFlags =
true);
64 template <
class Dataframe>
66 const Dataframe& digi,
116 template <
class Dataframe>
118 const Dataframe& digi,
132 if (abseta == 28 || abseta == 29)
139 const unsigned nRead = digi.size();
142 double TotalCharge = 0.0;
143 for (
unsigned i = 0;
i < nRead; ++
i) {
153 double NominalChi2 = 0;
176 double TS4Left = 1000;
177 double TS4Right = 1000;
185 if (TS4Left > 1000 || TS4Left < -1000)
187 if (TS4Right > 1000 || TS4Right < -1000)
204 int soi = digi.presamples();
static std::vector< std::string > checklist log
constexpr int ietaAbs() const
get the absolute value of the cell ieta
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
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
constexpr HcalDetId id() const
get the id
bool CheckPassFilter(double Charge, double Discriminant, std::vector< std::pair< double, double > > &Cuts, int Side)
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
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0
std::vector< double > errors_
std::vector< double > CumulativeIdealPulse
std::vector< std::pair< double, double > > mLambdaRMS8MaxCut
std::vector< std::pair< double, double > > mTS4TS5UpperCut