33 isoDeposit.addCandEnergy(tauCandidate.pt());
41 for ( reco::PFTauCollection::const_iterator pfTau = pfTaus->begin();
42 pfTau != pfTaus->end(); ++pfTau ) {
43 double dR =
deltaR(pfTau->eta(), pfTau->phi(), tauCandidate.eta(), tauCandidate.phi());
44 if ( pfTau_matched == 0 || dR < dR_min ) {
46 pfTau_matched = &(*pfTau);
56 double dRsignalCone_max = 0.;
58 candidate != candidates->end(); ++candidate ) {
64 (candidate->vertex() - tauVertex).Rho() <
maxDxyTrack_ &&
65 fabs(candidate->vertex().z() - tauVertex.z()) <
maxDzTrack_ ) {
69 bool isSignalCone =
false;
71 tauSignalConeConstituent != pfTau_matched->
signalPFCands().
end(); ++tauSignalConeConstituent ) {
72 double dR =
deltaR(candidate->momentum(), (*tauSignalConeConstituent)->momentum());
76 if ( !isSignalCone ) {
78 isoDeposit.addDeposit(candidateDirection, candidate->pt());
88 isoDepositVeto.
vetoDir = tauCandidateDirection;
89 isoDepositVeto.
dR = dRsignalCone_max + 1.e-3;
90 isoDeposit.setVeto(isoDepositVeto);
92 edm::LogWarning (
"PFTauExtractor::depositFromObject") <<
" Failed to match PFTau to tauCandidate direction given by"
93 <<
" eta = " << tauCandidate.eta() <<
", phi = " << tauCandidate.phi()
94 <<
" --> skipping computation of IsoDeposit !!";
T getParameter(std::string const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
virtual const Point & vertex() const
vertex position (overwritten by PF...)
const_iterator end() const
Termination of iteration.
const PFCandidateRefVector & signalPFCands() const
PFCandidates in signal region.
const_iterator begin() const
Initialize an iterator over the RefVector.
math::XYZPoint Point
point in the space
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
virtual Vector momentum() const GCC11_FINAL
spatial momentum vector
#define DEFINE_EDM_PLUGIN(factory, type, name)