#include <HBHENegativeEFilter.h>
|
bool | checkPassFilter (const HcalDetId &id, const double *ts, unsigned lenTS) const |
|
const PiecewiseScalingPolynomial & | getA1 (const HcalDetId &id) const |
|
const PiecewiseScalingPolynomial & | getA2 (const HcalDetId &id) const |
|
const std::vector< std::pair< double, double > > & | getCut () const |
|
const std::vector< uint32_t > & | getEtaLimits () const |
|
unsigned | getFirstTimeSlice () const |
|
unsigned | getLastTimeSlice () const |
|
double | getMinCharge () const |
|
| HBHENegativeEFilter () |
|
| HBHENegativeEFilter (const std::vector< PiecewiseScalingPolynomial > &a1vec, const std::vector< PiecewiseScalingPolynomial > &a2vec, const std::vector< uint32_t > &iEtaLimits, const std::vector< std::pair< double, double > > &cut, double minCharge, unsigned firstTimeSlice, unsigned lastTimeSlice) |
|
bool | isEnabled () const |
|
bool | operator!= (const HBHENegativeEFilter &r) const |
|
bool | operator== (const HBHENegativeEFilter &r) const |
|
|
unsigned | getEtaIndex (const HcalDetId &id) const |
|
template<class Archive > |
void | load (Archive &ar, const unsigned) |
|
template<class Archive > |
void | save (Archive &ar, const unsigned) const |
|
bool | validate () const |
|
Definition at line 16 of file HBHENegativeEFilter.h.
HBHENegativeEFilter::HBHENegativeEFilter |
( |
| ) |
|
|
inline |
HBHENegativeEFilter::HBHENegativeEFilter |
( |
const std::vector< PiecewiseScalingPolynomial > & |
a1vec, |
|
|
const std::vector< PiecewiseScalingPolynomial > & |
a2vec, |
|
|
const std::vector< uint32_t > & |
iEtaLimits, |
|
|
const std::vector< std::pair< double, double > > & |
cut, |
|
|
double |
minCharge, |
|
|
unsigned |
firstTimeSlice, |
|
|
unsigned |
lastTimeSlice |
|
) |
| |
Definition at line 6 of file HBHENegativeEFilter.cc.
References Exception, and validate().
23 "Invalid HBHENegativeEFilter constructor arguments");
std::vector< PiecewiseScalingPolynomial > a1v_
std::vector< PiecewiseScalingPolynomial > a2v_
std::vector< std::pair< double, double > > cut_
std::vector< uint32_t > iEtaLimits_
bool HBHENegativeEFilter::checkPassFilter |
( |
const HcalDetId & |
id, |
|
|
const double * |
ts, |
|
|
unsigned |
lenTS |
|
) |
| const |
Definition at line 87 of file HBHENegativeEFilter.cc.
References a1v_, a2v_, TkAlMuonSelectors_cfi::cut, cut_, plotBeamSpotDB::first, getEtaIndex(), mps_fire::i, minCharge_, slope, tFirst_, tLast_, and mitigatedMETSequence_cff::U.
Referenced by HBHENegativeEFilter(), HBHEPhase1Reconstructor::runHBHENegativeEFilter(), and HBHENegativeFlagSetter::setPulseShapeFlags().
91 const unsigned sz =
cut_.size();
94 double chargeInWindow = 0.0;
96 chargeInWindow += ts[
i];
100 const std::pair<double,double>*
cut = &
cut_[0];
101 double cutValue = cut[0].second;
105 unsigned largerPoint = 0;
106 for (; cut[largerPoint].first <= chargeInWindow; ++largerPoint) {}
109 if (largerPoint >= sz)
110 cutValue = cut[sz - 1
U].second;
111 else if (largerPoint)
113 const double slope = (cut[largerPoint].second - cut[largerPoint-1
U].second)/
114 (cut[largerPoint].
first - cut[largerPoint-1
U].
first);
115 cutValue = cut[largerPoint-1
U].second + slope*
116 (chargeInWindow - cut[largerPoint-1
U].first);
127 const double ecorr = ts[
i] - a1(ts[
i-1
U]) - a2(ts[
i-2
U]);
128 passes = ecorr >= cutValue;
std::vector< PiecewiseScalingPolynomial > a1v_
unsigned getEtaIndex(const HcalDetId &id) const
std::vector< PiecewiseScalingPolynomial > a2v_
static const double slope[3]
std::vector< std::pair< double, double > > cut_
const std::vector<std::pair<double,double> >& HBHENegativeEFilter::getCut |
( |
| ) |
const |
|
inline |
unsigned HBHENegativeEFilter::getEtaIndex |
( |
const HcalDetId & |
id | ) |
const |
|
private |
const std::vector<uint32_t>& HBHENegativeEFilter::getEtaLimits |
( |
| ) |
const |
|
inline |
unsigned HBHENegativeEFilter::getFirstTimeSlice |
( |
| ) |
const |
|
inline |
unsigned HBHENegativeEFilter::getLastTimeSlice |
( |
| ) |
const |
|
inline |
double HBHENegativeEFilter::getMinCharge |
( |
| ) |
const |
|
inline |
bool HBHENegativeEFilter::isEnabled |
( |
| ) |
const |
|
inline |
template<class Archive >
void HBHENegativeEFilter::load |
( |
Archive & |
ar, |
|
|
const unsigned |
|
|
) |
| |
|
inlineprivate |
template<class Archive >
void HBHENegativeEFilter::save |
( |
Archive & |
ar, |
|
|
const unsigned |
|
|
) |
| const |
|
inlineprivate |
bool HBHENegativeEFilter::validate |
( |
| ) |
const |
|
private |
Definition at line 26 of file HBHENegativeEFilter.cc.
References a1v_, a2v_, cut_, plotBeamSpotDB::first, mps_fire::i, iEtaLimits_, tFirst_, tLast_, and mitigatedMETSequence_cff::U.
Referenced by HBHENegativeEFilter(), load(), operator!=(), and save().
32 if (nLimits >= static_cast<std::size_t>(UINT_MAX - 1
U))
34 for (std::size_t
i=1;
i<nLimits; ++
i)
38 if (
a1v_.size() != nLimits + 1)
40 if (
a2v_.size() != nLimits + 1)
43 const std::size_t sz =
cut_.size();
44 if (sz >= static_cast<std::size_t>(UINT_MAX - 1
U))
46 for (std::size_t i=1; i<sz; ++
i)
std::vector< PiecewiseScalingPolynomial > a1v_
std::vector< PiecewiseScalingPolynomial > a2v_
std::vector< std::pair< double, double > > cut_
std::vector< uint32_t > iEtaLimits_
friend class boost::serialization::access |
|
friend |
std::vector<std::pair<double,double> > HBHENegativeEFilter::cut_ |
|
private |
std::vector<uint32_t> HBHENegativeEFilter::iEtaLimits_ |
|
private |
double HBHENegativeEFilter::minCharge_ |
|
private |
uint32_t HBHENegativeEFilter::tFirst_ |
|
private |
uint32_t HBHENegativeEFilter::tLast_ |
|
private |