#include <NominalEfficiencyThresholds.h>
Classes | |
struct | EfficiencyBin |
compare to efficiencies More... | |
class | EtaBounds |
struct | locless |
compare two locations More... | |
struct | ThresholdLocation |
threshold location More... | |
Public Member Functions | |
std::vector< double > | bins () const |
void | dump () |
NominalEfficiencyThresholds (const std::string &infile) | |
NominalEfficiencyThresholds () | |
float | thresholdValueForEfficiency (ThresholdLocation location, float eff_thr) const |
~NominalEfficiencyThresholds () | |
Private Types | |
typedef std::map < ThresholdLocation, ThresholdConstituents, locless > | MapType |
typedef std::pair < EfficiencyBin, float > | ThresholdConstituent |
typedef std::map < EfficiencyBin, float, EfficiencyBin > | ThresholdConstituents |
Private Member Functions | |
void | add (ThresholdLocation location, ThresholdConstituent threshold) |
Private Attributes | |
EtaBounds | etabounds |
MapType | thresholds |
Definition at line 10 of file NominalEfficiencyThresholds.h.
typedef std::map<ThresholdLocation,ThresholdConstituents,locless> muonisolation::NominalEfficiencyThresholds::MapType [private] |
Definition at line 58 of file NominalEfficiencyThresholds.h.
typedef std::pair<EfficiencyBin,float> muonisolation::NominalEfficiencyThresholds::ThresholdConstituent [private] |
Definition at line 56 of file NominalEfficiencyThresholds.h.
typedef std::map<EfficiencyBin,float,EfficiencyBin> muonisolation::NominalEfficiencyThresholds::ThresholdConstituents [private] |
Definition at line 57 of file NominalEfficiencyThresholds.h.
muonisolation::NominalEfficiencyThresholds::NominalEfficiencyThresholds | ( | ) | [inline] |
Definition at line 12 of file NominalEfficiencyThresholds.h.
{ }
muonisolation::NominalEfficiencyThresholds::NominalEfficiencyThresholds | ( | const std::string & | infile | ) |
muonisolation::NominalEfficiencyThresholds::~NominalEfficiencyThresholds | ( | ) | [inline] |
Definition at line 14 of file NominalEfficiencyThresholds.h.
{ }
void NominalEfficiencyThresholds::add | ( | ThresholdLocation | location, |
ThresholdConstituent | threshold | ||
) | [private] |
Definition at line 100 of file NominalEfficiencyThresholds.cc.
{ MapType::iterator ploc = thresholds.find(location); if ( ploc == thresholds.end() ) { ThresholdConstituents mt; mt.insert(threshold); thresholds[location] = mt; } else { // cout << "insert element ("<<threshold.first.eff<<"," // <<threshold.first.eff_previous<<") to map "<<endl; (*ploc).second.insert(threshold); // cout << "new size is:"<< (*ploc).second.size() <<endl; } }
vector< double > NominalEfficiencyThresholds::bins | ( | ) | const |
Definition at line 43 of file NominalEfficiencyThresholds.cc.
References i, and query::result.
void NominalEfficiencyThresholds::dump | ( | void | ) |
Definition at line 116 of file NominalEfficiencyThresholds.cc.
References gather_cfg::cout.
{ MapType::iterator ploc; for (ploc = thresholds.begin(); ploc != thresholds.end(); ploc++) { cout << "eta: "<< (*ploc).first.eta << " icone: "<< (*ploc).first.cone<<endl; ThresholdConstituents::iterator it; for (it = (*ploc).second.begin(); it != (*ploc).second.end(); it++) { cout << " eff: " << (*it).first.eff << " eff_previous: "<< (*it).first.eff_previous << " cut value: " << (*it).second <<endl; } } }
float NominalEfficiencyThresholds::thresholdValueForEfficiency | ( | ThresholdLocation | location, |
float | eff_thr | ||
) | const |
Definition at line 131 of file NominalEfficiencyThresholds.cc.
References muonisolation::NominalEfficiencyThresholds::ThresholdLocation::cone, gather_cfg::cout, epsilon, and muonisolation::NominalEfficiencyThresholds::ThresholdLocation::eta.
Referenced by muonisolation::IsolatorByNominalEfficiency::result().
{ MapType::const_iterator ploc = thresholds.find(location); if ( ploc == thresholds.end() ) { cout << "NominalEfficiencyThresholds: Problem:can't find location in the map :( " << location.eta << " " << location.cone << " " << eff_thr <<endl; return -1; } const float epsilon=1.e-6; EfficiencyBin eb = {eff_thr,eff_thr-epsilon}; ThresholdConstituents::const_iterator it = (*ploc).second.find(eb); if (it == (*ploc).second.end()) { cout << "NominalEfficiencyThresholds: Problem:can't find threshold in the map :("<<endl; return -1; } return (*it).second; }
Definition at line 63 of file NominalEfficiencyThresholds.h.
Definition at line 61 of file NominalEfficiencyThresholds.h.