7 double TS4TS5EnergyThreshold,
10 double minRBXRechitR45E)
11 : r45Count_(0), r45Fraction_(0), 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;
37 int rbxHitCount = rbx.
numRecHits(minRBXRechitR45E);
41 if (rbxHitCount > 0) {
49 for (std::vector<reco::HcalNoiseHPD>::const_iterator it1 = rbx.
HPDsBegin(); it1 != rbx.
HPDsEnd(); ++it1) {
50 int nhpdhits = it1->numRecHits(minRecHitE);
65 for (std::vector<reco::HcalNoiseHPD>::const_iterator it1 = rbx.
HPDsBegin(); it1 != rbx.
HPDsEnd(); ++it1) {
68 float energy = (*it2)->energy();
69 float time = (*it2)->time();
70 if (
energy >= minLowHitE) {
78 if (
energy >= minHighHitE) {
91 for (std::vector<reco::HcalNoiseHPD>::const_iterator it1 = rbx.
HPDsBegin(); it1 != rbx.
HPDsEnd(); ++it1) {
92 double eme = it1->caloTowerEmE();
93 double hade = it1->recHitEnergy(minRecHitE);
94 double emf = (eme + hade) == 0 ? 999 : eme / (eme + hade);
104 for (std::vector<reco::HcalNoiseHPD>::const_iterator it1 = rbx.
HPDsBegin(); it1 != rbx.
HPDsEnd(); ++it1) {
134 if (iConfig.
existsAs<
int>(
"pMinRBXRechitR45Count"))
138 if (iConfig.
existsAs<
double>(
"pMinRBXRechitR45Fraction"))
142 if (iConfig.
existsAs<
double>(
"pMinRBXRechitR45EnergyFraction"))
158 if (iConfig.
existsAs<std::vector<double> >(
"lRBXRecHitR45Cuts"))
161 double defaultCut[4] = {-999, -999, -999, -999};
176 if (iConfig.
existsAs<std::vector<double> >(
"tRBXRecHitR45Cuts"))
179 double defaultCut[4] = {-999, -999, -999, -999};
285 int Count =
data.r45Count();
287 double EnergyFraction =
data.r45EnergyFraction();
340 int Count =
data.r45Count();
342 double EnergyFraction =
data.r45EnergyFraction();
371 twrrefset.insert(*it);
373 twrrefset.insert(*it);
377 for (twrrefset_t::const_iterator it = twrrefset.begin(); it != twrrefset.end(); ++it) {
402 int IndexLargerThanCharge = -1;
403 for (
int i = 1;
i < (
int)Cuts.size();
i++) {
405 IndexLargerThanCharge =
i;
410 double limit = 1000000;
412 if (IndexLargerThanCharge == -1)
413 limit = Cuts[Cuts.size() - 1].second;
416 double C1 = Cuts[IndexLargerThanCharge].first;
417 double C2 = Cuts[IndexLargerThanCharge - 1].first;
418 double L1 = Cuts[IndexLargerThanCharge].second;
419 double L2 = Cuts[IndexLargerThanCharge - 1].second;
bool CheckPassFilter(double Charge, double Discriminant, std::vector< std::pair< double, double > > &Cuts, int Side)
std::vector< HcalNoiseHPD >::const_iterator HPDsBegin(void) const
std::set< edm::Ref< CaloTowerCollection >, twrrefcomp > twrrefset_t
T getParameter(std::string const &) const
bool passTightRatio(const CommonHcalNoiseRBXData &) const
bool passLooseTiming(const CommonHcalNoiseRBXData &) const
bool passLooseZeros(const CommonHcalNoiseRBXData &) const
double recHitEnergy(double theshold=1.5) const
bool passLooseRatio(const CommonHcalNoiseRBXData &) const
int pMinRBXRechitR45Count_
int totalZeros(void) const
std::vector< double > lMinRBXRechitR45Cuts_
bool passRatioThreshold(const CommonHcalNoiseRBXData &) const
bool passTightNoiseFilter(const CommonHcalNoiseRBXData &) const
bool passTightZeros(const CommonHcalNoiseRBXData &) const
int numRecHits(double threshold=1.5) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
edm::RefVector< CaloTowerCollection > rbxtowers_
float allChargeTotal(void) const
bool passLooseHits(const CommonHcalNoiseRBXData &) const
double r45EnergyFraction_
bool passLooseRBXRechitR45(const CommonHcalNoiseRBXData &) const
double energy(void) const
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)
double pMinRBXRechitR45EnergyFraction_
std::vector< double > tMinRBXRechitR45Cuts_
bool passZerosThreshold(const CommonHcalNoiseRBXData &) const
float allChargeHighest2TS(unsigned int firstts=4) const
double pMinRBXRechitR45Fraction_
reco::JetExtendedAssociation::JetExtendedData Value
bool passTightRBXRechitR45(const CommonHcalNoiseRBXData &) const
bool passEMFThreshold(const CommonHcalNoiseRBXData &) const
HcalNoiseAlgo(const edm::ParameterSet &iConfig)
static std::string join(char **cmd)
double caloTowerEmE(void) const
void clear()
Clear the vector.
bool passLooseNoiseFilter(const CommonHcalNoiseRBXData &) const
bool passHighLevelNoiseFilter(const CommonHcalNoiseRBXData &) const
const_iterator end() const
Termination of iteration.
std::vector< HcalNoiseHPD >::const_iterator HPDsEnd(void) const
int numRecHitsFailR45(double threshold=1.5) const
char data[epos_bytes_allocation]
bool passTightTiming(const CommonHcalNoiseRBXData &) const
bool passTightHits(const CommonHcalNoiseRBXData &) const
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
void operator()(edm::RefVector< CaloTowerCollection > &v1, const edm::RefVector< CaloTowerCollection > &v2) const
const std::vector< float > allCharge(void) const
const_iterator begin() const
Initialize an iterator over the RefVector.
double recHitEnergyFailR45(double threshold=1.5) const
bool isProblematic(const CommonHcalNoiseRBXData &) const