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