14 : G4VPhysicsConstructor(name),
16 parameters.get<
framework::config::Parameters>(
"photonuclear_model")} {
22 G4ProcessManager* process_manager = G4Gamma::Gamma()->GetProcessManager();
23 if (process_manager ==
nullptr) {
24 EXCEPTION_RAISE(
"GammaPhysics",
25 "Was unable to access the process manager for photons, "
26 "something is very wrong!");
29 auto pn = PhotoNuclearModel::Factory::get().make(
33 EXCEPTION_RAISE(
"UnableToCreate",
34 "Unable to create a PhotoNuclearModel of type " +
37 pn.value()->removeExistingModel(process_manager);
38 pn.value()->constructGammaProcess(process_manager);
57 const auto processes{process_manager->GetProcessList()};
58 for (
int i{0}; i < processes->size(); i++) {
59 const auto process{(*processes)[i]};
60 if (process->GetProcessName() ==
"photonNuclear") {
61 process_manager->SetProcessOrderingToFirst(
62 process, G4ProcessVectorDoItIndex::idxAll);
Class used to enhanced the gamma physics list.
Class encapsulating parameters for configuring a processor.
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
GammaPhysics(const G4String &name, const framework::config::Parameters ¶meters)
Class constructor.
G4GammaConversionToMuons gamma_conv_process_
The gamma to muons process.
void ConstructProcess() final
We do two things for this call back during initialization.
void ConstructParticle() final
Construct particles.
framework::config::Parameters model_parameters_
Parameters from the configuration to pass along to the photonuclear model.
All classes in the ldmx-sw project use this namespace.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...