CMS 3D CMS Logo

JetVetoedTracksAssociationDRVertex Class Reference

#include <SimTracker/TrackHistory/interface/JetVetoedTracksAssociatorDRVertex.h>

List of all members.

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


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.

00005 : mDeltaR2Threshold(dr*dr) {}

JetVetoedTracksAssociationDRVertex::~JetVetoedTracksAssociationDRVertex (  )  [inline]

Definition at line 19 of file JetVetoedTracksAssociatorDRVertex.h.

00019 {}


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, deltaR2(), reco::Particle::eta(), eta, reco::TrackBase::eta(), TrackClassifier::evaluate(), i, TrackClassifier::is(), j, metsig::jet, reco::btau::jetEta, reco::btau::jetPhi, mDeltaR2Threshold, reco::TrackBase::p(), phi, reco::Particle::phi(), reco::TrackBase::phi(), TrackCategories::PrimaryVertex, edm::RefVector< C, T, F >::push_back(), reco::JetTracksAssociation::setValue(), t, and track.

Referenced by JetVetoedTracksAssociatorAtVertex::produce().

00014 {
00015     // cache tracks kinematics
00016     std::vector <math::RhoEtaPhiVector> trackP3s;
00017     trackP3s.reserve (fTracks.size());
00018     for (unsigned i = 0; i < fTracks.size(); ++i)
00019     {
00020         const reco::Track* track = &*(fTracks[i]);
00021         trackP3s.push_back (math::RhoEtaPhiVector (track->p(),track->eta(), track->phi()));
00022     }
00023     //loop on jets and associate
00024     for (unsigned j = 0; j < fJets.size(); ++j)
00025     {
00026         reco::TrackRefVector assoTracks;
00027         const reco::Jet* jet = &*(fJets[j]);
00028         double jetEta = jet->eta();
00029         double jetPhi = jet->phi();
00030         for (unsigned t = 0; t < fTracks.size(); ++t)
00031         {
00032             double dR2 = deltaR2 (jetEta, jetPhi, trackP3s[t].eta(), trackP3s[t].phi());
00033             classifier.evaluate( reco::TrackBaseRef(fTracks[t]) );
00034             if (
00035                 dR2 < mDeltaR2Threshold &&
00036                 (
00037                     classifier.is(TrackCategories::BWeakDecay) ||
00038                     classifier.is(TrackCategories::CWeakDecay) ||
00039                     classifier.is(TrackCategories::PrimaryVertex)
00040                 )
00041             ) assoTracks.push_back (fTracks[t]);
00042         }
00043         reco::JetTracksAssociation::setValue (fAssociation, fJets[j], assoTracks);
00044     }
00045 }


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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:14 2009 for CMSSW by  doxygen 1.5.4