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

Output scheme for Germanium detectors. More...

#include <RMGGermaniumOutputScheme.hh>

Inheritance diagram for RMGGermaniumOutputScheme:
Collaboration diagram for RMGGermaniumOutputScheme:

Public Member Functions

void AssignOutputNames (G4AnalysisManager *ana_man) override
 Sets the names of the output columns, invoked in RMGRunAction::SetupAnalysisManager.
 
void StoreEvent (const G4Event *event) override
 Store the information from the event, invoked in RMGEventAction::EndOfEventAction.
 
bool ShouldDiscardEvent (const G4Event *event) override
 Decide whether to store the event, invoked in RMGEventAction::EndOfEventAction.
 
std::optional< bool > StackingActionNewStage (int) override
 Wraps G4UserStackingAction::StackingActionNewStage.
 
std::optional< G4ClassificationOfNewTrack > StackingActionClassify (const G4Track *, int) override
 Wraps G4UserStackingAction::StackingActionClassify.
 
void SetEdepCutLow (double threshold)
 Set a lower cut on the energy deposited in the event to store it.
 
void SetEdepCutHigh (double threshold)
 Set a lower cut on the energy deposited in the event to store it.
 
void AddEdepCutDetector (int det_uid)
 Add a detector uid to the list of detectors to apply the energy cut for.
 
void SetPositionMode (RMGOutputTools::PositionMode mode)
 Set which position is used for the steps.
 
void SetClusterDistance (double threshold)
 Set a distance to compute together steps in the bulk.
 
void SetClusterDistanceSurface (double threshold)
 Set a distance to compute together steps in the surface.
 
void SetSurfaceThickness (double thickness)
 Set the thickness of the surface region.
 
void SetClusterTimeThreshold (double threshold)
 Set the time threshold for pre-clustering.
 
void SetElectronTrackEnergyThreshold (double threshold)
 Set the energy threshold to merge electron tracks.
 
void EndOfRunAction (const G4Run *) override
 Perform final actions at the end of a run.
 
- Public Member Functions inherited from RMGVOutputScheme
virtual void ClearBeforeEvent ()
 Clear any event-specific data.
 
virtual bool StoreAlways () const
 Indicates whether the output scheme always stores event data.
 
virtual void TrackingActionPre (const G4Track *)
 Hook called before tracking a new particle.
 
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 GetNtupleNameFlat () const override
 
- Protected Member Functions inherited from RMGVOutputScheme
virtual std::string GetNtupleName (RMGDetectorMetadata det) 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 Germanium detectors.

This output scheme records the hits in the Germanium detectors. The properties of each RMGDetectorHit are recorded:

  • event index,
  • particle type,
  • time,
  • position,
  • energy deposition,
  • distance to detector surface,
  • velocity of the particle (optional).

Optionally, the track ID and parent track ID can be stored as well as the detector ID for the single table output mode.

In addition, this class can be used for stacking tracks associated with optical photons when no energy was deposited in Germanium.

Member Function Documentation

◆ AssignOutputNames()

void RMGGermaniumOutputScheme::AssignOutputNames ( G4AnalysisManager * ana_man)
overridevirtual

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

Reimplemented from RMGVOutputScheme.

◆ EndOfRunAction()

void RMGGermaniumOutputScheme::EndOfRunAction ( const G4Run * )
overridevirtual

Perform final actions at the end of a run.

This function can be used by derived output schemes to finalize or write remaining data.

Reimplemented from RMGVOutputScheme.

◆ GetNtupleNameFlat()

std::string RMGGermaniumOutputScheme::GetNtupleNameFlat ( ) const
inlinenodiscardoverrideprotectedvirtual

Reimplemented from RMGVOutputScheme.

◆ ShouldDiscardEvent()

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

Decide whether to store the event, invoked in RMGEventAction::EndOfEventAction.

true if the event should be discarded, else false . The event is discarded if there is no hit in Germanium or the energy range condition is not met.

Reimplemented from RMGVOutputScheme.

◆ StackingActionClassify()

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

Wraps G4UserStackingAction::StackingActionClassify.

This is used to classify all optical photon tracks as fWaiting if fDiscardPhotonsIfNoGermaniumEdep is true.

Reimplemented from RMGVOutputScheme.

◆ StackingActionNewStage()

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

Wraps G4UserStackingAction::StackingActionNewStage.

discard all waiting events, if ShouldDiscardEvent() is true.

Reimplemented from RMGVOutputScheme.

◆ StoreEvent()

void RMGGermaniumOutputScheme::StoreEvent ( const G4Event * event)
overridevirtual

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

Only steps with non-zero energy are stored, unless fDiscardZeroEnergyHits is false.

Reimplemented from RMGVOutputScheme.


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