47 double tS4TS5ChargeThreshold,
int first,
int last,
67 for(
int i = 0;
i < (int)
std::min(threshold.size(), cut.size());
i++)
68 mCut.push_back(std::pair<double, double>(threshold[
i], cut[i]));
95 const int nRead = cs.
size();
101 for(
int i = 0;
i < nRead;
i++)
103 const int capid = digi[
i].capid();
104 inputCharge[
i] = cs[
i] - calib.
pedestal(capid);
108 double ChargeInWindow = 0;
110 ChargeInWindow = ChargeInWindow + inputCharge[
i];
116 for(
int i = 0;
i < nRead;
i++)
117 inputCharge[
i] = inputCharge[
i] * gains[
i];
119 bool pulseShapeCorrApplied =
false;
120 bool leakCorrApplied =
false;
121 bool readjustTiming =
false;
128 &pulseShapeCorrApplied, &leakCorrApplied,
131 for(
int i = mFirst;
i <=
mLast;
i++)
134 if(decision ==
false)
153 std::vector<std::pair<double, double> > &
cuts,
171 int indexLargerThanCharge = -1;
172 for(
int i = 1;
i < (int)
cuts.size();
i++)
174 if(
cuts[
i].first > charge)
176 indexLargerThanCharge =
i;
181 double limit = 1000000;
183 if(indexLargerThanCharge == -1)
187 double C1 =
cuts[indexLargerThanCharge].first;
188 double C2 =
cuts[indexLargerThanCharge-1].first;
189 double L1 =
cuts[indexLargerThanCharge].second;
190 double L2 =
cuts[indexLargerThanCharge-1].second;
192 limit = (charge - C1) / (C2 - C1) * (L2 - L1) + L1;
195 if(side > 0 && discriminant > limit)
197 if(side < 0 && discriminant < limit)
double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
auto_ptr< ClusterSequence > cs
void setBXInfo(const BunchXParameter *info, unsigned length)
static const int MAXSAMPLES
double mMinimumChargeThreshold
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
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
~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
boost::shared_ptr< AbsOOTPileupCorrection > hbhePileupCorr_
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
const HcalDetId & id() const