EICd
EIC data model
ClusterConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstCluster_H
4 #define EICD_ConstCluster_H
5 
6 #include "eicd/ClusterObj.h"
7 
8 #include "eicd/CovXYZ.h"
9 #include "eicd/Index.h"
10 #include "eicd/VectorXYZ.h"
11 #include "podio/ObjectID.h"
12 
13 
14 
15 namespace eic {
16 
17 
18 /** @class ConstCluster
19  * EIC cluster
20  * @author: W. Armstrong, S. Joosten, C.Peng
21  */
22 class ConstCluster {
23 
24  friend class Cluster;
25  friend class ClusterCollection;
27 
28 public:
29  /// default constructor
30  ConstCluster();
32 
33  /// constructor from existing ClusterObj
35 
36  /// copy constructor
37  ConstCluster(const ConstCluster& other);
38 
39  /// copy-assignment operator
40  ConstCluster& operator=(const ConstCluster& other);
41 
42  /// support cloning (deep-copy)
43  ConstCluster clone() const;
44 
45  /// destructor
46  ~ConstCluster();
47 
48 
49 public:
50 
51  /// Access the unique ID for this cluster
52  const eic::Index& ID() const;
53 
54  /// Access the Reconstructed energy of the cluster [GeV].
55  const float& energy() const;
56 
57  /// Access the Error on the cluster energy [GeV]
58  const float& energyError() const;
59 
60  /// Access the [ns]
61  const float& time() const;
62 
63  /// Access the Number of hits in the cluster.
64  const std::uint32_t& nhits() const;
65 
66  /// Access the Global position of the cluster [mm].
67  const eic::VectorXYZ& position() const;
68 
69  /// Access the Covariance matrix of the position (6 Parameters).
70  const eic::CovXYZ& positionError() const;
71 
72  /// Access the shower radius [mm]
73  const float& radius() const;
74 
75  /// Access the shower skewness [unitless]
76  const float& skewness() const;
77 
78 
79 
80 
81 
82  /// check whether the object is actually available
83  bool isAvailable() const;
84  /// disconnect from ClusterObj instance
85  void unlink() { m_obj = nullptr; }
86 
87  bool operator==(const ConstCluster& other) const { return m_obj == other.m_obj; }
88  bool operator==(const Cluster& other) const;
89 
90  // less comparison operator, so that objects can be e.g. stored in sets.
91  bool operator<(const ConstCluster& other) const { return m_obj < other.m_obj; }
92 
93  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
94 
95  const podio::ObjectID getObjectID() const;
96 
97 private:
98  ClusterObj* m_obj;
99 };
100 
101 } // namespace eic
102 
103 
104 #endif
eic::ConstCluster::positionError
const eic::CovXYZ & positionError() const
Access the Covariance matrix of the position (6 Parameters).
Definition: ClusterConst.cc:60
eic::Index
Definition: Index.h:11
eic::ConstCluster::clone
ConstCluster clone() const
support cloning (deep-copy)
Definition: ClusterConst.cc:47
CovXYZ.h
eic::ClusterCollection
Definition: ClusterCollection.h:76
eic::ClusterConstCollectionIterator
Definition: ClusterCollection.h:51
eic::Cluster
Definition: Cluster.h:24
eic::ClusterObj
Definition: ClusterObj.h:18
eic
Definition: BasicParticle.cc:13
eic::ConstCluster::getObjectID
const podio::ObjectID getObjectID() const
Definition: ClusterConst.cc:76
eic::ConstCluster::id
unsigned int id() const
Definition: ClusterConst.h:93
eic::ConstCluster::skewness
const float & skewness() const
Access the shower skewness [unitless].
Definition: ClusterConst.cc:62
eic::ConstCluster::position
const eic::VectorXYZ & position() const
Access the Global position of the cluster [mm].
Definition: ClusterConst.cc:59
eic::ConstCluster::ConstCluster
ConstCluster()
default constructor
Definition: ClusterConst.cc:16
eic::ConstCluster::operator=
ConstCluster & operator=(const ConstCluster &other)
copy-assignment operator
Definition: ClusterConst.cc:37
VectorXYZ.h
eic::ConstCluster::operator<
bool operator<(const ConstCluster &other) const
Definition: ClusterConst.h:91
eic::ConstCluster::operator==
bool operator==(const ConstCluster &other) const
Definition: ClusterConst.h:87
eic::ConstCluster::energy
const float & energy() const
Access the Reconstructed energy of the cluster [GeV].
Definition: ClusterConst.cc:55
eic::ConstCluster::unlink
void unlink()
disconnect from ClusterObj instance
Definition: ClusterConst.h:85
eic::ConstCluster::~ConstCluster
~ConstCluster()
destructor
Definition: ClusterConst.cc:51
eic::ConstCluster::radius
const float & radius() const
Access the shower radius [mm].
Definition: ClusterConst.cc:61
eic::ConstCluster
Definition: ClusterConst.h:22
eic::ConstCluster::energyError
const float & energyError() const
Access the Error on the cluster energy [GeV].
Definition: ClusterConst.cc:56
eic::ConstCluster::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: ClusterConst.cc:69
eic::CovXYZ
Definition: CovXYZ.h:11
Index.h
eic::ConstCluster::time
const float & time() const
Access the [ns].
Definition: ClusterConst.cc:57
eic::VectorXYZ
Definition: VectorXYZ.h:13
ClusterObj.h
eic::ConstCluster::ID
const eic::Index & ID() const
Access the unique ID for this cluster.
Definition: ClusterConst.cc:54
eic::ConstCluster::nhits
const std::uint32_t & nhits() const
Access the Number of hits in the cluster.
Definition: ClusterConst.cc:58