LDMX Software
PhotoNuclearModel.h
1#ifndef SIMCORE_PHOTONUCLEAR_MODEL_H
2#define SIMCORE_PHOTONUCLEAR_MODEL_H
3#include <G4CrossSectionDataSetRegistry.hh>
4#include <G4HadronInelasticProcess.hh>
5#include <G4HadronicInteraction.hh>
6#include <G4PhotoNuclearCrossSection.hh>
7#include <G4ProcessManager.hh>
8#include <string>
9#include <utility>
10
11#include "Framework/Configure/Parameters.h"
12#include "Framework/Factory.h"
13
26namespace simcore {
27
29 public:
37 PhotoNuclearModel(const std::string& name,
38 const framework::config::Parameters& parameters){};
39 virtual ~PhotoNuclearModel() = default;
40
48 virtual void constructGammaProcess(G4ProcessManager* processManager) = 0;
49
53 DECLARE_FACTORY(PhotoNuclearModel, std::shared_ptr<PhotoNuclearModel>,
54 const std::string&, const framework::config::Parameters&);
55
65 virtual void removeExistingModel(G4ProcessManager* processManager);
66
79 virtual void addPNCrossSectionData(G4HadronInelasticProcess* process) const;
80};
81} // namespace simcore
82
93#define DECLARE_PHOTONUCLEAR_MODEL(CLASS) \
94 FACTORY_REGISTRATION(simcore::PhotoNuclearModel, CLASS)
95
96#endif /* SIMCORE_PHOTONUCLEAR_MODEL_H */
Header holding Factory class and supporting macros.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
virtual void removeExistingModel(G4ProcessManager *processManager)
Removes any existing photonNuclear process from the process manager of the G4Gamma class.
virtual void addPNCrossSectionData(G4HadronInelasticProcess *process) const
Default implementation for adding XS data for the process.
PhotoNuclearModel(const std::string &name, const framework::config::Parameters &parameters)
Base class does not take any parameters or do anything in particular, but any derived class may.
DECLARE_FACTORY(PhotoNuclearModel, std::shared_ptr< PhotoNuclearModel >, const std::string &, const framework::config::Parameters &)
The factory for PhotoNuclearModels.
virtual void constructGammaProcess(G4ProcessManager *processManager)=0
The primary part of the model interface, responsible for adding the desired G4HadronicInteraction to ...
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...