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

Helper class to ease the extraction of information from a G4Track object. More...

#include <Geant4TrackHandler.h>

Public Types

typedef G4VUserTrackInformation Info
 
typedef G4ReferenceCountedHandle< G4VTouchable > Touchable
 

Public Member Functions

 Geant4TrackHandler ()=delete
 Inhibit default constructor. More...
 
 Geant4TrackHandler (const G4Track *t)
 Initializing constructor. More...
 
const char * statusName () const
 
 operator const G4Track * () const
 Conversion to G4Track. More...
 
int id () const
 Track's identifier. More...
 
int parent () const
 Track's parent identifier. More...
 
G4ParticleDefinition * trackDef () const
 Track's particle definition. More...
 
const std::string & name () const
 Track's particle name. More...
 
const std::string & type () const
 Track's particle type. More...
 
const G4ThreeVector & position () const
 Track's position. More...
 
const G4ThreeVector & vertex () const
 Track's vertex position, where the track was created. More...
 
double globalTime () const
 Track global time. More...
 
double properTime () const
 Track proper time. More...
 
double energy () const
 Track's energy. More...
 
double kineticEnergy () const
 Track's kinetic energy. More...
 
double velocity () const
 Track velocity. More...
 
double length () const
 Track length. More...
 
double time () const
 Track time. More...
 
double charge () const
 Track charge. More...
 
double mass () const
 Track charge. More...
 
G4VPhysicalVolume * vol () const
 Physical (original) volume of the track. More...
 
G4ThreeVector momentum () const
 
G4VPhysicalVolume * nextVol () const
 Next physical volume of the track. More...
 
const G4LogicalVolume * vertexVol () const
 Logical volume of the origine vertex. More...
 
const Touchabletouchable () const
 Touchable of the track. More...
 
const TouchablenextTouchable () const
 Next touchable of the track. More...
 
const G4VProcess * creatorProcess () const
 Physical process of the track generation. More...
 
const std::string creatorName () const
 Physical process of the track generation. More...
 
InfouserInfo () const
 User information block. More...
 
template<typename T >
T * info () const
 Specific user information block. More...
 
const G4Step * step () const
 Step information. More...
 
G4int stepNumber () const
 Step number. More...
 
int pdgID () const
 Access the PDG particle identification. More...
 
const G4DynamicParticle * dynamic () const
 Access the dynamic particle of the track object. More...
 
const G4PrimaryParticle * primary () const
 Access the primary particle of the track object (if present) More...
 

Public Attributes

const G4Track * track
 Reference to the track object. More...
 

Detailed Description

Helper class to ease the extraction of information from a G4Track object.

Tiny helper/utility class to easily access Geant4 track information. Born by lazyness: Avoid typing millions of statements!

Author
M.Frank
Version
1.0

Definition at line 53 of file Geant4TrackHandler.h.

Member Typedef Documentation

◆ Info

Definition at line 55 of file Geant4TrackHandler.h.

◆ Touchable

typedef G4ReferenceCountedHandle<G4VTouchable> dd4hep::sim::Geant4TrackHandler::Touchable

Definition at line 56 of file Geant4TrackHandler.h.

Constructor & Destructor Documentation

◆ Geant4TrackHandler() [1/2]

dd4hep::sim::Geant4TrackHandler::Geant4TrackHandler ( )
delete

Inhibit default constructor.

◆ Geant4TrackHandler() [2/2]

dd4hep::sim::Geant4TrackHandler::Geant4TrackHandler ( const G4Track *  t)
inline

Initializing constructor.

Should test here if the track pointer is valid to avoind any later trouble

Definition at line 62 of file Geant4TrackHandler.h.

Member Function Documentation

◆ charge()

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

Track charge.

Definition at line 141 of file Geant4TrackHandler.h.

◆ creatorName()

const std::string dd4hep::sim::Geant4TrackHandler::creatorName ( ) const
inline

Physical process of the track generation.

Definition at line 178 of file Geant4TrackHandler.h.

◆ creatorProcess()

const G4VProcess* dd4hep::sim::Geant4TrackHandler::creatorProcess ( ) const
inline

Physical process of the track generation.

Definition at line 174 of file Geant4TrackHandler.h.

◆ dynamic()

const G4DynamicParticle* dd4hep::sim::Geant4TrackHandler::dynamic ( ) const
inline

Access the dynamic particle of the track object.

Definition at line 205 of file Geant4TrackHandler.h.

◆ energy()

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

Track's energy.

Definition at line 121 of file Geant4TrackHandler.h.

◆ globalTime()

double dd4hep::sim::Geant4TrackHandler::globalTime ( ) const
inline

Track global time.

Definition at line 113 of file Geant4TrackHandler.h.

◆ id()

int dd4hep::sim::Geant4TrackHandler::id ( ) const
inline

Track's identifier.

Definition at line 85 of file Geant4TrackHandler.h.

◆ info()

template<typename T >
T* dd4hep::sim::Geant4TrackHandler::info ( ) const
inline

Specific user information block.

Definition at line 188 of file Geant4TrackHandler.h.

◆ kineticEnergy()

double dd4hep::sim::Geant4TrackHandler::kineticEnergy ( ) const
inline

Track's kinetic energy.

Definition at line 125 of file Geant4TrackHandler.h.

◆ length()

double dd4hep::sim::Geant4TrackHandler::length ( ) const
inline

Track length.

Definition at line 133 of file Geant4TrackHandler.h.

◆ mass()

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

Track charge.

Definition at line 146 of file Geant4TrackHandler.h.

◆ momentum()

G4ThreeVector dd4hep::sim::Geant4TrackHandler::momentum ( ) const
inline

Definition at line 154 of file Geant4TrackHandler.h.

◆ name()

const std::string& dd4hep::sim::Geant4TrackHandler::name ( ) const
inline

Track's particle name.

Definition at line 97 of file Geant4TrackHandler.h.

◆ nextTouchable()

const Touchable& dd4hep::sim::Geant4TrackHandler::nextTouchable ( ) const
inline

Next touchable of the track.

Definition at line 170 of file Geant4TrackHandler.h.

◆ nextVol()

G4VPhysicalVolume* dd4hep::sim::Geant4TrackHandler::nextVol ( ) const
inline

Next physical volume of the track.

Definition at line 158 of file Geant4TrackHandler.h.

◆ operator const G4Track *()

dd4hep::sim::Geant4TrackHandler::operator const G4Track * ( ) const
inline

Conversion to G4Track.

Definition at line 81 of file Geant4TrackHandler.h.

◆ parent()

int dd4hep::sim::Geant4TrackHandler::parent ( ) const
inline

Track's parent identifier.

Definition at line 89 of file Geant4TrackHandler.h.

◆ pdgID()

int dd4hep::sim::Geant4TrackHandler::pdgID ( ) const
inline

Access the PDG particle identification.

Definition at line 200 of file Geant4TrackHandler.h.

◆ position()

const G4ThreeVector& dd4hep::sim::Geant4TrackHandler::position ( ) const
inline

Track's position.

Definition at line 105 of file Geant4TrackHandler.h.

◆ primary()

const G4PrimaryParticle* dd4hep::sim::Geant4TrackHandler::primary ( ) const
inline

Access the primary particle of the track object (if present)

Definition at line 209 of file Geant4TrackHandler.h.

◆ properTime()

double dd4hep::sim::Geant4TrackHandler::properTime ( ) const
inline

Track proper time.

Definition at line 117 of file Geant4TrackHandler.h.

◆ statusName()

const char* dd4hep::sim::Geant4TrackHandler::statusName ( ) const
inline

Definition at line 68 of file Geant4TrackHandler.h.

◆ step()

const G4Step* dd4hep::sim::Geant4TrackHandler::step ( ) const
inline

Step information.

Definition at line 192 of file Geant4TrackHandler.h.

◆ stepNumber()

G4int dd4hep::sim::Geant4TrackHandler::stepNumber ( ) const
inline

Step number.

Definition at line 196 of file Geant4TrackHandler.h.

◆ time()

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

Track time.

Definition at line 137 of file Geant4TrackHandler.h.

◆ touchable()

const Touchable& dd4hep::sim::Geant4TrackHandler::touchable ( ) const
inline

Touchable of the track.

Definition at line 166 of file Geant4TrackHandler.h.

◆ trackDef()

G4ParticleDefinition* dd4hep::sim::Geant4TrackHandler::trackDef ( ) const
inline

Track's particle definition.

Definition at line 93 of file Geant4TrackHandler.h.

◆ type()

const std::string& dd4hep::sim::Geant4TrackHandler::type ( ) const
inline

Track's particle type.

Definition at line 101 of file Geant4TrackHandler.h.

◆ userInfo()

Info* dd4hep::sim::Geant4TrackHandler::userInfo ( ) const
inline

User information block.

Definition at line 184 of file Geant4TrackHandler.h.

◆ velocity()

double dd4hep::sim::Geant4TrackHandler::velocity ( ) const
inline

Track velocity.

Definition at line 129 of file Geant4TrackHandler.h.

◆ vertex()

const G4ThreeVector& dd4hep::sim::Geant4TrackHandler::vertex ( ) const
inline

Track's vertex position, where the track was created.

Definition at line 109 of file Geant4TrackHandler.h.

◆ vertexVol()

const G4LogicalVolume* dd4hep::sim::Geant4TrackHandler::vertexVol ( ) const
inline

Logical volume of the origine vertex.

Definition at line 162 of file Geant4TrackHandler.h.

◆ vol()

G4VPhysicalVolume* dd4hep::sim::Geant4TrackHandler::vol ( ) const
inline

Physical (original) volume of the track.

Definition at line 151 of file Geant4TrackHandler.h.

Member Data Documentation

◆ track

const G4Track* dd4hep::sim::Geant4TrackHandler::track

Reference to the track object.

Definition at line 58 of file Geant4TrackHandler.h.


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