CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/RecoVertex/GhostTrackFitter/interface/TrackGhostTrackState.h

Go to the documentation of this file.
00001 #ifndef RecoBTag_TrackGhostTrackState_h
00002 #define RecoBTag_TrackGhostTrackState_h
00003 
00004 #include <utility>
00005 
00006 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00007 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00008 #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
00009 
00010 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00011 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00012 
00013 #include "RecoVertex/GhostTrackFitter/interface/BasicGhostTrackState.h"
00014 
00015 namespace reco {
00016 
00017 class GhostTrackPrediction;
00018 
00019 class TrackGhostTrackState : public BasicGhostTrackState {
00020     public:
00021         TrackGhostTrackState(const TransientTrack &track) : track_(track) {}
00022 
00023         const TransientTrack &track() const { return track_; }
00024         const TrajectoryStateOnSurface &tsos() const { return tsos_; }
00025 
00026         bool isValid() const { return tsos_.isValid(); }
00027 
00028         GlobalPoint globalPosition() const
00029         { return tsos_.globalPosition(); }
00030         GlobalError cartesianError() const
00031         { return tsos_.cartesianError().position(); }
00032         CovarianceMatrix cartesianCovariance() const
00033         { return tsos_.cartesianError().matrix().Sub<CovarianceMatrix>(0, 0); }
00034 
00035         void reset() { tsos_ = TrajectoryStateOnSurface(); }
00036         bool linearize(const GhostTrackPrediction &pred,
00037                        bool initial, double lambda);
00038         bool linearize(const GhostTrackPrediction &pred, double lambda);
00039 
00040         Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred,
00041                                        bool withMeasurementError) const;
00042         Vertex vertexStateOnMeasurement(const GhostTrackPrediction &pred,
00043                                         bool withGhostTrackError) const;
00044 
00045     private:
00046         BasicGhostTrackState *clone() const
00047         { return new TrackGhostTrackState(*this); }
00048 
00049         TrajectoryStateOnSurface        tsos_;
00050         TransientTrack                  track_;
00051 };
00052 
00053 }
00054 
00055 #endif // RecoBTag_TrackGhostTrackState_h