00001 #ifndef RecoMuon_TrackingTools_MuonTrackLoader_H 00002 #define RecoMuon_TrackingTools_MuonTrackLoader_H 00003 00013 #include "FWCore/Framework/interface/ESHandle.h" 00014 #include "FWCore/Framework/interface/EventSetup.h" 00015 00016 #include "DataFormats/TrackReco/interface/TrackFwd.h" 00017 #include "DataFormats/TrackReco/interface/TrackExtraFwd.h" 00018 #include "DataFormats/Common/interface/OrphanHandle.h" 00019 #include "DataFormats/MuonReco/interface/MuonFwd.h" 00020 #include "DataFormats/BeamSpot/interface/BeamSpot.h" 00021 00022 #include "RecoMuon/TrackingTools/interface/MuonCandidate.h" 00023 00024 namespace edm {class Event; class EventSetup; class ParameterSet;} 00025 00026 class Trajectory; 00027 class Propagator; 00028 class MuonServiceProxy; 00029 class MuonUpdatorAtVertex; 00030 class TrajectorySmoother; 00031 00032 class MuonTrackLoader { 00033 public: 00034 00035 typedef MuonCandidate::TrajectoryContainer TrajectoryContainer; 00036 typedef MuonCandidate::CandidateContainer CandidateContainer; 00037 00039 MuonTrackLoader(edm::ParameterSet ¶meterSet, const MuonServiceProxy *service =0); 00040 00042 virtual ~MuonTrackLoader(); 00043 00045 edm::OrphanHandle<reco::TrackCollection> loadTracks(const TrajectoryContainer&, 00046 edm::Event&,const std::string& = "", 00047 bool = true); 00048 00050 edm::OrphanHandle<reco::TrackCollection> loadTracks(const TrajectoryContainer&, 00051 edm::Event&,std::vector<std::pair<Trajectory*, reco::TrackRef> >, 00052 const std::string& = "", 00053 bool = true); 00054 00056 edm::OrphanHandle<reco::MuonTrackLinksCollection> loadTracks(const CandidateContainer&, 00057 edm::Event&); 00058 00059 private: 00060 00062 std::pair<bool,reco::Track> buildTrackAtPCA(const Trajectory& trajectory, const reco::BeamSpot &) const; 00063 00065 std::pair<bool,reco::Track> buildTrackUpdatedAtPCA(const reco::Track& trackAtPCA, const reco::BeamSpot &) const; 00066 00067 reco::TrackExtra buildTrackExtra(const Trajectory&) const; 00068 00069 const MuonServiceProxy *theService; 00070 00071 bool theUpdatingAtVtx; 00072 MuonUpdatorAtVertex *theUpdatorAtVtx; 00073 00074 bool theTrajectoryFlag; 00075 00076 bool theSmoothingStep; 00077 std::string theSmootherName; 00078 edm::ESHandle<TrajectorySmoother> theSmoother; 00079 00081 std::string theL2SeededTkLabel; 00082 bool thePutTkTrackFlag; 00083 bool theSmoothTkTrackFlag; 00084 bool theAllowNoVtxFlag; 00085 }; 00086 #endif