TrackerHitConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef DD4POD_ConstTrackerHit_H
4 #define DD4POD_ConstTrackerHit_H
5 
6 #include "dd4pod/TrackerHitObj.h"
7 
8 #include "dd4pod/FourVector.h"
10 #include "podio/ObjectID.h"
11 
12 
13 
14 namespace dd4pod {
15 
16 
17 class TrackerHit;
18 class TrackerHitCollection;
19 class TrackerHitCollectionIterator;
20 
26 
27  friend TrackerHit;
28  friend TrackerHitCollection;
30 
31 public:
35 
38 
40  ConstTrackerHit(const ConstTrackerHit& other);
41 
44 
46  ConstTrackerHit 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::FourVector& momentum() const;
68 
70  const double& length() const;
71 
73  const dd4pod::MonteCarloContrib& truth() const;
74 
76  const double& energyDeposit() const;
77 
78 
79 
80 
81 
83  bool isAvailable() const;
85  void unlink() { m_obj = nullptr; }
86 
87  bool operator==(const ConstTrackerHit& other) const { return m_obj == other.m_obj; }
88  bool operator==(const TrackerHit& other) const;
89 
90  // less comparison operator, so that objects can be e.g. stored in sets.
91  bool operator<(const ConstTrackerHit& 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  TrackerHitObj* m_obj;
99 };
100 
101 } // namespace dd4pod
102 
103 
104 #endif
ConstTrackerHit clone() const
support cloning (deep-copy)
const long & flag() const
Access the User flag to classify hits.
const long long & cellID() const
Access the cellID.
bool isAvailable() const
check whether the object is actually available
A Collection is identified by an ID.
const dd4pod::MonteCarloContrib & truth() const
Access the truth.
const double & energyDeposit() const
Access the energyDeposit.
void unlink()
disconnect from TrackerHitObj instance
const dd4pod::FourVector & position() const
Access the position.
ConstTrackerHit & operator=(const ConstTrackerHit &other)
copy-assignment operator
bool operator==(const ConstTrackerHit &other) const
unsigned int id() const
const double & length() const
Access the length.
bool operator<(const ConstTrackerHit &other) const
const long & g4ID() const
Access the Original Geant4 track identifier of the creating track (debugging)
const dd4pod::FourVector & momentum() const
Access the momentum.
ConstTrackerHit()
default constructor
const podio::ObjectID getObjectID() const