CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/TrackingTools/TransientTrack/interface/TrackTransientTrack.h

Go to the documentation of this file.
00001 #ifndef TrackReco_TrackTransientTrack_h
00002 #define TrackReco_TrackTransientTrack_h
00003 
00008 #include "TrackingTools/TransientTrack/interface/BasicTransientTrack.h"
00009 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h" 
00010 #include "DataFormats/TrackReco/interface/Track.h"
00011 #include "DataFormats/TrackReco/interface/TrackFwd.h" 
00012 #include "TrackingTools/PatternTools/interface/TSCPBuilderNoMaterial.h"
00013 
00014 namespace reco {
00015 
00016   class TrackTransientTrack : public Track, public BasicTransientTrack {
00017   public:
00018 
00019     // constructor from persistent track
00020     TrackTransientTrack(); 
00021     TrackTransientTrack( const Track & tk , const MagneticField* field); 
00022     TrackTransientTrack( const TrackRef & tk , const MagneticField* field); 
00023 
00024     TrackTransientTrack( const TrackRef & tk , const MagneticField* field, const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
00025 
00026     TrackTransientTrack( const Track & tk , const MagneticField* field, const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
00027 
00028     TrackTransientTrack( const TrackTransientTrack & tt );
00029     
00030     TrackTransientTrack& operator=(const TrackTransientTrack & tt);
00031 
00032     void setES(const edm::EventSetup& );
00033 
00034     void setTrackingGeometry(const edm::ESHandle<GlobalTrackingGeometry>& );
00035 
00036     void setBeamSpot(const reco::BeamSpot& beamSpot);
00037 
00038     FreeTrajectoryState initialFreeState() const {return initialFTS;}
00039 
00040     TrajectoryStateOnSurface outermostMeasurementState() const;
00041 
00042     TrajectoryStateOnSurface innermostMeasurementState() const;
00043 
00044     TrajectoryStateClosestToPoint 
00045       trajectoryStateClosestToPoint( const GlobalPoint & point ) const
00046       {return builder(initialFTS, point);}
00047 
00051     TrajectoryStateOnSurface stateOnSurface(const GlobalPoint & point) const;
00052 
00053     TrajectoryStateClosestToPoint impactPointTSCP() const;
00054 
00055     TrajectoryStateOnSurface impactPointState() const;
00056 
00057     bool impactPointStateAvailable() const {return  initialTSOSAvailable;}
00058 
00062     TrackRef persistentTrackRef() const { return tkr_; }
00063     
00064     TrackBaseRef trackBaseRef() const {return TrackBaseRef(tkr_);}
00065 
00066     TrackCharge charge() const {return Track::charge();}
00067 
00068     const MagneticField* field() const {return theField;}
00069 
00070     const Track & track() const {return *this;}
00071 
00072     TrajectoryStateClosestToBeamLine stateAtBeamLine() const;
00073 
00074   private:
00075 
00076     void calculateTSOSAtVertex() const;
00077 
00078     TrackRef tkr_;
00079     const MagneticField* theField;
00080 
00081     FreeTrajectoryState initialFTS;
00082     mutable bool initialTSOSAvailable, initialTSCPAvailable, blStateAvailable;
00083     mutable TrajectoryStateOnSurface initialTSOS;
00084     mutable TrajectoryStateClosestToPoint initialTSCP;
00085     TSCPBuilderNoMaterial builder;
00086     edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
00087     reco::BeamSpot theBeamSpot;
00088     mutable TrajectoryStateClosestToBeamLine trajectoryStateClosestToBeamLine;
00089 
00090   };
00091 
00092 }
00093 
00094 #endif