CalorimeterHit.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef DD4POD_CalorimeterHit_H
4 #define DD4POD_CalorimeterHit_H
5 
8 
9 #include "dd4pod/FourVector.h"
11 #include "podio/ObjectID.h"
12 #include <ostream>
13 
14 
15 
16 namespace dd4pod {
17 
18 
19 class CalorimeterHitCollection;
20 class CalorimeterHitCollectionIterator;
21 class ConstCalorimeterHit;
22 
28 
31  friend ConstCalorimeterHit;
32 
33 public:
34 
38 
41 
43  CalorimeterHit(const CalorimeterHit& other);
44 
47 
49  CalorimeterHit clone() const;
50 
53 
55  operator ConstCalorimeterHit() const;
56 
57 public:
58 
60  const long long& cellID() const;
61 
63  const long& flag() const;
64 
66  const long& g4ID() const;
67 
69  const dd4pod::FourVector& position() const;
70 
72  const dd4pod::MonteCarloContrib& truth() const;
73 
75  const double& energyDeposit() const;
76 
77 
78 
80  void cellID(long long value);
81 
83  void flag(long value);
84 
86  void g4ID(long value);
87 
92 
97 
99  void energyDeposit(double value);
100 
101 
102 
103 
104 
105 
107  bool isAvailable() const;
109  void unlink() { m_obj = nullptr; }
110 
111  bool operator==(const CalorimeterHit& other) const { return m_obj == other.m_obj; }
112  bool operator==(const ConstCalorimeterHit& other) const;
113 
114  // less comparison operator, so that objects can be e.g. stored in sets.
115  bool operator<(const CalorimeterHit& other) const { return m_obj < other.m_obj; }
116 
117  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
118 
119  const podio::ObjectID getObjectID() const;
120 
121 private:
122  CalorimeterHitObj* m_obj;
123 };
124 
125 std::ostream& operator<<(std::ostream& o, const ConstCalorimeterHit& value);
126 
127 } // namespace dd4pod
128 
129 
130 #endif
bool isAvailable() const
check whether the object is actually available
const long long & cellID() const
Access the cellID.
parameter value(const doc_string &label, Targets &&... tgts)
makes required, blocking, repeatable value parameter; matches any non-empty string
Definition: clipp.h:2094
const dd4pod::FourVector & position() const
Access the position.
A Collection is identified by an ID.
const dd4pod::MonteCarloContrib & truth() const
Access the truth.
CalorimeterHit clone() const
support cloning (deep-copy)
unsigned int id() const
void unlink()
disconnect from CalorimeterHitObj instance
const double & energyDeposit() const
Access the energyDeposit.
const podio::ObjectID getObjectID() const
CalorimeterHit()
default constructor
std::ostream & operator<<(std::ostream &o, const ConstCalorimeterHit &value)
bool operator==(const CalorimeterHit &other) const
const long & g4ID() const
Access the Original Geant4 track identifier of the creating track (debugging)
bool operator<(const CalorimeterHit &other) const
const long & flag() const
Access the User flag to classify hits.
CalorimeterHit & operator=(const CalorimeterHit &other)
copy-assignment operator