CMS 3D CMS Logo

IsolatorByNominalEfficiency.h
Go to the documentation of this file.
1 #ifndef MuonIsolation_IsolatorByNominalEfficiency_H
2 #define MuonIsolation_IsolatorByNominalEfficiency_H
3 
14 #include <vector>
15 #include <string>
16 
17 namespace muonisolation {
18  class NominalEfficiencyThresholds;
19 }
20 
21 namespace muonisolation {
23  public:
25 
28  const std::vector<std::string>& ceff,
29  const std::vector<double>& weights);
30 
32  const std::vector<std::string>& ceff,
33  const std::vector<double>& weights,
34  const std::vector<double>& thresh);
35 
37 
39  Result result(const DepositContainer& deposits, const edm::Event* = nullptr) const override;
40 
41  Cuts cuts(float nominalEfficiency) const;
42 
43  private:
44  class ConeSizes {
45  private:
46  enum IsoDim { DIM = 15 };
47  static const float cone_dr[DIM];
48 
49  public:
50  int dim() const { return DIM; }
51  double size(int i) const;
52  int index(float dr) const;
53  };
54 
55  // Compute the weighted sum of deposits of different type within dRcone
56  virtual double weightedSum(const DepositContainer& deposits, float dRcone) const;
57 
58  // Size of cone for a given nominal efficiency value.
59  int bestConeForEfficiencyIndex(float eff_thr) const;
60 
61  typedef std::multimap<float, int> mapNomEff_Cone;
62  mapNomEff_Cone cones(const std::vector<std::string>& names);
63 
65 
66  ResultType resultType() const override { return ISOL_FLOAT_TYPE; }
67 
68  private:
69  mapNomEff_Cone coneForEfficiency;
71  std::vector<double> theWeights;
72  std::vector<double> theDepThresholds;
74  };
75 } // namespace muonisolation
76 
77 #endif
MuIsoBaseIsolator::DepositContainer DepositContainer
const std::string names[nVars_]
Result result(const DepositContainer &deposits, const edm::Event *=0) const override
Compute the deposit within the cone and return the isolation result.
IsolatorByNominalEfficiency(const std::string &thrFile, const std::vector< std::string > &ceff, const std::vector< double > &weights)
Constructor.
mapNomEff_Cone cones(const std::vector< std::string > &names)
virtual double weightedSum(const DepositContainer &deposits, float dRcone) const
std::vector< DepositAndVetos > DepositContainer
std::string findPath(const std::string &fileName)