00001 #ifndef SimpleTrackRefitter_H_ 00002 #define SimpleTrackRefitter_H_ 00003 00004 // system include files 00005 #include <memory> 00006 00007 // user include files 00008 #include "FWCore/Framework/interface/Frameworkfwd.h" 00009 #include "FWCore/Framework/interface/Event.h" 00010 #include "FWCore/Framework/interface/MakerMacros.h" 00011 #include "FWCore/Framework/interface/ESHandle.h" 00012 #include <FWCore/Framework/interface/EventSetup.h> 00013 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00014 #include <FWCore/Utilities/interface/InputTag.h> 00015 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h" 00016 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h" 00017 #include "DataFormats/TrackReco/interface/Track.h" 00018 #include "DataFormats/TrackReco/interface/TrackExtra.h" 00019 #include <DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h> 00020 #include <TrackingTools/PatternTools/interface/Trajectory.h> 00021 #include "TrackingTools/TrajectoryState/interface/BasicSingleTrajectoryState.h" 00022 #include <TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h> 00023 #include <Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h> 00024 #include <MagneticField/Engine/interface/MagneticField.h> 00025 #include <vector> 00026 #include <string> 00027 00028 00038 class Propagator; 00039 class KFUpdator; 00040 class KFUpdator; 00041 class Chi2MeasurementEstimator; 00042 class TransientTrackingRecHitBuilder; 00043 class TrajectorySmoother; 00044 class TrajectoryFitter; 00045 00046 class SimpleTrackRefitter{ 00047 00048 public: 00050 SimpleTrackRefitter(const edm::ParameterSet&); 00051 00053 virtual ~SimpleTrackRefitter(); 00054 00056 std::vector<Trajectory> refitTrack(const reco::Track& newTrack, 00057 const uint32_t ExcludedDetId = 0); 00058 std::vector<Trajectory> refitTrack(const TrajectorySeed& seed, 00059 const TrackingRecHitCollection &hits, 00060 const uint32_t ExcludedDetid = 0); 00061 std::vector<Trajectory> refitTrack(const TrajectorySeed& seed, 00062 const reco::Track& theT, 00063 const uint32_t ExcludedDetid = 0); 00064 00065 // to be called before the refit 00066 void setServices(const edm::EventSetup& es); 00067 00068 private: 00069 // methods for cosmic tracking 00070 void initServices(const bool& seedAlongMomentum); 00071 void destroyServices(); 00072 std::vector<TrajectoryMeasurement> seedMeasurements(const TrajectorySeed& seed) const; 00073 TrajectoryStateOnSurface startingTSOS(const TrajectorySeed& seed)const; 00074 Trajectory createStartingTrajectory( const TrajectorySeed& seed) const; 00075 // members 00076 const Propagator* thePropagator; 00077 const Propagator* thePropagatorOp; 00078 const KFUpdator* theUpdator; 00079 const Chi2MeasurementEstimator *theEstimator; 00080 const TransientTrackingRecHitBuilder *RHBuilder; 00081 const TrajectorySmoother * theSmoother; 00082 const TrajectoryFitter * theFitter; 00083 const TrajectoryStateTransform tsTransform; 00084 const TrackerGeometry* tracker; 00085 const MagneticField* magfield; 00086 edm::ParameterSet conf_; 00087 bool isCosmics_; 00088 }; 00089 00090 #endif