16#ifndef _RMG_GERMANIUM_OUTPUT_SCHEME_HH_
17#define _RMG_GERMANIUM_OUTPUT_SCHEME_HH_
23#include "G4AnalysisManager.hh"
24#include "G4GenericMessenger.hh"
26#include "RMGDetectorHit.hh"
27#include "RMGGermaniumDetector.hh"
28#include "RMGOutputTools.hh"
29#include "RMGVOutputScheme.hh"
50class RMGGermaniumOutputScheme :
public RMGVOutputScheme {
54 RMGGermaniumOutputScheme();
99 fPreClusterPars.cluster_distance_surface = threshold;
107 fPreClusterPars.cluster_time_threshold = threshold;
112 fPreClusterPars.track_energy_threshold = threshold;
119 [[nodiscard]] std::string GetNtupleNameFlat()
const override {
return "germanium"; }
123 RMGDetectorHitsCollection* GetHitColl(
const G4Event*);
124 void SetPositionModeString(std::string mode);
126 std::vector<std::unique_ptr<G4GenericMessenger>> fMessengers;
127 void DefineCommands();
129 double fEdepCutLow = -1;
130 double fEdepCutHigh = -1;
131 std::set<int> fEdepCutDetectors;
133 bool fDiscardPhotonsIfNoGermaniumEdep =
false;
134 bool fDiscardZeroEnergyHits =
true;
136 bool fStoreSinglePrecisionEnergy =
false;
137 bool fStoreSinglePrecisionPosition =
false;
139 bool fStoreTrackID =
false;
140 bool fPreClusterHits =
true;
141 bool fStoreVelocity =
false;
144 RMGOutputTools::ClusterPars fPreClusterPars{};
149 std::map<std::string, G4ThreeVector> fDetectorOrigins;
void EndOfRunAction(const G4Run *) override
Perform final actions at the end of a run.
Definition RMGGermaniumOutputScheme.cc:401
void SetPositionMode(RMGOutputTools::PositionMode mode)
Set which position is used for the steps.
Definition RMGGermaniumOutputScheme.hh:92
void SetEdepCutLow(double threshold)
Set a lower cut on the energy deposited in the event to store it.
Definition RMGGermaniumOutputScheme.hh:83
void SetElectronTrackEnergyThreshold(double threshold)
Set the energy threshold to merge electron tracks.
Definition RMGGermaniumOutputScheme.hh:111
std::optional< G4ClassificationOfNewTrack > StackingActionClassify(const G4Track *, int) override
Wraps G4UserStackingAction::StackingActionClassify.
Definition RMGGermaniumOutputScheme.cc:375
void SetClusterDistanceSurface(double threshold)
Set a distance to compute together steps in the surface.
Definition RMGGermaniumOutputScheme.hh:98
void SetSurfaceThickness(double thickness)
Set the thickness of the surface region.
Definition RMGGermaniumOutputScheme.hh:103
void SetClusterTimeThreshold(double threshold)
Set the time threshold for pre-clustering.
Definition RMGGermaniumOutputScheme.hh:106
std::optional< bool > StackingActionNewStage(int) override
Wraps G4UserStackingAction::StackingActionNewStage.
Definition RMGGermaniumOutputScheme.cc:389
void StoreEvent(const G4Event *event) override
Store the information from the event, invoked in RMGEventAction::EndOfEventAction.
Definition RMGGermaniumOutputScheme.cc:215
void AssignOutputNames(G4AnalysisManager *ana_man) override
Sets the names of the output columns, invoked in RMGRunAction::SetupAnalysisManager.
Definition RMGGermaniumOutputScheme.cc:55
void SetClusterDistance(double threshold)
Set a distance to compute together steps in the bulk.
Definition RMGGermaniumOutputScheme.hh:95
void AddEdepCutDetector(int det_uid)
Add a detector uid to the list of detectors to apply the energy cut for.
Definition RMGGermaniumOutputScheme.hh:89
void SetEdepCutHigh(double threshold)
Set a lower cut on the energy deposited in the event to store it.
Definition RMGGermaniumOutputScheme.hh:86
bool ShouldDiscardEvent(const G4Event *event) override
Decide whether to store the event, invoked in RMGEventAction::EndOfEventAction.
Definition RMGGermaniumOutputScheme.cc:180