EICd
EIC data model
Cluster2DInfoConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstCluster2DInfo_H
4 #define EICD_ConstCluster2DInfo_H
5 
7 
8 #include "eicd/Index.h"
9 #include "eicd/VectorPolar.h"
10 #include "podio/ObjectID.h"
11 
12 
13 
14 namespace eic {
15 
16 
17 /** @class ConstCluster2DInfo
18  * Additional info for 3D clusters
19  * @author: S. Joosten
20  */
22 
23  friend class Cluster2DInfo;
26 
27 public:
28  /// default constructor
31 
32  /// constructor from existing Cluster2DInfoObj
34 
35  /// copy constructor
37 
38  /// copy-assignment operator
40 
41  /// support cloning (deep-copy)
42  ConstCluster2DInfo clone() const;
43 
44  /// destructor
46 
47 
48 public:
49 
50  /// Access the Primary cluster ID
51  const eic::Index& clusterID() const;
52 
53  /// Access the Cluster position polar information
54  const eic::VectorPolar& polar() const;
55 
56  /// Access the Cluster pseudorapidity
57  const float& eta() const;
58 
59 
60 
61 
62 
63  /// check whether the object is actually available
64  bool isAvailable() const;
65  /// disconnect from Cluster2DInfoObj instance
66  void unlink() { m_obj = nullptr; }
67 
68  bool operator==(const ConstCluster2DInfo& other) const { return m_obj == other.m_obj; }
69  bool operator==(const Cluster2DInfo& other) const;
70 
71  // less comparison operator, so that objects can be e.g. stored in sets.
72  bool operator<(const ConstCluster2DInfo& other) const { return m_obj < other.m_obj; }
73 
74  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
75 
76  const podio::ObjectID getObjectID() const;
77 
78 private:
79  Cluster2DInfoObj* m_obj;
80 };
81 
82 } // namespace eic
83 
84 
85 #endif
eic::ConstCluster2DInfo::unlink
void unlink()
disconnect from Cluster2DInfoObj instance
Definition: Cluster2DInfoConst.h:66
eic::Index
Definition: Index.h:11
eic::ConstCluster2DInfo::eta
const float & eta() const
Access the Cluster pseudorapidity.
Definition: Cluster2DInfoConst.cc:50
eic::ConstCluster2DInfo::getObjectID
const podio::ObjectID getObjectID() const
Definition: Cluster2DInfoConst.cc:64
eic::ConstCluster2DInfo::~ConstCluster2DInfo
~ConstCluster2DInfo()
destructor
Definition: Cluster2DInfoConst.cc:45
eic::ConstCluster2DInfo::clone
ConstCluster2DInfo clone() const
support cloning (deep-copy)
Definition: Cluster2DInfoConst.cc:41
eic::Cluster2DInfoCollection
Definition: Cluster2DInfoCollection.h:76
eic
Definition: BasicParticle.cc:13
eic::Cluster2DInfo
Definition: Cluster2DInfo.h:23
eic::ConstCluster2DInfo::clusterID
const eic::Index & clusterID() const
Access the Primary cluster ID.
Definition: Cluster2DInfoConst.cc:48
eic::ConstCluster2DInfo::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: Cluster2DInfoConst.cc:57
eic::VectorPolar
Definition: VectorPolar.h:13
eic::ConstCluster2DInfo::ConstCluster2DInfo
ConstCluster2DInfo()
default constructor
Definition: Cluster2DInfoConst.cc:16
eic::ConstCluster2DInfo::operator=
ConstCluster2DInfo & operator=(const ConstCluster2DInfo &other)
copy-assignment operator
Definition: Cluster2DInfoConst.cc:31
eic::Cluster2DInfoConstCollectionIterator
Definition: Cluster2DInfoCollection.h:51
Cluster2DInfoObj.h
eic::ConstCluster2DInfo::polar
const eic::VectorPolar & polar() const
Access the Cluster position polar information.
Definition: Cluster2DInfoConst.cc:49
eic::ConstCluster2DInfo
Definition: Cluster2DInfoConst.h:21
VectorPolar.h
Index.h
eic::ConstCluster2DInfo::id
unsigned int id() const
Definition: Cluster2DInfoConst.h:74
eic::Cluster2DInfoObj
Definition: Cluster2DInfoObj.h:18
eic::ConstCluster2DInfo::operator==
bool operator==(const ConstCluster2DInfo &other) const
Definition: Cluster2DInfoConst.h:68
eic::ConstCluster2DInfo::operator<
bool operator<(const ConstCluster2DInfo &other) const
Definition: Cluster2DInfoConst.h:72