Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-12 03:09:42

0001 #ifndef RecoBTag_BasicGhostTrackState_h
0002 #define RecoBTag_BasicGhostTrackState_h
0003 
0004 #include <utility>
0005 
0006 #include "TrackingTools/TrajectoryState/interface/ProxyBase11.h"
0007 
0008 #include "DataFormats/Math/interface/Error.h"
0009 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0010 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0011 #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
0012 
0013 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
0014 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0015 
0016 namespace reco {
0017 
0018   class GhostTrackPrediction;
0019 
0020   class BasicGhostTrackState {
0021   public:
0022     using BGTS = BasicGhostTrackState;
0023     using Proxy = ProxyBase11<BGTS>;
0024     using pointer = Proxy::pointer;
0025 
0026     typedef math::Error<3>::type CovarianceMatrix;
0027     typedef std::pair<GlobalPoint, GlobalError> Vertex;
0028 
0029     virtual ~BasicGhostTrackState() {}
0030 
0031     template <typename T, typename... Args>
0032     static std::shared_ptr<BGTS> build(Args &&...args) {
0033       return std::make_shared<T>(std::forward<Args>(args)...);
0034     }
0035 
0036     virtual GlobalPoint globalPosition() const = 0;
0037     virtual GlobalError cartesianError() const = 0;
0038     virtual CovarianceMatrix cartesianCovariance() const = 0;
0039 
0040     double lambda() const { return lambda_; }
0041     virtual bool isValid() const { return true; }
0042 
0043     virtual void reset() {}
0044     virtual bool linearize(const GhostTrackPrediction &pred, bool initial, double lambda) {
0045       lambda_ = lambda;
0046       return true;
0047     }
0048     virtual bool linearize(const GhostTrackPrediction &pred, double lambda) {
0049       lambda_ = lambda;
0050       return true;
0051     }
0052 
0053     virtual Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError) const = 0;
0054     virtual Vertex vertexStateOnMeasurement(const GhostTrackPrediction &pred, bool withGhostTrackError) const = 0;
0055 
0056     double weight() const { return weight_; }
0057     void setWeight(double weight) { weight_ = weight; }
0058 
0059     virtual pointer clone() const = 0;
0060 
0061   protected:
0062     double lambda_ = 0;
0063     double weight_ = 1.;
0064   };
0065 
0066 }  // namespace reco
0067 
0068 #endif  // RecoBTag_BasicGhostTrackState_h