00001 // \class JetTracksAssociationDR 00002 // Associate jets with tracks by simple "delta R" criteria 00003 // Fedor Ratnikov (UMd) 00004 // $Id: JetTracksAssociationDR.h,v 1.2 2010/03/16 21:48:47 srappocc Exp $ 00005 00006 #ifndef RecoJets_JetAssociationAlgorithms_JetTracksAssociationDR_h 00007 #define RecoJets_JetAssociationAlgorithms_JetTracksAssociationDR_h 00008 00009 #include "DataFormats/JetReco/interface/Jet.h" 00010 #include "DataFormats/JetReco/interface/JetTracksAssociation.h" 00011 #include "DataFormats/TrackReco/interface/Track.h" 00012 #include "DataFormats/TrackReco/interface/TrackFwd.h" 00013 00014 class MagneticField; 00015 class Propagator; 00016 00017 class JetTracksAssociationDR { 00018 00019 public: 00020 00021 // ---------- Con(de)structors ---------- 00022 00024 explicit JetTracksAssociationDR( double dr_threshold ); 00025 00027 virtual ~JetTracksAssociationDR(); 00028 00029 // ---------- Typedefs ---------- 00030 00032 typedef reco::JetTracksAssociation::Container Association; 00033 00035 typedef edm::Handle< edm::View<reco::Jet> > Jets; 00036 00038 typedef edm::Handle< reco::TrackCollection > Tracks; 00039 00040 // Jet reference 00041 typedef edm::RefToBase<reco::Jet> JetRef; 00042 00043 // Collection of jet references 00044 typedef std::vector<JetRef> JetRefs; 00045 00046 // Collection of track references 00047 typedef std::vector<reco::TrackRef> TrackRefs; 00048 00049 // Track Quality 00050 typedef reco::TrackBase::TrackQuality TrackQuality; 00051 00052 // ---------- Public interface ---------- 00053 00054 // Associate tracks to jets 00055 void associateTracksToJets( Association*, 00056 const JetRefs&, 00057 const TrackRefs& ); 00058 00060 virtual void associateTracksToJet( reco::TrackRefVector&, 00061 const reco::Jet&, 00062 const TrackRefs& ) = 0; 00063 00064 // Takes Handle as input and creates collection of edm::Refs 00065 static void createJetRefs( JetRefs&, 00066 const Jets& ); 00067 00068 // Takes Handle as input and creates collection of edm::Refs 00069 static void createTrackRefs( TrackRefs&, 00070 const Tracks&, 00071 const TrackQuality& ); 00072 00073 protected: 00074 00076 JetTracksAssociationDR() {} 00077 00079 double mDeltaR2Threshold; 00080 00081 }; 00082 00083 #endif // RecoJets_JetAssociationAlgorithms_JetTracksAssociationDR_h