CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
VertexState.h
Go to the documentation of this file.
1 #ifndef RecoVertex_VertexPrimitives_VertexState_H
2 #define RecoVertex_VertexPrimitives_VertexState_H
3 
7 #include <vector>
8 
13 class VertexState final : private BasicVertexState::Proxy {
16 
17 public:
19  VertexState(VertexState const&) = default;
20  VertexState(VertexState&&) = default;
21  VertexState& operator=(const VertexState&) = default;
22  VertexState& operator=(VertexState&&) = default;
23 
24  // template<typename... Args>
25  // VertexState(Args && ...args) :
26  // Base ( new BSVS ( std::forward<Args>(args)...)){}
27 
28  explicit VertexState(BasicVertexState* p) : Base(p) {}
29 
31  : Base(new BSVS(
32  GlobalPoint(Basic3DVector<float>(beamSpot.position())), GlobalError(beamSpot.rotatedCovariance3D()), 1.0)) {
33  }
34 
35  VertexState(const GlobalPoint& pos, const GlobalError& posErr, const double& weightInMix = 1.0)
36  : Base(new BSVS(pos, posErr, weightInMix)) {}
37 
38  VertexState(const GlobalPoint& pos, const GlobalWeight& posWeight, const double& weightInMix = 1.0)
39  : Base(new BSVS(pos, posWeight, weightInMix)) {}
40 
42  const GlobalWeight& posWeight,
43  const double& weightInMix = 1.0)
44  : Base(new BSVS(weightTimesPosition, posWeight, weightInMix)) {}
45 
46  // with time
47  VertexState(const GlobalPoint& pos, const double time, const GlobalError& posTimeErr, const double& weightInMix = 1.0)
48  : Base(new BSVS(pos, time, posTimeErr, weightInMix)) {}
49 
51  const double time,
52  const GlobalWeight& posTimeWeight,
53  const double& weightInMix = 1.0)
54  : Base(new BSVS(pos, time, posTimeWeight, weightInMix)) {}
55 
57  const GlobalWeight& posTimeWeight,
58  const double& weightInMix = 1.0)
59  : Base(new BSVS(weightTimesPosition, posTimeWeight, weightInMix)) {}
60 
61  //3D covariance matrices (backwards compatible)
62  GlobalPoint position() const { return data().position(); }
63 
64  GlobalError error() const { return data().error(); }
65 
66  // with time, full cov
67  GlobalError error4D() const { return data().error4D(); }
68 
69  GlobalWeight weight() const { return data().weight(); }
70 
71  GlobalWeight weight4D() const { return data().weight4D(); }
72 
73  double time() const { return data().time(); }
74 
75  double timeError() const { return data().timeError(); }
76 
77  AlgebraicVector3 weightTimesPosition() const { return data().weightTimesPosition(); }
78 
79  AlgebraicVector4 weightTimesPosition4D() const { return data().weightTimesPosition4D(); }
80 
81  double weightInMixture() const { return data().weightInMixture(); }
82 
85  // RefCountedVertexSeed seedWithoutTracks() const
86  // {
87  // return data().seedWithoutTracks();
88  // }
89 
90  std::vector<VertexState> components() const { return data().components(); }
91 
93  bool isValid() const { return Base::isValid() && data().isValid(); }
94 
95  bool is4D() const { return data().is4D(); }
96 };
97 
98 #endif
VertexState(BasicVertexState *p)
Definition: VertexState.h:28
VertexState(const GlobalPoint &pos, const double time, const GlobalError &posTimeErr, const double &weightInMix=1.0)
Definition: VertexState.h:47
ProxyBase11< BasicVertexState > Proxy
VertexState(const reco::BeamSpot &beamSpot)
Definition: VertexState.h:30
GlobalPoint position() const
Definition: VertexState.h:62
const T & data() const
Definition: ProxyBase11.h:51
GlobalWeight weight4D() const
Definition: VertexState.h:71
VertexState(const AlgebraicVector4 &weightTimesPosition, const GlobalWeight &posTimeWeight, const double &weightInMix=1.0)
Definition: VertexState.h:56
double weightInMixture() const
Definition: VertexState.h:81
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:77
std::vector< VertexState > components() const
Definition: VertexState.h:90
double time() const
Definition: VertexState.h:73
double timeError() const
Definition: VertexState.h:75
VertexState(const GlobalPoint &pos, const double time, const GlobalWeight &posTimeWeight, const double &weightInMix=1.0)
Definition: VertexState.h:50
VertexState(const GlobalPoint &pos, const GlobalWeight &posWeight, const double &weightInMix=1.0)
Definition: VertexState.h:38
ROOT::Math::SVector< double, 4 > AlgebraicVector4
GlobalWeight weight() const
Definition: VertexState.h:69
GlobalError error4D() const
Definition: VertexState.h:67
bool isValid() const
Make the ReferenceCountingProxy method to check validity public.
Definition: VertexState.h:93
AlgebraicVector4 weightTimesPosition4D() const
Definition: VertexState.h:79
bool is4D() const
Definition: VertexState.h:95
ROOT::Math::SVector< double, 3 > AlgebraicVector3
GlobalError error() const
Definition: VertexState.h:64
VertexState(const GlobalPoint &pos, const GlobalError &posErr, const double &weightInMix=1.0)
Definition: VertexState.h:35
VertexState & operator=(const VertexState &)=default
bool isValid() const
Definition: ProxyBase11.h:69
VertexState(const AlgebraicVector3 &weightTimesPosition, const GlobalWeight &posWeight, const double &weightInMix=1.0)
Definition: VertexState.h:41