remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGTrackOutputScheme Class Reference

Output scheme for track information. More...

#include <RMGTrackOutputScheme.hh>

Inheritance diagram for RMGTrackOutputScheme:
Collaboration diagram for RMGTrackOutputScheme:

Public Member Functions

void AssignOutputNames (G4AnalysisManager *) override
 Sets the names of the output columns, invoked in RMGRunAction::SetupAnalysisManager.
 
void TrackingActionPre (const G4Track *) override
 Called in RMGTrackingAction::PreUserTrackingAction to collect information about the track before it is processed.
 
void EndOfRunAction (const G4Run *) override
 handles the storage of the process map.
 
void ClearBeforeEvent () override
 Clears the event data and frees memory before the next event is processed.
 
void StoreEvent (const G4Event *) override
 Store the information from the event, invoked in RMGEventAction::EndOfEventAction.
 
bool StoreAlways () const override
 Invoked in RMGEventAction::EndOfEventAction and decides whether to always store this OutputScheme.
 
- Public Member Functions inherited from RMGVOutputScheme
virtual bool ShouldDiscardEvent (const G4Event *)
 Decide whether to discard the current event.
 
virtual std::optional< G4ClassificationOfNewTrack > StackingActionClassify (const G4Track *, const int)
 Hook for classifying new tracks during the stacking phase.
 
virtual std::optional< bool > StackingActionNewStage (const int)
 Hook for transitioning to a new stacking stage.
 
virtual void TrackingActionPost (const G4Track *)
 Hook called after tracking a new particle.
 
virtual void SteppingAction (const G4Step *)
 Hook called after each step.
 
void SetNtuplePerDetector (bool ntuple_per_det)
 Specify whether to create separate ntuples for each detector.
 
void SetNtupleUseVolumeName (bool use_vol_name)
 Specify whether to use the physical volume name for naming ntuples.
 
void SetEventIDOffset (int offset)
 

Protected Member Functions

std::string GetNtupleName (RMGDetectorMetadata) const override
 
void AddParticleFilter (const int pdg)
 
void AddProcessFilter (const std::string proc)
 
void SetEnergyFilter (double energy)
 
- Protected Member Functions inherited from RMGVOutputScheme
virtual std::string GetNtupleNameFlat () const
 
void CreateNtupleFOrDColumn (G4AnalysisManager *ana_man, int nt, std::string name, bool use_float)
 
void FillNtupleFOrDColumn (G4AnalysisManager *ana_man, int nt, int col, double val, bool use_float)
 
int GetEventIDForStorage (const G4Event *evt) const
 

Additional Inherited Members

- Static Public Attributes inherited from RMGVOutputScheme
static std::string fUIDKeyFormatString = "det{:03}"
 
- Protected Attributes inherited from RMGVOutputScheme
bool fNtuplePerDetector = true
 
bool fNtupleUseVolumeName = false
 
int fEventIDOffset = 0
 

Detailed Description

Output scheme for track information.

This output scheme records the properties of each track generated. The properties of each track recorded:

  • event index,
  • track ID,
  • parent track ID,
  • creator process,
  • particle type,
  • time,
  • position,
  • momentum,
  • kinetic energy

The creator process is mapped to a unique integer value and additionally stored in the output.

It can be specified that the information is always stored, even if the event would be discarded by other output schemes.

Member Function Documentation

◆ AssignOutputNames()

void RMGTrackOutputScheme::AssignOutputNames ( G4AnalysisManager * ana_man)
overridevirtual

Sets the names of the output columns, invoked in RMGRunAction::SetupAnalysisManager.

Reimplemented from RMGVOutputScheme.

◆ ClearBeforeEvent()

void RMGTrackOutputScheme::ClearBeforeEvent ( )
overridevirtual

Clears the event data and frees memory before the next event is processed.

Reimplemented from RMGVOutputScheme.

◆ EndOfRunAction()

void RMGTrackOutputScheme::EndOfRunAction ( const G4Run * )
overridevirtual

handles the storage of the process map.

Reimplemented from RMGVOutputScheme.

◆ GetNtupleName()

std::string RMGTrackOutputScheme::GetNtupleName ( RMGDetectorMetadata ) const
inlinenodiscardoverrideprotectedvirtual

Reimplemented from RMGVOutputScheme.

◆ StoreAlways()

bool RMGTrackOutputScheme::StoreAlways ( ) const
inlinenodiscardoverridevirtual

Invoked in RMGEventAction::EndOfEventAction and decides whether to always store this OutputScheme.

Reimplemented from RMGVOutputScheme.

◆ StoreEvent()

void RMGTrackOutputScheme::StoreEvent ( const G4Event * )
overridevirtual

Store the information from the event, invoked in RMGEventAction::EndOfEventAction.

If fStoreAlways is true, the information is always stored, even if the event would be discarded by other output schemes.

Reimplemented from RMGVOutputScheme.

◆ TrackingActionPre()

void RMGTrackOutputScheme::TrackingActionPre ( const G4Track * track)
overridevirtual

Called in RMGTrackingAction::PreUserTrackingAction to collect information about the track before it is processed.

Reimplemented from RMGVOutputScheme.


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