64 const T& tauCandidate)
const {
69 isoDeposit.addCandEnergy(tauCandidate.pt());
77 for (reco::PFTauCollection::const_iterator pfTau = pfTaus->begin(); pfTau != pfTaus->end(); ++pfTau) {
78 double dR =
deltaR(pfTau->eta(), pfTau->phi(), tauCandidate.eta(), tauCandidate.phi());
79 if (pfTau_matched ==
nullptr || dR < dR_min) {
81 pfTau_matched = &(*pfTau);
91 double dRsignalCone_max = 0.;
94 double dR =
deltaR(candidate->momentum(), pfTau_matched->
momentum());
99 fabs(candidate->vertex().z() - tauVertex.z()) <
maxDzTrack_) {
102 bool isSignalCone =
false;
103 for (std::vector<reco::CandidatePtr>::const_iterator tauSignalConeConstituent =
105 tauSignalConeConstituent != pfTau_matched->
signalCands().end();
106 ++tauSignalConeConstituent) {
107 double dR =
deltaR(candidate->momentum(), (*tauSignalConeConstituent)->momentum());
114 isoDeposit.addDeposit(candidateDirection, candidate->pt());
124 isoDepositVeto.
vetoDir = tauCandidateDirection;
125 isoDepositVeto.
dR = dRsignalCone_max + 1.e-3;
126 isoDeposit.setVeto(isoDepositVeto);
129 <<
" Failed to match PFTau to tauCandidate direction given by"
130 <<
" eta = " << tauCandidate.eta() <<
", phi = " << tauCandidate.phi()
131 <<
" --> skipping computation of IsoDeposit !!";
Vector momentum() const final
spatial momentum vector
std::vector< PFTau > PFTauCollection
collection of PFTau objects
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< Track > TrackCollection
collection of Tracks
const Point & vertex() const override
vertex position (overwritten by PF...)
math::XYZPoint Point
point in the space
T getParameter(std::string const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
#define DEFINE_EDM_PLUGIN(factory, type, name)
Log< level::Warning, false > LogWarning
const std::vector< reco::CandidatePtr > & signalCands() const
Candidates in signal region.