6 using namespace muonisolation;
10 if (i >= 0 && i <
DIM)
17 for (
int i =
DIM;
i >= 1;
i--)
18 if (cone_dr[
i - 1] < dr)
24 0.001, 0.02, 0.045, 0.09, 0.13, 0.17, 0.20, 0.24, 0.28, 0.32, 0.38, 0.45, 0.5, 0.6, 0.7};
27 const vector<string>& ceff,
29 : theWeights(weights) {
36 const vector<string>& ceff,
37 const vector<double>& weights,
38 const vector<double>&
thresh)
48 for (vector<string>::const_iterator is = usrVec.begin(); is != usrVec.end(); is++) {
50 int cone = strtol((*is).c_str(), &evp, 10);
51 float effic = strtod(evp + 1, &evp);
52 result.insert(make_pair(effic, cone));
65 if (deposits.empty()) {
66 cout <<
"IsolatorByNominalEfficiency: no deposit" << endl;
76 float theEta = deposits.back().dep->eta();
81 float nominalEfficiency = 1.;
82 const float deltaeff = 0.005;
83 const float mineff = deltaeff;
84 for (
float eff = .995; eff > mineff; eff -= deltaeff) {
100 nominalEfficiency = eff;
115 mapNomEff_Cone::const_reverse_iterator it;
117 if (eff_thr <= (*it).first)
118 best_cone = (*it).second;
128 vector<double>::const_iterator
w =
theWeights.begin();
130 for (DepositContainer::const_iterator dep = deposits.begin(); dep != deposits.end(); dep++) {
131 if (dep->vetos !=
nullptr) {
132 sumDep += dep->dep->depositAndCountWithin(dRcone, *dep->vetos, *dThresh).first * (*w);
134 sumDep += dep->dep->depositAndCountWithin(dRcone,
Vetos(), *dThresh).first * (*w);
146 vector<double> coneSizes;
147 vector<double> cutvalues;
148 for (vector<double>::const_iterator it = etaBounds.begin(), itEnd = etaBounds.end(); it < itEnd; ++it) {
155 return Cuts(etaBounds, coneSizes, cutvalues);
mapNomEff_Cone coneForEfficiency
std::vector< double > theDepThresholds
Result result(const DepositContainer &deposits, const edm::Event *=nullptr) const override
Compute the deposit within the cone and return the isolation result.
std::vector< double > theWeights
int index(float dr) const
MuIsoBaseIsolator::DepositContainer DepositContainer
reco::IsoDeposit::Vetos Vetos
std::vector< double > bins() const
ResultType resultType() const override
~IsolatorByNominalEfficiency() override
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)
static const float cone_dr[DIM]
Cuts cuts(float nominalEfficiency) const
virtual double weightedSum(const DepositContainer &deposits, float dRcone) const
NominalEfficiencyThresholds * thresholds
int bestConeForEfficiencyIndex(float eff_thr) const
std::string fullPath() const
float thresholdValueForEfficiency(ThresholdLocation location, float eff_thr) const
std::multimap< float, int > mapNomEff_Cone
std::string findPath(const std::string &fileName)