CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoVertex/GhostTrackFitter/interface/BasicGhostTrackState.h

Go to the documentation of this file.
00001 #ifndef RecoBTag_BasicGhostTrackState_h
00002 #define RecoBTag_BasicGhostTrackState_h
00003 
00004 #include <utility>
00005 
00006 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
00007 #include "TrackingTools/TrajectoryState/interface/ProxyBase.h"
00008 #include "TrackingTools/TrajectoryState/interface/CopyUsingClone.h"
00009 
00010 #include "DataFormats/Math/interface/Error.h"
00011 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00012 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00013 #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
00014 
00015 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00016 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00017 
00018 namespace reco {
00019 
00020 class GhostTrackPrediction;
00021 
00022 class BasicGhostTrackState : public ReferenceCountedInEvent {
00023     public:
00024         typedef BasicGhostTrackState                    BGTS;
00025         typedef ProxyBase<BGTS, CopyUsingClone<BGTS> >  Proxy;
00026 
00027     private:
00028         friend class ProxyBase<BGTS, CopyUsingClone<BGTS> >;
00029         friend class ReferenceCountingPointer<BGTS>;
00030         friend class CopyUsingClone<BGTS>;
00031 
00032     public:
00033         typedef math::Error<3>::type CovarianceMatrix;
00034         typedef std::pair<GlobalPoint, GlobalError> Vertex;
00035 
00036         BasicGhostTrackState() : lambda_(0.), weight_(1.) {}
00037         virtual ~BasicGhostTrackState() {}
00038 
00039         virtual GlobalPoint globalPosition() const = 0;
00040         virtual GlobalError cartesianError() const = 0;
00041         virtual CovarianceMatrix cartesianCovariance() const = 0;
00042 
00043         double lambda() const { return lambda_; }
00044         virtual bool isValid() const { return true; }
00045 
00046         virtual void reset() {}
00047         virtual bool linearize(const GhostTrackPrediction &pred,
00048                                bool initial, double lambda)
00049         { lambda_ = lambda; return true; }
00050         virtual bool linearize(const GhostTrackPrediction &pred,
00051                                double lambda)
00052         { lambda_ = lambda; return true; }
00053 
00054         virtual Vertex vertexStateOnGhostTrack(
00055                                 const GhostTrackPrediction &pred,
00056                                 bool withMeasurementError) const = 0;
00057         virtual Vertex vertexStateOnMeasurement(
00058                                 const GhostTrackPrediction &pred,
00059                                 bool withGhostTrackError) const = 0;
00060 
00061         double weight() const { return weight_; }
00062         void setWeight(double weight) { weight_ = weight; }
00063 
00064     protected:
00065         virtual BasicGhostTrackState *clone() const = 0;
00066 
00067         double  lambda_;
00068         double  weight_;
00069 };
00070 
00071 }
00072 
00073 #endif // RecoBTag_BasicGhostTrackState_h