CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/TrackingTools/TransientTrack/interface/TransientTrack.h

Go to the documentation of this file.
00001 #ifndef TrackReco_TransientTrack_h
00002 #define TrackReco_TransientTrack_h
00003 
00004 
00012 #include "TrackingTools/TransientTrack/interface/BasicTransientTrack.h"
00013 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h" 
00014 
00015 #include "DataFormats/TrackReco/interface/Track.h"
00016 #include "DataFormats/TrackReco/interface/TrackFwd.h" 
00017 #include "DataFormats/Common/interface/RefToBase.h" 
00018 
00019 namespace reco {
00020 
00021   class TransientTrack : private  BasicTransientTrack::Proxy {
00022 
00023     typedef BasicTransientTrack::Proxy             Base;
00024 
00025   public:
00026 
00027     TransientTrack() noexcept {}
00028 
00029     explicit TransientTrack( BasicTransientTrack * btt ) noexcept : Base(btt) {}
00030 
00031     ~TransientTrack() noexcept {}
00032 
00033 
00034 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
00035 
00036     TransientTrack(TransientTrack const & rh) noexcept :
00037       Base(rh){}
00038     
00039     
00040     TransientTrack(TransientTrack && rh) noexcept :
00041       Base(std::move(rh)){}
00042     
00043     TransientTrack & operator=(TransientTrack && rh) noexcept {
00044       Base::operator=(std::move(rh));
00045       return *this;
00046     }
00047     
00048     TransientTrack & operator=(TransientTrack const & rh) noexcept {
00049       Base::operator=(rh);
00050       return *this;
00051     }
00052 
00053 #endif
00054   
00055     void swap(TransientTrack & rh) noexcept {
00056       Base::swap(rh);
00057     }
00058 
00059     TransientTrack( const Track & tk , const MagneticField* field); 
00060     TransientTrack( const TrackRef & tk , const MagneticField* field); 
00061 
00062     TransientTrack( const TrackRef & tk , const MagneticField* field, const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
00063 
00064     TransientTrack( const Track & tk , const MagneticField* field, const edm::ESHandle<GlobalTrackingGeometry>& trackingGeometry);
00065 
00066 
00067 
00068     void setES(const edm::EventSetup& es) {sharedData().setES(es);}
00069 
00070     void setTrackingGeometry(const edm::ESHandle<GlobalTrackingGeometry>& tg)
00071         {sharedData().setTrackingGeometry(tg);}
00072 
00073     void setBeamSpot(const reco::BeamSpot& beamSpot) 
00074         {sharedData().setBeamSpot(beamSpot);}
00075 
00076     FreeTrajectoryState initialFreeState() const {return data().initialFreeState();}
00077 
00078     TrajectoryStateOnSurface outermostMeasurementState() const
00079         {return data().outermostMeasurementState();}
00080 
00081     TrajectoryStateOnSurface innermostMeasurementState() const
00082         {return data().innermostMeasurementState();}
00083 
00084     TrajectoryStateClosestToPoint 
00085       trajectoryStateClosestToPoint( const GlobalPoint & point ) const
00086         {return data().trajectoryStateClosestToPoint(point);}
00087 
00088     TrajectoryStateOnSurface stateOnSurface(const GlobalPoint & point) const
00089         {return data().stateOnSurface(point);}
00090 
00091     TrajectoryStateClosestToPoint impactPointTSCP() const
00092         {return data().impactPointTSCP();}
00093 
00094     TrajectoryStateOnSurface impactPointState() const
00095         {return data().impactPointState();}
00096 
00097     bool impactPointStateAvailable() const
00098         {return data().impactPointStateAvailable();}
00099 
00100     TrackCharge charge() const {return data().charge();}
00101 
00102     bool operator== (const TransientTrack & other) const
00103         {return &(data()) == &(other.data());}
00104     // {return (a.persistentTrackRef()==tkr_);}
00105 
00106     bool operator< (const TransientTrack & other) const 
00107         {return &(data()) < &(other.data());}
00108     // {return (initialFTS.momentum().z()<a.initialFreeState().momentum().z());}
00109 
00110     const MagneticField* field() const {return data().field();}
00111 
00112     const BasicTransientTrack* basicTransientTrack() const {return &(data());}
00113 
00114     const Track & track() const {return data().track();}
00115 
00116     TrackBaseRef trackBaseRef() const {return data().trackBaseRef();}
00117 
00118     TrajectoryStateClosestToBeamLine stateAtBeamLine() const
00119         {return data().stateAtBeamLine();}
00120 
00121 // Methods forwarded to original track.
00122 
00124     trackingRecHit_iterator recHitsBegin() const { return track().recHitsBegin(); }
00126     trackingRecHit_iterator recHitsEnd() const { return track().recHitsEnd(); }
00128     TrackingRecHitRef recHit( size_t i ) const { return track().recHit( i ); }
00130     size_t recHitsSize() const { return track().recHitsSize(); }
00131     //  hit pattern
00132     const HitPattern & hitPattern() const { return track().hitPattern(); }
00134     unsigned short numberOfValidHits() const { return track().hitPattern().numberOfValidHits(); }
00136     unsigned short numberOfLostHits() const { return track().hitPattern().numberOfLostHits(); }
00138     double chi2() const { return track().chi2(); }
00140     double ndof() const { return track().ndof(); }
00142     double normalizedChi2() const { return track().chi2() / track().ndof(); }
00143 
00145     bool isValid() const {return Base::isValid() ;}
00146 
00147   };
00148 
00149 }
00150 
00151 #endif