CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VertexState.h
Go to the documentation of this file.
1 #ifndef VertexState_H
2 #define VertexState_H
3 
7 #include <vector>
8 
14 
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 
29  Base(p) {}
30 
31  explicit VertexState(const reco::BeamSpot& beamSpot) :
32  Base ( new BSVS ( GlobalPoint(Basic3DVector<float> (beamSpot.position())),
33  GlobalError(beamSpot.rotatedCovariance3D()), 1.0)) {}
34 
35 
36  VertexState(const GlobalPoint & pos,
37  const GlobalError & posErr, const double & weightInMix= 1.0) :
38  Base ( new BSVS (pos, posErr, weightInMix)) {}
39 
40  VertexState(const GlobalPoint & pos,
41  const GlobalWeight & posWeight, const double & weightInMix= 1.0) :
42  Base ( new BSVS (pos, posWeight, weightInMix)) {}
43 
45  const GlobalWeight & posWeight, const double & weightInMix= 1.0) :
46  Base ( new BSVS (weightTimesPosition, posWeight, weightInMix)) {}
47 
48 
49 
51  {
52  return data().position();
53  }
54 
56  {
57  return data().error();
58  }
59 
61  {
62  return data().weight();
63  }
64 
66  {
67  return data().weightTimesPosition();
68  }
69 
70  double weightInMixture() const
71  {
72  return data().weightInMixture();
73  }
74 
77 // RefCountedVertexSeed seedWithoutTracks() const
78 // {
79 // return data().seedWithoutTracks();
80 // }
81 
82  std::vector<VertexState> components() const
83  {
84  return data().components();
85  }
86 
88  bool isValid() const {return Base::isValid() && data().isValid();}
89 
90 };
91 
92 #endif
93 
#define GCC11_FINAL
VertexState(BasicVertexState *p)
Definition: VertexState.h:28
VertexState(const reco::BeamSpot &beamSpot)
Definition: VertexState.h:31
GlobalPoint position() const
Definition: VertexState.h:50
double weightInMixture() const
Definition: VertexState.h:70
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:65
ROOT::Math::SVector< double, 3 > AlgebraicVector3
std::vector< VertexState > components() const
Definition: VertexState.h:82
VertexState(const GlobalPoint &pos, const GlobalWeight &posWeight, const double &weightInMix=1.0)
Definition: VertexState.h:40
ProxyBase< BasicVertexState, CopyUsingClone< BasicVertexState > > Proxy
GlobalWeight weight() const
Definition: VertexState.h:60
const T & data() const
Definition: ProxyBase.h:67
bool isValid() const
Make the ReferenceCountingProxy method to check validity public.
Definition: VertexState.h:88
bool isValid() const
Definition: ProxyBase.h:81
GlobalError error() const
Definition: VertexState.h:55
VertexState(const GlobalPoint &pos, const GlobalError &posErr, const double &weightInMix=1.0)
Definition: VertexState.h:36
VertexState & operator=(const VertexState &)=default
VertexState(const AlgebraicVector3 &weightTimesPosition, const GlobalWeight &posWeight, const double &weightInMix=1.0)
Definition: VertexState.h:44