EICd
EIC data model
VertexConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstVertex_H
4 #define EICD_ConstVertex_H
5 
6 #include "eicd/VertexObj.h"
7 
8 #include "eicd/Index.h"
9 #include "eicd/VectorXYZ.h"
10 #include "podio/ObjectID.h"
11 
12 
13 
14 namespace eic {
15 
16 
17 /** @class ConstVertex
18  * EIC vertex
19  * @author: W. Armstrong, S. Joosten
20  */
21 class ConstVertex {
22 
23  friend class Vertex;
24  friend class VertexCollection;
26 
27 public:
28  /// default constructor
29  ConstVertex();
31 
32  /// constructor from existing VertexObj
33  ConstVertex(VertexObj* obj);
34 
35  /// copy constructor
36  ConstVertex(const ConstVertex& other);
37 
38  /// copy-assignment operator
39  ConstVertex& operator=(const ConstVertex& other);
40 
41  /// support cloning (deep-copy)
42  ConstVertex clone() const;
43 
44  /// destructor
45  ~ConstVertex();
46 
47 
48 public:
49 
50  /// Access the unique vertex ID
51  const eic::Index& ID() const;
52 
53  /// Access the postion of vertex [mm]
54  const eic::VectorXYZ& position() const;
55 
56  /// Access the time of vertex [ns]
57  const float& time() const;
58 
59  /// Access the Chi squared of the vertex fit.
60  const float& chi2() const;
61 
62  /// Access the Probability of the vertex fit
63  const float& probability() const;
64 
65  /// Access the Whether it is the primary vertex of the event
66  const bool& primary() const;
67 
68 
69 
70 
71 
72  /// check whether the object is actually available
73  bool isAvailable() const;
74  /// disconnect from VertexObj instance
75  void unlink() { m_obj = nullptr; }
76 
77  bool operator==(const ConstVertex& other) const { return m_obj == other.m_obj; }
78  bool operator==(const Vertex& other) const;
79 
80  // less comparison operator, so that objects can be e.g. stored in sets.
81  bool operator<(const ConstVertex& other) const { return m_obj < other.m_obj; }
82 
83  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
84 
85  const podio::ObjectID getObjectID() const;
86 
87 private:
88  VertexObj* m_obj;
89 };
90 
91 } // namespace eic
92 
93 
94 #endif
eic::ConstVertex::operator==
bool operator==(const ConstVertex &other) const
Definition: VertexConst.h:77
eic::Index
Definition: Index.h:11
VertexObj.h
eic::ConstVertex::operator<
bool operator<(const ConstVertex &other) const
Definition: VertexConst.h:81
eic::ConstVertex::ConstVertex
ConstVertex()
default constructor
Definition: VertexConst.cc:16
eic::VertexConstCollectionIterator
Definition: VertexCollection.h:51
eic
Definition: BasicParticle.cc:13
eic::ConstVertex::operator=
ConstVertex & operator=(const ConstVertex &other)
copy-assignment operator
Definition: VertexConst.cc:34
eic::ConstVertex::time
const float & time() const
Access the time of vertex [ns].
Definition: VertexConst.cc:53
eic::ConstVertex
Definition: VertexConst.h:21
eic::ConstVertex::clone
ConstVertex clone() const
support cloning (deep-copy)
Definition: VertexConst.cc:44
eic::ConstVertex::position
const eic::VectorXYZ & position() const
Access the postion of vertex [mm].
Definition: VertexConst.cc:52
VectorXYZ.h
eic::ConstVertex::primary
const bool & primary() const
Access the Whether it is the primary vertex of the event.
Definition: VertexConst.cc:56
eic::ConstVertex::chi2
const float & chi2() const
Access the Chi squared of the vertex fit.
Definition: VertexConst.cc:54
eic::ConstVertex::~ConstVertex
~ConstVertex()
destructor
Definition: VertexConst.cc:48
eic::ConstVertex::unlink
void unlink()
disconnect from VertexObj instance
Definition: VertexConst.h:75
eic::ConstVertex::ID
const eic::Index & ID() const
Access the unique vertex ID.
Definition: VertexConst.cc:51
eic::ConstVertex::getObjectID
const podio::ObjectID getObjectID() const
Definition: VertexConst.cc:70
eic::VertexCollection
Definition: VertexCollection.h:76
eic::Vertex
Definition: Vertex.h:23
eic::ConstVertex::probability
const float & probability() const
Access the Probability of the vertex fit.
Definition: VertexConst.cc:55
eic::ConstVertex::id
unsigned int id() const
Definition: VertexConst.h:83
Index.h
eic::ConstVertex::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: VertexConst.cc:63
eic::VectorXYZ
Definition: VectorXYZ.h:13
eic::VertexObj
Definition: VertexObj.h:18