7 double minRBXRechitR45E)
10 ,r45EnergyFraction_(0)
21 if(
energy_ > TS4TS5EnergyThreshold)
23 std::vector<float> AllCharge = rbx.
allCharge();
24 double BaseCharge = AllCharge[4] + AllCharge[5];
27 double TS4TS5 = (AllCharge[4] - AllCharge[5]) / BaseCharge;
38 int rbxHitCount = rbx.
numRecHits(minRBXRechitR45E);
48 for(std::vector<reco::HcalNoiseHPD>::const_iterator it1=rbx.
HPDsBegin(); it1!=rbx.
HPDsEnd(); ++it1) {
49 int nhpdhits=it1->numRecHits(minRecHitE);
63 for(std::vector<reco::HcalNoiseHPD>::const_iterator it1=rbx.
HPDsBegin(); it1!=rbx.
HPDsEnd(); ++it1) {
66 float energy=(*it2)->energy();
67 float time=(*it2)->time();
68 if(energy>=minLowHitE) {
74 if(energy>=minHighHitE) {
85 for(std::vector<reco::HcalNoiseHPD>::const_iterator it1=rbx.
HPDsBegin(); it1!=rbx.
HPDsEnd(); ++it1) {
86 double eme=it1->caloTowerEmE();
87 double hade=it1->recHitEnergy(minRecHitE);
88 double emf=(eme+hade)==0 ? 999 : eme/(eme+hade);
97 for(std::vector<reco::HcalNoiseHPD>::const_iterator it1=rbx.
HPDsBegin(); it1!=rbx.
HPDsEnd(); ++it1) {
128 if(iConfig.
existsAs<
int>(
"pMinRBXRechitR45Count"))
132 if(iConfig.
existsAs<
double>(
"pMinRBXRechitR45Fraction"))
136 if(iConfig.
existsAs<
double>(
"pMinRechitR45EnergyFraction"))
152 if(iConfig.
existsAs<std::vector<double> >(
"lRBXRecHitR45Cuts"))
156 double defaultCut[4] = {-999, -999, -999, -999};
171 if(iConfig.
existsAs<std::vector<double> >(
"tRBXRecHitR45Cuts"))
175 double defaultCut[4] = {-999, -999, -999, -999};
347 twrrefset.insert(*it);
349 twrrefset.insert(*it);
353 for(twrrefset_t::const_iterator it=twrrefset.begin(); it!=twrrefset.end(); ++it) {
360 std::vector<std::pair<double, double> > &Cuts,
int Side)
374 if(Charge <= Cuts[0].
first)
377 int IndexLargerThanCharge = -1;
378 for(
int i = 1;
i < (int)Cuts.size();
i++)
380 if(Cuts[
i].first > Charge)
382 IndexLargerThanCharge =
i;
387 double limit = 1000000;
389 if(IndexLargerThanCharge == -1)
390 limit = Cuts[Cuts.size()-1].second;
393 double C1 = Cuts[IndexLargerThanCharge].first;
394 double C2 = Cuts[IndexLargerThanCharge-1].first;
395 double L1 = Cuts[IndexLargerThanCharge].second;
396 double L2 = Cuts[IndexLargerThanCharge-1].second;
398 limit = (Charge - C1) / (C2 - C1) * (L2 - L1) + L1;
401 if(Side > 0 && Discriminant > limit)
403 if(Side < 0 && Discriminant < limit)
bool CheckPassFilter(double Charge, double Discriminant, std::vector< std::pair< double, double > > &Cuts, int Side)
double HPDEMF(void) const
T getParameter(std::string const &) const
int numRecHitsFailR45(double threshold=1.5) const
bool isProblematic(const CommonHcalNoiseRBXData &) const
bool passTightRatio(const CommonHcalNoiseRBXData &) const
double minLowEHitTime(void) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
float allChargeHighest2TS(unsigned int firstts=4) const
bool passLooseRatio(const CommonHcalNoiseRBXData &) const
bool passTightRBXRechitR45(const CommonHcalNoiseRBXData &) const
double maxHighEHitTime(void) const
bool passTightTiming(const CommonHcalNoiseRBXData &) const
double maxLowEHitTime(void) const
int pMinRBXRechitR45Count_
std::vector< HcalNoiseHPD >::const_iterator HPDsBegin(void) const
std::vector< double > lMinRBXRechitR45Cuts_
double r45EnergyFraction(void) const
int numRecHits(double threshold=1.5) const
std::vector< HcalNoiseHPD >::const_iterator HPDsEnd(void) const
bool passLooseRBXRechitR45(const CommonHcalNoiseRBXData &) const
const_iterator end() const
Termination of iteration.
edm::RefVector< CaloTowerCollection > rbxtowers_
bool passHighLevelNoiseFilter(const CommonHcalNoiseRBXData &) const
const_iterator begin() const
Initialize an iterator over the RefVector.
double RBXEMF(void) const
double caloTowerEmE(void) const
double r45EnergyFraction_
int numRBXHits(void) const
std::set< edm::Ref< CaloTowerCollection >, twrrefcomp > twrrefset_t
CommonHcalNoiseRBXData(const reco::HcalNoiseRBX &rbx, double minRecHitE, double minLowHitE, double minHighHitE, double TS4TS5EnergyThreshold, std::vector< std::pair< double, double > > &TS4TS5UpperCut, std::vector< std::pair< double, double > > &TS4TS5LowerCut, double MinRBXRechitR45E)
bool passLooseZeros(const CommonHcalNoiseRBXData &) const
double pMinRBXRechitR45EnergyFraction_
double recHitEnergy(double theshold=1.5) const
float allChargeTotal(void) const
std::vector< double > tMinRBXRechitR45Cuts_
bool passTightZeros(const CommonHcalNoiseRBXData &) const
double pMinRBXRechitR45Fraction_
bool passRatioThreshold(const CommonHcalNoiseRBXData &) const
void operator()(edm::RefVector< CaloTowerCollection > &v1, const edm::RefVector< CaloTowerCollection > &v2) const
reco::JetExtendedAssociation::JetExtendedData Value
int numHPDNoOtherHits(void) const
bool passZerosThreshold(const CommonHcalNoiseRBXData &) const
bool passLooseNoiseFilter(const CommonHcalNoiseRBXData &) const
HcalNoiseAlgo(const edm::ParameterSet &iConfig)
bool passLooseHits(const CommonHcalNoiseRBXData &) const
int totalZeros(void) const
static std::string join(char **cmd)
void clear()
Clear the vector.
double recHitEnergyFailR45(double threshold=1.5) const
double energy(void) const
bool passLooseTiming(const CommonHcalNoiseRBXData &) const
bool passTightNoiseFilter(const CommonHcalNoiseRBXData &) const
char data[epos_bytes_allocation]
double minHighEHitTime(void) const
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
bool passEMFThreshold(const CommonHcalNoiseRBXData &) const
const std::vector< float > allCharge(void) const
tuple TS4TS5EnergyThreshold
int numHPDHits(void) const
bool validRatio(void) const
bool passTightHits(const CommonHcalNoiseRBXData &) const
double r45Fraction(void) const