6 using namespace muonisolation;
10 {
if (i >= 0 && i<
DIM)
return cone_dr[
i];
else return 0.; }
14 for(
int i=
DIM;
i>=1;
i--)
if (cone_dr[
i-1] < dr)
return i;
19 { 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};
22 const vector<string> & ceff,
const vector<double>&
weights) : theWeights(weights){
30 const vector<double>& weights,
const vector<double>&
thresh
44 for (vector<string>::const_iterator is = usrVec.begin();
45 is != usrVec.end(); is++) {
47 int cone = strtol( (*is).c_str(), &evp, 10);
48 float effic = strtod(evp+1, &evp);
49 result.insert(make_pair(effic,cone));
64 if (deposits.size()==0) {
65 cout <<
"IsolatorByNominalEfficiency: no deposit" << endl;
75 float theEta = deposits.back().dep->eta();
80 float nominalEfficiency = 1.;
81 const float deltaeff=0.005;
82 const float mineff=deltaeff;
83 for (
float eff=.995; eff>mineff; eff-=deltaeff) {
97 if (sumDep > thres)
break;
98 nominalEfficiency = eff;
114 mapNomEff_Cone::const_reverse_iterator it;
117 if (eff_thr <= (*it).first) best_cone = (*it).second;
124 float dRcone)
const {
129 vector<double>::const_iterator
w =
theWeights.begin();
131 for (DepositContainer::const_iterator dep = deposits.begin();
132 dep != deposits.end(); dep++) {
133 if (dep->vetos != 0){
134 sumDep += dep->dep->depositAndCountWithin(dRcone, *dep->vetos, *dThresh).first * (*w);
136 sumDep += dep->dep->depositAndCountWithin(dRcone,
Vetos(), *dThresh).first * (*w);
138 if (sumDep <0.) sumDep = 0.;
148 vector<double> coneSizes;
149 vector<double> cutvalues;
150 for (vector<double>::const_iterator it=etaBounds.begin(),itEnd=etaBounds.end();it < itEnd;++it){
157 return Cuts(etaBounds,coneSizes,cutvalues);
mapNomEff_Cone coneForEfficiency
std::vector< double > theDepThresholds
std::vector< double > theWeights
int index(float dr) const
MuIsoBaseIsolator::DepositContainer DepositContainer
reco::IsoDeposit::Vetos Vetos
std::vector< double > bins() const
std::multimap< float, int > mapNomEff_Cone
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 Result result(const DepositContainer &deposits, const edm::Event *=0) const
Compute the deposit within the cone and return the isolation result.
static const float cone_dr[DIM]
Cuts cuts(float nominalEfficiency) const
virtual ResultType resultType() const
virtual double weightedSum(const DepositContainer &deposits, float dRcone) const
NominalEfficiencyThresholds * thresholds
int bestConeForEfficiencyIndex(float eff_thr) const
float thresholdValueForEfficiency(ThresholdLocation location, float eff_thr) const
std::string fullPath() const
virtual ~IsolatorByNominalEfficiency()
std::string findPath(const std::string &fileName)