CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
JetTracksAssociationDRVertex Class Reference

#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 More...
 

Detailed Description

Definition at line 10 of file JetTracksAssociationDRVertex.h.

Constructor & Destructor Documentation

◆ JetTracksAssociationDRVertex()

JetTracksAssociationDRVertex::JetTracksAssociationDRVertex ( double  fDr)

Definition at line 12 of file JetTracksAssociationDRVertex.cc.

12 : mDeltaR2Threshold(fDr * fDr) {}

◆ ~JetTracksAssociationDRVertex()

JetTracksAssociationDRVertex::~JetTracksAssociationDRVertex ( )
inline

Definition at line 13 of file JetTracksAssociationDRVertex.h.

13 {}

Member Function Documentation

◆ produce()

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 14 of file JetTracksAssociationDRVertex.cc.

16  {
17  // cache tracks kinematics
18  std::vector<math::RhoEtaPhiVector> trackP3s;
19  trackP3s.reserve(fTracks.size());
20  for (unsigned i = 0; i < fTracks.size(); ++i) {
21  const reco::Track* track = &*(fTracks[i]);
22  trackP3s.push_back(math::RhoEtaPhiVector(track->p(), track->eta(), track->phi()));
23  }
24  //loop on jets and associate
25  for (unsigned j = 0; j < fJets.size(); ++j) {
26  reco::TrackRefVector assoTracks;
27  const reco::Jet* jet = &*(fJets[j]);
28  double jetEta = jet->eta();
29  double jetPhi = jet->phi();
30  for (unsigned t = 0; t < fTracks.size(); ++t) {
31  double dR2 = deltaR2(jetEta, jetPhi, trackP3s[t].eta(), trackP3s[t].phi());
32  if (dR2 < mDeltaR2Threshold)
33  assoTracks.push_back(fTracks[t]);
34  }
35  reco::JetTracksAssociation::setValue(fAssociation, fJets[j], assoTracks);
36  }
37 }

References HLTMuonOfflineAnalyzer_cfi::deltaR2, PVValHelper::eta, mps_fire::i, dqmiolumiharvest::j, metsig::jet, reco::btau::jetEta, reco::btau::jetPhi, mDeltaR2Threshold, phi, edm::RefVector< C, T, F >::push_back(), reco::JetTracksAssociation::setValue(), submitPVValidationJobs::t, and HLT_FULL_cff::track.

Referenced by JetTracksAssociatorAtVertex::produce().

Member Data Documentation

◆ mDeltaR2Threshold

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().

mps_fire.i
i
Definition: mps_fire.py:428
reco::Jet
Base class for all types of Jets.
Definition: Jet.h:20
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
edm::RefVector< TrackCollection >
math::RhoEtaPhiVector
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
Definition: Vector3D.h:33
PVValHelper::eta
Definition: PVValidationHelpers.h:69
reco::JetTracksAssociation::setValue
bool setValue(Container &, const reco::JetBaseRef &, reco::TrackRefVector)
associate jet with value. Returns false and associate nothing if jet is already associated
Definition: JetTracksAssociation.cc:41
reco::Track
Definition: Track.h:27
reco::btau::jetPhi
Definition: TaggingVariable.h:36
reco::btau::jetEta
Definition: TaggingVariable.h:34
edm::RefVector::push_back
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
DDAxes::phi
HLTMuonOfflineAnalyzer_cfi.deltaR2
deltaR2
Definition: HLTMuonOfflineAnalyzer_cfi.py:105
metsig::jet
Definition: SignAlgoResolutions.h:47
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
JetTracksAssociationDRVertex::mDeltaR2Threshold
double mDeltaR2Threshold
fidutial dR between track in the vertex and jet's reference direction
Definition: JetTracksAssociationDRVertex.h:21