20 return !isolated_(i1, i2);
22 double cut()
const {
return isolated_.cut(); }
30 return (i1 < cut_ && i2 >=
cut_) || (i1 >=
cut_ && i2 <
cut_);
59 using namespace isodeposit;
61 template<
typename Isolator>
65 isolator_(cfg.
template getParameter<double>(
"isoCut")),
66 ptThreshold(cfg.getUntrackedParameter<double>(
"ptThreshold")),
67 etEcalThreshold(cfg.getUntrackedParameter<double>(
"etEcalThreshold")),
68 etHcalThreshold(cfg.getUntrackedParameter<double>(
"etHcalThreshold")),
69 dRVetoTrk(cfg.getUntrackedParameter<double>(
"deltaRVetoTrk")),
70 dRTrk(cfg.getUntrackedParameter<double>(
"deltaRTrk")),
71 dREcal(cfg.getUntrackedParameter<double>(
"deltaREcal")),
72 dRHcal(cfg.getUntrackedParameter<double>(
"deltaRHcal")),
73 alpha(cfg.getUntrackedParameter<double>(
"alpha")),
74 beta(cfg.getUntrackedParameter<double>(
"beta")),
75 relativeIsolation(cfg.
template getParameter<
bool>(
"relativeIsolation")) {
87 vetosTrk.push_back(
new ConeVeto( dir, dRVetoTrk ));
91 vetosEcal.push_back(
new ConeVeto( dir, 0.));
95 vetosHcal.push_back(
new ConeVeto( dir, 0. ));
98 double isovalueTrk = (trkIso->
sumWithin(dRTrk,vetosTrk));
103 double iso =
alpha*( ((1+
beta)/2*isovalueEcal) + ((1-
beta)/2*isovalueHcal) ) + ((1-
alpha)*isovalueTrk) ;
104 if(relativeIsolation) iso /= t->pt();
112 if(trk !=
nullptr)
return isolation(trk);
114 <<
"Candidate daughter #0 is neither pat::Muons nor pat::GenericParticle\n";
125 <<
"Candidate daughters have no master clone\n";
ZToMuMuIsoDepositSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
SingleObjectSelector< reco::CandidateView, AndSelector< ZToMuMuIsoDepositSelector< TwoNonIsolatedSelector >, StringCutObjectSelector< reco::Candidate > > > ZToMuMuTwoNonIsolatedIDSelector
NonIsolatedSelector(double cut)
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
double candIsolation(const reco::Candidate *c) const
bool operator()(double i1, double i2) const
double sumWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
#define DEFINE_FWK_MODULE(type)
SingleObjectSelector< reco::CandidateView, AndSelector< ZToMuMuIsoDepositSelector< NonIsolatedSelector >, StringCutObjectSelector< reco::Candidate > > > ZToMuMuNonIsolatedIDSelector
bool operator()(const reco::Candidate &z) const
bool operator()(double i1, double i2) const
def template(fileName, svg, replaceme="REPLACEME")
OneNonIsolatedSelector(double cut)
SingleObjectSelector< reco::CandidateView, AndSelector< ZToMuMuIsoDepositSelector< IsolatedSelector >, StringCutObjectSelector< reco::Candidate > > > ZToMuMuIsolatedIDSelector
double candIsolation(const reco::Candidate *c, double ptThreshold, double etEcalThreshold, double etHcalThreshold, double dRVetoTrk, double dRTrk, double dREcal, double dRHcal, double alpha, double beta, bool relativeIsolation)
bool operator()(double i1, double i2) const
virtual const CandidateBaseRef & masterClone() const =0
double isolation(const T *t) const
SingleObjectSelector< reco::CandidateView, AndSelector< ZToMuMuIsoDepositSelector< OneNonIsolatedSelector >, StringCutObjectSelector< reco::Candidate > > > ZToMuMuOneNonIsolatedIDSelector
std::vector< AbsVeto * > AbsVetos
IsolatedSelector(double cut)
IsolatedSelector isolated_
TwoNonIsolatedSelector(double cut)
virtual size_type numberOfDaughters() const =0
number of daughters
Analysis-level muon class.
edm::View< Candidate > CandidateView
view of a collection containing candidates
bool operator()(double i1, double i2) const
virtual bool hasMasterClone() const =0