CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/TrackingTools/TrackRefitter/interface/TrackTransformer.h

Go to the documentation of this file.
00001 #ifndef TrackingTools_TrackRefitter_TrackTransformer_H
00002 #define TrackingTools_TrackRefitter_TrackTransformer_H
00003 
00018 #include "TrackingTools/TrackRefitter/interface/TrackTransformerBase.h"
00019 
00020 #include "TrackingTools/TrackRefitter/interface/RefitDirection.h"
00021 
00022 #include "FWCore/Framework/interface/ESHandle.h"
00023 
00024 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
00025 #include "MagneticField/Engine/interface/MagneticField.h"
00026 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00027 
00028 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00029 
00030 namespace edm {class ParameterSet; class EventSetup;}
00031 namespace reco {class TransientTrack;}
00032 
00033 class TrajectoryFitter;
00034 class TrajectorySmoother;
00035 class Propagator;
00036 class TransientTrackingRecHitBuilder;
00037 class Trajectory;
00038 
00039 class TrackTransformer: public TrackTransformerBase{
00040 
00041 public:
00042 
00044   TrackTransformer(const edm::ParameterSet&);
00045 
00047   virtual ~TrackTransformer();
00048   
00049   // Operations
00050 
00052   virtual std::vector<Trajectory> transform(const reco::Track&) const;
00053 
00055   std::vector<Trajectory> transform(const reco::TrackRef&) const;
00056 
00058   std::vector<Trajectory> transform(const reco::TransientTrack,
00059                                     TransientTrackingRecHit::ConstRecHitContainer) const;
00060 
00062   const MagneticField* magneticField() const {return &*theMGField;}
00063   
00065   edm::ESHandle<GlobalTrackingGeometry> trackingGeometry() const {return theTrackingGeometry;}
00066 
00068   virtual void setServices(const edm::EventSetup&);
00069 
00071   edm::ESHandle<TrajectoryFitter> refitter() const {return theFitter;}
00072   
00074   edm::ESHandle<TrajectorySmoother> smoother() const {return theSmoother;}
00075 
00076   TransientTrackingRecHit::ConstRecHitContainer
00077     getTransientRecHits(const reco::TransientTrack& track) const;
00078   
00079  protected:
00080   
00081  private:
00082 
00083   std::string thePropagatorName;
00084   edm::ESHandle<Propagator> propagator() const {return thePropagator;}
00085   edm::ESHandle<Propagator> thePropagator;
00086   
00087   unsigned long long theCacheId_TC;
00088   unsigned long long theCacheId_GTG;
00089   unsigned long long theCacheId_MG;
00090   unsigned long long theCacheId_TRH;
00091   
00092   bool theRPCInTheFit;
00093 
00094   bool theDoPredictionsOnly;
00095   RefitDirection theRefitDirection;
00096 
00097   edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
00098   edm::ESHandle<MagneticField> theMGField;
00099   
00100   std::string theFitterName;
00101   edm::ESHandle<TrajectoryFitter> theFitter;
00102   
00103   std::string theSmootherName;
00104   edm::ESHandle<TrajectorySmoother> theSmoother;
00105  
00106   RefitDirection::GeometricalDirection
00107     checkRecHitsOrdering(TransientTrackingRecHit::ConstRecHitContainer&) const;
00108 
00109   //  void reorder(TransientTrackingRecHit::ConstRecHitContainer& recHits) const;
00110 
00111   std::string theTrackerRecHitBuilderName;
00112   edm::ESHandle<TransientTrackingRecHitBuilder> theTrackerRecHitBuilder;
00113   
00114   std::string theMuonRecHitBuilderName;
00115   edm::ESHandle<TransientTrackingRecHitBuilder> theMuonRecHitBuilder;
00116 };
00117 #endif
00118