CMS 3D CMS Logo

NominalEfficiencyThresholds.h
Go to the documentation of this file.
1 #ifndef MuonIsolation_NominalEfficiencyThresholds_H
2 #define MuonIsolation_NominalEfficiencyThresholds_H
3 
4 #include <map>
5 #include <string>
6 #include <utility>
7 #include <vector>
8 
9 namespace muonisolation {
11  public:
15 
18  float eta;
19  int cone;
20  };
21 
22  float thresholdValueForEfficiency(ThresholdLocation location, float eff_thr) const;
23 
24  std::vector<double> bins() const;
25  void dump();
26 
27  private:
29  struct EfficiencyBin {
30  float eff;
31  float eff_previous;
32  bool operator()(const EfficiencyBin& e1, const EfficiencyBin& e2) const;
33  };
34 
35  class EtaBounds {
36  public:
37  enum { NumberOfTowers = 32 };
38  EtaBounds();
39  int towerFromEta(double eta) const;
40  float operator()(unsigned int i) const { return theBounds[i]; }
41 
42  private:
43  float theBounds[NumberOfTowers + 1]; //max eta of towers 1-32 (indx 1-32) and 0. for indx 0
44  };
45 
47  struct locless {
48  bool operator()(const ThresholdLocation& l1, const ThresholdLocation& l2) const;
50  };
51 
52  typedef std::pair<EfficiencyBin, float> ThresholdConstituent;
53  typedef std::map<EfficiencyBin, float, EfficiencyBin> ThresholdConstituents;
54  typedef std::map<ThresholdLocation, ThresholdConstituents, locless> MapType;
55 
58 
60  };
61 } // namespace muonisolation
62 #endif
std::pair< EfficiencyBin, float > ThresholdConstituent
std::map< EfficiencyBin, float, EfficiencyBin > ThresholdConstituents
location
10.6 INPUT and workflows
Definition: relval_nano.py:81
bool operator()(const ThresholdLocation &l1, const ThresholdLocation &l2) const
float thresholdValueForEfficiency(ThresholdLocation location, float eff_thr) const
std::map< ThresholdLocation, ThresholdConstituents, locless > MapType
bool operator()(const EfficiencyBin &e1, const EfficiencyBin &e2) const
void add(ThresholdLocation location, ThresholdConstituent threshold)