Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::ParticleTrackingAction Class Reference

#include <acts/blob/sPHENIX/Examples/Algorithms/Geant4/include/ActsExamples/Geant4/ParticleTrackingAction.hpp>

+ Inheritance diagram for ActsExamples::ParticleTrackingAction:
+ Collaboration diagram for ActsExamples::ParticleTrackingAction:

Classes

struct  Config
 

Public Member Functions

 ParticleTrackingAction (const Config &cfg, std::unique_ptr< const Acts::Logger > logger=Acts::getDefaultLogger("ParticleTrackingAction", Acts::Logging::INFO))
 
 ~ParticleTrackingAction () override=default
 
void PreUserTrackingAction (const G4Track *aTrack) final
 
void PostUserTrackingAction (const G4Track *aTrack) final
 

Protected Attributes

Config m_cfg
 

Private Member Functions

SimParticle convert (const G4Track &aTrack, SimBarcode particleId) const
 
std::optional< SimBarcodemakeParticleId (G4int trackId, G4int parentId) const
 Make the particle id.
 
const Acts::Loggerlogger () const
 Private access method to the logging instance.
 
EventStoreeventStore () const
 Private access method to the event store.
 

Private Attributes

std::unique_ptr< const
Acts::Logger
m_logger
 The looging instance.
 

Detailed Description

The G4UserTrackingAction that is called for every track in the simulation process.

It records the initial and final particle state

Definition at line 31 of file ParticleTrackingAction.hpp.

View newest version in sPHENIX GitHub at line 31 of file ParticleTrackingAction.hpp

Constructor & Destructor Documentation

ActsExamples::ParticleTrackingAction::ParticleTrackingAction ( const Config cfg,
std::unique_ptr< const Acts::Logger logger = Acts::getDefaultLogger("ParticleTrackingAction",                                                    Acts::Logging::INFO) 
)

Construct the stepping action

Parameters
cfgthe configuration struct
loggerthe ACTS logging instance

Definition at line 30 of file ParticleTrackingAction.cpp.

View newest version in sPHENIX GitHub at line 30 of file ParticleTrackingAction.cpp

ActsExamples::ParticleTrackingAction::~ParticleTrackingAction ( )
overridedefault

Member Function Documentation

ActsExamples::SimParticle ActsExamples::ParticleTrackingAction::convert ( const G4Track &  aTrack,
SimBarcode  particleId 
) const
private

Convert a G4Track to a SimParticle

Parameters
aTrackthe current Geant4 track
particleIdthe particle ID the particle will have

Definition at line 105 of file ParticleTrackingAction.cpp.

View newest version in sPHENIX GitHub at line 105 of file ParticleTrackingAction.cpp

References charge(), Acts::UnitConstants::GeV, mass, Acts::UnitConstants::mm, Acts::UnitConstants::ns, merge_hashes::p, pdg, ActsFatras::Particle::setAbsoluteMomentum(), ActsFatras::Particle::setDirection(), and ActsFatras::Particle::setPosition4().

+ Here is the call graph for this function:

EventStore& ActsExamples::ParticleTrackingAction::eventStore ( ) const
inlineprivate

Private access method to the event store.

Definition at line 78 of file ParticleTrackingAction.hpp.

View newest version in sPHENIX GitHub at line 78 of file ParticleTrackingAction.hpp

References ActsExamples::ParticleTrackingAction::Config::eventStore, and m_cfg.

const Acts::Logger& ActsExamples::ParticleTrackingAction::logger ( ) const
inlineprivate

Private access method to the logging instance.

Definition at line 75 of file ParticleTrackingAction.hpp.

View newest version in sPHENIX GitHub at line 75 of file ParticleTrackingAction.hpp

References m_logger.

std::optional< ActsExamples::SimBarcode > ActsExamples::ParticleTrackingAction::makeParticleId ( G4int  trackId,
G4int  parentId 
) const
private

Make the particle id.

Definition at line 132 of file ParticleTrackingAction.cpp.

View newest version in sPHENIX GitHub at line 132 of file ParticleTrackingAction.cpp

References ACTS_DEBUG, train_ambiguity_solver::pid, and Acts::MultiIndex< T, BitsPerLevel >::Zeros().

+ Here is the call graph for this function:

void ActsExamples::ParticleTrackingAction::PostUserTrackingAction ( const G4Track *  aTrack)
final

Action after the track is processed in the the simulation, this will record the final particle

Parameters
aTrackthe current Geant4 track

Definition at line 70 of file ParticleTrackingAction.cpp.

View newest version in sPHENIX GitHub at line 70 of file ParticleTrackingAction.cpp

References ACTS_WARNING, assert, Acts::Svg::DetectorConverter::convert(), Acts::eInvalid, it, m_cfg(), n, and particle.

+ Here is the call graph for this function:

void ActsExamples::ParticleTrackingAction::PreUserTrackingAction ( const G4Track *  aTrack)
final

Action before the track is processed in the the simulation, this will record the initial particle

Parameters
aTrackthe current Geant4 track

Definition at line 34 of file ParticleTrackingAction.cpp.

View newest version in sPHENIX GitHub at line 34 of file ParticleTrackingAction.cpp

References ACTS_WARNING, Acts::Svg::DetectorConverter::convert(), it, and particle.

+ Here is the call graph for this function:

Member Data Documentation

Config ActsExamples::ParticleTrackingAction::m_cfg
protected

Definition at line 62 of file ParticleTrackingAction.hpp.

View newest version in sPHENIX GitHub at line 62 of file ParticleTrackingAction.hpp

Referenced by eventStore().

std::unique_ptr<const Acts::Logger> ActsExamples::ParticleTrackingAction::m_logger
private

The looging instance.

Definition at line 81 of file ParticleTrackingAction.hpp.

View newest version in sPHENIX GitHub at line 81 of file ParticleTrackingAction.hpp

Referenced by logger().


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