15 #ifndef DD4HEP_GEANT4PARTICLE_H
16 #define DD4HEP_GEANT4PARTICLE_H
22 #include "Math/Vector4D.h"
25 class G4ParticleDefinition;
36 namespace Simulation {
125 #ifdef DD4HEP_DD4HEP_PTR_AUTO
152 #ifndef __DDG4_STANDALONE_DICTIONARIES__
209 const G4ParticleDefinition *
definition()
const;
214 void dump1(
int level,
const std::string& src,
const char* tag)
const;
216 void dump2(
int level,
const std::string& src,
const char* tag,
int g4id,
bool inrec)
const;
218 void dumpWithVertex(
int level,
const std::string& src,
const char* tag)
const;
219 void dumpWithMomentum(
int level,
const std::string& src,
const char* tag)
const;
221 void dump4(
int level,
const std::string& src,
const char* tag)
const;
226 void offset(
int off)
const;
231 : particle(c.particle) {
263 return ROOT::Math::PxPyPzM4D<double>(p->
psx,p->
psy,p->
psz,p->
mass);
269 return ROOT::Math::Cartesian3D<double>(p->
vsx,p->
vsy,p->
vsz);
275 return ROOT::Math::Cartesian3D<double>(p->
vex,p->
vey,p->
vez);
335 int particleID(
int track,
bool throw_if_not_found=
true)
const;
341 #endif // DD4HEP_GEANT4PARTICLE_H
ROOT::Math::PxPyPzM4D< double > FourVector
Geant4Particle * addRef()
Increase reference count.
const G4VProcess * process
not persisten. ROOT cannot handle
size_t numDaughter() const
Accessor to the number of particle daughters.
dd4hep_ptr< ParticleExtension > extension
User data extension if required.
std::map< int, Particle * > ParticleMap
void offset(int off) const
Handlers.
Data structure to store the MC particle information.
void adopt(ParticleMap &pm, TrackEquivalents &equiv)
Adopt particle maps.
void removeDaughter(int id_daughter)
Remove daughter from set.
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,+0.00e+00) [mm] time: +0.00e+00 [ns] #Par: 0 #Dau: 4.
double momentum() const
Scalar particle momentum.
ThreeVector endVertex() const
Access patricle momentum, energy as 4 vector.
Geant4ParticleHandle(Geant4Particle *part)
Default constructor.
FourVector pxPyPzM() const
Access patricle momentum, energy as 4 vector.
int charge3() const
Charge accessor (for python etc.)
std::set< int > Particles
int particleID(int track, bool throw_if_not_found=true) const
Access the equivalent track id (shortcut to the usage of TrackEquivalents)
void dump4(int level, const std::string &src, const char *tag) const
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...
const ParticleMap & particles() const
Access the particle map.
Out version of the std auto_ptr implementation base either on auto_ptr or unique_ptr.
const TrackEquivalents & equivalents() const
Access the map of track equivalents.
Geant4ParticleMap()
Default constructor.
ThreeVector startVertex() const
Access patricle momentum, energy as 4 vector.
Base class to extend the basic particle class used by DDG4 with user information. ...
Particles parents
The list of daughters of this MC particle.
Geant4ParticleProperties
Track properties.
Data structure to map particles produced during the generation and the simulation.
int ref
Reference counter.
const G4ParticleDefinition * definition() const
Access the Geant4 particle definition object (expensive!)
virtual ~ParticleExtension()
Default destructor.
ParticleExtension()
Default constructor.
std::string particleName() const
Access to the Geant4 particle name.
void clear()
Clear particle maps.
double time() const
Geant4 time of the particle.
Geant4ParticleHandle & operator=(Geant4Particle *part)
Assignment operator.
std::string particleType() const
Access to the Geant4 particle type.
size_t numParent() const
Accessor to the number of particle parents.
Geant4Particle * operator->() const
Overloaded -> operator to access particle details.
Data structure to access derived MC particle information.
ROOT::Math::Cartesian3D< double > ThreeVector
double energy() const
Scalar particle energy.
double momentum2() const
Scalar particle momentum squared.
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,+0.00e+00) [mm] time: +0.00e+00 [ns] #Par: 0 #Dau: 4.
virtual ~Geant4ParticleMap()
Default destructor.
Geant4Particle & get_data(Geant4Particle &c)
Assignment operator.
bool isValid() const
Check if the particle map was ever filled (ie. some particle handler was present) ...
virtual ~Geant4Particle()
Default destructor.
void dump1(int level, const std::string &src, const char *tag) const
Various output formats:
std::map< int, int > TrackEquivalents
std::string processName() const
Access to the creator process name.
Geant4Particle * particle
Particle pointer.
ParticleMap particleMap
Mapping of particles of this event.
TrackEquivalents equivalentTracks
Map associating the G4Track identifiers with identifiers of existing MCParticles. ...
void dump() const
Dump content.
double charge() const
Geant4 charge of the particle.
Geant4Particle()
Default constructor.
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,+0.00e+00) [mm] time: +0.00e+00 [ns] #Par: 0 #Dau: 4.
std::string processTypeName() const
Access to the creator process type name.
double mass() const
Geant4 mass of the particle.
void release()
Decrease reference count. Deletes object if NULL.