CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/PhysicsTools/PatUtils/interface/SimpleJetTrackAssociator.h

Go to the documentation of this file.
00001 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00002 #include "DataFormats/Math/interface/Vector3D.h"
00003 #include "DataFormats/Common/interface/View.h"
00004 
00005 namespace helper {
00006 class SimpleJetTrackAssociator {
00007         public:
00008                 SimpleJetTrackAssociator() :
00009                     deltaR2_(0), nHits_(0), chi2nMax_(0) { }
00010                 SimpleJetTrackAssociator(double deltaR, int32_t nHits, double chi2nMax) :
00011                     deltaR2_(deltaR*deltaR), nHits_(nHits), chi2nMax_(chi2nMax) {}
00012                 
00013                 // 100% FWLite compatible (but will make up transient refs)
00014                 void associateTransient(const math::XYZVector &dir, const reco::TrackCollection  &in, reco::TrackRefVector &out) ;
00015 
00016                 // more versatile, persistent refs, for when we're in full framework
00017                 void associate(const math::XYZVector &dir, const edm::View<reco::Track> &in, reco::TrackRefVector &out) ;
00018         private:
00019                 double  deltaR2_;
00020                 int32_t nHits_;
00021                 double  chi2nMax_;
00022 };
00023 }
00024