#include <JetTracksAssociationDRVertex.h>
Public Member Functions | |
JetTracksAssociationDRVertex (double fDr) | |
void | produce (reco::JetTracksAssociation::Container *fAssociation, const std::vector< edm::RefToBase< reco::Jet > > &fJets, const std::vector< reco::TrackRef > &fTracks) const |
~JetTracksAssociationDRVertex () | |
Private Attributes | |
double | mDeltaR2Threshold |
fidutial dR between track in the vertex and jet's reference direction |
Definition at line 11 of file JetTracksAssociationDRVertex.h.
JetTracksAssociationDRVertex::JetTracksAssociationDRVertex | ( | double | fDr | ) |
Definition at line 14 of file JetTracksAssociationDRVertex.cc.
: mDeltaR2Threshold (fDr*fDr) {}
JetTracksAssociationDRVertex::~JetTracksAssociationDRVertex | ( | ) | [inline] |
Definition at line 14 of file JetTracksAssociationDRVertex.h.
{}
void JetTracksAssociationDRVertex::produce | ( | reco::JetTracksAssociation::Container * | fAssociation, |
const std::vector< edm::RefToBase< reco::Jet > > & | fJets, | ||
const std::vector< reco::TrackRef > & | fTracks | ||
) | const |
Definition at line 18 of file JetTracksAssociationDRVertex.cc.
References Geom::deltaR2(), eta(), reco::LeafCandidate::eta(), reco::TrackBase::eta(), i, j, metsig::jet, reco::btau::jetEta, reco::btau::jetPhi, mDeltaR2Threshold, reco::TrackBase::p(), reco::LeafCandidate::phi(), phi, reco::TrackBase::phi(), edm::RefVector< C, T, F >::push_back(), reco::JetExtendedAssociation::setValue(), and lumiQTWidget::t.
Referenced by JetTracksAssociatorAtVertex::produce().
{ // cache tracks kinematics std::vector <math::RhoEtaPhiVector> trackP3s; trackP3s.reserve (fTracks.size()); for (unsigned i = 0; i < fTracks.size(); ++i) { const reco::Track* track = &*(fTracks[i]); trackP3s.push_back (math::RhoEtaPhiVector (track->p(),track->eta(), track->phi())); } //loop on jets and associate for (unsigned j = 0; j < fJets.size(); ++j) { reco::TrackRefVector assoTracks; const reco::Jet* jet = &*(fJets[j]); double jetEta = jet->eta(); double jetPhi = jet->phi(); for (unsigned t = 0; t < fTracks.size(); ++t) { double dR2 = deltaR2 (jetEta, jetPhi, trackP3s[t].eta(), trackP3s[t].phi()); if (dR2 < mDeltaR2Threshold) assoTracks.push_back (fTracks[t]); } reco::JetTracksAssociation::setValue (fAssociation, fJets[j], assoTracks); } }
double JetTracksAssociationDRVertex::mDeltaR2Threshold [private] |
fidutial dR between track in the vertex and jet's reference direction
Definition at line 21 of file JetTracksAssociationDRVertex.h.
Referenced by produce().