CalorimeterHitConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef DD4POD_ConstCalorimeterHit_H
4 #define DD4POD_ConstCalorimeterHit_H
5 
7 
8 #include "dd4pod/FourVector.h"
10 #include "podio/ObjectID.h"
11 
12 
13 
14 namespace dd4pod {
15 
16 
17 class CalorimeterHit;
18 class CalorimeterHitCollection;
19 class CalorimeterHitCollectionIterator;
20 
26 
27  friend CalorimeterHit;
30 
31 public:
35 
38 
41 
44 
46  ConstCalorimeterHit clone() const;
47 
50 
51 
52 public:
53 
55  const long long& cellID() const;
56 
58  const long& flag() const;
59 
61  const long& g4ID() const;
62 
64  const dd4pod::FourVector& position() const;
65 
67  const dd4pod::MonteCarloContrib& truth() const;
68 
70  const double& energyDeposit() const;
71 
72 
73 
74 
75 
77  bool isAvailable() const;
79  void unlink() { m_obj = nullptr; }
80 
81  bool operator==(const ConstCalorimeterHit& other) const { return m_obj == other.m_obj; }
82  bool operator==(const CalorimeterHit& other) const;
83 
84  // less comparison operator, so that objects can be e.g. stored in sets.
85  bool operator<(const ConstCalorimeterHit& other) const { return m_obj < other.m_obj; }
86 
87  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
88 
89  const podio::ObjectID getObjectID() const;
90 
91 private:
92  CalorimeterHitObj* m_obj;
93 };
94 
95 } // namespace dd4pod
96 
97 
98 #endif
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.
A Collection is identified by an ID.
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.
bool operator<(const ConstCalorimeterHit &other) const
bool isAvailable() const
check whether the object is actually available
const long & g4ID() const
Access the Original Geant4 track identifier of the creating track (debugging)
void unlink()
disconnect from CalorimeterHitObj instance
ConstCalorimeterHit()
default constructor
ConstCalorimeterHit clone() const
support cloning (deep-copy)