PhotoMultiplierHitConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef DD4POD_ConstPhotoMultiplierHit_H
4 #define DD4POD_ConstPhotoMultiplierHit_H
5 
7 
8 #include "dd4pod/FourVector.h"
10 #include "podio/ObjectID.h"
11 
12 
13 
14 namespace dd4pod {
15 
16 
17 class PhotoMultiplierHit;
18 class PhotoMultiplierHitCollection;
19 class PhotoMultiplierHitCollectionIterator;
20 
26 
27  friend PhotoMultiplierHit;
30 
31 public:
35 
38 
41 
44 
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::FourVector& momentum() const;
68 
70  const double& length() const;
71 
73  const dd4pod::MonteCarloContrib& truth() const;
74 
76  const double& energy() const;
77 
78 
79 
80 
81 
83  bool isAvailable() const;
85  void unlink() { m_obj = nullptr; }
86 
87  bool operator==(const ConstPhotoMultiplierHit& other) const { return m_obj == other.m_obj; }
88  bool operator==(const PhotoMultiplierHit& other) const;
89 
90  // less comparison operator, so that objects can be e.g. stored in sets.
91  bool operator<(const ConstPhotoMultiplierHit& other) const { return m_obj < other.m_obj; }
92 
93  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
94 
95  const podio::ObjectID getObjectID() const;
96 
97 private:
98  PhotoMultiplierHitObj* m_obj;
99 };
100 
101 } // namespace dd4pod
102 
103 
104 #endif
const long & flag() const
Access the User flag to classify hits.
void unlink()
disconnect from PhotoMultiplierHitObj instance
const dd4pod::FourVector & momentum() const
Access the momentum.
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
const long long & cellID() const
Access the cellID.
bool isAvailable() const
check whether the object is actually available
bool operator<(const ConstPhotoMultiplierHit &other) const
A Collection is identified by an ID.
const podio::ObjectID getObjectID() const
const dd4pod::FourVector & position() const
Access the position.
ConstPhotoMultiplierHit clone() const
support cloning (deep-copy)