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

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

#include <Geant4HitHandler.h>

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

Public Member Functions

 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...
 

Public Attributes

const G4Track * track
 
const G4VTouchable * touchable_ptr
 

Detailed Description

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

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

Author
M.Frank
Version
1.0

Definition at line 42 of file Geant4HitHandler.h.

Constructor & Destructor Documentation

◆ Geant4HitHandler() [1/4]

dd4hep::sim::Geant4HitHandler::Geant4HitHandler ( )
delete

Inhibit default constructor.

◆ Geant4HitHandler() [2/4]

dd4hep::sim::Geant4HitHandler::Geant4HitHandler ( const G4Track *  t,
const G4VTouchable *  h 
)
inline

Initializing constructor.

Definition at line 50 of file Geant4HitHandler.h.

◆ Geant4HitHandler() [3/4]

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

No copy constructor.

◆ Geant4HitHandler() [4/4]

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

No move constructor.

Member Function Documentation

◆ globalToLocal() [1/3]

dd4hep::Position Geant4HitHandler::globalToLocal ( const G4ThreeVector &  global) const

Coordinate transformation to local coordinates.

Definition at line 58 of file Geant4HitHandler.cpp.

◆ globalToLocal() [2/3]

dd4hep::Position Geant4HitHandler::globalToLocal ( const Position global) const

Coordinate transformation to local coordinates.

Definition at line 52 of file Geant4HitHandler.cpp.

◆ globalToLocal() [3/3]

dd4hep::Position Geant4HitHandler::globalToLocal ( double  x,
double  y,
double  z 
) const

Coordinate transformation to local coordinates.

Definition at line 46 of file Geant4HitHandler.cpp.

◆ globalToLocalG4() [1/2]

G4ThreeVector Geant4HitHandler::globalToLocalG4 ( const G4ThreeVector &  loc) const

Coordinate transformation to local coordinates with G4 objects.

Coordinate transformation to local coordinates.

Definition at line 69 of file Geant4HitHandler.cpp.

◆ globalToLocalG4() [2/2]

G4ThreeVector Geant4HitHandler::globalToLocalG4 ( double  x,
double  y,
double  z 
) const

Coordinate transformation to local coordinates.

Definition at line 64 of file Geant4HitHandler.cpp.

◆ isSensitive() [1/2]

bool dd4hep::sim::Geant4HitHandler::isSensitive ( const G4LogicalVolume *  lv) const
inline

Definition at line 102 of file Geant4HitHandler.h.

◆ isSensitive() [2/2]

bool dd4hep::sim::Geant4HitHandler::isSensitive ( const G4VPhysicalVolume *  pv) const
inline

Definition at line 105 of file Geant4HitHandler.h.

◆ localToGlobal() [1/4]

dd4hep::Position Geant4HitHandler::localToGlobal ( const DDSegmentation::Vector3D local) const

Coordinate transformation to global coordinates.

Coordinate transformation to global coordinate.

Note: DDSegmentation points are units in CM! Conversion done inside!

Definition at line 25 of file Geant4HitHandler.cpp.

◆ localToGlobal() [2/4]

dd4hep::Position Geant4HitHandler::localToGlobal ( const G4ThreeVector &  local) const

Coordinate transformation to global coordinates in MM.

Coordinate transformation to global coordinates.

Definition at line 40 of file Geant4HitHandler.cpp.

◆ localToGlobal() [3/4]

dd4hep::Position Geant4HitHandler::localToGlobal ( const Position local) const

Coordinate transformation to global coordinates.

Note: Positions are in units of MM!

Definition at line 30 of file Geant4HitHandler.cpp.

◆ localToGlobal() [4/4]

dd4hep::Position Geant4HitHandler::localToGlobal ( double  x,
double  y,
double  z 
) const

Coordinate transformation to global coordinates in MM.

Coordinate transformation to global coordinates.

Definition at line 35 of file Geant4HitHandler.cpp.

◆ operator=() [1/2]

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

Assignment operator inhibited. Should not be copied.

◆ operator=() [2/2]

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

Move operator inhibited. Should not be copied.

◆ parentID()

int dd4hep::sim::Geant4HitHandler::parentID ( ) const
inline

Access the G4 track ID of the parent track.

Definition at line 77 of file Geant4HitHandler.h.

◆ touchable()

const G4VTouchable* dd4hep::sim::Geant4HitHandler::touchable ( ) const
inline

Definition at line 63 of file Geant4HitHandler.h.

◆ trackDef()

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

Definition at line 66 of file Geant4HitHandler.h.

◆ trkAlive()

bool dd4hep::sim::Geant4HitHandler::trkAlive ( ) const
inline

Definition at line 92 of file Geant4HitHandler.h.

◆ trkEnergy()

double dd4hep::sim::Geant4HitHandler::trkEnergy ( ) const
inline

Definition at line 83 of file Geant4HitHandler.h.

◆ trkID()

int dd4hep::sim::Geant4HitHandler::trkID ( ) const
inline

Access the G4 track ID.

Definition at line 73 of file Geant4HitHandler.h.

◆ trkKineEnergy()

double dd4hep::sim::Geant4HitHandler::trkKineEnergy ( ) const
inline

Definition at line 86 of file Geant4HitHandler.h.

◆ trkMom()

Momentum dd4hep::sim::Geant4HitHandler::trkMom ( ) const
inline

Definition at line 98 of file Geant4HitHandler.h.

◆ trkPdgID()

int dd4hep::sim::Geant4HitHandler::trkPdgID ( ) const
inline

Definition at line 69 of file Geant4HitHandler.h.

◆ trkProcess()

const G4VProcess* dd4hep::sim::Geant4HitHandler::trkProcess ( ) const
inline

Definition at line 95 of file Geant4HitHandler.h.

◆ trkStatus()

int dd4hep::sim::Geant4HitHandler::trkStatus ( ) const
inline

Definition at line 89 of file Geant4HitHandler.h.

◆ trkTime()

double dd4hep::sim::Geant4HitHandler::trkTime ( ) const
inline

Definition at line 80 of file Geant4HitHandler.h.

Member Data Documentation

◆ touchable_ptr

const G4VTouchable* dd4hep::sim::Geant4HitHandler::touchable_ptr

Definition at line 46 of file Geant4HitHandler.h.

◆ track

const G4Track* dd4hep::sim::Geant4HitHandler::track

Definition at line 45 of file Geant4HitHandler.h.


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