CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
JetVetoedTracksAssociationDRVertex Class Reference

#include <JetVetoedTracksAssociatorDRVertex.h>

Public Member Functions

 JetVetoedTracksAssociationDRVertex (double fDr)
 
void produce (reco::JetTracksAssociation::Container *fAssociation, const std::vector< edm::RefToBase< reco::Jet > > &fJets, const std::vector< reco::TrackRef > &fTracks, TrackClassifier &classifier) const
 
 ~JetVetoedTracksAssociationDRVertex ()
 

Private Attributes

double mDeltaR2Threshold
 fidutial dR between track in the vertex and jet's reference direction More...
 

Detailed Description

Definition at line 13 of file JetVetoedTracksAssociatorDRVertex.h.

Constructor & Destructor Documentation

JetVetoedTracksAssociationDRVertex::JetVetoedTracksAssociationDRVertex ( double  fDr)

Definition at line 5 of file JetVetoedTracksAssociatorDRVertex.cc.

5 : mDeltaR2Threshold(dr*dr) {}
double mDeltaR2Threshold
fidutial dR between track in the vertex and jet&#39;s reference direction
JetVetoedTracksAssociationDRVertex::~JetVetoedTracksAssociationDRVertex ( )
inline

Definition at line 19 of file JetVetoedTracksAssociatorDRVertex.h.

19 {}

Member Function Documentation

void JetVetoedTracksAssociationDRVertex::produce ( reco::JetTracksAssociation::Container fAssociation,
const std::vector< edm::RefToBase< reco::Jet > > &  fJets,
const std::vector< reco::TrackRef > &  fTracks,
TrackClassifier classifier 
) const

Definition at line 8 of file JetVetoedTracksAssociatorDRVertex.cc.

References TrackCategories::BWeakDecay, TrackCategories::CWeakDecay, reco::deltaR2(), eta, reco::LeafCandidate::eta(), reco::TrackBase::eta(), TrackClassifier::evaluate(), i, TrackCategories::is(), j, metsig::jet, reco::btau::jetEta, reco::btau::jetPhi, mDeltaR2Threshold, reco::TrackBase::p(), phi, reco::LeafCandidate::phi(), reco::TrackBase::phi(), TrackCategories::PrimaryVertex, edm::RefVector< C, T, F >::push_back(), reco::JetTracksAssociation::setValue(), and lumiQTWidget::t.

Referenced by JetVetoedTracksAssociatorAtVertex::produce().

14 {
15  // cache tracks kinematics
16  std::vector <math::RhoEtaPhiVector> trackP3s;
17  trackP3s.reserve (fTracks.size());
18  for (unsigned i = 0; i < fTracks.size(); ++i)
19  {
20  const reco::Track* track = &*(fTracks[i]);
21  trackP3s.push_back (math::RhoEtaPhiVector (track->p(),track->eta(), track->phi()));
22  }
23  //loop on jets and associate
24  for (unsigned j = 0; j < fJets.size(); ++j)
25  {
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  {
32  double dR2 = deltaR2 (jetEta, jetPhi, trackP3s[t].eta(), trackP3s[t].phi());
33  classifier.evaluate( reco::TrackBaseRef(fTracks[t]) );
34  if (
35  dR2 < mDeltaR2Threshold &&
36  (
37  classifier.is(TrackClassifier::BWeakDecay) ||
38  classifier.is(TrackClassifier::CWeakDecay) ||
40  )
41  ) assoTracks.push_back (fTracks[t]);
42  }
43  reco::JetTracksAssociation::setValue (fAssociation, fJets[j], assoTracks);
44  }
45 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:602
int i
Definition: DBlmapReader.cc:9
Base class for all types of Jets.
Definition: Jet.h:20
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:632
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
Definition: Vector3D.h:32
virtual double eta() const
momentum pseudorapidity
TrackClassifier const & evaluate(reco::TrackBaseRef const &)
Classify the RecoTrack in categories.
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:638
bool setValue(Container &, const reco::JetBaseRef &, reco::TrackRefVector)
associate jet with value. Returns false and associate nothing if jet is already associated ...
int j
Definition: DBlmapReader.cc:9
double deltaR2(const T1 &t1, const T2 &t2)
Definition: deltaR.h:36
bool is(Category category) const
Returns track flag for a given category.
double mDeltaR2Threshold
fidutial dR between track in the vertex and jet&#39;s reference direction
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:62
virtual double phi() const
momentum azimuthal angle

Member Data Documentation

double JetVetoedTracksAssociationDRVertex::mDeltaR2Threshold
private

fidutial dR between track in the vertex and jet's reference direction

Definition at line 30 of file JetVetoedTracksAssociatorDRVertex.h.

Referenced by produce().