EICd
EIC data model
CalorimeterHitConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstCalorimeterHit_H
4 #define EICD_ConstCalorimeterHit_H
5 
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 ConstCalorimeterHit
18  * Calorimeter hit
19  * @author: W. Armstrong, S. Joosten
20  */
22 
23  friend class CalorimeterHit;
26 
27 public:
28  /// default constructor
31 
32  /// constructor from existing CalorimeterHitObj
34 
35  /// copy constructor
37 
38  /// copy-assignment operator
40 
41  /// support cloning (deep-copy)
42  ConstCalorimeterHit clone() const;
43 
44  /// destructor
46 
47 
48 public:
49 
50  /// Access the unique ID for this hit
51  const eic::Index& ID() const;
52 
53  /// Access the The detector specific (geometrical) cell id.
54  const std::int64_t& cellID() const;
55 
56  /// Access the layer for this hit
57  const std::int32_t& layer() const;
58 
59  /// Access the sector for this hit
60  const std::int32_t& sector() const;
61 
62  /// Access the The energy for this hit in [GeV].
63  const float& energy() const;
64 
65  /// Access the Error on energy [GeV].
66  const float& energyError() const;
67 
68  /// Access the The time of the hit in [ns].
69  const float& time() const;
70 
71  /// Access the The global position of the hit in world coordinates [mm].
72  const eic::VectorXYZ& position() const;
73 
74  /// Access the The local position of the hit in detector coordinates [mm].
75  const eic::VectorXYZ& local() const;
76 
77  /// Access the The dimension information of the cell [mm].
78  const eic::VectorXYZ& dimension() const;
79 
80 
81 
82 
83 
84  /// check whether the object is actually available
85  bool isAvailable() const;
86  /// disconnect from CalorimeterHitObj instance
87  void unlink() { m_obj = nullptr; }
88 
89  bool operator==(const ConstCalorimeterHit& other) const { return m_obj == other.m_obj; }
90  bool operator==(const CalorimeterHit& other) const;
91 
92  // less comparison operator, so that objects can be e.g. stored in sets.
93  bool operator<(const ConstCalorimeterHit& 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  CalorimeterHitObj* m_obj;
101 };
102 
103 } // namespace eic
104 
105 
106 #endif
eic::Index
Definition: Index.h:11
eic::ConstCalorimeterHit::sector
const std::int32_t & sector() const
Access the sector for this hit.
Definition: CalorimeterHitConst.cc:58
eic::ConstCalorimeterHit::local
const eic::VectorXYZ & local() const
Access the The local position of the hit in detector coordinates [mm].
Definition: CalorimeterHitConst.cc:63
eic::ConstCalorimeterHit::layer
const std::int32_t & layer() const
Access the layer for this hit.
Definition: CalorimeterHitConst.cc:57
CalorimeterHitObj.h
eic::ConstCalorimeterHit::clone
ConstCalorimeterHit clone() const
support cloning (deep-copy)
Definition: CalorimeterHitConst.cc:48
eic
Definition: BasicParticle.cc:13
eic::CalorimeterHitObj
Definition: CalorimeterHitObj.h:18
eic::ConstCalorimeterHit::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: CalorimeterHitConst.cc:71
eic::ConstCalorimeterHit::position
const eic::VectorXYZ & position() const
Access the The global position of the hit in world coordinates [mm].
Definition: CalorimeterHitConst.cc:62
eic::ConstCalorimeterHit::operator<
bool operator<(const ConstCalorimeterHit &other) const
Definition: CalorimeterHitConst.h:93
eic::CalorimeterHitConstCollectionIterator
Definition: CalorimeterHitCollection.h:51
VectorXYZ.h
eic::ConstCalorimeterHit::~ConstCalorimeterHit
~ConstCalorimeterHit()
destructor
Definition: CalorimeterHitConst.cc:52
eic::ConstCalorimeterHit::dimension
const eic::VectorXYZ & dimension() const
Access the The dimension information of the cell [mm].
Definition: CalorimeterHitConst.cc:64
eic::ConstCalorimeterHit
Definition: CalorimeterHitConst.h:21
eic::ConstCalorimeterHit::getObjectID
const podio::ObjectID getObjectID() const
Definition: CalorimeterHitConst.cc:78
eic::ConstCalorimeterHit::energy
const float & energy() const
Access the The energy for this hit in [GeV].
Definition: CalorimeterHitConst.cc:59
eic::ConstCalorimeterHit::operator==
bool operator==(const ConstCalorimeterHit &other) const
Definition: CalorimeterHitConst.h:89
eic::ConstCalorimeterHit::cellID
const std::int64_t & cellID() const
Access the The detector specific (geometrical) cell id.
Definition: CalorimeterHitConst.cc:56
eic::CalorimeterHit
Definition: CalorimeterHit.h:23
eic::ConstCalorimeterHit::time
const float & time() const
Access the The time of the hit in [ns].
Definition: CalorimeterHitConst.cc:61
eic::ConstCalorimeterHit::unlink
void unlink()
disconnect from CalorimeterHitObj instance
Definition: CalorimeterHitConst.h:87
eic::ConstCalorimeterHit::id
unsigned int id() const
Definition: CalorimeterHitConst.h:95
eic::ConstCalorimeterHit::operator=
ConstCalorimeterHit & operator=(const ConstCalorimeterHit &other)
copy-assignment operator
Definition: CalorimeterHitConst.cc:38
eic::ConstCalorimeterHit::ConstCalorimeterHit
ConstCalorimeterHit()
default constructor
Definition: CalorimeterHitConst.cc:16
eic::ConstCalorimeterHit::energyError
const float & energyError() const
Access the Error on energy [GeV].
Definition: CalorimeterHitConst.cc:60
Index.h
eic::ConstCalorimeterHit::ID
const eic::Index & ID() const
Access the unique ID for this hit.
Definition: CalorimeterHitConst.cc:55
eic::CalorimeterHitCollection
Definition: CalorimeterHitCollection.h:76
eic::VectorXYZ
Definition: VectorXYZ.h:13