DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Geant4Particle.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
14 #ifndef DDG4_GEANT4PARTICLE_H
15 #define DDG4_GEANT4PARTICLE_H
16 
17 // Framework include files
18 
19 // ROOT includes
20 #include <Math/Vector4D.h>
21 
22 // Geant4 forward declarations
23 class G4ParticleDefinition;
24 class G4VProcess;
25 
26 // C/C++ include files
27 #include <set>
28 #include <map>
29 #include <vector>
30 #include <memory>
31 
33 namespace dd4hep {
34 
36  namespace sim {
37 
38  // Forward declarations
39  class Geant4Particle;
40 
42 
48  public:
52  virtual ~ParticleExtension();
53  };
54 
68 
69  // Generator status for a given particles: bit 0...4, agreed by many formats (HepMC, LCIO, ....):
70  G4PARTICLE_GEN_EMPTY = 1<<0, // Empty line
71  G4PARTICLE_GEN_STABLE = 1<<1, // undecayed particle, stable in the generator
72  G4PARTICLE_GEN_DECAYED = 1<<2, // particle decayed in the generator
73  G4PARTICLE_GEN_DOCUMENTATION = 1<<3, // documentation line
74  G4PARTICLE_GEN_BEAM = 1<<4, // beam particle
75 
76  G4PARTICLE_GEN_OTHER = 1<<9, // any other generator status
77 
78  G4PARTICLE_GEN_GENERATOR = // Particle comes from generator
82  G4PARTICLE_GEN_STATUS = 0x3FF, // Mask for generator status (bit 0...9)
83  G4PARTICLE_GEN_STATUS_MASK = 0xFFFF,// Mask for the raw generator status (max 65k values)
84  // Simulation status of a given particle
85  G4PARTICLE_SIM_CREATED = 1<<10, // True if the particle has been created by the simulation program (rather than the generator)
86  G4PARTICLE_SIM_BACKSCATTER = 1<<11, // True if the particle is the result of a backscatter from a calorimeter shower.
87  G4PARTICLE_SIM_DECAY_CALO = 1<<12, // True if the particle has interacted in a calorimeter region.
88  G4PARTICLE_SIM_DECAY_TRACKER = 1<<13, // True if the particle has interacted in a tracking region.
89  G4PARTICLE_SIM_STOPPED = 1<<14, // True if the particle has been stopped by the simulation program.
90  G4PARTICLE_SIM_LEFT_DETECTOR = 1<<15, // True if the particle has left the world volume undecayed.
91  G4PARTICLE_SIM_PARENT_RADIATED = 1<<16, // True if the particle's vertex is not the endpoint of the parent particle.
92  G4PARTICLE_SIM_OVERLAY = 1<<17, // True if the particle has been overlayed by the simulation (or digitization) program.
93 
95  };
96 
98 
104  public:
105  typedef std::set<int> Particles;
107  int ref { 0 };
108  int id { 0 };
109  int originalG4ID { 0 };
110  int g4Parent { 0 };
111  int reason { 0 };
112  int mask { 0 };
113  int steps { 0 };
114  int secondaries { 0 };
115  int pdgID { 0 };
116  int status { 0 };
117  int colorFlow[2] { 0, 0 };
118  unsigned short genStatus { 0 };
119  char charge { 0 };
120  char _spare[1] { 0 };
121  float spin[3] { 0E0,0E0,0E0 };
122  // 12 ints + 4 bytes + 3 floats should be aligned to 8 bytes....
124  double vsx = 0E0, vsy = 0E0, vsz = 0E0;
126  double vex = 0E0, vey = 0E0, vez = 0E0;
128  double psx = 0E0, psy = 0E0, psz = 0E0;
130  double pex = 0E0, pey = 0E0, pez = 0E0;
132  double mass { 0E0 };
134  double time { 0E0 };
136  double properTime { 0E0 };
141 
143  std::unique_ptr<ParticleExtension> extension { };
145  const G4VProcess *process = 0;
146 
147  public:
149  Geant4Particle();
151  Geant4Particle(int part_id);
155  virtual ~Geant4Particle();
160  ++ref;
161  return this;
162  }
164  void release();
168  void removeDaughter(int id_daughter);
170  int charge3() const { return charge; }
171  };
172 
173 #ifndef __DDG4_STANDALONE_DICTIONARIES__
174 
176 
182  public:
183  typedef ROOT::Math::PxPyPzM4D<double> FourVector;
184  typedef ROOT::Math::Cartesian3D<double> ThreeVector;
185  protected:
188 
189  public:
197  Geant4Particle* operator->() const;
199  operator Geant4Particle*() const;
201  size_t numParent() const;
203  size_t numDaughter() const;
205  double momentum2() const;
207  double energy() const;
209  double momentum() const { return std::sqrt(momentum2()); }
211  double charge() const { return double(particle->charge); }
213  double mass() const { return particle->mass; }
215  double time() const { return particle->time; }
217  std::string particleName() const;
219  std::string particleType() const;
221  std::string processName() const;
223  std::string processTypeName() const;
225  FourVector pxPyPzM() const;
227  template <typename T> std::vector<T> pxPyPzM(T unit) const;
229  ThreeVector startVertex() const;
231  ThreeVector endVertex() const;
233  const G4ParticleDefinition *definition() const;
234 
236 
238  void dump1(int level, const std::string& src, const char* tag) const;
240  void dump2(int level, const std::string& src, const char* tag, int g4id, bool inrec) const;
242  void dumpWithVertex(int level, const std::string& src, const char* tag) const;
243  void dumpWithMomentum(int level, const std::string& src, const char* tag) const;
244  void dumpWithMomentumAndVertex(int level, const std::string& src, const char* tag) const;
245  static void header4(int level, const std::string& src, const char* tag);
246  void dump4(int level, const std::string& src, const char* tag) const;
247 
249 
251  void offset(int off) const;
252 
254  static std::vector<G4ParticleDefinition*> g4DefinitionsRegEx(const std::string& expression);
256  static G4ParticleDefinition* g4DefinitionsExact(const std::string& expression);
257  };
258 
260  : particle(c.particle) {
261  }
262 
265  : particle(p) {
266  }
267 
270  return particle;
271  }
274  particle = part;
275  return *this;
276  }
278  inline Geant4ParticleHandle::operator Geant4Particle*() const {
279  return particle;
280  }
282  inline size_t Geant4ParticleHandle::numParent() const {
283  return particle->parents.size();
284  }
286  inline size_t Geant4ParticleHandle::numDaughter() const {
287  return particle->daughters.size();
288  }
290  inline ROOT::Math::PxPyPzM4D<double> Geant4ParticleHandle::pxPyPzM() const {
291  const Geant4Particle* p = particle;
292  return ROOT::Math::PxPyPzM4D<double>(p->psx,p->psy,p->psz,p->mass);
293  }
294 
296  inline ROOT::Math::Cartesian3D<double> Geant4ParticleHandle::startVertex() const {
297  const Geant4Particle* p = particle;
298  return ROOT::Math::Cartesian3D<double>(p->vsx,p->vsy,p->vsz);
299  }
300 
302  inline ROOT::Math::Cartesian3D<double> Geant4ParticleHandle::endVertex() const {
303  const Geant4Particle* p = particle;
304  return ROOT::Math::Cartesian3D<double>(p->vex,p->vey,p->vez);
305  }
306 
308  inline double Geant4ParticleHandle::energy() const {
309  const Geant4Particle* p = particle;
310  ROOT::Math::PxPyPzM4D<double> v(p->psx,p->psy,p->psz,p->mass);
311  return v.E();
312  }
313 
315  inline double Geant4ParticleHandle::momentum2() const {
316  const Geant4Particle* p = particle;
317  return (p->psx*p->psx + p->psy*p->psy + p->psz*p->psz);
318  }
319 
321 
338  public:
340  typedef std::map<int,Particle*> ParticleMap;
341  typedef std::map<int,int> TrackEquivalents;
346 
347  public:
351  virtual ~Geant4ParticleMap();
353  bool isValid() const;
355  void dump() const;
357  void clear();
359  void adopt(ParticleMap& pm, TrackEquivalents& equiv);
361  const ParticleMap& particles() const { return particleMap; }
363  const TrackEquivalents& equivalents() const { return equivalentTracks; }
365  int particleID(int track, bool throw_if_not_found=true) const;
366  };
367 #endif
368 
369  } // End namespace sim
370 } // End namespace dd4hep
371 #endif // DDG4_GEANT4PARTICLE_H
dd4hep::sim::G4PARTICLE_SIM_CREATED
@ G4PARTICLE_SIM_CREATED
Definition: Geant4Particle.h:85
dd4hep::sim::G4PARTICLE_CREATED_TRACKER_HIT
@ G4PARTICLE_CREATED_TRACKER_HIT
Definition: Geant4Particle.h:64
dd4hep::sim::Geant4ParticleHandle::offset
void offset(int off) const
Handlers.
Definition: Geant4Particle.cpp:249
dd4hep::sim::Geant4ParticleMap::Geant4ParticleMap
Geant4ParticleMap()
Default constructor.
Definition: Geant4Particle.h:349
dd4hep::sim::ParticleExtension::ParticleExtension
ParticleExtension()
Default constructor.
Definition: Geant4Particle.h:50
dd4hep::sim::Geant4ParticleHandle::momentum2
double momentum2() const
Scalar particle momentum squared.
Definition: Geant4Particle.h:315
dd4hep::sim::G4PARTICLE_ABOVE_ENERGY_THRESHOLD
@ G4PARTICLE_ABOVE_ENERGY_THRESHOLD
Definition: Geant4Particle.h:60
dd4hep::sim::Geant4Particle::vsz
double vsz
Definition: Geant4Particle.h:124
dd4hep::sim::G4PARTICLE_KEEP_PARENT
@ G4PARTICLE_KEEP_PARENT
Definition: Geant4Particle.h:62
dd4hep::sim::Geant4Particle::reason
int reason
Definition: Geant4Particle.h:111
dd4hep::sim::Geant4ParticleHandle::dump1
void dump1(int level, const std::string &src, const char *tag) const
Various output formats:
Definition: Geant4Particle.cpp:264
dd4hep::sim::Geant4ParticleMap::Particle
Geant4Particle Particle
Definition: Geant4Particle.h:339
dd4hep::sim::G4PARTICLE_GEN_STABLE
@ G4PARTICLE_GEN_STABLE
Definition: Geant4Particle.h:71
dd4hep::sim::G4PARTICLE_SIM_PARENT_RADIATED
@ G4PARTICLE_SIM_PARENT_RADIATED
Definition: Geant4Particle.h:91
v
View * v
Definition: MultiView.cpp:28
dd4hep::sim::Geant4ParticleMap::dump
void dump() const
Dump content.
Definition: Geant4Particle.cpp:495
dd4hep::sim::Geant4Particle::mass
double mass
Particle mass.
Definition: Geant4Particle.h:132
dd4hep::sim::Geant4Particle::vey
double vey
Definition: Geant4Particle.h:126
dd4hep::sim::Geant4ParticleHandle::particleName
std::string particleName() const
Access to the Geant4 particle name.
Definition: Geant4Particle.cpp:154
dd4hep::sim::Geant4Particle::pez
double pez
Definition: Geant4Particle.h:130
dd4hep::sim::Geant4ParticleHandle::dumpWithVertex
void dumpWithVertex(int level, const std::string &src, const char *tag) const
Output type 3:+++ "tag" ID: 0 e- status:00000014 type: 11 Vertex:(+0.00e+00,+0.00e+00,...
Definition: Geant4Particle.cpp:308
dd4hep::sim::G4PARTICLE_KEEP_USER
@ G4PARTICLE_KEEP_USER
Definition: Geant4Particle.h:65
dd4hep::sim::Geant4ParticleMap::particles
const ParticleMap & particles() const
Access the particle map.
Definition: Geant4Particle.h:361
dd4hep::sim::G4PARTICLE_KEEP_PROCESS
@ G4PARTICLE_KEEP_PROCESS
Definition: Geant4Particle.h:61
dd4hep::sim::Geant4ParticleHandle::numDaughter
size_t numDaughter() const
Accessor to the number of particle daughters.
Definition: Geant4Particle.h:286
dd4hep::sim::Geant4Particle::addRef
Geant4Particle * addRef()
Increase reference count.
Definition: Geant4Particle.h:159
dd4hep::sim::Geant4ParticleHandle::g4DefinitionsRegEx
static std::vector< G4ParticleDefinition * > g4DefinitionsRegEx(const std::string &expression)
Access Geant4 particle definitions by regular expression.
Definition: Geant4Particle.cpp:182
dd4hep::sim::Geant4ParticleHandle::FourVector
ROOT::Math::PxPyPzM4D< double > FourVector
Definition: Geant4Particle.h:183
dd4hep::sim::Geant4ParticleMap::adopt
void adopt(ParticleMap &pm, TrackEquivalents &equiv)
Adopt particle maps.
Definition: Geant4Particle.cpp:526
dd4hep::sim::Geant4ParticleHandle::Geant4ParticleHandle
Geant4ParticleHandle(Geant4Particle *part)
Default constructor.
Definition: Geant4Particle.h:264
dd4hep::sim::Geant4ParticleHandle::processName
std::string processName() const
Access to the creator process name.
Definition: Geant4Particle.cpp:228
dd4hep::sim::Geant4Particle::Geant4Particle
Geant4Particle(const Geant4Particle &copy)=delete
NO copy constructor.
dd4hep::sim::Geant4Particle::pdgID
int pdgID
Definition: Geant4Particle.h:115
dd4hep::sim::Geant4ParticleHandle::endVertex
ThreeVector endVertex() const
Access particle momentum, energy as 4 vector.
Definition: Geant4Particle.h:302
dd4hep::sim::Geant4Particle::g4Parent
int g4Parent
not persistent
Definition: Geant4Particle.h:110
dd4hep::sim::Geant4ParticleMap::TrackEquivalents
std::map< int, int > TrackEquivalents
Definition: Geant4Particle.h:341
dd4hep::sim::Geant4Particle::psz
double psz
Definition: Geant4Particle.h:128
dd4hep::sim::Geant4ParticleHandle::operator->
Geant4Particle * operator->() const
Overloaded -> operator to access particle details.
Definition: Geant4Particle.h:269
dd4hep::sim::G4PARTICLE_CREATED_HIT
@ G4PARTICLE_CREATED_HIT
Definition: Geant4Particle.h:57
dd4hep::sim::Geant4Particle::~Geant4Particle
virtual ~Geant4Particle()
Default destructor.
Definition: Geant4Particle.cpp:54
dd4hep::sim::G4PARTICLE_GEN_STATUS_MASK
@ G4PARTICLE_GEN_STATUS_MASK
Definition: Geant4Particle.h:83
dd4hep::sim::Geant4ParticleMap::~Geant4ParticleMap
virtual ~Geant4ParticleMap()
Default destructor.
Definition: Geant4Particle.cpp:483
dd4hep::sim::Geant4Particle::charge3
int charge3() const
Charge accessor (for python etc.)
Definition: Geant4Particle.h:170
dd4hep::sim::Geant4Particle::secondaries
int secondaries
Definition: Geant4Particle.h:114
dd4hep::sim::G4PARTICLE_GEN_DOCUMENTATION
@ G4PARTICLE_GEN_DOCUMENTATION
Definition: Geant4Particle.h:73
dd4hep::sim::G4PARTICLE_SIM_BACKSCATTER
@ G4PARTICLE_SIM_BACKSCATTER
Definition: Geant4Particle.h:86
dd4hep::sim::Geant4ParticleHandle::dumpWithMomentumAndVertex
void dumpWithMomentumAndVertex(int level, const std::string &src, const char *tag) const
Output type 3:+++ <tag> ID: 0 e- status:00000014 type: 11 Vertex:(+0.00e+00,+0.00e+00,...
Definition: Geant4Particle.cpp:353
dd4hep::sim::Geant4Particle::extension
std::unique_ptr< ParticleExtension > extension
User data extension if required.
Definition: Geant4Particle.h:143
dd4hep::sim::Geant4ParticleHandle::charge
double charge() const
Geant4 charge of the particle.
Definition: Geant4Particle.h:211
dd4hep::sim::Geant4Particle::get_data
Geant4Particle & get_data(Geant4Particle &c)
Assignment operator.
Definition: Geant4Particle.cpp:67
dd4hep::sim::Geant4ParticleMap
Data structure to map particles produced during the generation and the simulation.
Definition: Geant4Particle.h:337
dd4hep::sim::ParticleExtension::~ParticleExtension
virtual ~ParticleExtension()
Default destructor.
Definition: Geant4Particle.cpp:38
dd4hep::sim::G4PARTICLE_GEN_EMPTY
@ G4PARTICLE_GEN_EMPTY
Definition: Geant4Particle.h:70
dd4hep::sim::G4PARTICLE_SIM_STOPPED
@ G4PARTICLE_SIM_STOPPED
Definition: Geant4Particle.h:89
dd4hep::sim::Geant4ParticleHandle::particleType
std::string particleType() const
Access to the Geant4 particle type.
Definition: Geant4Particle.cpp:168
dd4hep::sim::Geant4ParticleHandle::pxPyPzM
std::vector< T > pxPyPzM(T unit) const
Access particle momentum, energy as 4 vector.
dd4hep::sim::Geant4Particle::_spare
char _spare[1]
Definition: Geant4Particle.h:120
dd4hep::sim::Geant4ParticleHandle::dump2
void dump2(int level, const std::string &src, const char *tag, int g4id, bool inrec) const
Output type 2:+++ "tag" 20 G4: 7 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+3.304035e+01 in record:Y...
Definition: Geant4Particle.cpp:288
dd4hep::sim::Geant4Particle::Particles
std::set< int > Particles
Definition: Geant4Particle.h:105
dd4hep::sim::Geant4Particle::vez
double vez
Definition: Geant4Particle.h:126
dd4hep::sim::G4PARTICLE_SIM_DECAY_CALO
@ G4PARTICLE_SIM_DECAY_CALO
Definition: Geant4Particle.h:87
dd4hep::sim::Geant4ParticleHandle::numParent
size_t numParent() const
Accessor to the number of particle parents.
Definition: Geant4Particle.h:282
dd4hep::sim::Geant4ParticleMap::ParticleMap
std::map< int, Particle * > ParticleMap
Definition: Geant4Particle.h:340
dd4hep::sim::G4PARTICLE_KEEP_ALWAYS
@ G4PARTICLE_KEEP_ALWAYS
Definition: Geant4Particle.h:66
dd4hep::sim::Geant4ParticleMap::equivalents
const TrackEquivalents & equivalents() const
Access the map of track equivalents.
Definition: Geant4Particle.h:363
dd4hep::sim::G4PARTICLE_GEN_GENERATOR
@ G4PARTICLE_GEN_GENERATOR
Definition: Geant4Particle.h:78
dd4hep::sim::Geant4Particle::colorFlow
int colorFlow[2]
Definition: Geant4Particle.h:117
dd4hep::sim::Geant4Particle::spin
float spin[3]
Definition: Geant4Particle.h:121
dd4hep::sim::G4PARTICLE_GEN_STATUS
@ G4PARTICLE_GEN_STATUS
Definition: Geant4Particle.h:82
dd4hep::sim::Geant4Particle::genStatus
unsigned short genStatus
Definition: Geant4Particle.h:118
dd4hep::sim::Geant4Particle::status
int status
Definition: Geant4Particle.h:116
dd4hep::sim::Geant4ParticleHandle::ThreeVector
ROOT::Math::Cartesian3D< double > ThreeVector
Definition: Geant4Particle.h:184
dd4hep::sim::Geant4ParticleHandle::pxPyPzM
FourVector pxPyPzM() const
Access particle momentum, energy as 4 vector.
Definition: Geant4Particle.h:290
dd4hep::sim::G4PARTICLE_GEN_DECAYED
@ G4PARTICLE_GEN_DECAYED
Definition: Geant4Particle.h:72
dd4hep::sim::Geant4Particle::originalG4ID
int originalG4ID
Definition: Geant4Particle.h:109
dd4hep::sim::Geant4ParticleHandle::dump4
void dump4(int level, const std::string &src, const char *tag) const
Definition: Geant4Particle.cpp:386
dd4hep::sim::G4PARTICLE_LAST_NOTHING
@ G4PARTICLE_LAST_NOTHING
Definition: Geant4Particle.h:94
dd4hep::sim::G4PARTICLE_SIM_OVERLAY
@ G4PARTICLE_SIM_OVERLAY
Definition: Geant4Particle.h:92
dd4hep::sim::Geant4ParticleHandle::operator=
Geant4ParticleHandle & operator=(Geant4Particle *part)
Assignment operator.
Definition: Geant4Particle.h:273
dd4hep::sim::Geant4Particle::daughters
Particles daughters
The list of daughters of this MC particle.
Definition: Geant4Particle.h:140
dd4hep::sim::G4PARTICLE_SIM_DECAY_TRACKER
@ G4PARTICLE_SIM_DECAY_TRACKER
Definition: Geant4Particle.h:88
dd4hep::sim::Geant4ParticleProperties
Geant4ParticleProperties
Track properties.
Definition: Geant4Particle.h:56
dd4hep::sim::Geant4ParticleHandle::momentum
double momentum() const
Scalar particle momentum.
Definition: Geant4Particle.h:209
dd4hep::sim::Geant4ParticleHandle::processTypeName
std::string processTypeName() const
Access to the creator process type name.
Definition: Geant4Particle.cpp:241
dd4hep::sim::Geant4Particle::mask
int mask
Definition: Geant4Particle.h:112
dd4hep::sim::Geant4Particle::time
double time
Particle creation time.
Definition: Geant4Particle.h:134
dd4hep::sim::Geant4Particle::steps
int steps
Definition: Geant4Particle.h:113
dd4hep::sim::Geant4Particle::process
const G4VProcess * process
Reference to the G4VProcess, which created this track.
Definition: Geant4Particle.h:145
dd4hep::sim::Geant4ParticleHandle::g4DefinitionsExact
static G4ParticleDefinition * g4DefinitionsExact(const std::string &expression)
Access Geant4 particle definitions by exact match.
Definition: Geant4Particle.cpp:221
dd4hep::sim::Geant4Particle::pex
double pex
The track momentum at the end vertex.
Definition: Geant4Particle.h:130
dd4hep::sim::Geant4ParticleMap::particleID
int particleID(int track, bool throw_if_not_found=true) const
Access the equivalent track id (shortcut to the usage of TrackEquivalents)
Definition: Geant4Particle.cpp:541
dd4hep::sim::G4PARTICLE_HAS_SECONDARIES
@ G4PARTICLE_HAS_SECONDARIES
Definition: Geant4Particle.h:59
dd4hep::sim::Geant4Particle::vex
double vex
The end vertex.
Definition: Geant4Particle.h:126
dd4hep::sim::Geant4Particle::vsx
double vsx
The starting vertex.
Definition: Geant4Particle.h:124
dd4hep::sim::Geant4ParticleMap::clear
void clear()
Clear particle maps.
Definition: Geant4Particle.cpp:488
dd4hep::sim::Geant4Particle::psx
double psx
The track momentum at the start vertex.
Definition: Geant4Particle.h:128
dd4hep::sim::G4PARTICLE_GEN_BEAM
@ G4PARTICLE_GEN_BEAM
Definition: Geant4Particle.h:74
dd4hep::sim::Geant4ParticleHandle::definition
const G4ParticleDefinition * definition() const
Access the Geant4 particle definition object (expensive!)
Definition: Geant4Particle.cpp:116
dd4hep::sim::Geant4Particle::pey
double pey
Definition: Geant4Particle.h:130
dd4hep::sim::G4PARTICLE_FORCE_KILL
@ G4PARTICLE_FORCE_KILL
Definition: Geant4Particle.h:67
dd4hep::sim::Geant4ParticleMap::particleMap
ParticleMap particleMap
Mapping of particles of this event.
Definition: Geant4Particle.h:343
dd4hep::sim::G4PARTICLE_SIM_LEFT_DETECTOR
@ G4PARTICLE_SIM_LEFT_DETECTOR
Definition: Geant4Particle.h:90
dd4hep::sim::Geant4Particle::Geant4Particle
Geant4Particle()
not persistent
Definition: Geant4Particle.cpp:42
dd4hep::sim::Geant4ParticleHandle::mass
double mass() const
Geant4 mass of the particle.
Definition: Geant4Particle.h:213
dd4hep::sim::Geant4ParticleHandle::particle
Geant4Particle * particle
Particle pointer.
Definition: Geant4Particle.h:187
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::sim::Geant4ParticleHandle
Data structure to access derived MC particle information.
Definition: Geant4Particle.h:181
dd4hep::sim::Geant4ParticleHandle::dumpWithMomentum
void dumpWithMomentum(int level, const std::string &src, const char *tag) const
Output type 3:+++ <tag> ID: 0 e- status:00000014 type: 11 Vertex:(+0.00e+00,+0.00e+00,...
Definition: Geant4Particle.cpp:331
dd4hep::sim::Geant4Particle::parents
Particles parents
The list of parents of this MC particle.
Definition: Geant4Particle.h:138
dd4hep::sim::Geant4ParticleHandle::startVertex
ThreeVector startVertex() const
Access particle momentum, energy as 4 vector.
Definition: Geant4Particle.h:296
dd4hep::sim::Geant4ParticleMap::equivalentTracks
TrackEquivalents equivalentTracks
Map associating the G4Track identifiers with identifiers of existing MCParticles.
Definition: Geant4Particle.h:345
dd4hep::sim::Geant4Particle::vsy
double vsy
Definition: Geant4Particle.h:124
dd4hep::sim::G4PARTICLE_CREATED_CALORIMETER_HIT
@ G4PARTICLE_CREATED_CALORIMETER_HIT
Definition: Geant4Particle.h:63
dd4hep::sim::ParticleExtension
Base class to extend the basic particle class used by DDG4 with user information.
Definition: Geant4Particle.h:47
dd4hep::sim::G4PARTICLE_PRIMARY
@ G4PARTICLE_PRIMARY
Definition: Geant4Particle.h:58
dd4hep::sim::Geant4Particle
Data structure to store the MC particle information.
Definition: Geant4Particle.h:103
dd4hep::sim::Geant4ParticleHandle::time
double time() const
Geant4 time of the particle.
Definition: Geant4Particle.h:215
dd4hep::sim::Geant4Particle::charge
char charge
Definition: Geant4Particle.h:119
dd4hep::detail::tools::copy
void copy(Alignment from, Alignment to)
Copy alignment object from source object.
Definition: AlignmentTools.cpp:43
dd4hep::sim::Geant4ParticleHandle::energy
double energy() const
Scalar particle energy.
Definition: Geant4Particle.h:308
dd4hep::sim::Geant4Particle::psy
double psy
Definition: Geant4Particle.h:128
dd4hep::sim::Geant4ParticleMap::isValid
bool isValid() const
Check if the particle map was ever filled (ie. some particle handler was present)
Definition: Geant4Particle.cpp:536
dd4hep::sim::Geant4Particle::operator=
Geant4Particle & operator=(const Geant4Particle &copy)=delete
NO assignment operation.
dd4hep::sim::G4PARTICLE_GEN_OTHER
@ G4PARTICLE_GEN_OTHER
Definition: Geant4Particle.h:76
dd4hep::sim::Geant4Particle::release
void release()
Decrease reference count. Deletes object if NULL.
Definition: Geant4Particle.cpp:59
dd4hep::sim::Geant4Particle::properTime
double properTime
Proper time.
Definition: Geant4Particle.h:136
dd4hep::sim::Geant4ParticleHandle::header4
static void header4(int level, const std::string &src, const char *tag)
Definition: Geant4Particle.cpp:375
dd4hep::sim::Geant4Particle::removeDaughter
void removeDaughter(int id_daughter)
Remove daughter from set.
Definition: Geant4Particle.cpp:110
dd4hep::sim::Geant4Particle::ref
int ref
Reference counter.
Definition: Geant4Particle.h:107