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

Data structure to map particles produced during the generation and the simulation. More...

#include <Geant4Particle.h>

Public Types

typedef Geant4Particle Particle
 
typedef std::map< int, Particle * > ParticleMap
 
typedef std::map< int, int > TrackEquivalents
 

Public Member Functions

 Geant4ParticleMap ()
 Default constructor. More...
 
virtual ~Geant4ParticleMap ()
 Default destructor. More...
 
bool isValid () const
 Check if the particle map was ever filled (ie. some particle handler was present) More...
 
void dump () const
 Dump content. More...
 
void clear ()
 Clear particle maps. More...
 
void adopt (ParticleMap &pm, TrackEquivalents &equiv)
 Adopt particle maps. More...
 
const ParticleMapparticles () const
 Access the particle map. More...
 
const TrackEquivalentsequivalents () const
 Access the map of track equivalents. More...
 
int particleID (int track, bool throw_if_not_found=true) const
 Access the equivalent track id (shortcut to the usage of TrackEquivalents) More...
 

Public Attributes

ParticleMap particleMap
 Mapping of particles of this event. More...
 
TrackEquivalents equivalentTracks
 Map associating the G4Track identifiers with identifiers of existing MCParticles. More...
 

Detailed Description

Data structure to map particles produced during the generation and the simulation.

This data structure is added to the Geant4Event data extensions by the Geant4GenerationInit action. Particles are added:

Note: This object takes OWNERSHIP of the inserted particles! beware of double deletion of objects!

Author
M.Frank
Version
1.0

Definition at line 337 of file Geant4Particle.h.

Member Typedef Documentation

◆ Particle

Definition at line 339 of file Geant4Particle.h.

◆ ParticleMap

Definition at line 340 of file Geant4Particle.h.

◆ TrackEquivalents

Definition at line 341 of file Geant4Particle.h.

Constructor & Destructor Documentation

◆ Geant4ParticleMap()

dd4hep::sim::Geant4ParticleMap::Geant4ParticleMap ( )
inline

Default constructor.

Definition at line 349 of file Geant4Particle.h.

◆ ~Geant4ParticleMap()

Geant4ParticleMap::~Geant4ParticleMap ( )
virtual

Default destructor.

Definition at line 483 of file Geant4Particle.cpp.

Member Function Documentation

◆ adopt()

void Geant4ParticleMap::adopt ( ParticleMap pm,
TrackEquivalents equiv 
)

Adopt particle maps.

Definition at line 526 of file Geant4Particle.cpp.

◆ clear()

void Geant4ParticleMap::clear ( )

Clear particle maps.

Definition at line 488 of file Geant4Particle.cpp.

◆ dump()

void Geant4ParticleMap::dump ( ) const

Dump content.

Definition at line 495 of file Geant4Particle.cpp.

◆ equivalents()

const TrackEquivalents& dd4hep::sim::Geant4ParticleMap::equivalents ( ) const
inline

Access the map of track equivalents.

Definition at line 363 of file Geant4Particle.h.

◆ isValid()

bool Geant4ParticleMap::isValid ( ) const

Check if the particle map was ever filled (ie. some particle handler was present)

Definition at line 536 of file Geant4Particle.cpp.

◆ particleID()

int Geant4ParticleMap::particleID ( int  track,
bool  throw_if_not_found = true 
) const

Access the equivalent track id (shortcut to the usage of TrackEquivalents)

Definition at line 541 of file Geant4Particle.cpp.

◆ particles()

const ParticleMap& dd4hep::sim::Geant4ParticleMap::particles ( ) const
inline

Access the particle map.

Definition at line 361 of file Geant4Particle.h.

Member Data Documentation

◆ equivalentTracks

TrackEquivalents dd4hep::sim::Geant4ParticleMap::equivalentTracks

Map associating the G4Track identifiers with identifiers of existing MCParticles.

not persistent

Definition at line 345 of file Geant4Particle.h.

◆ particleMap

ParticleMap dd4hep::sim::Geant4ParticleMap::particleMap

Mapping of particles of this event.

Definition at line 343 of file Geant4Particle.h.


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