CalorimeterHitConst.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 ConstCalorimeterHit::ConstCalorimeterHit(long long cellID, long flag, long g4ID, dd4pod::FourVector position, dd4pod::MonteCarloContrib truth, double energyDeposit) : m_obj(new CalorimeterHitObj()) {
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.truth = truth;
28 }
29 
31  m_obj->acquire();
32 }
33 
35  if (m_obj) m_obj->release();
36  m_obj = other.m_obj;
37  return *this;
38 }
39 
41  if (m_obj) m_obj->acquire();
42 }
43 
45  return {new CalorimeterHitObj(*m_obj)};
46 }
47 
49  if (m_obj) m_obj->release();
50 }
51 const long long& ConstCalorimeterHit::cellID() const { return m_obj->data.cellID; }
52 const long& ConstCalorimeterHit::flag() const { return m_obj->data.flag; }
53 const long& ConstCalorimeterHit::g4ID() const { return m_obj->data.g4ID; }
56 const double& ConstCalorimeterHit::energyDeposit() const { return m_obj->data.energyDeposit; }
57 
58 
59 
60 
61 
62 
64  if (m_obj) {
65  return true;
66  }
67  return false;
68 }
69 
70 const podio::ObjectID ConstCalorimeterHit::getObjectID() const {
71  if (m_obj) {
72  return m_obj->id;
73  }
74  return podio::ObjectID{podio::ObjectID::invalid, podio::ObjectID::invalid};
75 }
76 
78  return m_obj == other.m_obj;
79 }
80 
81 } // namespace dd4pod
82 
const dd4pod::MonteCarloContrib & truth() const
Access the truth.
const dd4pod::FourVector & position() const
Access the position.
const long & flag() const
Access the User flag to classify hits.
long flag
User flag to classify hits.
::dd4pod::FourVector position
position
bool operator==(const ConstCalorimeterHit &other) const
const double & energyDeposit() const
Access the energyDeposit.
ConstCalorimeterHit & operator=(const ConstCalorimeterHit &other)
copy-assignment operator
const podio::ObjectID getObjectID() const
const long long & cellID() const
Access the cellID.
double energyDeposit
energyDeposit
bool isAvailable() const
check whether the object is actually available
long g4ID
Original Geant4 track identifier of the creating track (debugging)
::dd4pod::MonteCarloContrib truth
truth
const long & g4ID() const
Access the Original Geant4 track identifier of the creating track (debugging)
ConstCalorimeterHit()
default constructor
ConstCalorimeterHit clone() const
support cloning (deep-copy)