30 return (i1 < cut_ && i2 >=
cut_) || (i1 >=
cut_ && i2 <
cut_);
58 using namespace isodeposit;
60 template<
typename Isolator>
64 isolator_(cfg.
template getParameter<double>(
"isoCut")),
65 ptThreshold(cfg.getUntrackedParameter<double>(
"ptThreshold")),
66 etEcalThreshold(cfg.getUntrackedParameter<double>(
"etEcalThreshold")),
67 etHcalThreshold(cfg.getUntrackedParameter<double>(
"etHcalThreshold")),
68 dRVetoTrk(cfg.getUntrackedParameter<double>(
"deltaRVetoTrk")),
69 dRTrk(cfg.getUntrackedParameter<double>(
"deltaRTrk")),
70 dREcal(cfg.getUntrackedParameter<double>(
"deltaREcal")),
71 dRHcal(cfg.getUntrackedParameter<double>(
"deltaRHcal")),
72 alpha(cfg.getUntrackedParameter<double>(
"alpha")),
73 beta(cfg.getUntrackedParameter<double>(
"beta")),
74 relativeIsolation(cfg.
template getParameter<bool>(
"relativeIsolation")) {
86 vetosTrk.push_back(
new ConeVeto( dir, dRVetoTrk ));
90 vetosEcal.push_back(
new ConeVeto( dir, 0.));
94 vetosHcal.push_back(
new ConeVeto( dir, 0. ));
97 double isovalueTrk = (trkIso->
sumWithin(dRTrk,vetosTrk));
102 double iso =
alpha*( ((1+
beta)/2*isovalueEcal) + ((1-
beta)/2*isovalueHcal) ) + ((1-
alpha)*isovalueTrk) ;
103 if(relativeIsolation) iso /= t->pt();
113 <<
"Candidate daughter #0 is neither pat::Muons nor pat::GenericParticle\n";
124 <<
"Candidate daughters have no master clone\n";
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
SingleObjectSelector< reco::CandidateView, AndSelector< ZToMuMuIsoDepositSelector< TwoNonIsolatedSelector >, StringCutObjectSelector< reco::Candidate > > > ZToMuMuTwoNonIsolatedIDSelector
NonIsolatedSelector(double cut)
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) ...
virtual size_type numberOfDaughters() const =0
number of daughters
virtual bool hasMasterClone() const =0
SingleObjectSelector< reco::CandidateView, AndSelector< ZToMuMuIsoDepositSelector< NonIsolatedSelector >, StringCutObjectSelector< reco::Candidate > > > ZToMuMuNonIsolatedIDSelector
bool operator()(const reco::Candidate &z) const
bool operator()(double i1, double i2) const
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
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
ZToMuMuIsoDepositSelector(const edm::ParameterSet &cfg)
double isolation(const T *t) const
SingleObjectSelector< reco::CandidateView, AndSelector< ZToMuMuIsoDepositSelector< OneNonIsolatedSelector >, StringCutObjectSelector< reco::Candidate > > > ZToMuMuOneNonIsolatedIDSelector
IsolatedSelector(double cut)
IsolatedSelector isolated_
TwoNonIsolatedSelector(double cut)
isodeposit::AbsVetos AbsVetos
Analysis-level muon class.
edm::View< Candidate > CandidateView
view of a collection containing candidates
bool operator()(double i1, double i2) const
virtual const CandidateBaseRef & masterClone() const =0