14 std::shared_ptr<gdynamicdigitization::dRoutinesMap> digi_map,
15 std::shared_ptr<GAnalysisAccumulator> analyzer) :
18 digitization_routines_map(std::move(digi_map)),
19 analysis_accumulator(std::move(analyzer)),
20 sharedParticles_(std::make_shared<std::vector<
GparticlePtr>>(
34 SetUserAction(
new GRunAction(
goptions, digitization_routines_map, analysis_accumulator));
41 const auto thread_id = G4Threading::G4GetThreadId();
50 auto* run_action =
new GRunAction(
goptions, digitization_routines_map, analysis_accumulator);
51 SetUserAction(run_action);
53 std::shared_ptr<GTrackProvenance> track_provenance;
56 track_provenance = std::make_shared<GTrackProvenance>(save_ancestors);
GAction(std::shared_ptr< GOptions > gopts, std::shared_ptr< gdynamicdigitization::dRoutinesMap > digi_map, std::shared_ptr< GAnalysisAccumulator > analysis_accumulator=nullptr)
Constructs the action initializer used by the Geant4 run manager.
void Build() const override
Registers the user actions required by worker threads and sequential execution.
void BuildForMaster() const override
Registers the user actions required by the master thread.
GBase(const std::shared_ptr< GOptions > &gopt, std::string logger_name="")
std::shared_ptr< GLogger > log
Handles event begin/end callbacks, hit digitization, and event-level publication.
Generates the primary vertices for each Geant4 event.
Handles run begin/end callbacks and creates the thread-local GRun object.
Applies per-step track guards for one Geant4 worker.
Records initial track provenance for one Geant4 worker.
Declares GEventAction, the per-event processing action for the GEMC actions module.
constexpr const char * SAVE_ORIGINAL_TRACK_SWITCH
constexpr const char * SAVE_ALL_ANCESTORS_SWITCH
Declares GPrimaryGeneratorAction, the primary-particle generation action for the GEMC actions module.
Declares GRunAction, the run-lifecycle action for the GEMC actions module.
Declares GAction, the Geant4 action-initialization entry point for the GEMC actions module.
constexpr const char * GACTION_LOGGER
std::shared_ptr< Gparticle > GparticlePtr