50 double tS4TS5ChargeThreshold,
int first,
int last,
70 for(
int i = 0;
i < (int)
std::min(threshold.size(), cut.size());
i++)
71 mCut.push_back(std::pair<double, double>(threshold[
i], cut[i]));
99 const int nRead = cs.
size();
102 for (
int i=0;
i < nRead;
i++)
104 const int capid = digi[
i].capid();
108 double ChargeInWindow = 0.0;
110 ChargeInWindow += ts[
i];
121 const double ecorr = ts[
i] - a1(ts[
i-1]) - a2(ts[
i-2]);
142 std::vector<std::pair<double, double> > &
cuts,
160 int indexLargerThanCharge = -1;
161 for(
int i = 1;
i < (int)
cuts.size();
i++)
163 if(
cuts[
i].first > charge)
165 indexLargerThanCharge =
i;
170 double limit = 1000000;
172 if(indexLargerThanCharge == -1)
176 double C1 =
cuts[indexLargerThanCharge].first;
177 double C2 =
cuts[indexLargerThanCharge-1].first;
178 double L1 =
cuts[indexLargerThanCharge].second;
179 double L2 =
cuts[indexLargerThanCharge-1].second;
181 limit = (charge - C1) / (C2 - C1) * (L2 - L1) + L1;
184 if(side > 0 && discriminant > limit)
186 if(side < 0 && discriminant < limit)
const PiecewiseScalingPolynomial & getA1() const
auto_ptr< ClusterSequence > cs
void setBXInfo(const BunchXParameter *info, unsigned length)
static const int MAXSAMPLES
double mMinimumChargeThreshold
HcalDetId id() const
get the id
const PiecewiseScalingPolynomial & getA2() const
void setFlagField(uint32_t value, int base, int width=1)
double pedestal(int fCapId) const
get pedestal for capid=0..3
double mTS4TS5ChargeThreshold
MVATrainerComputer * calib
std::vector< std::pair< double, double > > mCut
~HBHENegativeFlagSetter()
bool checkPassFilter(double charge, double discriminant, std::vector< std::pair< double, double > > &cuts, int side)
void setHBHEPileupCorrection(boost::shared_ptr< AbsOOTPileupCorrection > corr)
int size() const
get the size
void fcn(int &, double *, double &, double *, int)
boost::shared_ptr< AbsOOTPileupCorrection > hbhePileupCorr_
const OOTPileupCorrDataFcn & getCorrectionByID(const HcalDetId &id) const
unsigned mLengthBunchCrossingInfo
void setPulseShapeFlags(HBHERecHit &hbhe, const HBHEDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calib)
const BunchXParameter * mBunchCrossingInfo
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0