DD4hep  1.37.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 <unordered_map>
30 #include <vector>
31 #include <memory>
32 
34 namespace dd4hep {
35 
37  namespace sim {
38 
39  // Forward declarations
40  class Geant4Particle;
41 
43 
49  public:
53  virtual ~ParticleExtension();
54  };
55 
69  G4PARTICLE_STARTED_IN_CALORIMETER = 1<<12, // True if the particle has interacted in a calorimeter region.
70 
71  // Generator status for a given particles: bit 0...4, agreed by many formats (HepMC, LCIO, ....):
72  G4PARTICLE_GEN_EMPTY = 1<<0, // Empty line
73  G4PARTICLE_GEN_STABLE = 1<<1, // undecayed particle, stable in the generator
74  G4PARTICLE_GEN_DECAYED = 1<<2, // particle decayed in the generator
75  G4PARTICLE_GEN_DOCUMENTATION = 1<<3, // documentation line
76  G4PARTICLE_GEN_BEAM = 1<<4, // beam particle
77 
78  G4PARTICLE_GEN_OTHER = 1<<9, // any other generator status
79 
80  G4PARTICLE_GEN_GENERATOR = // Particle comes from generator
84  G4PARTICLE_GEN_STATUS = 0x3FF, // Mask for generator status (bit 0...9)
85  G4PARTICLE_GEN_STATUS_MASK = 0xFFFF,// Mask for the raw generator status (max 65k values)
86  // Simulation status of a given particle
87  G4PARTICLE_SIM_CREATED = 1<<10, // True if the particle has been created by the simulation program (rather than the generator)
88  G4PARTICLE_SIM_BACKSCATTER = 1<<11, // True if the particle is the result of a backscatter from a calorimeter shower.
89  G4PARTICLE_SIM_DECAY_CALO = 1<<12, // True if the particle has interacted in a calorimeter region.
90  G4PARTICLE_SIM_DECAY_TRACKER = 1<<13, // True if the particle has interacted in a tracking region.
91  G4PARTICLE_SIM_STOPPED = 1<<14, // True if the particle has been stopped by the simulation program.
92  G4PARTICLE_SIM_LEFT_DETECTOR = 1<<15, // True if the particle has left the world volume undecayed.
93  G4PARTICLE_SIM_PARENT_RADIATED = 1<<16, // True if the particle's vertex is not the endpoint of the parent particle.
94  G4PARTICLE_SIM_OVERLAY = 1<<17, // True if the particle has been overlayed by the simulation (or digitization) program.
95 
97  };
98 
100 
106  public:
107  typedef std::set<int> Particles;
109  int ref { 0 };
110  int id { 0 };
111  int originalG4ID { 0 };
112  int g4Parent { 0 };
113  int reason { 0 };
114  int mask { 0 };
115  int steps { 0 };
116  int secondaries { 0 };
117  int pdgID { 0 };
118  int status { 0 };
119  int colorFlow[2] { 0, 0 };
120  unsigned short genStatus { 0 };
121  char charge { 0 };
122  char _spare[1] { 0 };
123  float spin[3] { 0E0,0E0,0E0 };
124  // 12 ints + 4 bytes + 3 floats should be aligned to 8 bytes....
126  double vsx = 0E0, vsy = 0E0, vsz = 0E0;
128  double vex = 0E0, vey = 0E0, vez = 0E0;
130  double psx = 0E0, psy = 0E0, psz = 0E0;
132  double pex = 0E0, pey = 0E0, pez = 0E0;
134  double mass { 0E0 };
136  double time { 0E0 };
138  double properTime { 0E0 };
143 
145  std::unique_ptr<ParticleExtension> extension { };
147  const G4VProcess *process = 0;
148 
149  public:
151  Geant4Particle();
153  Geant4Particle(int part_id);
157  virtual ~Geant4Particle();
162  ++ref;
163  return this;
164  }
166  void release();
170  void removeDaughter(int id_daughter);
172  int charge3() const { return charge; }
173  };
174 
175 #ifndef __DDG4_STANDALONE_DICTIONARIES__
176 
178 
184  public:
185  typedef ROOT::Math::PxPyPzM4D<double> FourVector;
186  typedef ROOT::Math::Cartesian3D<double> ThreeVector;
187  protected:
190 
191  public:
199  Geant4Particle* operator->() const;
201  operator Geant4Particle*() const;
203  size_t numParent() const;
205  size_t numDaughter() const;
207  double momentum2() const;
209  double energy() const;
211  double momentum() const { return std::sqrt(momentum2()); }
213  double charge() const { return double(particle->charge); }
215  double mass() const { return particle->mass; }
217  double time() const { return particle->time; }
219  std::string particleName() const;
221  std::string particleType() const;
223  std::string processName() const;
225  std::string processTypeName() const;
227  FourVector pxPyPzM() const;
229  template <typename T> std::vector<T> pxPyPzM(T unit) const;
231  ThreeVector startVertex() const;
233  ThreeVector endVertex() const;
235  const G4ParticleDefinition *definition() const;
236 
238 
240  void dump1(int level, const std::string& src, const char* tag) const;
242  void dump2(int level, const std::string& src, const char* tag, int g4id, bool inrec) const;
244  void dumpWithVertex(int level, const std::string& src, const char* tag) const;
245  void dumpWithMomentum(int level, const std::string& src, const char* tag) const;
246  void dumpWithMomentumAndVertex(int level, const std::string& src, const char* tag) const;
247  static void header4(int level, const std::string& src, const char* tag);
248  void dump4(int level, const std::string& src, const char* tag) const;
249 
251 
253  void offset(int off) const;
254 
256  static std::vector<G4ParticleDefinition*> g4DefinitionsRegEx(const std::string& expression);
258  static G4ParticleDefinition* g4DefinitionsExact(const std::string& expression);
259  };
260 
262  : particle(c.particle) {
263  }
264 
267  : particle(p) {
268  }
269 
272  return particle;
273  }
276  particle = part;
277  return *this;
278  }
280  inline Geant4ParticleHandle::operator Geant4Particle*() const {
281  return particle;
282  }
284  inline size_t Geant4ParticleHandle::numParent() const {
285  return particle->parents.size();
286  }
288  inline size_t Geant4ParticleHandle::numDaughter() const {
289  return particle->daughters.size();
290  }
292  inline ROOT::Math::PxPyPzM4D<double> Geant4ParticleHandle::pxPyPzM() const {
293  const Geant4Particle* p = particle;
294  return ROOT::Math::PxPyPzM4D<double>(p->psx,p->psy,p->psz,p->mass);
295  }
296 
298  inline ROOT::Math::Cartesian3D<double> Geant4ParticleHandle::startVertex() const {
299  const Geant4Particle* p = particle;
300  return ROOT::Math::Cartesian3D<double>(p->vsx,p->vsy,p->vsz);
301  }
302 
304  inline ROOT::Math::Cartesian3D<double> Geant4ParticleHandle::endVertex() const {
305  const Geant4Particle* p = particle;
306  return ROOT::Math::Cartesian3D<double>(p->vex,p->vey,p->vez);
307  }
308 
310  inline double Geant4ParticleHandle::energy() const {
311  const Geant4Particle* p = particle;
312  ROOT::Math::PxPyPzM4D<double> v(p->psx,p->psy,p->psz,p->mass);
313  return v.E();
314  }
315 
317  inline double Geant4ParticleHandle::momentum2() const {
318  const Geant4Particle* p = particle;
319  return (p->psx*p->psx + p->psy*p->psy + p->psz*p->psz);
320  }
321 
323 
340  public:
342  typedef std::map<int,Particle*> ParticleMap;
343  typedef std::unordered_map<int,int> TrackEquivalents;
348 
349  public:
353  virtual ~Geant4ParticleMap();
355  bool isValid() const;
357  void dump() const;
359  void clear();
361  void adopt(ParticleMap& pm, TrackEquivalents& equiv);
363  const ParticleMap& particles() const { return particleMap; }
365  const TrackEquivalents& equivalents() const { return equivalentTracks; }
367  int particleID(int track, bool throw_if_not_found=true) const;
368  };
369 #endif
370 
371  } // End namespace sim
372 } // End namespace dd4hep
373 #endif // DDG4_GEANT4PARTICLE_H
dd4hep::sim::G4PARTICLE_SIM_CREATED
@ G4PARTICLE_SIM_CREATED
Definition: Geant4Particle.h:87
dd4hep::sim::G4PARTICLE_CREATED_TRACKER_HIT
@ G4PARTICLE_CREATED_TRACKER_HIT
Definition: Geant4Particle.h:65
dd4hep::sim::Geant4ParticleHandle::offset
void offset(int off) const
Handlers.
Definition: Geant4Particle.cpp:245
dd4hep::sim::Geant4ParticleMap::Geant4ParticleMap
Geant4ParticleMap()
Default constructor.
Definition: Geant4Particle.h:351
dd4hep::sim::ParticleExtension::ParticleExtension
ParticleExtension()
Default constructor.
Definition: Geant4Particle.h:51
dd4hep::sim::Geant4ParticleHandle::momentum2
double momentum2() const
Scalar particle momentum squared.
Definition: Geant4Particle.h:317
dd4hep::sim::G4PARTICLE_ABOVE_ENERGY_THRESHOLD
@ G4PARTICLE_ABOVE_ENERGY_THRESHOLD
Definition: Geant4Particle.h:61
dd4hep::sim::Geant4Particle::vsz
double vsz
Definition: Geant4Particle.h:126
dd4hep::sim::G4PARTICLE_KEEP_PARENT
@ G4PARTICLE_KEEP_PARENT
Definition: Geant4Particle.h:63
dd4hep::sim::Geant4Particle::reason
int reason
Definition: Geant4Particle.h:113
dd4hep::sim::Geant4ParticleHandle::dump1
void dump1(int level, const std::string &src, const char *tag) const
Various output formats:
Definition: Geant4Particle.cpp:260
dd4hep::sim::Geant4ParticleMap::Particle
Geant4Particle Particle
Definition: Geant4Particle.h:341
dd4hep::sim::G4PARTICLE_GEN_STABLE
@ G4PARTICLE_GEN_STABLE
Definition: Geant4Particle.h:73
dd4hep::sim::G4PARTICLE_SIM_PARENT_RADIATED
@ G4PARTICLE_SIM_PARENT_RADIATED
Definition: Geant4Particle.h:93
v
View * v
Definition: MultiView.cpp:28
dd4hep::sim::Geant4ParticleMap::dump
void dump() const
Dump content.
Definition: Geant4Particle.cpp:491
dd4hep::sim::Geant4Particle::mass
double mass
Particle mass.
Definition: Geant4Particle.h:134
dd4hep::sim::Geant4Particle::vey
double vey
Definition: Geant4Particle.h:128
dd4hep::sim::Geant4ParticleHandle::particleName
std::string particleName() const
Access to the Geant4 particle name.
Definition: Geant4Particle.cpp:150
dd4hep::sim::Geant4Particle::pez
double pez
Definition: Geant4Particle.h:132
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:304
dd4hep::sim::G4PARTICLE_KEEP_USER
@ G4PARTICLE_KEEP_USER
Definition: Geant4Particle.h:66
dd4hep::sim::Geant4ParticleMap::particles
const ParticleMap & particles() const
Access the particle map.
Definition: Geant4Particle.h:363
dd4hep::sim::G4PARTICLE_KEEP_PROCESS
@ G4PARTICLE_KEEP_PROCESS
Definition: Geant4Particle.h:62
dd4hep::sim::Geant4ParticleHandle::numDaughter
size_t numDaughter() const
Accessor to the number of particle daughters.
Definition: Geant4Particle.h:288
dd4hep::sim::Geant4Particle::addRef
Geant4Particle * addRef()
Increase reference count.
Definition: Geant4Particle.h:161
dd4hep::sim::Geant4ParticleHandle::g4DefinitionsRegEx
static std::vector< G4ParticleDefinition * > g4DefinitionsRegEx(const std::string &expression)
Access Geant4 particle definitions by regular expression.
Definition: Geant4Particle.cpp:178
dd4hep::sim::Geant4ParticleHandle::FourVector
ROOT::Math::PxPyPzM4D< double > FourVector
Definition: Geant4Particle.h:185
dd4hep::sim::Geant4ParticleMap::adopt
void adopt(ParticleMap &pm, TrackEquivalents &equiv)
Adopt particle maps.
Definition: Geant4Particle.cpp:522
dd4hep::sim::Geant4ParticleHandle::Geant4ParticleHandle
Geant4ParticleHandle(Geant4Particle *part)
Default constructor.
Definition: Geant4Particle.h:266
dd4hep::sim::Geant4ParticleMap::TrackEquivalents
std::unordered_map< int, int > TrackEquivalents
Definition: Geant4Particle.h:343
dd4hep::sim::Geant4ParticleHandle::processName
std::string processName() const
Access to the creator process name.
Definition: Geant4Particle.cpp:224
dd4hep::sim::Geant4Particle::Geant4Particle
Geant4Particle(const Geant4Particle &copy)=delete
NO copy constructor.
dd4hep::sim::Geant4Particle::pdgID
int pdgID
Definition: Geant4Particle.h:117
dd4hep::sim::Geant4ParticleHandle::endVertex
ThreeVector endVertex() const
Access particle momentum, energy as 4 vector.
Definition: Geant4Particle.h:304
dd4hep::sim::Geant4Particle::g4Parent
int g4Parent
not persistent
Definition: Geant4Particle.h:112
dd4hep::sim::Geant4Particle::psz
double psz
Definition: Geant4Particle.h:130
dd4hep::sim::Geant4ParticleHandle::operator->
Geant4Particle * operator->() const
Overloaded -> operator to access particle details.
Definition: Geant4Particle.h:271
dd4hep::sim::G4PARTICLE_CREATED_HIT
@ G4PARTICLE_CREATED_HIT
Definition: Geant4Particle.h:58
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:85
dd4hep::sim::Geant4ParticleMap::~Geant4ParticleMap
virtual ~Geant4ParticleMap()
Default destructor.
Definition: Geant4Particle.cpp:479
dd4hep::sim::Geant4Particle::charge3
int charge3() const
Charge accessor (for python etc.)
Definition: Geant4Particle.h:172
dd4hep::sim::Geant4Particle::secondaries
int secondaries
Definition: Geant4Particle.h:116
dd4hep::sim::G4PARTICLE_GEN_DOCUMENTATION
@ G4PARTICLE_GEN_DOCUMENTATION
Definition: Geant4Particle.h:75
dd4hep::sim::G4PARTICLE_SIM_BACKSCATTER
@ G4PARTICLE_SIM_BACKSCATTER
Definition: Geant4Particle.h:88
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:349
dd4hep::sim::Geant4Particle::extension
std::unique_ptr< ParticleExtension > extension
User data extension if required.
Definition: Geant4Particle.h:145
dd4hep::sim::Geant4ParticleHandle::charge
double charge() const
Geant4 charge of the particle.
Definition: Geant4Particle.h:213
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:339
dd4hep::sim::ParticleExtension::~ParticleExtension
virtual ~ParticleExtension()
Default destructor.
Definition: Geant4Particle.cpp:38
dd4hep::sim::G4PARTICLE_GEN_EMPTY
@ G4PARTICLE_GEN_EMPTY
Definition: Geant4Particle.h:72
dd4hep::sim::G4PARTICLE_SIM_STOPPED
@ G4PARTICLE_SIM_STOPPED
Definition: Geant4Particle.h:91
dd4hep::sim::Geant4ParticleHandle::particleType
std::string particleType() const
Access to the Geant4 particle type.
Definition: Geant4Particle.cpp:164
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:122
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:284
dd4hep::sim::Geant4Particle::Particles
std::set< int > Particles
Definition: Geant4Particle.h:107
dd4hep::sim::Geant4Particle::vez
double vez
Definition: Geant4Particle.h:128
dd4hep::sim::G4PARTICLE_SIM_DECAY_CALO
@ G4PARTICLE_SIM_DECAY_CALO
Definition: Geant4Particle.h:89
dd4hep::sim::Geant4ParticleHandle::numParent
size_t numParent() const
Accessor to the number of particle parents.
Definition: Geant4Particle.h:284
dd4hep::sim::Geant4ParticleMap::ParticleMap
std::map< int, Particle * > ParticleMap
Definition: Geant4Particle.h:342
dd4hep::sim::G4PARTICLE_KEEP_ALWAYS
@ G4PARTICLE_KEEP_ALWAYS
Definition: Geant4Particle.h:67
dd4hep::sim::Geant4ParticleMap::equivalents
const TrackEquivalents & equivalents() const
Access the map of track equivalents.
Definition: Geant4Particle.h:365
dd4hep::sim::G4PARTICLE_GEN_GENERATOR
@ G4PARTICLE_GEN_GENERATOR
Definition: Geant4Particle.h:80
dd4hep::sim::Geant4Particle::colorFlow
int colorFlow[2]
Definition: Geant4Particle.h:119
dd4hep::sim::Geant4Particle::spin
float spin[3]
Definition: Geant4Particle.h:123
dd4hep::sim::G4PARTICLE_GEN_STATUS
@ G4PARTICLE_GEN_STATUS
Definition: Geant4Particle.h:84
dd4hep::sim::Geant4Particle::genStatus
unsigned short genStatus
Definition: Geant4Particle.h:120
dd4hep::sim::Geant4Particle::status
int status
Definition: Geant4Particle.h:118
dd4hep::sim::Geant4ParticleHandle::ThreeVector
ROOT::Math::Cartesian3D< double > ThreeVector
Definition: Geant4Particle.h:186
dd4hep::sim::Geant4ParticleHandle::pxPyPzM
FourVector pxPyPzM() const
Access particle momentum, energy as 4 vector.
Definition: Geant4Particle.h:292
dd4hep::sim::G4PARTICLE_GEN_DECAYED
@ G4PARTICLE_GEN_DECAYED
Definition: Geant4Particle.h:74
dd4hep::sim::Geant4Particle::originalG4ID
int originalG4ID
Definition: Geant4Particle.h:111
dd4hep::sim::Geant4ParticleHandle::dump4
void dump4(int level, const std::string &src, const char *tag) const
Definition: Geant4Particle.cpp:382
dd4hep::sim::G4PARTICLE_LAST_NOTHING
@ G4PARTICLE_LAST_NOTHING
Definition: Geant4Particle.h:96
dd4hep::sim::G4PARTICLE_SIM_OVERLAY
@ G4PARTICLE_SIM_OVERLAY
Definition: Geant4Particle.h:94
dd4hep::sim::Geant4ParticleHandle::operator=
Geant4ParticleHandle & operator=(Geant4Particle *part)
Assignment operator.
Definition: Geant4Particle.h:275
dd4hep::sim::Geant4Particle::daughters
Particles daughters
The list of daughters of this MC particle.
Definition: Geant4Particle.h:142
dd4hep::sim::G4PARTICLE_SIM_DECAY_TRACKER
@ G4PARTICLE_SIM_DECAY_TRACKER
Definition: Geant4Particle.h:90
dd4hep::sim::Geant4ParticleProperties
Geant4ParticleProperties
Track properties.
Definition: Geant4Particle.h:57
dd4hep::sim::G4PARTICLE_STARTED_IN_CALORIMETER
@ G4PARTICLE_STARTED_IN_CALORIMETER
Definition: Geant4Particle.h:69
dd4hep::sim::Geant4ParticleHandle::momentum
double momentum() const
Scalar particle momentum.
Definition: Geant4Particle.h:211
dd4hep::sim::Geant4ParticleHandle::processTypeName
std::string processTypeName() const
Access to the creator process type name.
Definition: Geant4Particle.cpp:237
dd4hep::sim::Geant4Particle::mask
int mask
Definition: Geant4Particle.h:114
dd4hep::sim::Geant4Particle::time
double time
Particle creation time.
Definition: Geant4Particle.h:136
dd4hep::sim::Geant4Particle::steps
int steps
Definition: Geant4Particle.h:115
dd4hep::sim::Geant4Particle::process
const G4VProcess * process
Reference to the G4VProcess, which created this track.
Definition: Geant4Particle.h:147
dd4hep::sim::Geant4ParticleHandle::g4DefinitionsExact
static G4ParticleDefinition * g4DefinitionsExact(const std::string &expression)
Access Geant4 particle definitions by exact match.
Definition: Geant4Particle.cpp:217
dd4hep::sim::Geant4Particle::pex
double pex
The track momentum at the end vertex.
Definition: Geant4Particle.h:132
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:537
dd4hep::sim::G4PARTICLE_HAS_SECONDARIES
@ G4PARTICLE_HAS_SECONDARIES
Definition: Geant4Particle.h:60
dd4hep::sim::Geant4Particle::vex
double vex
The end vertex.
Definition: Geant4Particle.h:128
dd4hep::sim::Geant4Particle::vsx
double vsx
The starting vertex.
Definition: Geant4Particle.h:126
dd4hep::sim::Geant4ParticleMap::clear
void clear()
Clear particle maps.
Definition: Geant4Particle.cpp:484
dd4hep::sim::Geant4Particle::psx
double psx
The track momentum at the start vertex.
Definition: Geant4Particle.h:130
dd4hep::sim::G4PARTICLE_GEN_BEAM
@ G4PARTICLE_GEN_BEAM
Definition: Geant4Particle.h:76
dd4hep::sim::Geant4ParticleHandle::definition
const G4ParticleDefinition * definition() const
Access the Geant4 particle definition object (expensive!)
Definition: Geant4Particle.cpp:112
dd4hep::sim::Geant4Particle::pey
double pey
Definition: Geant4Particle.h:132
dd4hep::sim::G4PARTICLE_FORCE_KILL
@ G4PARTICLE_FORCE_KILL
Definition: Geant4Particle.h:68
dd4hep::sim::Geant4ParticleMap::particleMap
ParticleMap particleMap
Mapping of particles of this event.
Definition: Geant4Particle.h:345
dd4hep::sim::G4PARTICLE_SIM_LEFT_DETECTOR
@ G4PARTICLE_SIM_LEFT_DETECTOR
Definition: Geant4Particle.h:92
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:215
dd4hep::sim::Geant4ParticleHandle::particle
Geant4Particle * particle
Particle pointer.
Definition: Geant4Particle.h:189
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:183
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:327
dd4hep::sim::Geant4Particle::parents
Particles parents
The list of parents of this MC particle.
Definition: Geant4Particle.h:140
dd4hep::sim::Geant4ParticleHandle::startVertex
ThreeVector startVertex() const
Access particle momentum, energy as 4 vector.
Definition: Geant4Particle.h:298
dd4hep::sim::Geant4ParticleMap::equivalentTracks
TrackEquivalents equivalentTracks
Map associating the G4Track identifiers with identifiers of existing MCParticles.
Definition: Geant4Particle.h:347
dd4hep::sim::Geant4Particle::vsy
double vsy
Definition: Geant4Particle.h:126
dd4hep::sim::G4PARTICLE_CREATED_CALORIMETER_HIT
@ G4PARTICLE_CREATED_CALORIMETER_HIT
Definition: Geant4Particle.h:64
dd4hep::sim::ParticleExtension
Base class to extend the basic particle class used by DDG4 with user information.
Definition: Geant4Particle.h:48
dd4hep::sim::G4PARTICLE_PRIMARY
@ G4PARTICLE_PRIMARY
Definition: Geant4Particle.h:59
dd4hep::sim::Geant4Particle
Data structure to store the MC particle information.
Definition: Geant4Particle.h:105
dd4hep::sim::Geant4ParticleHandle::time
double time() const
Geant4 time of the particle.
Definition: Geant4Particle.h:217
dd4hep::sim::Geant4Particle::charge
char charge
Definition: Geant4Particle.h:121
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:310
dd4hep::sim::Geant4Particle::psy
double psy
Definition: Geant4Particle.h:130
dd4hep::sim::Geant4ParticleMap::isValid
bool isValid() const
Check if the particle map was ever filled (ie. some particle handler was present)
Definition: Geant4Particle.cpp:532
dd4hep::sim::Geant4Particle::operator=
Geant4Particle & operator=(const Geant4Particle &copy)=delete
NO assignment operation.
dd4hep::sim::G4PARTICLE_GEN_OTHER
@ G4PARTICLE_GEN_OTHER
Definition: Geant4Particle.h:78
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:138
dd4hep::sim::Geant4ParticleHandle::header4
static void header4(int level, const std::string &src, const char *tag)
Definition: Geant4Particle.cpp:371
dd4hep::sim::Geant4Particle::removeDaughter
void removeDaughter(int id_daughter)
Remove daughter from set.
Definition: Geant4Particle.cpp:106
dd4hep::sim::Geant4Particle::ref
int ref
Reference counter.
Definition: Geant4Particle.h:109