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();
93 fPreClusterPars.cluster_distance_surface = threshold;
101 fPreClusterPars.cluster_time_threshold = threshold;
106 fPreClusterPars.track_energy_threshold = threshold;
113 [[nodiscard]] std::string GetNtupleNameFlat()
const override {
return "germanium"; }
117 RMGDetectorHitsCollection* GetHitColl(
const G4Event*);
118 void SetPositionModeString(std::string mode);
120 std::vector<std::unique_ptr<G4GenericMessenger>> fMessengers;
121 void DefineCommands();
123 double fEdepCutLow = -1;
124 double fEdepCutHigh = -1;
125 std::set<int> fEdepCutDetectors;
127 bool fDiscardWaitingTracksUnlessGermaniumEdep =
false;
128 bool fDiscardZeroEnergyHits =
true;
130 bool fStoreSinglePrecisionEnergy =
false;
131 bool fStoreSinglePrecisionPosition =
false;
133 bool fStoreTrackID =
false;
134 bool fPreClusterHits =
true;
135 bool fStoreVelocity =
false;
138 RMGOutputTools::ClusterPars fPreClusterPars{};
143 std::map<std::string, G4ThreeVector> fDetectorOrigins;
void EndOfRunAction(const G4Run *) override
Perform final actions at the end of a run.
Definition RMGGermaniumOutputScheme.cc:386
void SetPositionMode(RMGOutputTools::PositionMode mode)
Set which position is used for the steps.
Definition RMGGermaniumOutputScheme.hh:86
void SetEdepCutLow(double threshold)
Set a lower cut on the energy deposited in the event to store it.
Definition RMGGermaniumOutputScheme.hh:77
void SetElectronTrackEnergyThreshold(double threshold)
Set the energy threshold to merge electron tracks.
Definition RMGGermaniumOutputScheme.hh:105
void SetClusterDistanceSurface(double threshold)
Set a distance to compute together steps in the surface.
Definition RMGGermaniumOutputScheme.hh:92
void SetSurfaceThickness(double thickness)
Set the thickness of the surface region.
Definition RMGGermaniumOutputScheme.hh:97
void SetClusterTimeThreshold(double threshold)
Set the time threshold for pre-clustering.
Definition RMGGermaniumOutputScheme.hh:100
std::optional< bool > StackingActionNewStage(int) override
Wraps G4UserStackingAction::StackingActionNewStage.
Definition RMGGermaniumOutputScheme.cc:375
void StoreEvent(const G4Event *event) override
Store the information from the event, invoked in RMGEventAction::EndOfEventAction.
Definition RMGGermaniumOutputScheme.cc:214
void AssignOutputNames(G4AnalysisManager *ana_man) override
Sets the names of the output columns, invoked in RMGRunAction::SetupAnalysisManager.
Definition RMGGermaniumOutputScheme.cc:54
void SetClusterDistance(double threshold)
Set a distance to compute together steps in the bulk.
Definition RMGGermaniumOutputScheme.hh:89
void AddEdepCutDetector(int det_uid)
Add a detector uid to the list of detectors to apply the energy cut for.
Definition RMGGermaniumOutputScheme.hh:83
void SetEdepCutHigh(double threshold)
Set a lower cut on the energy deposited in the event to store it.
Definition RMGGermaniumOutputScheme.hh:80
bool ShouldDiscardEvent(const G4Event *event) override
Decide whether to store the event, invoked in RMGEventAction::EndOfEventAction.
Definition RMGGermaniumOutputScheme.cc:179