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