DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
dd4hep::sim::Geant4ParticleHandle Class Reference

Data structure to access derived MC particle information. More...

#include <Geant4Particle.h>

Public Types

typedef ROOT::Math::PxPyPzM4D< double > FourVector
 
typedef ROOT::Math::Cartesian3D< double > ThreeVector
 

Public Member Functions

 Geant4ParticleHandle (Geant4Particle *part)
 Default constructor. More...
 
 Geant4ParticleHandle (const Geant4ParticleHandle &h)
 Initializing constructor. More...
 
Geant4ParticleHandleoperator= (Geant4Particle *part)
 Assignment operator. More...
 
Geant4Particleoperator-> () const
 Overloaded -> operator to access particle details. More...
 
 operator Geant4Particle * () const
 Conversion operator to pointer. More...
 
size_t numParent () const
 Accessor to the number of particle parents. More...
 
size_t numDaughter () const
 Accessor to the number of particle daughters. More...
 
double momentum2 () const
 Scalar particle momentum squared. More...
 
double energy () const
 Scalar particle energy. More...
 
double momentum () const
 Scalar particle momentum. More...
 
double charge () const
 Geant4 charge of the particle. More...
 
double mass () const
 Geant4 mass of the particle. More...
 
double time () const
 Geant4 time of the particle. More...
 
std::string particleName () const
 Access to the Geant4 particle name. More...
 
std::string particleType () const
 Access to the Geant4 particle type. More...
 
std::string processName () const
 Access to the creator process name. More...
 
std::string processTypeName () const
 Access to the creator process type name. More...
 
FourVector pxPyPzM () const
 Access particle momentum, energy as 4 vector. More...
 
template<typename T >
std::vector< T > pxPyPzM (T unit) const
 Access particle momentum, energy as 4 vector. More...
 
ThreeVector startVertex () const
 Access particle momentum, energy as 4 vector. More...
 
ThreeVector endVertex () const
 Access particle momentum, energy as 4 vector. More...
 
const G4ParticleDefinition * definition () const
 Access the Geant4 particle definition object (expensive!) More...
 
void dump1 (int level, const std::string &src, const char *tag) const
 Various output formats: More...
 
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:YES #Par: 1/18 #Dau: 0. More...
 
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. More...
 
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. More...
 
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. More...
 
void dump4 (int level, const std::string &src, const char *tag) const
 
void offset (int off) const
 Handlers. More...
 

Static Public Member Functions

static void header4 (int level, const std::string &src, const char *tag)
 
static std::vector< G4ParticleDefinition * > g4DefinitionsRegEx (const std::string &expression)
 Access Geant4 particle definitions by regular expression. More...
 
static G4ParticleDefinition * g4DefinitionsExact (const std::string &expression)
 Access Geant4 particle definitions by exact match. More...
 

Protected Attributes

Geant4Particleparticle
 Particle pointer. More...
 

Detailed Description

Data structure to access derived MC particle information.

Author
M.Frank
Version
1.0

Definition at line 181 of file Geant4Particle.h.

Member Typedef Documentation

◆ FourVector

typedef ROOT::Math::PxPyPzM4D<double> dd4hep::sim::Geant4ParticleHandle::FourVector

Definition at line 183 of file Geant4Particle.h.

◆ ThreeVector

typedef ROOT::Math::Cartesian3D<double> dd4hep::sim::Geant4ParticleHandle::ThreeVector

Definition at line 184 of file Geant4Particle.h.

Constructor & Destructor Documentation

◆ Geant4ParticleHandle() [1/2]

dd4hep::sim::Geant4ParticleHandle::Geant4ParticleHandle ( Geant4Particle part)
inline

Default constructor.

Initializing constructor.

Definition at line 264 of file Geant4Particle.h.

◆ Geant4ParticleHandle() [2/2]

dd4hep::sim::Geant4ParticleHandle::Geant4ParticleHandle ( const Geant4ParticleHandle h)
inline

Initializing constructor.

Definition at line 259 of file Geant4Particle.h.

Member Function Documentation

◆ charge()

double dd4hep::sim::Geant4ParticleHandle::charge ( ) const
inline

Geant4 charge of the particle.

Definition at line 211 of file Geant4Particle.h.

◆ definition()

const G4ParticleDefinition * Geant4ParticleHandle::definition ( ) const

Access the Geant4 particle definition object (expensive!)

Definition at line 116 of file Geant4Particle.cpp.

◆ dump1()

void Geant4ParticleHandle::dump1 ( int  level,
const std::string &  src,
const char *  tag 
) const

Various output formats:

Output type 1:+++ <tag> 10 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+1.017927e+03 #Par: 1/4 #Dau: 2.

Output type 1:+++ "tag" 10 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+1.017927e+03 #Par: 1/4 #Dau: 2

Definition at line 264 of file Geant4Particle.cpp.

◆ dump2()

void Geant4ParticleHandle::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:YES #Par: 1/18 #Dau: 0.

Output type 2:+++ <tag> 20 G4: 7 def:0xde4eaa8 [gamma , gamma] reason: 20 E:+3.304035e+01 in record:YES #Par: 1/18 #Dau: 0.

Definition at line 288 of file Geant4Particle.cpp.

◆ dump4()

void Geant4ParticleHandle::dump4 ( int  level,
const std::string &  src,
const char *  tag 
) const

Definition at line 386 of file Geant4Particle.cpp.

◆ dumpWithMomentum()

void Geant4ParticleHandle::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.

Definition at line 331 of file Geant4Particle.cpp.

◆ dumpWithMomentumAndVertex()

void Geant4ParticleHandle::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.

Definition at line 353 of file Geant4Particle.cpp.

◆ dumpWithVertex()

void Geant4ParticleHandle::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.

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.

Definition at line 308 of file Geant4Particle.cpp.

◆ endVertex()

ROOT::Math::Cartesian3D< double > dd4hep::sim::Geant4ParticleHandle::endVertex ( ) const
inline

Access particle momentum, energy as 4 vector.

Access end start vertex as 3-vector.

Definition at line 302 of file Geant4Particle.h.

◆ energy()

double dd4hep::sim::Geant4ParticleHandle::energy ( ) const
inline

Scalar particle energy.

Definition at line 308 of file Geant4Particle.h.

◆ g4DefinitionsExact()

G4ParticleDefinition * Geant4ParticleHandle::g4DefinitionsExact ( const std::string &  expression)
static

Access Geant4 particle definitions by exact match.

Definition at line 221 of file Geant4Particle.cpp.

◆ g4DefinitionsRegEx()

std::vector< G4ParticleDefinition * > Geant4ParticleHandle::g4DefinitionsRegEx ( const std::string &  expression)
static

Access Geant4 particle definitions by regular expression.

Definition at line 182 of file Geant4Particle.cpp.

◆ header4()

void Geant4ParticleHandle::header4 ( int  level,
const std::string &  src,
const char *  tag 
)
static

Definition at line 375 of file Geant4Particle.cpp.

◆ mass()

double dd4hep::sim::Geant4ParticleHandle::mass ( ) const
inline

Geant4 mass of the particle.

Definition at line 213 of file Geant4Particle.h.

◆ momentum()

double dd4hep::sim::Geant4ParticleHandle::momentum ( ) const
inline

Scalar particle momentum.

Definition at line 209 of file Geant4Particle.h.

◆ momentum2()

double dd4hep::sim::Geant4ParticleHandle::momentum2 ( ) const
inline

Scalar particle momentum squared.

Definition at line 315 of file Geant4Particle.h.

◆ numDaughter()

size_t dd4hep::sim::Geant4ParticleHandle::numDaughter ( ) const
inline

Accessor to the number of particle daughters.

Definition at line 286 of file Geant4Particle.h.

◆ numParent()

size_t dd4hep::sim::Geant4ParticleHandle::numParent ( ) const
inline

Accessor to the number of particle parents.

Definition at line 282 of file Geant4Particle.h.

◆ offset()

void Geant4ParticleHandle::offset ( int  off) const

Handlers.

Offset all particle identifiers (id, parents, daughters) by a constant number.

Offset all particle identifiers (id, parents, daughters) by a constant number

Definition at line 249 of file Geant4Particle.cpp.

◆ operator Geant4Particle *()

dd4hep::sim::Geant4ParticleHandle::operator Geant4Particle * ( ) const
inline

Conversion operator to pointer.

Definition at line 278 of file Geant4Particle.h.

◆ operator->()

Geant4Particle * dd4hep::sim::Geant4ParticleHandle::operator-> ( ) const
inline

Overloaded -> operator to access particle details.

Definition at line 269 of file Geant4Particle.h.

◆ operator=()

Geant4ParticleHandle & dd4hep::sim::Geant4ParticleHandle::operator= ( Geant4Particle part)
inline

Assignment operator.

Definition at line 273 of file Geant4Particle.h.

◆ particleName()

std::string Geant4ParticleHandle::particleName ( ) const

Access to the Geant4 particle name.

Definition at line 154 of file Geant4Particle.cpp.

◆ particleType()

std::string Geant4ParticleHandle::particleType ( ) const

Access to the Geant4 particle type.

Definition at line 168 of file Geant4Particle.cpp.

◆ processName()

std::string Geant4ParticleHandle::processName ( ) const

Access to the creator process name.

Definition at line 228 of file Geant4Particle.cpp.

◆ processTypeName()

std::string Geant4ParticleHandle::processTypeName ( ) const

Access to the creator process type name.

Definition at line 241 of file Geant4Particle.cpp.

◆ pxPyPzM() [1/2]

ROOT::Math::PxPyPzM4D< double > dd4hep::sim::Geant4ParticleHandle::pxPyPzM ( ) const
inline

Access particle momentum, energy as 4 vector.

Access patricle momentum, energy as 4 vector.

Definition at line 290 of file Geant4Particle.h.

◆ pxPyPzM() [2/2]

template<typename T >
std::vector<T> dd4hep::sim::Geant4ParticleHandle::pxPyPzM ( unit) const

Access particle momentum, energy as 4 vector.

◆ startVertex()

ROOT::Math::Cartesian3D< double > dd4hep::sim::Geant4ParticleHandle::startVertex ( ) const
inline

Access particle momentum, energy as 4 vector.

Access start vertex as 3-vector.

Definition at line 296 of file Geant4Particle.h.

◆ time()

double dd4hep::sim::Geant4ParticleHandle::time ( ) const
inline

Geant4 time of the particle.

Definition at line 215 of file Geant4Particle.h.

Member Data Documentation

◆ particle

Geant4Particle* dd4hep::sim::Geant4ParticleHandle::particle
protected

Particle pointer.

Definition at line 187 of file Geant4Particle.h.


The documentation for this class was generated from the following files: