8#include "G4Electron.hh"
9#include "G4ProcessManager.hh"
10#include "G4ProcessTable.hh"
19 : G4VPhysicsConstructor(NAME), params_{params} {
29 ldmx_log(info) <<
"GENIE electronuclear process is not enabled";
33 ldmx_log(info) <<
"Setting up GENIE electronuclear process...";
35 G4ProcessManager* process_manager =
36 G4Electron::Definition()->GetProcessManager();
37 if (!process_manager) {
38 EXCEPTION_RAISE(
"GenieNuclearPhysics",
39 "Unable to access the electron process manager!");
43 G4VProcess* existing =
44 G4ProcessTable::GetProcessTable()->FindProcess(
"electronNuclear",
"e-");
46 ldmx_log(info) <<
"Removing built-in electronNuclear process";
47 process_manager->RemoveProcess(existing);
50 <<
"No built-in electronNuclear process found — adding GENIE process";
55 process_manager->AddDiscreteProcess(genie_process);
58 process_manager->SetProcessOrderingToFirst(genie_process,
59 G4ProcessVectorDoItIndex::idxAll);
61 ldmx_log(info) <<
"GENIE electronuclear process registered successfully";
G4VDiscreteProcess that uses GENIE to simulate electronuclear interactions as the electron traverses ...
G4VPhysicsConstructor that registers the GENIE electronuclear process with the electron.
Class encapsulating parameters for configuring a processor.
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
Geant4 discrete process that fires GENIE electronuclear interactions.
framework::config::Parameters params_
Stored configuration to forward to the process.
GenieNuclearPhysics(const framework::config::Parameters ¶ms)
Constructor.
void ConstructProcess() override
Remove the built-in electronNuclear process and register the GENIE-based replacement.
static const std::string NAME
Name of this physics constructor.
bool enable_
Is the GENIE process enabled?
void ConstructParticle() override
No new particles to construct.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...