#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 |
Definition at line 13 of file JetVetoedTracksAssociatorDRVertex.h.
JetVetoedTracksAssociationDRVertex::JetVetoedTracksAssociationDRVertex | ( | double | fDr | ) |
Definition at line 5 of file JetVetoedTracksAssociatorDRVertex.cc.
: mDeltaR2Threshold(dr*dr) {}
JetVetoedTracksAssociationDRVertex::~JetVetoedTracksAssociationDRVertex | ( | ) | [inline] |
Definition at line 19 of file JetVetoedTracksAssociatorDRVertex.h.
{}
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, Geom::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(), reco::LeafCandidate::phi(), phi, reco::TrackBase::phi(), TrackCategories::PrimaryVertex, edm::RefVector< C, T, F >::push_back(), reco::JetExtendedAssociation::setValue(), and lumiQTWidget::t.
Referenced by JetVetoedTracksAssociatorAtVertex::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()); classifier.evaluate( reco::TrackBaseRef(fTracks[t]) ); if ( dR2 < mDeltaR2Threshold && ( classifier.is(TrackClassifier::BWeakDecay) || classifier.is(TrackClassifier::CWeakDecay) || classifier.is(TrackClassifier::PrimaryVertex) ) ) assoTracks.push_back (fTracks[t]); } reco::JetTracksAssociation::setValue (fAssociation, fJets[j], assoTracks); } }
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().