CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoVertex/GhostTrackFitter/interface/GhostTrackState.h

Go to the documentation of this file.
00001 #ifndef RecoBTag_GhostTrackState_h
00002 #define RecoBTag_GhostTrackState_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/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00011 
00012 #include "RecoVertex/GhostTrackFitter/interface/BasicGhostTrackState.h"
00013 
00014 class VertexState;
00015 
00016 namespace reco {
00017 
00018 class TransientTrack;
00019 class GhostTrackPrediction;
00020 
00021 class GhostTrackState : public BasicGhostTrackState::Proxy {
00022         typedef BasicGhostTrackState::Proxy Base;
00023 
00024     public:
00025         typedef BasicGhostTrackState::CovarianceMatrix CovarianceMatrix;
00026         typedef BasicGhostTrackState::Vertex Vertex;
00027 
00028         GhostTrackState(const TransientTrack &track);
00029         GhostTrackState(const GlobalPoint &pos, const CovarianceMatrix &cov);
00030         GhostTrackState(const GlobalPoint &pos, const GlobalError &error);
00031         GhostTrackState(const VertexState &state);
00032 
00033         const TransientTrack &track() const;
00034         const TrajectoryStateOnSurface &tsos() const;
00035 
00036         GlobalPoint globalPosition() const { return data().globalPosition(); }
00037         GlobalError cartesianError() const { return data().cartesianError(); }
00038         CovarianceMatrix cartesianCovariance() const { return data().cartesianCovariance(); }
00039 
00040         double lambda() const { return data().lambda(); }
00041         double lambdaError(const GhostTrackPrediction &pred,
00042                            const GlobalError &pvError = GlobalError()) const;
00043         bool isValid() const { return Base::isValid() && data().isValid(); }
00044         bool isTrack() const;
00045         bool isVertex() const;
00046 
00047         void reset() { unsharedData().reset(); }
00048         bool linearize(const GhostTrackPrediction &pred,
00049                        bool initial = false, double lambda = 0.)
00050         { return unsharedData().linearize(pred, initial, lambda); }
00051         bool linearize(const GhostTrackPrediction &pred, double lambda)
00052         { return unsharedData().linearize(pred, lambda); }
00053 
00054         double flightDistance(const GlobalPoint &point,
00055                               const GlobalVector &dir) const;
00056         double axisDistance(const GlobalPoint &point,
00057                             const GlobalVector &dir) const;
00058         double axisDistance(const GhostTrackPrediction &pred) const;
00059 
00060         Vertex vertexStateOnGhostTrack(
00061                                 const GhostTrackPrediction &pred,
00062                                 bool withMeasurementError = true) const
00063         { return data().vertexStateOnGhostTrack(pred, withMeasurementError); }
00064         Vertex vertexStateOnMeasurement(const GhostTrackPrediction &pred,
00065                                         bool withGhostTrackError = true) const
00066         { return data().vertexStateOnMeasurement(pred, withGhostTrackError); }
00067 
00068         double weight() const { return data().weight(); }
00069         void setWeight(double weight) { unsharedData().setWeight(weight); }
00070 };
00071 
00072 }
00073 
00074 #endif // RecoBTag_GhostTrackState_h