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){ return std::make_shared<T>(std::forward<Args>(args)...);}
33 
34 
35  virtual GlobalPoint globalPosition() const = 0;
36  virtual GlobalError cartesianError() const = 0;
37  virtual CovarianceMatrix cartesianCovariance() const = 0;
38 
39  double lambda() const { return lambda_; }
40  virtual bool isValid() const { return true; }
41 
42  virtual void reset() {}
43  virtual bool linearize(const GhostTrackPrediction &pred,
44  bool initial, double lambda)
45  { lambda_ = lambda; return true; }
46  virtual bool linearize(const GhostTrackPrediction &pred,
47  double lambda)
48  { lambda_ = lambda; return true; }
49 
50  virtual Vertex vertexStateOnGhostTrack(
51  const GhostTrackPrediction &pred,
52  bool withMeasurementError) const = 0;
53  virtual Vertex vertexStateOnMeasurement(
54  const GhostTrackPrediction &pred,
55  bool withGhostTrackError) const = 0;
56 
57  double weight() const { return weight_; }
58  void setWeight(double weight) { weight_ = weight; }
59 
60  virtual pointer clone() const = 0;
61 
62 protected:
63  double lambda_=0;
64  double weight_=1.;
65 };
66 
67 }
68 
69 #endif // RecoBTag_BasicGhostTrackState_h
static std::shared_ptr< BGTS > build(Args &&...args)
std::pair< GlobalPoint, GlobalError > Vertex
virtual bool isValid() const
virtual pointer clone() const =0
Definition: weight.py:1
ErrorD< N >::type type
Definition: Error.h:33
std::shared_ptr< T > pointer
Definition: ProxyBase11.h:27
virtual bool linearize(const GhostTrackPrediction &pred, double lambda)
virtual Vertex vertexStateOnMeasurement(const GhostTrackPrediction &pred, bool withGhostTrackError) const =0
virtual bool linearize(const GhostTrackPrediction &pred, bool initial, double lambda)
virtual GlobalError cartesianError() const =0
virtual GlobalPoint globalPosition() const =0
math::Error< 3 >::type CovarianceMatrix
virtual Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError) const =0
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:17
fixed size matrix
virtual CovarianceMatrix cartesianCovariance() const =0
long double T