EICd
EIC data model
RawCalorimeterHitConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstRawCalorimeterHit_H
4 #define EICD_ConstRawCalorimeterHit_H
5 
7 
8 #include "eicd/Index.h"
9 #include "podio/ObjectID.h"
10 
11 
12 
13 namespace eic {
14 
15 
16 /** @class ConstRawCalorimeterHit
17  * Raw (digitized) calorimeter hit
18  * @author: W. Armstrong, S. Joosten
19  */
21 
22  friend class RawCalorimeterHit;
25 
26 public:
27  /// default constructor
29  ConstRawCalorimeterHit(eic::Index ID, std::int64_t cellID, std::int64_t amplitude, std::int64_t time);
30 
31  /// constructor from existing RawCalorimeterHitObj
33 
34  /// copy constructor
36 
37  /// copy-assignment operator
39 
40  /// support cloning (deep-copy)
42 
43  /// destructor
45 
46 
47 public:
48 
49  /// Access the unique ID for this hit
50  const eic::Index& ID() const;
51 
52  /// Access the The detector specific (geometrical) cell id.
53  const std::int64_t& cellID() const;
54 
55  /// Access the The amplitude of the hit in ADC counts.
56  const std::int64_t& amplitude() const;
57 
58  /// Access the Timing in TDC
59  const std::int64_t& time() const;
60 
61 
62 
63 
64 
65  /// check whether the object is actually available
66  bool isAvailable() const;
67  /// disconnect from RawCalorimeterHitObj instance
68  void unlink() { m_obj = nullptr; }
69 
70  bool operator==(const ConstRawCalorimeterHit& other) const { return m_obj == other.m_obj; }
71  bool operator==(const RawCalorimeterHit& other) const;
72 
73  // less comparison operator, so that objects can be e.g. stored in sets.
74  bool operator<(const ConstRawCalorimeterHit& other) const { return m_obj < other.m_obj; }
75 
76  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
77 
78  const podio::ObjectID getObjectID() const;
79 
80 private:
81  RawCalorimeterHitObj* m_obj;
82 };
83 
84 } // namespace eic
85 
86 
87 #endif
eic::Index
Definition: Index.h:11
eic::ConstRawCalorimeterHit::amplitude
const std::int64_t & amplitude() const
Access the The amplitude of the hit in ADC counts.
Definition: RawCalorimeterHitConst.cc:51
eic::ConstRawCalorimeterHit::operator==
bool operator==(const ConstRawCalorimeterHit &other) const
Definition: RawCalorimeterHitConst.h:70
eic::ConstRawCalorimeterHit::unlink
void unlink()
disconnect from RawCalorimeterHitObj instance
Definition: RawCalorimeterHitConst.h:68
eic::ConstRawCalorimeterHit::id
unsigned int id() const
Definition: RawCalorimeterHitConst.h:76
eic::ConstRawCalorimeterHit::time
const std::int64_t & time() const
Access the Timing in TDC.
Definition: RawCalorimeterHitConst.cc:52
eic::ConstRawCalorimeterHit::ID
const eic::Index & ID() const
Access the unique ID for this hit.
Definition: RawCalorimeterHitConst.cc:49
eic::RawCalorimeterHit
Definition: RawCalorimeterHit.h:22
eic
Definition: BasicParticle.cc:13
eic::ConstRawCalorimeterHit::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: RawCalorimeterHitConst.cc:59
eic::ConstRawCalorimeterHit
Definition: RawCalorimeterHitConst.h:20
RawCalorimeterHitObj.h
eic::ConstRawCalorimeterHit::operator=
ConstRawCalorimeterHit & operator=(const ConstRawCalorimeterHit &other)
copy-assignment operator
Definition: RawCalorimeterHitConst.cc:32
eic::ConstRawCalorimeterHit::clone
ConstRawCalorimeterHit clone() const
support cloning (deep-copy)
Definition: RawCalorimeterHitConst.cc:42
eic::ConstRawCalorimeterHit::operator<
bool operator<(const ConstRawCalorimeterHit &other) const
Definition: RawCalorimeterHitConst.h:74
Index.h
eic::RawCalorimeterHitConstCollectionIterator
Definition: RawCalorimeterHitCollection.h:51
eic::RawCalorimeterHitObj
Definition: RawCalorimeterHitObj.h:18
eic::ConstRawCalorimeterHit::cellID
const std::int64_t & cellID() const
Access the The detector specific (geometrical) cell id.
Definition: RawCalorimeterHitConst.cc:50
eic::ConstRawCalorimeterHit::getObjectID
const podio::ObjectID getObjectID() const
Definition: RawCalorimeterHitConst.cc:66
eic::ConstRawCalorimeterHit::ConstRawCalorimeterHit
ConstRawCalorimeterHit()
default constructor
Definition: RawCalorimeterHitConst.cc:16
eic::ConstRawCalorimeterHit::~ConstRawCalorimeterHit
~ConstRawCalorimeterHit()
destructor
Definition: RawCalorimeterHitConst.cc:46
eic::RawCalorimeterHitCollection
Definition: RawCalorimeterHitCollection.h:76