#include <JetTracksAssociationDRVertex.h>
Public Member Functions | |
void | associateTracksToJet (reco::TrackRefVector &, const reco::Jet &, const TrackRefs &) |
Associate tracks to the given jet. | |
JetTracksAssociationDRVertex (double dr_threshold) | |
Constructor taking dR threshold as argument. | |
void | produce (Association *, const JetRefs &, const TrackRefs &) |
Associates tracks to jets. | |
void | produce (Association *, const Jets &, const Tracks &, const TrackQuality &) |
Associates tracks to jets (using Handles as input) | |
void | propagateTracks (const TrackRefs &) |
~JetTracksAssociationDRVertex () | |
Destructor. | |
Private Attributes | |
std::vector < math::RhoEtaPhiVector > | propagatedTracks_ |
Definition at line 13 of file JetTracksAssociationDRVertex.h.
JetTracksAssociationDRVertex::JetTracksAssociationDRVertex | ( | double | dr_threshold | ) | [explicit] |
Constructor taking dR threshold as argument.
Definition at line 10 of file JetTracksAssociationDRVertex.cc.
: JetTracksAssociationDR(fDr), propagatedTracks_() {;}
JetTracksAssociationDRVertex::~JetTracksAssociationDRVertex | ( | ) |
void JetTracksAssociationDRVertex::associateTracksToJet | ( | reco::TrackRefVector & | , |
const reco::Jet & | , | ||
const TrackRefs & | |||
) | [virtual] |
Associate tracks to the given jet.
Implements JetTracksAssociationDR.
Definition at line 47 of file JetTracksAssociationDRVertex.cc.
References edm::RefVector< C, T, F >::clear(), Geom::deltaR2(), reco::LeafCandidate::eta(), getHLTprescales::index, JetTracksAssociationDR::mDeltaR2Threshold, reco::LeafCandidate::phi(), propagatedTracks_, and edm::RefVector< C, T, F >::push_back().
{ associated.clear(); std::vector<math::RhoEtaPhiVector>::const_iterator ii = propagatedTracks_.begin(); std::vector<math::RhoEtaPhiVector>::const_iterator jj = propagatedTracks_.end(); for ( ; ii != jj; ++ii ) { uint32_t index = ii - propagatedTracks_.begin(); double dR2 = deltaR2( fJet.eta(), fJet.phi(), ii->eta(), ii->phi() ); if ( dR2 < mDeltaR2Threshold ) { associated.push_back( fTracks[index] ); } } }
void JetTracksAssociationDRVertex::produce | ( | Association * | fAssociation, |
const JetRefs & | fJets, | ||
const TrackRefs & | fTracks | ||
) |
Associates tracks to jets.
Definition at line 36 of file JetTracksAssociationDRVertex.cc.
References JetTracksAssociationDR::associateTracksToJets(), and propagateTracks().
{ //clear(); propagateTracks( fTracks ); associateTracksToJets( fAssociation, fJets, fTracks ); }
void JetTracksAssociationDRVertex::produce | ( | Association * | fAssociation, |
const Jets & | fJets, | ||
const Tracks & | fTracks, | ||
const TrackQuality & | fQuality | ||
) |
Associates tracks to jets (using Handles as input)
Definition at line 22 of file JetTracksAssociationDRVertex.cc.
References JetTracksAssociationDR::createJetRefs(), JetTracksAssociationDR::createTrackRefs(), analyzePatCleaning_cfg::jets, and testEve_cfg::tracks.
Referenced by JetTracksAssociatorAtVertex::produce().
{ JetRefs jets; createJetRefs( jets, fJets ); TrackRefs tracks; createTrackRefs( tracks, fTracks, fQuality ); produce( fAssociation, jets, tracks ); }
void JetTracksAssociationDRVertex::propagateTracks | ( | const TrackRefs & | fTracks | ) |
Definition at line 63 of file JetTracksAssociationDRVertex.cc.
References propagatedTracks_.
Referenced by produce().
{ propagatedTracks_.clear(); propagatedTracks_.reserve( fTracks.size() ); TrackRefs::const_iterator ii = fTracks.begin(); TrackRefs::const_iterator jj = fTracks.end(); for ( ; ii != jj; ++ii ) { propagatedTracks_.push_back( math::RhoEtaPhiVector( (**ii).p(), (**ii).eta(), (**ii).phi() ) ); } }
std::vector<math::RhoEtaPhiVector> JetTracksAssociationDRVertex::propagatedTracks_ [private] |
Definition at line 44 of file JetTracksAssociationDRVertex.h.
Referenced by associateTracksToJet(), and propagateTracks().