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  virtual BasicSingleVertexState* clone() const
52  {
53  return new BasicSingleVertexState(*this);
54  }
55 
56  GlobalPoint position() const;
57  GlobalError error() const;
58  GlobalError error4D() const;
59  double time() const;
60  double timeError() const;
61  GlobalWeight weight() const;
62  GlobalWeight weight4D() const;
65  double weightInMixture() const;
66 
70  bool isValid() const {return valid;}
71  bool is4D() const { 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
AlgebraicVector4 weightTimesPosition4D() const
GlobalWeight weight4D() const
GlobalWeight weight() const
virtual BasicSingleVertexState * clone() const
GlobalPoint position() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
AlgebraicVector3 weightTimesPosition() const
ROOT::Math::SVector< double, 4 > AlgebraicVector4
AlgebraicVector4 theWeightTimesPos