#include <SimpleJetTrackAssociator.h>
Public Member Functions | |
void | associate (const math::XYZVector &dir, const edm::View< reco::Track > &in, reco::TrackRefVector &out) |
void | associateTransient (const math::XYZVector &dir, const reco::TrackCollection &in, reco::TrackRefVector &out) |
SimpleJetTrackAssociator () | |
SimpleJetTrackAssociator (double deltaR, int32_t nHits, double chi2nMax) | |
Private Attributes | |
double | chi2nMax_ |
double | deltaR2_ |
int32_t | nHits_ |
Definition at line 6 of file SimpleJetTrackAssociator.h.
helper::SimpleJetTrackAssociator::SimpleJetTrackAssociator | ( | ) | [inline] |
Definition at line 8 of file SimpleJetTrackAssociator.h.
helper::SimpleJetTrackAssociator::SimpleJetTrackAssociator | ( | double | deltaR, |
int32_t | nHits, | ||
double | chi2nMax | ||
) | [inline] |
void helper::SimpleJetTrackAssociator::associate | ( | const math::XYZVector & | dir, |
const edm::View< reco::Track > & | in, | ||
reco::TrackRefVector & | out | ||
) |
Definition at line 19 of file SimpleJetTrackAssociator.cc.
References Geom::deltaR2(), i, n, reco::TrackBase::normalizedChi2(), reco::TrackBase::numberOfValidHits(), edm::RefVector< C, T, F >::push_back(), edm::View< T >::refAt(), edm::View< T >::size(), and lumiQTWidget::t.
{ for (size_t i = 0, n = in.size(); i < n; i++) { const reco::Track & t = in[i]; if ((t.numberOfValidHits() < nHits_) || (t.normalizedChi2() > chi2nMax_)) continue; if (deltaR2(dir, t) < deltaR2_) { reco::TrackRef tr = in.refAt(i).castTo<reco::TrackRef>(); out.push_back(tr); } } }
void helper::SimpleJetTrackAssociator::associateTransient | ( | const math::XYZVector & | dir, |
const reco::TrackCollection & | in, | ||
reco::TrackRefVector & | out | ||
) |
Definition at line 6 of file SimpleJetTrackAssociator.cc.
References chi2nMax_, Geom::deltaR2(), deltaR2_, i, n, nHits_, reco::TrackBase::normalizedChi2(), reco::TrackBase::numberOfValidHits(), edm::RefVector< C, T, F >::push_back(), and lumiQTWidget::t.
double helper::SimpleJetTrackAssociator::chi2nMax_ [private] |
Definition at line 21 of file SimpleJetTrackAssociator.h.
Referenced by associateTransient().
double helper::SimpleJetTrackAssociator::deltaR2_ [private] |
Definition at line 19 of file SimpleJetTrackAssociator.h.
Referenced by associateTransient().
int32_t helper::SimpleJetTrackAssociator::nHits_ [private] |
Definition at line 20 of file SimpleJetTrackAssociator.h.
Referenced by associateTransient().