ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
ActsPlugins::Geant4MaterialStepConverter Class Reference

Converts Geant4 steps into recorded material tracks. More...

#include <ActsPlugins/Geant4/Geant4MaterialStepConverter.hpp>

Classes

struct  Config
 Nested configuration struct. More...

Public Member Functions

 Geant4MaterialStepConverter (const Config &cfg)
 Constructor.
bool addStep (const G4Step &step, Acts::RecordedMaterialTrack &track) const
 Add the material of a step to a recorded material track.
const Config & config () const
 Readonly access to the configuration.
Acts::RecordedMaterialTrack startTrack (const G4Track &track) const
 Start a recorded material track.

Detailed Description

Converts Geant4 steps into recorded material tracks.

This is the Geant4 side of a material recording with geantinos: an Acts::RecordedMaterialTrack is started from a Geant4 track with startTrack, and every step of it through a material is added to it with addStep as one Acts::MaterialInteraction. The caller owns the tracks.

Constructor & Destructor Documentation

◆ Geant4MaterialStepConverter()

ActsPlugins::Geant4MaterialStepConverter::Geant4MaterialStepConverter ( const Config & cfg)
explicit

Constructor.

Parameters
cfgthe configuration

Member Function Documentation

◆ addStep()

bool ActsPlugins::Geant4MaterialStepConverter::addStep ( const G4Step & step,
Acts::RecordedMaterialTrack & track ) const

Add the material of a step to a recorded material track.

The material is appended as one interaction, and added to the accumulated material of the track.

Parameters
stepthe Geant4 step
trackthe material track the step belongs to
Returns
whether the step was recorded, it is not if it has no material or the material is excluded

◆ config()

const Config & ActsPlugins::Geant4MaterialStepConverter::config ( ) const

Readonly access to the configuration.

Returns
the configuration

◆ startTrack()

Acts::RecordedMaterialTrack ActsPlugins::Geant4MaterialStepConverter::startTrack ( const G4Track & track) const

Start a recorded material track.

Parameters
trackthe Geant4 track
Returns
an empty material track, starting at the vertex position and the initial direction of track