00001 #ifndef TRACKINGTOOLS_TRANSIENTRACKBUILDER_H 00002 #define TRACKINGTOOLS_TRANSIENTRACKBUILDER_H 00003 00004 #include "TrackingTools/TransientTrack/interface/TransientTrack.h" 00005 #include "DataFormats/TrackReco/interface/TrackFwd.h" 00006 #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" 00007 00014 class TransientTrackBuilder { 00015 public: 00016 TransientTrackBuilder(const MagneticField* field, 00017 const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry) : 00018 theField(field) , theTrackingGeometry(trackingGeometry) {} 00019 00020 reco::TransientTrack build ( const reco::Track * p) const; 00021 reco::TransientTrack build ( const reco::Track & p) const; 00022 reco::TransientTrack build ( const reco::GsfTrack * p) const; 00023 reco::TransientTrack build ( const reco::GsfTrack & p) const; 00024 00025 reco::TransientTrack build ( const reco::TrackRef * p) const; 00026 reco::TransientTrack build ( const reco::TrackRef & p) const; 00027 reco::TransientTrack build ( const reco::GsfTrackRef * p) const; 00028 reco::TransientTrack build ( const reco::GsfTrackRef & p) const; 00029 00030 std::vector<reco::TransientTrack> build ( const edm::Handle<reco::TrackCollection> & trkColl) const; 00031 std::vector<reco::TransientTrack> build ( const edm::Handle<reco::GsfTrackCollection> & trkColl) const; 00032 std::vector<reco::TransientTrack> build ( const edm::Handle<edm::View<reco::Track> > & trkColl) const; 00033 00034 std::vector<reco::TransientTrack> build ( const edm::Handle<reco::TrackCollection> & trkColl, 00035 const reco::BeamSpot & beamSpot) const; 00036 std::vector<reco::TransientTrack> build ( const edm::Handle<reco::GsfTrackCollection> & trkColl, 00037 const reco::BeamSpot & beamSpot) const; 00038 std::vector<reco::TransientTrack> build ( const edm::Handle<edm::View<reco::Track> > & trkColl, 00039 const reco::BeamSpot & beamSpot) const; 00040 00041 reco::TransientTrack build (const FreeTrajectoryState & fts) const; 00042 00043 const MagneticField* field() const {return theField;} 00044 const edm::ESHandle<GlobalTrackingGeometry> trackingGeometry() const {return theTrackingGeometry;} 00045 00046 private: 00047 const MagneticField* theField; 00048 edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry; 00049 }; 00050 00051 00052 #endif