LDMX Software
PhotonuclearModel.cxx
1#include "SimCore/PhotoNuclearModel.h"
2
3namespace simcore {
4void PhotoNuclearModel::removeExistingModel(G4ProcessManager* processManager) {
5 const auto processes{processManager->GetProcessList()};
6 for (int i{0}; i < processes->size(); ++i) {
7 const auto process{(*processes)[i]};
8 const auto processName{process->GetProcessName()};
9 if (processName == "photonNuclear") {
10 processManager->RemoveProcess(i);
11 }
12 }
13}
14
16 G4HadronInelasticProcess* process) const {
17 auto crossSectionRegistry{G4CrossSectionDataSetRegistry::Instance()};
18 auto crossSection{
19 crossSectionRegistry->GetCrossSectionDataSet("PhotoNuclearXS")};
20 if (!crossSection) {
21 crossSection = new G4PhotoNuclearCrossSection{};
22 }
23 process->AddDataSet(crossSection);
24}
25} // namespace simcore
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.