PhotoMultiplierHitConst.cc
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 // datamodel specific includes
9 
10 
11 #include <ostream>
12 
13 namespace dd4pod {
14 
15 
17  m_obj->acquire();
18 }
19 
20 ConstPhotoMultiplierHit::ConstPhotoMultiplierHit(long long cellID, long flag, long g4ID, dd4pod::FourVector position, dd4pod::FourVector momentum, double length, dd4pod::MonteCarloContrib truth, double energy) : m_obj(new PhotoMultiplierHitObj()) {
21  m_obj->acquire();
22  m_obj->data.cellID = cellID;
23  m_obj->data.flag = flag;
24  m_obj->data.g4ID = g4ID;
25  m_obj->data.position = position;
26  m_obj->data.momentum = momentum;
27  m_obj->data.length = length;
28  m_obj->data.truth = truth;
29  m_obj->data.energy = energy;
30 }
31 
33  m_obj->acquire();
34 }
35 
37  if (m_obj) m_obj->release();
38  m_obj = other.m_obj;
39  return *this;
40 }
41 
43  if (m_obj) m_obj->acquire();
44 }
45 
47  return {new PhotoMultiplierHitObj(*m_obj)};
48 }
49 
51  if (m_obj) m_obj->release();
52 }
53 const long long& ConstPhotoMultiplierHit::cellID() const { return m_obj->data.cellID; }
54 const long& ConstPhotoMultiplierHit::flag() const { return m_obj->data.flag; }
55 const long& ConstPhotoMultiplierHit::g4ID() const { return m_obj->data.g4ID; }
58 const double& ConstPhotoMultiplierHit::length() const { return m_obj->data.length; }
60 const double& ConstPhotoMultiplierHit::energy() const { return m_obj->data.energy; }
61 
62 
63 
64 
65 
66 
68  if (m_obj) {
69  return true;
70  }
71  return false;
72 }
73 
74 const podio::ObjectID ConstPhotoMultiplierHit::getObjectID() const {
75  if (m_obj) {
76  return m_obj->id;
77  }
78  return podio::ObjectID{podio::ObjectID::invalid, podio::ObjectID::invalid};
79 }
80 
82  return m_obj == other.m_obj;
83 }
84 
85 } // namespace dd4pod
86 
::dd4pod::FourVector momentum
momentum
const long & flag() const
Access the User flag to classify hits.
const dd4pod::FourVector & momentum() const
Access the momentum.
long g4ID
Original Geant 4 track identifier of the creating track (debugging)
::dd4pod::FourVector position
position
const double & length() const
Access the length.
const double & energy() const
Access the photon energy.
const long & g4ID() const
Access the Original Geant 4 track identifier of the creating track (debugging)
const dd4pod::MonteCarloContrib & truth() const
Access the truth.
bool operator==(const ConstPhotoMultiplierHit &other) const
ConstPhotoMultiplierHit & operator=(const ConstPhotoMultiplierHit &other)
copy-assignment operator
::dd4pod::MonteCarloContrib truth
truth
const long long & cellID() const
Access the cellID.
bool isAvailable() const
check whether the object is actually available
long flag
User flag to classify hits.
const podio::ObjectID getObjectID() const
const dd4pod::FourVector & position() const
Access the position.
ConstPhotoMultiplierHit clone() const
support cloning (deep-copy)