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

Output filter discarding events that did not produce any of a given isotope list. More...

#include <RMGIsotopeFilterScheme.hh>

Inheritance diagram for RMGIsotopeFilterScheme:
Collaboration diagram for RMGIsotopeFilterScheme:

Public Member Functions

bool ShouldDiscardEvent (const G4Event *) override
 Discard the event if none of the registered isotopes was produced.
 
std::optional< bool > StackingActionNewStage (int stage) override
 Drive the two-stage stacking when photon deferral is enabled.
 
std::optional< G4ClassificationOfNewTrack > StackingActionClassify (const G4Track *, int stage) override
 Defer photons to stage 1; otherwise leave the classification unchanged.
 
void TrackingActionPre (const G4Track *) override
 Tag the current event if the track's particle matches a registered isotope.
 
void AddIsotope (int a, int z)
 Add an (A, Z) isotope to the keep list.
 
- Public Member Functions inherited from RMGVOutputScheme
virtual void AssignOutputNames (G4AnalysisManager *)
 Initialize ntuple column names for this output scheme.
 
virtual void ClearBeforeEvent ()
 Clear any event-specific data.
 
virtual bool StoreAlways () const
 Indicates whether the output scheme always stores event data.
 
virtual void StoreEvent (const G4Event *)
 Store the event data.
 
virtual void TrackingActionPost (const G4Track *)
 Hook called after tracking a new particle.
 
virtual void SteppingAction (const G4Step *)
 Hook called after each step.
 
virtual void EndOfRunAction (const G4Run *)
 Perform final actions at the end of a run.
 
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)
 

Additional Inherited Members

- Static Public Attributes inherited from RMGVOutputScheme
static std::string fUIDKeyFormatString = "det{:03}"
 
- Protected Member Functions inherited from RMGVOutputScheme
virtual std::string GetNtupleName (RMGDetectorMetadata det) const
 
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
 
- Protected Attributes inherited from RMGVOutputScheme
bool fNtuplePerDetector = true
 
bool fNtupleUseVolumeName = false
 
int fEventIDOffset = 0
 

Detailed Description

Output filter discarding events that did not produce any of a given isotope list.

Tracks created in the event are inspected; if no track corresponds to a (A, Z) pair in the configured isotope set, the event is discarded. With fDiscardPhotonsIfIsotopeNotProduced enabled, photon (and optical) tracks are deferred to a second stacking stage so that they are only tracked if a matching isotope is actually produced first, saving CPU on rejected events.

Member Function Documentation

◆ ShouldDiscardEvent()

bool RMGIsotopeFilterScheme::ShouldDiscardEvent ( const G4Event * event)
overridevirtual

Discard the event if none of the registered isotopes was produced.

Reimplemented from RMGVOutputScheme.

◆ StackingActionClassify()

std::optional< G4ClassificationOfNewTrack > RMGIsotopeFilterScheme::StackingActionClassify ( const G4Track * aTrack,
int stage )
overridevirtual

Defer photons to stage 1; otherwise leave the classification unchanged.

Reimplemented from RMGVOutputScheme.

◆ StackingActionNewStage()

std::optional< bool > RMGIsotopeFilterScheme::StackingActionNewStage ( int stage)
overridevirtual

Drive the two-stage stacking when photon deferral is enabled.

Reimplemented from RMGVOutputScheme.

◆ TrackingActionPre()

void RMGIsotopeFilterScheme::TrackingActionPre ( const G4Track * aTrack)
overridevirtual

Tag the current event if the track's particle matches a registered isotope.

Reimplemented from RMGVOutputScheme.


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