EICd
EIC data model
PMTHitConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstPMTHit_H
4 #define EICD_ConstPMTHit_H
5 
6 #include "eicd/PMTHitObj.h"
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 ConstPMTHit
18  * EIC PMT hit
19  * @author: S. Joosten, C. Peng
20  */
21 class ConstPMTHit {
22 
23  friend class PMTHit;
24  friend class PMTHitCollection;
26 
27 public:
28  /// default constructor
29  ConstPMTHit();
31 
32  /// constructor from existing PMTHitObj
33  ConstPMTHit(PMTHitObj* obj);
34 
35  /// copy constructor
36  ConstPMTHit(const ConstPMTHit& other);
37 
38  /// copy-assignment operator
39  ConstPMTHit& operator=(const ConstPMTHit& other);
40 
41  /// support cloning (deep-copy)
42  ConstPMTHit clone() const;
43 
44  /// destructor
45  ~ConstPMTHit();
46 
47 
48 public:
49 
50  /// Access the Unique hit ID
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 estimated number of photo-electrons [#]
57  const float& npe() const;
58 
59  /// Access the Time [ns]
60  const float& time() const;
61 
62  /// Access the Error on the time [ns]
63  const float& timeError() const;
64 
65  /// Access the PMT hit position [mm]
66  const eic::VectorXYZ& position() const;
67 
68  /// Access the The local position of the hit in detector coordinates [mm]
69  const eic::VectorXYZ& local() const;
70 
71  /// Access the The dimension information of the pixel [mm].
72  const eic::VectorXYZ& dimension() const;
73 
74 
75 
76 
77 
78  /// check whether the object is actually available
79  bool isAvailable() const;
80  /// disconnect from PMTHitObj instance
81  void unlink() { m_obj = nullptr; }
82 
83  bool operator==(const ConstPMTHit& other) const { return m_obj == other.m_obj; }
84  bool operator==(const PMTHit& other) const;
85 
86  // less comparison operator, so that objects can be e.g. stored in sets.
87  bool operator<(const ConstPMTHit& other) const { return m_obj < other.m_obj; }
88 
89  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
90 
91  const podio::ObjectID getObjectID() const;
92 
93 private:
94  PMTHitObj* m_obj;
95 };
96 
97 } // namespace eic
98 
99 
100 #endif
eic::Index
Definition: Index.h:11
eic::ConstPMTHit::id
unsigned int id() const
Definition: PMTHitConst.h:89
eic::ConstPMTHit::local
const eic::VectorXYZ & local() const
Access the The local position of the hit in detector coordinates [mm].
Definition: PMTHitConst.cc:59
eic::ConstPMTHit::getObjectID
const podio::ObjectID getObjectID() const
Definition: PMTHitConst.cc:74
eic::PMTHitObj
Definition: PMTHitObj.h:18
eic::ConstPMTHit::ConstPMTHit
ConstPMTHit()
default constructor
Definition: PMTHitConst.cc:16
eic::ConstPMTHit::operator<
bool operator<(const ConstPMTHit &other) const
Definition: PMTHitConst.h:87
eic::ConstPMTHit::operator=
ConstPMTHit & operator=(const ConstPMTHit &other)
copy-assignment operator
Definition: PMTHitConst.cc:36
eic
Definition: BasicParticle.cc:13
eic::ConstPMTHit::operator==
bool operator==(const ConstPMTHit &other) const
Definition: PMTHitConst.h:83
eic::PMTHit
Definition: PMTHit.h:23
eic::ConstPMTHit::unlink
void unlink()
disconnect from PMTHitObj instance
Definition: PMTHitConst.h:81
eic::PMTHitCollection
Definition: PMTHitCollection.h:76
PMTHitObj.h
eic::PMTHitConstCollectionIterator
Definition: PMTHitCollection.h:51
eic::ConstPMTHit::clone
ConstPMTHit clone() const
support cloning (deep-copy)
Definition: PMTHitConst.cc:46
eic::ConstPMTHit::time
const float & time() const
Access the Time [ns].
Definition: PMTHitConst.cc:56
VectorXYZ.h
eic::ConstPMTHit::npe
const float & npe() const
Access the estimated number of photo-electrons [#].
Definition: PMTHitConst.cc:55
eic::ConstPMTHit::position
const eic::VectorXYZ & position() const
Access the PMT hit position [mm].
Definition: PMTHitConst.cc:58
eic::ConstPMTHit::~ConstPMTHit
~ConstPMTHit()
destructor
Definition: PMTHitConst.cc:50
eic::ConstPMTHit::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: PMTHitConst.cc:67
eic::ConstPMTHit::dimension
const eic::VectorXYZ & dimension() const
Access the The dimension information of the pixel [mm].
Definition: PMTHitConst.cc:60
eic::ConstPMTHit
Definition: PMTHitConst.h:21
Index.h
eic::ConstPMTHit::timeError
const float & timeError() const
Access the Error on the time [ns].
Definition: PMTHitConst.cc:57
eic::ConstPMTHit::ID
const eic::Index & ID() const
Access the Unique hit ID.
Definition: PMTHitConst.cc:53
eic::VectorXYZ
Definition: VectorXYZ.h:13
eic::ConstPMTHit::cellID
const std::int64_t & cellID() const
Access the The detector specific (geometrical) cell id.
Definition: PMTHitConst.cc:54