EICd
EIC data model
ClusterLayerConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstClusterLayer_H
4 #define EICD_ConstClusterLayer_H
5 
6 #include "eicd/ClusterLayerObj.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 ConstClusterLayer
18  * 2D Cluster in a single layer for a multi-layer detector
19  * @author: S. Joosten, C. Peng
20  */
22 
23  friend class ClusterLayer;
24  friend class ClusterLayerCollection;
26 
27 public:
28  /// default constructor
30  ConstClusterLayer(eic::Index ID, eic::Index clusterID, std::int32_t layer, std::uint32_t nhits, float energy, float energyError, float radius, float skewness, eic::VectorXYZ position);
31 
32  /// constructor from existing ClusterLayerObj
34 
35  /// copy constructor
37 
38  /// copy-assignment operator
40 
41  /// support cloning (deep-copy)
42  ConstClusterLayer clone() const;
43 
44  /// destructor
46 
47 
48 public:
49 
50  /// Access the unique layer ID
51  const eic::Index& ID() const;
52 
53  /// Access the associated full 3D cluster, -1 if none
54  const eic::Index& clusterID() const;
55 
56  /// Access the layer number for this cluster layer
57  const std::int32_t& layer() const;
58 
59  /// Access the Number of hits
60  const std::uint32_t& nhits() const;
61 
62  /// Access the Energy in this cluster layer [GeV]
63  const float& energy() const;
64 
65  /// Access the Error on energy [GeV]
66  const float& energyError() const;
67 
68  /// Access the Shower radius [mm]
69  const float& radius() const;
70 
71  /// Access the Skewness of hits distribution
72  const float& skewness() const;
73 
74  /// Access the Global center position. [mm]
75  const eic::VectorXYZ& position() const;
76 
77 
78 
79 
80 
81  /// check whether the object is actually available
82  bool isAvailable() const;
83  /// disconnect from ClusterLayerObj instance
84  void unlink() { m_obj = nullptr; }
85 
86  bool operator==(const ConstClusterLayer& other) const { return m_obj == other.m_obj; }
87  bool operator==(const ClusterLayer& other) const;
88 
89  // less comparison operator, so that objects can be e.g. stored in sets.
90  bool operator<(const ConstClusterLayer& other) const { return m_obj < other.m_obj; }
91 
92  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
93 
94  const podio::ObjectID getObjectID() const;
95 
96 private:
97  ClusterLayerObj* m_obj;
98 };
99 
100 } // namespace eic
101 
102 
103 #endif
ClusterLayerObj.h
eic::Index
Definition: Index.h:11
eic::ConstClusterLayer::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: ClusterLayerConst.cc:69
eic::ConstClusterLayer::energy
const float & energy() const
Access the Energy in this cluster layer [GeV].
Definition: ClusterLayerConst.cc:58
eic::ConstClusterLayer::position
const eic::VectorXYZ & position() const
Access the Global center position. [mm].
Definition: ClusterLayerConst.cc:62
eic::ConstClusterLayer::ID
const eic::Index & ID() const
Access the unique layer ID.
Definition: ClusterLayerConst.cc:54
eic::ConstClusterLayer::id
unsigned int id() const
Definition: ClusterLayerConst.h:92
eic::ClusterLayerObj
Definition: ClusterLayerObj.h:18
eic::ConstClusterLayer::operator=
ConstClusterLayer & operator=(const ConstClusterLayer &other)
copy-assignment operator
Definition: ClusterLayerConst.cc:37
eic::ConstClusterLayer::nhits
const std::uint32_t & nhits() const
Access the Number of hits.
Definition: ClusterLayerConst.cc:57
eic::ConstClusterLayer::getObjectID
const podio::ObjectID getObjectID() const
Definition: ClusterLayerConst.cc:76
eic
Definition: BasicParticle.cc:13
eic::ClusterLayerCollection
Definition: ClusterLayerCollection.h:76
eic::ConstClusterLayer::operator<
bool operator<(const ConstClusterLayer &other) const
Definition: ClusterLayerConst.h:90
eic::ConstClusterLayer::ConstClusterLayer
ConstClusterLayer()
default constructor
Definition: ClusterLayerConst.cc:16
eic::ConstClusterLayer::clone
ConstClusterLayer clone() const
support cloning (deep-copy)
Definition: ClusterLayerConst.cc:47
eic::ConstClusterLayer::clusterID
const eic::Index & clusterID() const
Access the associated full 3D cluster, -1 if none.
Definition: ClusterLayerConst.cc:55
VectorXYZ.h
eic::ConstClusterLayer::layer
const std::int32_t & layer() const
Access the layer number for this cluster layer.
Definition: ClusterLayerConst.cc:56
eic::ConstClusterLayer::operator==
bool operator==(const ConstClusterLayer &other) const
Definition: ClusterLayerConst.h:86
eic::ConstClusterLayer::unlink
void unlink()
disconnect from ClusterLayerObj instance
Definition: ClusterLayerConst.h:84
eic::ConstClusterLayer::skewness
const float & skewness() const
Access the Skewness of hits distribution.
Definition: ClusterLayerConst.cc:61
eic::ConstClusterLayer::~ConstClusterLayer
~ConstClusterLayer()
destructor
Definition: ClusterLayerConst.cc:51
eic::ClusterLayerConstCollectionIterator
Definition: ClusterLayerCollection.h:51
eic::ClusterLayer
Definition: ClusterLayer.h:23
Index.h
eic::ConstClusterLayer::energyError
const float & energyError() const
Access the Error on energy [GeV].
Definition: ClusterLayerConst.cc:59
eic::ConstClusterLayer
Definition: ClusterLayerConst.h:21
eic::VectorXYZ
Definition: VectorXYZ.h:13
eic::ConstClusterLayer::radius
const float & radius() const
Access the Shower radius [mm].
Definition: ClusterLayerConst.cc:60