CMS 3D CMS Logo

BasicGhostTrackState.h
Go to the documentation of this file.
1 #ifndef RecoBTag_BasicGhostTrackState_h
2 #define RecoBTag_BasicGhostTrackState_h
3 
4 #include <utility>
5 
7 
12 
15 
16 namespace reco {
17 
18  class GhostTrackPrediction;
19 
21  public:
25 
27  typedef std::pair<GlobalPoint, GlobalError> Vertex;
28 
29  virtual ~BasicGhostTrackState() {}
30 
31  template <typename T, typename... Args>
32  static std::shared_ptr<BGTS> build(Args &&...args) {
33  return std::make_shared<T>(std::forward<Args>(args)...);
34  }
35 
36  virtual GlobalPoint globalPosition() const = 0;
37  virtual GlobalError cartesianError() const = 0;
38  virtual CovarianceMatrix cartesianCovariance() const = 0;
39 
40  double lambda() const { return lambda_; }
41  virtual bool isValid() const { return true; }
42 
43  virtual void reset() {}
44  virtual bool linearize(const GhostTrackPrediction &pred, bool initial, double lambda) {
45  lambda_ = lambda;
46  return true;
47  }
48  virtual bool linearize(const GhostTrackPrediction &pred, double lambda) {
49  lambda_ = lambda;
50  return true;
51  }
52 
53  virtual Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError) const = 0;
54  virtual Vertex vertexStateOnMeasurement(const GhostTrackPrediction &pred, bool withGhostTrackError) const = 0;
55 
56  double weight() const { return weight_; }
57  void setWeight(double weight) { weight_ = weight; }
58 
59  virtual pointer clone() const = 0;
60 
61  protected:
62  double lambda_ = 0;
63  double weight_ = 1.;
64  };
65 
66 } // namespace reco
67 
68 #endif // RecoBTag_BasicGhostTrackState_h
static std::shared_ptr< BGTS > build(Args &&...args)
std::pair< GlobalPoint, GlobalError > Vertex
virtual bool isValid() const
virtual CovarianceMatrix cartesianCovariance() const =0
Definition: weight.py:1
ErrorD< N >::type type
Definition: Error.h:32
std::shared_ptr< T > pointer
Definition: ProxyBase11.h:25
virtual bool linearize(const GhostTrackPrediction &pred, double lambda)
virtual Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError) const =0
virtual bool linearize(const GhostTrackPrediction &pred, bool initial, double lambda)
virtual GlobalPoint globalPosition() const =0
virtual GlobalError cartesianError() const =0
math::Error< 3 >::type CovarianceMatrix
virtual pointer clone() const =0
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
fixed size matrix
virtual Vertex vertexStateOnMeasurement(const GhostTrackPrediction &pred, bool withGhostTrackError) const =0
long double T