00001 #ifndef MuonIsolation_IsolatorByNominalEfficiency_H 00002 #define MuonIsolation_IsolatorByNominalEfficiency_H 00003 00013 #include "RecoMuon/MuonIsolation/interface/MuIsoBaseIsolator.h" 00014 #include "RecoMuon/MuonIsolation/interface/Cuts.h" 00015 #include <vector> 00016 #include <string> 00017 00018 namespace muonisolation { class NominalEfficiencyThresholds; } 00019 00020 namespace muonisolation { 00021 class IsolatorByNominalEfficiency : public MuIsoBaseIsolator { 00022 public: 00023 typedef MuIsoBaseIsolator::DepositContainer DepositContainer; 00024 00026 IsolatorByNominalEfficiency(const std::string & thrFile, 00027 const std::vector<std::string> & ceff, 00028 const std::vector<double> & weights); 00029 00030 IsolatorByNominalEfficiency(const std::string & thrFile, 00031 const std::vector<std::string> & ceff, 00032 const std::vector<double> & weights, const std::vector<double> & thresh ); 00033 00034 00035 virtual ~IsolatorByNominalEfficiency(); 00036 00038 virtual Result result(const DepositContainer& deposits, const edm::Event* = 0) const; 00039 00040 Cuts cuts(float nominalEfficiency) const; 00041 00042 private: 00043 00044 class ConeSizes { 00045 private: 00046 enum IsoDim { DIM = 15}; 00047 static float cone_dr[DIM]; 00048 public: 00049 int dim() const { return DIM;} 00050 double size(int i) const; 00051 int index(float dr) const; 00052 }; 00053 00054 // Compute the weighted sum of deposits of different type within dRcone 00055 virtual double weightedSum(const DepositContainer& deposits, float dRcone) const; 00056 00057 // Size of cone for a given nominal efficiency value. 00058 int bestConeForEfficiencyIndex(float eff_thr) const; 00059 00060 typedef std::multimap<float,int> mapNomEff_Cone; 00061 mapNomEff_Cone cones(const std::vector<std::string>& names); 00062 00063 std::string findPath(const std::string& fileName); 00064 00065 virtual ResultType resultType() const { return ISOL_FLOAT_TYPE;} 00066 00067 private: 00068 mapNomEff_Cone coneForEfficiency; 00069 NominalEfficiencyThresholds * thresholds; 00070 std::vector<double> theWeights; 00071 std::vector<double> theDepThresholds; 00072 ConeSizes theConesInfo; 00073 }; 00074 } 00075 00076 #endif