CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
13  NominalEfficiencyThresholds(const std::string & infile);
15 
17  struct ThresholdLocation { float eta; int cone; };
18 
19  float thresholdValueForEfficiency(ThresholdLocation location, float eff_thr) const;
20 
21  std::vector<double> bins() const;
22  void dump();
23 
24 private:
25 
26 
28  struct EfficiencyBin {
29  float eff;
30  float eff_previous;
31  bool operator() (const EfficiencyBin & e1,
32  const EfficiencyBin & e2) const;
33  };
34 
35 
36  class EtaBounds {
37  public:
38  enum { NumberOfTowers = 32 };
39  EtaBounds();
40  int towerFromEta(double eta) const;
41  float operator()(unsigned int i) const { return theBounds[i]; }
42  private:
43  float theBounds[NumberOfTowers+1]; //max eta of towers 1-32 (indx 1-32) and 0. for indx 0
44  };
45 
46 
48  struct locless {
49  bool operator()(const ThresholdLocation & l1,
50  const ThresholdLocation & l2) const;
52  };
53 
54 
55 
56  typedef std::pair<EfficiencyBin,float> ThresholdConstituent;
57  typedef std::map<EfficiencyBin,float,EfficiencyBin> ThresholdConstituents;
58  typedef std::map<ThresholdLocation,ThresholdConstituents,locless> MapType;
59 
62 
64 };
65 }
66 #endif
67 
int i
Definition: DBlmapReader.cc:9
std::map< ThresholdLocation, ThresholdConstituents, locless > MapType
std::map< EfficiencyBin, float, EfficiencyBin > ThresholdConstituents
bool operator()(const EfficiencyBin &e1, const EfficiencyBin &e2) const
bool operator()(const ThresholdLocation &l1, const ThresholdLocation &l2) const
T eta() const
float threshold
Definition: crabWrap.py:319
std::pair< EfficiencyBin, float > ThresholdConstituent
list infile
Definition: EdgesToViz.py:90
float thresholdValueForEfficiency(ThresholdLocation location, float eff_thr) const
void add(ThresholdLocation location, ThresholdConstituent threshold)