Geant4ParticleConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef DD4POD_ConstGeant4Particle_H
4 #define DD4POD_ConstGeant4Particle_H
5 
7 
8 #include <array>
9 #include <vector>
10 #include "podio/ObjectID.h"
11 
12 
13 
14 namespace dd4pod {
15 
16 
17 class Geant4Particle;
18 class Geant4ParticleCollection;
19 class Geant4ParticleCollectionIterator;
20 
26 
27  friend Geant4Particle;
30 
31 public:
34  ConstGeant4Particle(int ID, int g4Parent, int reason, int mask, int steps, int secondaries, int pdgID, int status, std::array<int, 2> colorFlow, int genStatus, int charge, std::array<int, 1> spare, std::array<float, 3> spin, double vsx, double vsy, double vsz, double vex, double vey, double vez, double psx, double psy, double psz, double pex, double pey, double pez, double mass, double time, double properTime);
35 
38 
41 
44 
46  ConstGeant4Particle clone() const;
47 
50 
51 
52 public:
53 
55  const int& ID() const;
56 
58  const int& g4Parent() const;
59 
61  const int& reason() const;
62 
64  const int& mask() const;
65 
67  const int& steps() const;
68 
70  const int& secondaries() const;
71 
73  const int& pdgID() const;
74 
76  const int& status() const;
77 
79  const std::array<int, 2>& colorFlow() const;
81  const int& colorFlow(size_t i) const;
83  const int& genStatus() const;
84 
86  const int& charge() const;
87 
89  const std::array<int, 1>& spare() const;
91  const int& spare(size_t i) const;
93  const std::array<float, 3>& spin() const;
95  const float& spin(size_t i) const;
97  const double& vsx() const;
98 
100  const double& vsy() const;
101 
103  const double& vsz() const;
104 
106  const double& vex() const;
107 
109  const double& vey() const;
110 
112  const double& vez() const;
113 
115  const double& psx() const;
116 
118  const double& psy() const;
119 
121  const double& psz() const;
122 
124  const double& pex() const;
125 
127  const double& pey() const;
128 
130  const double& pez() const;
131 
133  const double& mass() const;
134 
136  const double& time() const;
137 
139  const double& properTime() const;
140 
141 
142 
143  unsigned int parents_size() const;
144  int parents(unsigned int) const;
145  std::vector<int>::const_iterator parents_begin() const;
146  std::vector<int>::const_iterator parents_end() const;
147  podio::RelationRange<int> parents() const;
148  unsigned int daughters_size() const;
149  int daughters(unsigned int) const;
150  std::vector<int>::const_iterator daughters_begin() const;
151  std::vector<int>::const_iterator daughters_end() const;
152  podio::RelationRange<int> daughters() const;
153 
154 
156  bool isAvailable() const;
158  void unlink() { m_obj = nullptr; }
159 
160  bool operator==(const ConstGeant4Particle& other) const { return m_obj == other.m_obj; }
161  bool operator==(const Geant4Particle& other) const;
162 
163  // less comparison operator, so that objects can be e.g. stored in sets.
164  bool operator<(const ConstGeant4Particle& other) const { return m_obj < other.m_obj; }
165 
166  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
167 
168  const podio::ObjectID getObjectID() const;
169 
170 private:
171  Geant4ParticleObj* m_obj;
172 };
173 
174 } // namespace dd4pod
175 
176 
177 #endif
const int & secondaries() const
Access the x.
const double & properTime() const
Access the x.
const double & pez() const
Access the endpoint pz.
std::vector< int >::const_iterator parents_begin() const
const double & vsz() const
Access the startpoint x.
const int & steps() const
Access the x.
bool isAvailable() const
check whether the object is actually available
const int & pdgID() const
Access the x.
const std::array< float, 3 > & spin() const
Access the x.
bool operator<(const ConstGeant4Particle &other) const
unsigned int daughters_size() const
ConstGeant4Particle & operator=(const ConstGeant4Particle &other)
copy-assignment operator
const int & reason() const
Access the x.
const double & vey() const
Access the endpoint x.
const double & psz() const
Access the startpoint pz.
const double & psy() const
Access the startpoint py.
const double & vex() const
Access the endpoint x.
const podio::ObjectID getObjectID() const
const double & time() const
Access the x.
bool operator==(const ConstGeant4Particle &other) const
std::vector< int >::const_iterator daughters_end() const
void unlink()
disconnect from Geant4ParticleObj instance
const double & vsx() const
Access the startpoint x.
const int & charge() const
Access the x.
const int & g4Parent() const
Access the x.
std::vector< int >::const_iterator parents_end() const
const double & vez() const
Access the endpoint x.
const double & psx() const
Access the startpoint x.
ConstGeant4Particle()
default constructor
const double & pey() const
Access the endpoint x.
std::vector< int >::const_iterator daughters_begin() const
const double & vsy() const
Access the startpoint x.
const int & status() const
Access the x.
const std::array< int, 1 > & spare() const
Access the x.
const double & mass() const
Access the x.
podio::RelationRange< int > parents() const
const int & ID() const
Access the x.
podio::RelationRange< int > daughters() const
unsigned int parents_size() const
const int & genStatus() const
Access the x.
ConstGeant4Particle clone() const
support cloning (deep-copy)
const std::array< int, 2 > & colorFlow() const
Access the x.
A Collection is identified by an ID.
const double & pex() const
Access the endpoint x.
const int & mask() const
Access the x.