14 namespace muonisolation {
67 using namespace muonisolation;
75 deposit.setVeto(
veto(candDir));
76 deposit.addCandEnergy(cand.pt());
80 event.getByToken(theCandViewToken, candViewH);
82 candViewH = theCandViewH;
85 double eta = cand.eta(), phi = cand.phi();
87 LogDebug(metname) <<
"cand eta=" << eta <<
" phi=" << phi <<
" vtx=" << vtx;
89 double dR =
deltaR(it->eta(), it->phi(),
eta, phi);
90 LogDebug(metname) <<
"pdgid=" << it->pdgId() <<
" vtx=" << it->vertex() <<
" dR=" << dR
91 <<
" dvz=" << it->vz() - cand.vz() <<
" drho=" << (it->vertex() - vtx).Rho();
92 if ((dR < theDR_Max) && (dR > theDR_Veto) && (
std::abs(it->vz() - cand.vz()) < theDiff_z) &&
93 ((it->vertex() - vtx).Rho() < theDiff_r)) {
96 deposit.addDeposit(dirTrk, it->pt());
97 LogDebug(metname) <<
"pt=" << it->pt();
106 theDepositLabel(par.getUntrackedParameter<std::
string>(
"DepositLabel")),
107 theDiff_r(par.getParameter<double>(
"Diff_r")),
108 theDiff_z(par.getParameter<double>(
"Diff_z")),
109 theDR_Max(par.getParameter<double>(
"DR_Max")),
110 theDR_Veto(par.getParameter<double>(
"DR_Veto")) {}
unsigned long CacheIdentifier_t
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::string metname
edm::Event::CacheIdentifier_t theCacheID
std::vector< Track > TrackCollection
collection of Tracks
edm::EDGetTokenT< edm::View< reco::Candidate > > theCandViewToken
edm::Handle< edm::View< reco::Candidate > > theCandViewH
void initEvent(const edm::Event &ev, const edm::EventSetup &evSetup) override
perform some constly initialization
reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &muon) const override
reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &muon) const override
~CandViewExtractor() override
std::string theDepositLabel
CacheIdentifier_t cacheIdentifier() const
math::XYZPoint Point
point in the space
Abs< T >::type abs(const T &t)
reco::IsoDeposit depositFromObject(const edm::Event &ev, const edm::EventSetup &evSetup, const T &cand) const
void fillVetos(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &cand) override
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
#define DEFINE_EDM_PLUGIN(factory, type, name)
reco::IsoDeposit::Veto veto(const reco::IsoDeposit::Direction &dir) const