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:
71  std::vector<double> theWeights;
72  std::vector<double> theDepThresholds;
74  };
75 } // namespace muonisolation
76 
77 #endif
mps_fire.i
i
Definition: mps_fire.py:428
muonisolation::MuIsoBaseIsolator::ISOL_FLOAT_TYPE
Definition: MuIsoBaseIsolator.h:25
muonisolation::IsolatorByNominalEfficiency::ConeSizes::IsoDim
IsoDim
Definition: IsolatorByNominalEfficiency.h:46
muonisolation::MuIsoBaseIsolator::Result
Definition: MuIsoBaseIsolator.h:27
muonisolation::IsolatorByNominalEfficiency::ConeSizes
Definition: IsolatorByNominalEfficiency.h:44
muonisolation::IsolatorByNominalEfficiency::ConeSizes::cone_dr
static const float cone_dr[DIM]
Definition: IsolatorByNominalEfficiency.h:47
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
muonisolation::IsolatorByNominalEfficiency::cuts
Cuts cuts(float nominalEfficiency) const
Definition: IsolatorByNominalEfficiency.cc:144
muonisolation::IsolatorByNominalEfficiency::theDepThresholds
std::vector< double > theDepThresholds
Definition: IsolatorByNominalEfficiency.h:72
muonisolation::IsolatorByNominalEfficiency::DepositContainer
MuIsoBaseIsolator::DepositContainer DepositContainer
Definition: IsolatorByNominalEfficiency.h:24
JetPlusTrackCorrections_cff.dRcone
dRcone
Definition: JetPlusTrackCorrections_cff.py:38
muonisolation::IsolatorByNominalEfficiency::ConeSizes::DIM
Definition: IsolatorByNominalEfficiency.h:46
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
muonisolation::IsolatorByNominalEfficiency::theConesInfo
ConeSizes theConesInfo
Definition: IsolatorByNominalEfficiency.h:73
muonisolation::IsolatorByNominalEfficiency::ConeSizes::size
double size(int i) const
Definition: IsolatorByNominalEfficiency.cc:9
HLT_FULL_cff.weights
weights
Definition: HLT_FULL_cff.py:99178
muonisolation::MuIsoBaseIsolator
Definition: MuIsoBaseIsolator.h:12
muonisolation::IsolatorByNominalEfficiency::coneForEfficiency
mapNomEff_Cone coneForEfficiency
Definition: IsolatorByNominalEfficiency.h:69
muonisolation::IsolatorByNominalEfficiency::bestConeForEfficiencyIndex
int bestConeForEfficiencyIndex(float eff_thr) const
Definition: IsolatorByNominalEfficiency.cc:107
muonisolation::Cuts
Definition: Cuts.h:14
muonisolation::NominalEfficiencyThresholds
Definition: NominalEfficiencyThresholds.h:10
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
muonisolation::IsolatorByNominalEfficiency
Definition: IsolatorByNominalEfficiency.h:22
muonisolation::IsolatorByNominalEfficiency::result
Result result(const DepositContainer &deposits, const edm::Event *=nullptr) const override
Compute the deposit within the cone and return the isolation result.
Definition: IsolatorByNominalEfficiency.cc:63
muonisolation::IsolatorByNominalEfficiency::weightedSum
virtual double weightedSum(const DepositContainer &deposits, float dRcone) const
Definition: IsolatorByNominalEfficiency.cc:123
muonisolation::MuIsoBaseIsolator::ResultType
ResultType
Definition: MuIsoBaseIsolator.h:25
muonisolation::IsolatorByNominalEfficiency::findPath
std::string findPath(const std::string &fileName)
Definition: IsolatorByNominalEfficiency.cc:57
muonisolation::IsolatorByNominalEfficiency::theWeights
std::vector< double > theWeights
Definition: IsolatorByNominalEfficiency.h:71
muonisolation::IsolatorByNominalEfficiency::ConeSizes::index
int index(float dr) const
Definition: IsolatorByNominalEfficiency.cc:16
muonisolation
Definition: CandViewExtractor.h:16
GOODCOLL_filter_cfg.thresh
thresh
Definition: GOODCOLL_filter_cfg.py:74
muonisolation::IsolatorByNominalEfficiency::ConeSizes::dim
int dim() const
Definition: IsolatorByNominalEfficiency.h:50
muonisolation::IsolatorByNominalEfficiency::thresholds
NominalEfficiencyThresholds * thresholds
Definition: IsolatorByNominalEfficiency.h:70
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
muonisolation::MuIsoBaseIsolator::DepositContainer
std::vector< DepositAndVetos > DepositContainer
Definition: MuIsoBaseIsolator.h:23
muonisolation::IsolatorByNominalEfficiency::cones
mapNomEff_Cone cones(const std::vector< std::string > &names)
Definition: IsolatorByNominalEfficiency.cc:46
muonisolation::IsolatorByNominalEfficiency::IsolatorByNominalEfficiency
IsolatorByNominalEfficiency(const std::string &thrFile, const std::vector< std::string > &ceff, const std::vector< double > &weights)
Constructor.
muonisolation::IsolatorByNominalEfficiency::resultType
ResultType resultType() const override
Definition: IsolatorByNominalEfficiency.h:66
edm::Event
Definition: Event.h:73
CandIsolatorFromDeposits_cfi.deposits
deposits
Definition: CandIsolatorFromDeposits_cfi.py:4
muonisolation::IsolatorByNominalEfficiency::mapNomEff_Cone
std::multimap< float, int > mapNomEff_Cone
Definition: IsolatorByNominalEfficiency.h:61
muonisolation::IsolatorByNominalEfficiency::~IsolatorByNominalEfficiency
~IsolatorByNominalEfficiency() override
Definition: IsolatorByNominalEfficiency.cc:44
MuIsoBaseIsolator.h
Cuts.h