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

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

#include <Geant4StepHandler.h>

Inheritance diagram for dd4hep::sim::Geant4StepHandler:
dd4hep::sim::Geant4HitHandler

Public Member Functions

 Geant4StepHandler ()=delete
 Inhibit default constructor. More...
 
 Geant4StepHandler (const G4Step *s)
 Initializing constructor. More...
 
 Geant4StepHandler (const Geant4StepHandler &copy)=delete
 No copy constructor. More...
 
 Geant4StepHandler (Geant4StepHandler &&copy)=delete
 No move constructor. More...
 
Geant4StepHandleroperator= (const Geant4StepHandler &copy)=delete
 Assignment operator inhibited. Should not be copied. More...
 
Geant4StepHandleroperator= (Geant4StepHandler &&copy)=delete
 Move operator inhibited. Should not be copied. More...
 
const char * preStepStatus () const
 Returns the pre-step status in form of a string. More...
 
const char * postStepStatus () const
 Returns the post-step status in form of a string. More...
 
double totalEnergy () const
 Returns total energy deposit. More...
 
Position prePos () const
 Returns the pre-step position. More...
 
const G4ThreeVector & prePosG4 () const
 Returns the pre-step position as a G4ThreeVector. More...
 
Position postPos () const
 Returns the post-step position. More...
 
const G4ThreeVector & postPosG4 () const
 Returns the post-step position as a G4ThreeVector. More...
 
G4ThreeVector avgPositionG4 () const
 Average position vector of the step. More...
 
Position avgPosition () const
 Average position vector of the step. More...
 
Position direction () const
 Direction calculated from the post- and pre-position ofthe step. More...
 
Momentum preMom () const
 
Momentum postMom () const
 
double deposit () const
 
double stepLength () const
 
const G4VTouchable * preTouchable () const
 
const G4VTouchable * postTouchable () const
 
const char * volName (const G4StepPoint *p, const char *undefined="") const
 
G4VPhysicalVolume * volume (const G4StepPoint *p) const
 
G4VSolid * solid (const G4StepPoint *p) const
 
G4VPhysicalVolume * physvol (const G4StepPoint *p) const
 
G4LogicalVolume * logvol (const G4StepPoint *p) const
 
G4VSensitiveDetectorsd (const G4StepPoint *p) const
 
std::string sdName (const G4StepPoint *p, const std::string &undefined="") const
 
bool isSensitive (const G4StepPoint *point) const
 
G4VPhysicalVolume * preVolume () const
 
G4VSensitiveDetectorpreSD () const
 
G4VPhysicalVolume * postVolume () const
 
G4VSensitiveDetectorpostSD () const
 
bool firstInVolume () const
 
bool lastInVolume () const
 
double birkAttenuation () const
 Apply BirksLaw. More...
 
void doApplyBirksLaw (void)
 Set applyBirksLaw to ture. More...
 
- Public Member Functions inherited from dd4hep::sim::Geant4HitHandler
 Geant4HitHandler ()=delete
 Inhibit default constructor. More...
 
 Geant4HitHandler (const G4Track *t, const G4VTouchable *h)
 Initializing constructor. More...
 
 Geant4HitHandler (const Geant4HitHandler &copy)=delete
 No copy constructor. More...
 
 Geant4HitHandler (Geant4HitHandler &&copy)=delete
 No move constructor. More...
 
Geant4HitHandleroperator= (const Geant4HitHandler &copy)=delete
 Assignment operator inhibited. Should not be copied. More...
 
Geant4HitHandleroperator= (Geant4HitHandler &&copy)=delete
 Move operator inhibited. Should not be copied. More...
 
const G4VTouchable * touchable () const
 
G4ParticleDefinition * trackDef () const
 
int trkPdgID () const
 
int trkID () const
 Access the G4 track ID. More...
 
int parentID () const
 Access the G4 track ID of the parent track. More...
 
double trkTime () const
 
double trkEnergy () const
 
double trkKineEnergy () const
 
int trkStatus () const
 
bool trkAlive () const
 
const G4VProcess * trkProcess () const
 
Momentum trkMom () const
 
bool isSensitive (const G4LogicalVolume *lv) const
 
bool isSensitive (const G4VPhysicalVolume *pv) const
 
Position localToGlobal (const Position &local) const
 Coordinate transformation to global coordinates. More...
 
Position localToGlobal (const DDSegmentation::Vector3D &local) const
 Coordinate transformation to global coordinates. More...
 
Position localToGlobal (const G4ThreeVector &local) const
 Coordinate transformation to global coordinates in MM. More...
 
Position localToGlobal (double x, double y, double z) const
 Coordinate transformation to global coordinates in MM. More...
 
Position globalToLocal (double x, double y, double z) const
 Coordinate transformation to local coordinates. More...
 
Position globalToLocal (const Position &global) const
 Coordinate transformation to local coordinates. More...
 
Position globalToLocal (const G4ThreeVector &global) const
 Coordinate transformation to local coordinates. More...
 
G4ThreeVector globalToLocalG4 (double x, double y, double z) const
 Coordinate transformation to local coordinates. More...
 
G4ThreeVector globalToLocalG4 (const G4ThreeVector &loc) const
 Coordinate transformation to local coordinates with G4 objects. More...
 

Static Public Member Functions

static const char * stepStatus (G4StepStatus status)
 Returns the step status (argument) in form of a string. More...
 

Public Attributes

const G4Step * step
 
G4StepPoint * pre
 
G4StepPoint * post
 
bool applyBirksLaw
 
- Public Attributes inherited from dd4hep::sim::Geant4HitHandler
const G4Track * track
 
const G4VTouchable * touchable_ptr
 

Detailed Description

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

Helper/utility class to easily access Geant4 step information. Born by lazyness: Avoid typing millions of statements!

Author
M.Frank
Version
1.0

Definition at line 46 of file Geant4StepHandler.h.

Constructor & Destructor Documentation

◆ Geant4StepHandler() [1/4]

dd4hep::sim::Geant4StepHandler::Geant4StepHandler ( )
delete

Inhibit default constructor.

◆ Geant4StepHandler() [2/4]

dd4hep::sim::Geant4StepHandler::Geant4StepHandler ( const G4Step *  s)
inline

Initializing constructor.

Definition at line 55 of file Geant4StepHandler.h.

◆ Geant4StepHandler() [3/4]

dd4hep::sim::Geant4StepHandler::Geant4StepHandler ( const Geant4StepHandler copy)
delete

No copy constructor.

◆ Geant4StepHandler() [4/4]

dd4hep::sim::Geant4StepHandler::Geant4StepHandler ( Geant4StepHandler &&  copy)
delete

No move constructor.

Member Function Documentation

◆ avgPosition()

Position dd4hep::sim::Geant4StepHandler::avgPosition ( ) const
inline

Average position vector of the step.

Definition at line 109 of file Geant4StepHandler.h.

◆ avgPositionG4()

G4ThreeVector dd4hep::sim::Geant4StepHandler::avgPositionG4 ( ) const
inline

Average position vector of the step.

Definition at line 102 of file Geant4StepHandler.h.

◆ birkAttenuation()

double Geant4StepHandler::birkAttenuation ( ) const

Apply BirksLaw.

Definition at line 68 of file Geant4StepHandler.cpp.

◆ deposit()

double dd4hep::sim::Geant4StepHandler::deposit ( ) const
inline

Definition at line 135 of file Geant4StepHandler.h.

◆ direction()

Position dd4hep::sim::Geant4StepHandler::direction ( ) const
inline

Direction calculated from the post- and pre-position ofthe step.

Definition at line 116 of file Geant4StepHandler.h.

◆ doApplyBirksLaw()

void dd4hep::sim::Geant4StepHandler::doApplyBirksLaw ( void  )
inline

Set applyBirksLaw to ture.

Definition at line 196 of file Geant4StepHandler.h.

◆ firstInVolume()

bool dd4hep::sim::Geant4StepHandler::firstInVolume ( ) const
inline

Definition at line 187 of file Geant4StepHandler.h.

◆ isSensitive()

bool dd4hep::sim::Geant4StepHandler::isSensitive ( const G4StepPoint *  point) const
inline

Definition at line 172 of file Geant4StepHandler.h.

◆ lastInVolume()

bool dd4hep::sim::Geant4StepHandler::lastInVolume ( ) const
inline

Definition at line 190 of file Geant4StepHandler.h.

◆ logvol()

G4LogicalVolume* dd4hep::sim::Geant4StepHandler::logvol ( const G4StepPoint *  p) const
inline

Definition at line 160 of file Geant4StepHandler.h.

◆ operator=() [1/2]

Geant4StepHandler& dd4hep::sim::Geant4StepHandler::operator= ( const Geant4StepHandler copy)
delete

Assignment operator inhibited. Should not be copied.

◆ operator=() [2/2]

Geant4StepHandler& dd4hep::sim::Geant4StepHandler::operator= ( Geant4StepHandler &&  copy)
delete

Move operator inhibited. Should not be copied.

◆ physvol()

G4VPhysicalVolume* dd4hep::sim::Geant4StepHandler::physvol ( const G4StepPoint *  p) const
inline

Definition at line 157 of file Geant4StepHandler.h.

◆ postMom()

Momentum dd4hep::sim::Geant4StepHandler::postMom ( ) const
inline

Definition at line 131 of file Geant4StepHandler.h.

◆ postPos()

Position dd4hep::sim::Geant4StepHandler::postPos ( ) const
inline

Returns the post-step position.

Definition at line 93 of file Geant4StepHandler.h.

◆ postPosG4()

const G4ThreeVector& dd4hep::sim::Geant4StepHandler::postPosG4 ( ) const
inline

Returns the post-step position as a G4ThreeVector.

Definition at line 98 of file Geant4StepHandler.h.

◆ postSD()

G4VSensitiveDetector* dd4hep::sim::Geant4StepHandler::postSD ( ) const
inline

Definition at line 184 of file Geant4StepHandler.h.

◆ postStepStatus()

const char * Geant4StepHandler::postStepStatus ( ) const

Returns the post-step status in form of a string.

Definition at line 63 of file Geant4StepHandler.cpp.

◆ postTouchable()

const G4VTouchable* dd4hep::sim::Geant4StepHandler::postTouchable ( ) const
inline

Definition at line 144 of file Geant4StepHandler.h.

◆ postVolume()

G4VPhysicalVolume* dd4hep::sim::Geant4StepHandler::postVolume ( ) const
inline

Definition at line 181 of file Geant4StepHandler.h.

◆ preMom()

Momentum dd4hep::sim::Geant4StepHandler::preMom ( ) const
inline

Definition at line 127 of file Geant4StepHandler.h.

◆ prePos()

Position dd4hep::sim::Geant4StepHandler::prePos ( ) const
inline

Returns the pre-step position.

Definition at line 84 of file Geant4StepHandler.h.

◆ prePosG4()

const G4ThreeVector& dd4hep::sim::Geant4StepHandler::prePosG4 ( ) const
inline

Returns the pre-step position as a G4ThreeVector.

Definition at line 89 of file Geant4StepHandler.h.

◆ preSD()

G4VSensitiveDetector* dd4hep::sim::Geant4StepHandler::preSD ( ) const
inline

Definition at line 178 of file Geant4StepHandler.h.

◆ preStepStatus()

const char * Geant4StepHandler::preStepStatus ( ) const

Returns the pre-step status in form of a string.

Definition at line 58 of file Geant4StepHandler.cpp.

◆ preTouchable()

const G4VTouchable* dd4hep::sim::Geant4StepHandler::preTouchable ( ) const
inline

Definition at line 141 of file Geant4StepHandler.h.

◆ preVolume()

G4VPhysicalVolume* dd4hep::sim::Geant4StepHandler::preVolume ( ) const
inline

Definition at line 175 of file Geant4StepHandler.h.

◆ sd()

G4VSensitiveDetector* dd4hep::sim::Geant4StepHandler::sd ( const G4StepPoint *  p) const
inline

Definition at line 164 of file Geant4StepHandler.h.

◆ sdName()

std::string dd4hep::sim::Geant4StepHandler::sdName ( const G4StepPoint *  p,
const std::string &  undefined = "" 
) const
inline

Definition at line 168 of file Geant4StepHandler.h.

◆ solid()

G4VSolid* dd4hep::sim::Geant4StepHandler::solid ( const G4StepPoint *  p) const
inline

Definition at line 154 of file Geant4StepHandler.h.

◆ stepLength()

double dd4hep::sim::Geant4StepHandler::stepLength ( ) const
inline

Definition at line 138 of file Geant4StepHandler.h.

◆ stepStatus()

const char * Geant4StepHandler::stepStatus ( G4StepStatus  status)
static

Returns the step status (argument) in form of a string.

Returns the step status in form of a string.

Definition at line 27 of file Geant4StepHandler.cpp.

◆ totalEnergy()

double dd4hep::sim::Geant4StepHandler::totalEnergy ( ) const
inline

Returns total energy deposit.

Definition at line 77 of file Geant4StepHandler.h.

◆ volName()

const char* dd4hep::sim::Geant4StepHandler::volName ( const G4StepPoint *  p,
const char *  undefined = "" 
) const
inline

Definition at line 147 of file Geant4StepHandler.h.

◆ volume()

G4VPhysicalVolume* dd4hep::sim::Geant4StepHandler::volume ( const G4StepPoint *  p) const
inline

Definition at line 151 of file Geant4StepHandler.h.

Member Data Documentation

◆ applyBirksLaw

bool dd4hep::sim::Geant4StepHandler::applyBirksLaw

Definition at line 51 of file Geant4StepHandler.h.

◆ post

G4StepPoint* dd4hep::sim::Geant4StepHandler::post

Definition at line 50 of file Geant4StepHandler.h.

◆ pre

G4StepPoint* dd4hep::sim::Geant4StepHandler::pre

Definition at line 49 of file Geant4StepHandler.h.

◆ step

const G4Step* dd4hep::sim::Geant4StepHandler::step

Definition at line 48 of file Geant4StepHandler.h.


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