#include <HcalNoiseAlgo.h>
Public Member Functions | |
bool | CheckPassFilter (double Charge, double Discriminant, std::vector< std::pair< double, double > > &Cuts, int Side) |
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 | e10ts (void) const |
double | e2ts (void) const |
double | energy (void) const |
double | highEHitTimeSqrd (void) const |
double | HPDEMF (void) const |
double | lowEHitTimeSqrd (void) const |
double | maxHighEHitTime (void) const |
double | maxLowEHitTime (void) const |
double | minHighEHitTime (void) const |
double | minLowEHitTime (void) const |
int | numHighEHits (void) const |
int | numHPDHits (void) const |
int | numHPDNoOtherHits (void) const |
int | numLowEHits (void) const |
int | numRBXHits (void) const |
int | numZeros (void) const |
bool | PassTS4TS5 (void) const |
double | ratio (void) const |
double | RBXEMF (void) const |
edm::RefVector < CaloTowerCollection > | rbxTowers (void) const |
bool | validRatio (void) const |
~CommonHcalNoiseRBXData () | |
Private Attributes | |
double | e10ts_ |
double | e2ts_ |
double | energy_ |
double | highEHitTimeSqrd_ |
double | HPDEMF_ |
double | lowEHitTimeSqrd_ |
double | maxHighEHitTime_ |
double | maxLowEHitTime_ |
double | minHighEHitTime_ |
double | minLowEHitTime_ |
int | numHighEHits_ |
int | numHPDHits_ |
int | numHPDNoOtherHits_ |
int | numLowEHits_ |
int | numRBXHits_ |
int | numZeros_ |
double | RBXEMF_ |
edm::RefVector < CaloTowerCollection > | rbxtowers_ |
bool | TS4TS5Decision_ |
Definition at line 11 of file HcalNoiseAlgo.h.
CommonHcalNoiseRBXData::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 | ||
) |
Definition at line 3 of file HcalNoiseAlgo.cc.
References reco::HcalNoiseRBX::allCharge(), reco::HcalNoiseRBX::allChargeHighest2TS(), reco::HcalNoiseRBX::allChargeTotal(), edm::RefVector< C, T, F >::begin(), reco::HcalNoiseRBX::caloTowerEmE(), CheckPassFilter(), edm::RefVector< C, T, F >::clear(), e10ts_, e2ts_, edm::RefVector< C, T, F >::end(), energy(), energy_, highEHitTimeSqrd_, HPDEMF_, reco::HcalNoiseRBX::HPDsBegin(), reco::HcalNoiseRBX::HPDsEnd(), join(), lowEHitTimeSqrd_, maxHighEHitTime_, maxLowEHitTime_, minHighEHitTime_, minLowEHitTime_, numHighEHits_, numHPDHits_, numHPDNoOtherHits_, numLowEHits_, numRBXHits_, reco::HcalNoiseRBX::numRecHits(), numZeros_, RBXEMF_, rbxtowers_, reco::HcalNoiseRBX::recHitEnergy(), HI_PhotonSkim_cff::rechits, cond::rpcobgas::time, reco::HcalNoiseRBX::totalZeros(), and TS4TS5Decision_.
{ // energy energy_ = rbx.recHitEnergy(minRecHitE); // ratio e2ts_ = rbx.allChargeHighest2TS(); e10ts_ = rbx.allChargeTotal(); // TS4TS5 TS4TS5Decision_ = true; if(energy_ > TS4TS5EnergyThreshold) // check filter { std::vector<float> AllCharge = rbx.allCharge(); double BaseCharge = AllCharge[4] + AllCharge[5]; if(BaseCharge < 1) BaseCharge = 1; double TS4TS5 = (AllCharge[4] - AllCharge[5]) / BaseCharge; if(CheckPassFilter(BaseCharge, TS4TS5, TS4TS5UpperCut, 1) == false) TS4TS5Decision_ = false; if(CheckPassFilter(BaseCharge, TS4TS5, TS4TS5LowerCut, -1) == false) TS4TS5Decision_ = false; } else TS4TS5Decision_ = true; // # of hits numHPDHits_ = 0; for(std::vector<reco::HcalNoiseHPD>::const_iterator it1=rbx.HPDsBegin(); it1!=rbx.HPDsEnd(); ++it1) { int nhpdhits=it1->numRecHits(minRecHitE); if(numHPDHits_ < nhpdhits) numHPDHits_ = nhpdhits; } numRBXHits_ = rbx.numRecHits(minRecHitE); numHPDNoOtherHits_ = (numHPDHits_ == numRBXHits_) ? numHPDHits_ : 0; // # of ADC zeros numZeros_ = rbx.totalZeros(); // timing minLowEHitTime_ = minHighEHitTime_ = 99999.; maxLowEHitTime_ = maxHighEHitTime_ = -99999.; lowEHitTimeSqrd_ = highEHitTimeSqrd_ = 0; numLowEHits_ = numHighEHits_ = 0; for(std::vector<reco::HcalNoiseHPD>::const_iterator it1=rbx.HPDsBegin(); it1!=rbx.HPDsEnd(); ++it1) { edm::RefVector<HBHERecHitCollection> rechits=it1->recHits(); for(edm::RefVector<HBHERecHitCollection>::const_iterator it2=rechits.begin(); it2!=rechits.end(); ++it2) { float energy=(*it2)->energy(); float time=(*it2)->time(); if(energy>=minLowHitE) { if(minLowEHitTime_ > time) minLowEHitTime_ = time; if(maxLowEHitTime_ < time) maxLowEHitTime_ = time; lowEHitTimeSqrd_ += time*time; ++numLowEHits_; } if(energy>=minHighHitE) { if(minHighEHitTime_ > time) minHighEHitTime_ = time; if(maxHighEHitTime_ < time) maxHighEHitTime_ = time; highEHitTimeSqrd_ += time*time; ++numHighEHits_; } } } // emf HPDEMF_ = 999.; for(std::vector<reco::HcalNoiseHPD>::const_iterator it1=rbx.HPDsBegin(); it1!=rbx.HPDsEnd(); ++it1) { double eme=it1->caloTowerEmE(); double hade=it1->recHitEnergy(minRecHitE); double emf=(eme+hade)==0 ? 999 : eme/(eme+hade); if(HPDEMF_ > emf) emf = HPDEMF_; } double eme=rbx.caloTowerEmE(); RBXEMF_ = (eme+energy_)==0 ? 999 : eme/(eme+energy_); // calotowers rbxtowers_.clear(); JoinCaloTowerRefVectorsWithoutDuplicates join; for(std::vector<reco::HcalNoiseHPD>::const_iterator it1=rbx.HPDsBegin(); it1!=rbx.HPDsEnd(); ++it1) { join(rbxtowers_, it1->caloTowers()); } return; }
CommonHcalNoiseRBXData::~CommonHcalNoiseRBXData | ( | ) | [inline] |
Definition at line 17 of file HcalNoiseAlgo.h.
{}
bool CommonHcalNoiseRBXData::CheckPassFilter | ( | double | Charge, |
double | Discriminant, | ||
std::vector< std::pair< double, double > > & | Cuts, | ||
int | Side | ||
) |
Definition at line 280 of file HcalNoiseAlgo.cc.
References first, i, and MessageLogger_cff::limit.
Referenced by CommonHcalNoiseRBXData().
{ // // Checks whether Discriminant value passes Cuts for the specified Charge. True if pulse is good. // // The "Cuts" pairs are assumed to be sorted in terms of size from small to large, // where each "pair" = (Charge, Discriminant) // "Side" is either positive or negative, which determines whether to discard the pulse if discriminant // is greater or smaller than the cut value // if(Cuts.size() == 0) // safety check that there are some cuts defined return true; if(Charge <= Cuts[0].first) // too small to cut on return true; int IndexLargerThanCharge = -1; // find the range it is falling in for(int i = 1; i < (int)Cuts.size(); i++) { if(Cuts[i].first > Charge) { IndexLargerThanCharge = i; break; } } double limit = 1000000; if(IndexLargerThanCharge == -1) // if charge is greater than the last entry, assume flat line limit = Cuts[Cuts.size()-1].second; else // otherwise, do a linear interpolation to find the cut position { double C1 = Cuts[IndexLargerThanCharge].first; double C2 = Cuts[IndexLargerThanCharge-1].first; double L1 = Cuts[IndexLargerThanCharge].second; double L2 = Cuts[IndexLargerThanCharge-1].second; limit = (Charge - C1) / (C2 - C1) * (L2 - L1) + L1; } if(Side > 0 && Discriminant > limit) return false; if(Side < 0 && Discriminant < limit) return false; return true; }
double CommonHcalNoiseRBXData::e10ts | ( | void | ) | const [inline] |
Definition at line 23 of file HcalNoiseAlgo.h.
References e10ts_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables().
{ return e10ts_; }
double CommonHcalNoiseRBXData::e2ts | ( | void | ) | const [inline] |
Definition at line 22 of file HcalNoiseAlgo.h.
References e2ts_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables().
{ return e2ts_; }
double CommonHcalNoiseRBXData::energy | ( | void | ) | const [inline] |
Definition at line 20 of file HcalNoiseAlgo.h.
References energy_.
Referenced by CommonHcalNoiseRBXData(), HcalNoiseAlgo::isProblematic(), HLTHcalMETNoiseCleaner::noisedatacomp::operator()(), HLTHcalMETNoiseFilter::noisedatacomp::operator()(), HLTHcalTowerNoiseCleaner::noisedatacomp::operator()(), HcalNoiseAlgo::passEMFThreshold(), HcalNoiseAlgo::passRatioThreshold(), HcalNoiseAlgo::passZerosThreshold(), and reco::HcalNoiseInfoProducer::produce().
{ return energy_; }
double CommonHcalNoiseRBXData::highEHitTimeSqrd | ( | void | ) | const [inline] |
Definition at line 35 of file HcalNoiseAlgo.h.
References highEHitTimeSqrd_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables().
{ return highEHitTimeSqrd_; }
double CommonHcalNoiseRBXData::HPDEMF | ( | void | ) | const [inline] |
Definition at line 38 of file HcalNoiseAlgo.h.
References HPDEMF_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), and HcalNoiseAlgo::passHighLevelNoiseFilter().
{ return HPDEMF_; }
double CommonHcalNoiseRBXData::lowEHitTimeSqrd | ( | void | ) | const [inline] |
Definition at line 31 of file HcalNoiseAlgo.h.
References lowEHitTimeSqrd_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables().
{ return lowEHitTimeSqrd_; }
double CommonHcalNoiseRBXData::maxHighEHitTime | ( | void | ) | const [inline] |
Definition at line 34 of file HcalNoiseAlgo.h.
References maxHighEHitTime_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), HcalNoiseAlgo::passLooseTiming(), and HcalNoiseAlgo::passTightTiming().
{ return maxHighEHitTime_; }
double CommonHcalNoiseRBXData::maxLowEHitTime | ( | void | ) | const [inline] |
Definition at line 30 of file HcalNoiseAlgo.h.
References maxLowEHitTime_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), HcalNoiseAlgo::passLooseTiming(), and HcalNoiseAlgo::passTightTiming().
{ return maxLowEHitTime_; }
double CommonHcalNoiseRBXData::minHighEHitTime | ( | void | ) | const [inline] |
Definition at line 33 of file HcalNoiseAlgo.h.
References minHighEHitTime_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), HcalNoiseAlgo::passLooseTiming(), and HcalNoiseAlgo::passTightTiming().
{ return minHighEHitTime_; }
double CommonHcalNoiseRBXData::minLowEHitTime | ( | void | ) | const [inline] |
Definition at line 29 of file HcalNoiseAlgo.h.
References minLowEHitTime_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), HcalNoiseAlgo::passLooseTiming(), and HcalNoiseAlgo::passTightTiming().
{ return minLowEHitTime_; }
int CommonHcalNoiseRBXData::numHighEHits | ( | void | ) | const [inline] |
Definition at line 36 of file HcalNoiseAlgo.h.
References numHighEHits_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables().
{ return numHighEHits_; }
int CommonHcalNoiseRBXData::numHPDHits | ( | void | ) | const [inline] |
Definition at line 25 of file HcalNoiseAlgo.h.
References numHPDHits_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), HcalNoiseAlgo::passLooseHits(), and HcalNoiseAlgo::passTightHits().
{ return numHPDHits_; }
int CommonHcalNoiseRBXData::numHPDNoOtherHits | ( | void | ) | const [inline] |
Definition at line 27 of file HcalNoiseAlgo.h.
References numHPDNoOtherHits_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), HcalNoiseAlgo::passLooseHits(), and HcalNoiseAlgo::passTightHits().
{ return numHPDNoOtherHits_; }
int CommonHcalNoiseRBXData::numLowEHits | ( | void | ) | const [inline] |
Definition at line 32 of file HcalNoiseAlgo.h.
References numLowEHits_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables().
{ return numLowEHits_; }
int CommonHcalNoiseRBXData::numRBXHits | ( | void | ) | const [inline] |
Definition at line 26 of file HcalNoiseAlgo.h.
References numRBXHits_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), HcalNoiseAlgo::passLooseHits(), and HcalNoiseAlgo::passTightHits().
{ return numRBXHits_; }
int CommonHcalNoiseRBXData::numZeros | ( | void | ) | const [inline] |
Definition at line 28 of file HcalNoiseAlgo.h.
References numZeros_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), HcalNoiseAlgo::passLooseZeros(), and HcalNoiseAlgo::passTightZeros().
{ return numZeros_; }
bool CommonHcalNoiseRBXData::PassTS4TS5 | ( | void | ) | const [inline] |
Definition at line 39 of file HcalNoiseAlgo.h.
References TS4TS5Decision_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables().
{ return TS4TS5Decision_; }
double CommonHcalNoiseRBXData::ratio | ( | void | ) | const [inline] |
Definition at line 21 of file HcalNoiseAlgo.h.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), HcalNoiseAlgo::passLooseRatio(), and HcalNoiseAlgo::passTightRatio().
double CommonHcalNoiseRBXData::RBXEMF | ( | void | ) | const [inline] |
Definition at line 37 of file HcalNoiseAlgo.h.
References RBXEMF_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), and HcalNoiseAlgo::passHighLevelNoiseFilter().
{ return RBXEMF_; }
edm::RefVector<CaloTowerCollection> CommonHcalNoiseRBXData::rbxTowers | ( | void | ) | const [inline] |
Definition at line 40 of file HcalNoiseAlgo.h.
References rbxtowers_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables().
{ return rbxtowers_; }
bool CommonHcalNoiseRBXData::validRatio | ( | void | ) | const [inline] |
Definition at line 24 of file HcalNoiseAlgo.h.
References e10ts_.
Referenced by reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), HcalNoiseAlgo::isProblematic(), HcalNoiseAlgo::passLooseRatio(), and HcalNoiseAlgo::passTightRatio().
{ return e10ts_!=0.0; }
double CommonHcalNoiseRBXData::e10ts_ [private] |
Definition at line 49 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), e10ts(), ratio(), and validRatio().
double CommonHcalNoiseRBXData::e2ts_ [private] |
Definition at line 48 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), e2ts(), and ratio().
double CommonHcalNoiseRBXData::energy_ [private] |
Definition at line 47 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and energy().
double CommonHcalNoiseRBXData::highEHitTimeSqrd_ [private] |
Definition at line 60 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and highEHitTimeSqrd().
double CommonHcalNoiseRBXData::HPDEMF_ [private] |
Definition at line 62 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and HPDEMF().
double CommonHcalNoiseRBXData::lowEHitTimeSqrd_ [private] |
Definition at line 56 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and lowEHitTimeSqrd().
double CommonHcalNoiseRBXData::maxHighEHitTime_ [private] |
Definition at line 59 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and maxHighEHitTime().
double CommonHcalNoiseRBXData::maxLowEHitTime_ [private] |
Definition at line 55 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and maxLowEHitTime().
double CommonHcalNoiseRBXData::minHighEHitTime_ [private] |
Definition at line 58 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and minHighEHitTime().
double CommonHcalNoiseRBXData::minLowEHitTime_ [private] |
Definition at line 54 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and minLowEHitTime().
int CommonHcalNoiseRBXData::numHighEHits_ [private] |
Definition at line 61 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and numHighEHits().
int CommonHcalNoiseRBXData::numHPDHits_ [private] |
Definition at line 50 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and numHPDHits().
int CommonHcalNoiseRBXData::numHPDNoOtherHits_ [private] |
Definition at line 52 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and numHPDNoOtherHits().
int CommonHcalNoiseRBXData::numLowEHits_ [private] |
Definition at line 57 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and numLowEHits().
int CommonHcalNoiseRBXData::numRBXHits_ [private] |
Definition at line 51 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and numRBXHits().
int CommonHcalNoiseRBXData::numZeros_ [private] |
Definition at line 53 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and numZeros().
double CommonHcalNoiseRBXData::RBXEMF_ [private] |
Definition at line 63 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and RBXEMF().
Definition at line 65 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and rbxTowers().
bool CommonHcalNoiseRBXData::TS4TS5Decision_ [private] |
Definition at line 64 of file HcalNoiseAlgo.h.
Referenced by CommonHcalNoiseRBXData(), and PassTS4TS5().