2#include "SimCore/PhotoNuclearModels/BertiniAtLeastNProductsModel.h"
5bool BertiniAtLeastNProductsProcess::acceptEvent()
const {
6 int secondaries{theParticleChange.GetNumberOfSecondaries()};
8 for (
int i{0}; i < secondaries; ++i) {
9 const auto secondary{theParticleChange.GetSecondary(i)->GetParticle()};
10 const auto pdgCode{secondary->GetDefinition()->GetPDGEncoding()};
11 const auto energy{secondary->GetKineticEnergy()};
12 if (std::find(std::begin(pdg_ids_), std::end(pdg_ids_), pdgCode) !=
14 if (energy > threshold_) {
18 if (matchingCount >= min_products_) {
26 G4ProcessManager* processManager) {
27 auto photoNuclearProcess{
28 new G4HadronInelasticProcess(
"photonNuclear", G4Gamma::Definition())};
30 pdg_ids_, min_products_}};
31 model->SetMaxEnergy(15 * CLHEP::GeV);
33 photoNuclearProcess->RegisterMe(model);
34 processManager->AddDiscreteProcess(photoNuclearProcess);
void ConstructGammaProcess(G4ProcessManager *processManager) override
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.