CMS 3D CMS Logo

BasicSingleVertexState.h
Go to the documentation of this file.
1 #ifndef BasicSingleVertexState_H
2 #define BasicSingleVertexState_H
3 
5 
6 //#include "CommonReco/CommonVertex/interface/RefCountedVertexSeed.h"
7 
8 
14 
15 public:
16 
20  BasicSingleVertexState(const GlobalPoint & pos, const GlobalError & posErr,
21  const double & weightInMix = 1.0);
22  BasicSingleVertexState(const GlobalPoint & pos, const GlobalWeight & posWeight,
23  const double & weightInMix = 1.0);
25  const GlobalWeight & posWeight,
26  const double & weightInMix = 1.0);
27 
28  // constructors with time (ignores off-diagonals in fit)
29  BasicSingleVertexState(const GlobalPoint & pos, const GlobalError & posErr,
30  const double time, const double timeError,
31  const double & weightInMix = 1.0);
32  BasicSingleVertexState(const GlobalPoint & pos, const GlobalWeight & posWeight,
33  const double time, const double timeWeight,
34  const double & weightInMix = 1.0);
35  BasicSingleVertexState(const AlgebraicVector3 & weightTimesPosition,
36  const GlobalWeight & posWeight,
37  const double weightTimesTime, const double timeWeight,
38  const double & weightInMix = 1.0);
39 
40  // constructors with time, full cov
41  BasicSingleVertexState(const GlobalPoint & pos, const double time,
42  const GlobalError & posTimeErr, const double & weightInMix = 1.0);
43  BasicSingleVertexState(const GlobalPoint & pos, const double time,
44  const GlobalWeight & posTimeWeight, const double & weightInMix = 1.0);
45  BasicSingleVertexState(const AlgebraicVector4 & weightTimesPosition,
46  const GlobalWeight & posTimeWeight,
47  const double & weightInMix = 1.0);
48 
51  BasicSingleVertexState* clone() const override
52  {
53  return new BasicSingleVertexState(*this);
54  }
55 
56  GlobalPoint position() const override;
57  GlobalError error() const override;
58  GlobalError error4D() const override;
59  double time() const override;
60  double timeError() const override;
61  GlobalWeight weight() const override;
62  GlobalWeight weight4D() const override;
63  AlgebraicVector3 weightTimesPosition() const override;
64  AlgebraicVector4 weightTimesPosition4D() const override;
65  double weightInMixture() const override;
66 
70  bool isValid() const override {return valid;}
71  bool is4D() const override { return vertexIs4D; }
72 
73 private:
74 
75  void computePosition() const;
76  void computeError() const;
77  void computeWeight() const;
78  void computeWeightTimesPos() const;
79 
81  mutable double theTime;
82 
85 
88 
89  mutable bool thePosAvailable;
90  mutable bool theTimeAvailable;
91  mutable bool theErrAvailable;
92  mutable bool theWeightAvailable;
94 
95  bool valid;
96  bool vertexIs4D;
97 };
98 
99 #endif
GlobalError error4D() const override
AlgebraicVector4 weightTimesPosition4D() const override
GlobalError error() const override
double timeError() const override
GlobalWeight weight4D() const override
BasicSingleVertexState * clone() const override
ROOT::Math::SVector< double, 3 > AlgebraicVector3
bool isValid() const override
GlobalWeight weight() const override
double time() const override
double weightInMixture() const override
GlobalPoint position() const override
bool is4D() const override
AlgebraicVector3 weightTimesPosition() const override
ROOT::Math::SVector< double, 4 > AlgebraicVector4
AlgebraicVector4 theWeightTimesPos