CMS 3D CMS Logo

Public Member Functions | Private Attributes

helper::SimpleJetTrackAssociator Class Reference

#include <SimpleJetTrackAssociator.h>

List of all members.

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_

Detailed Description

Definition at line 6 of file SimpleJetTrackAssociator.h.


Constructor & Destructor Documentation

helper::SimpleJetTrackAssociator::SimpleJetTrackAssociator ( ) [inline]

Definition at line 8 of file SimpleJetTrackAssociator.h.

                                           :
                    deltaR2_(0), nHits_(0), chi2nMax_(0) { }
helper::SimpleJetTrackAssociator::SimpleJetTrackAssociator ( double  deltaR,
int32_t  nHits,
double  chi2nMax 
) [inline]

Definition at line 10 of file SimpleJetTrackAssociator.h.

                                                                                        :
                    deltaR2_(deltaR*deltaR), nHits_(nHits), chi2nMax_(chi2nMax) {}

Member Function Documentation

void helper::SimpleJetTrackAssociator::associate ( const math::XYZVector dir,
const edm::View< reco::Track > &  in,
reco::TrackRefVector out 
)
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.

                                                                                {
        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, i); // note: transient ref
                        out.push_back(tr);
                }
        }
}

Member Data Documentation

Definition at line 21 of file SimpleJetTrackAssociator.h.

Referenced by associateTransient().

Definition at line 19 of file SimpleJetTrackAssociator.h.

Referenced by associateTransient().

Definition at line 20 of file SimpleJetTrackAssociator.h.

Referenced by associateTransient().