2#include "SimCore/PhotoNuclearModels/BertiniSingleNeutronModel.h"
5#include <G4HadronInelasticProcess.hh>
8bool BertiniSingleNeutronProcess::acceptEvent()
const {
11 int secondaries{theParticleChange.GetNumberOfSecondaries()};
12 for (
int i{0}; i < secondaries; ++i) {
13 const auto secondary{theParticleChange.GetSecondary(i)->GetParticle()};
14 const auto pdg_code{secondary->GetDefinition()->GetPDGEncoding()};
18 const auto energy{secondary->GetKineticEnergy()};
19 if (energy > threshold_) {
21 if (pdg_code == 2112) {
26 return nhard == 1 && nhard_neutron == 1;
30 G4ProcessManager* processManager) {
31 auto photo_nuclear_process{
32 new G4HadronInelasticProcess(
"photonNuclear", G4Gamma::Definition())};
35 model->SetMaxEnergy(15 * CLHEP::GeV);
37 photo_nuclear_process->RegisterMe(model);
38 processManager->AddDiscreteProcess(photo_nuclear_process);
constexpr bool skipCountingParticle(const int pdgcode) const
Whether or not to include a particular particle type in any counting.
void constructGammaProcess(G4ProcessManager *processManager)
The primary part of the model interface, responsible for adding the desired G4HadronicInteraction to ...
virtual void addPNCrossSectionData(G4HadronInelasticProcess *process) const
Default implementation for adding XS data for the process.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...