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 
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 
60  void add(ThresholdLocation location, ThresholdConstituent threshold);
61  MapType thresholds;
62 
64 };
65 }
66 #endif
67 
std::map< ThresholdLocation, ThresholdConstituents, locless > MapType
std::map< EfficiencyBin, float, EfficiencyBin > ThresholdConstituents
std::pair< EfficiencyBin, float > ThresholdConstituent
Float e1
Definition: deltaR.h:20
Float e2
Definition: deltaR.h:21
float thresholdValueForEfficiency(ThresholdLocation location, float eff_thr) const
void add(ThresholdLocation location, ThresholdConstituent threshold)