LDMX Software
BertiniSingleNeutronModel.h
1#ifndef SIMCORE_BERTINI_SINGLE_NEUTRON_MODEL_H
2#define SIMCORE_BERTINI_SINGLE_NEUTRON_MODEL_H
3#include <G4HadProjectile.hh>
4#include <G4Nucleus.hh>
5#include <G4ProcessManager.hh>
6
7#include "Framework/Configure/Parameters.h"
8#include "SimCore/PhotoNuclearModels/BertiniEventTopologyProcess.h"
9#include "SimCore/PhotoNuclearModels/PhotoNuclearModel.h"
10namespace simcore {
12 public:
13 BertiniSingleNeutronProcess(double threshold, int Zmin, double Emin,
14 bool count_light_ions)
15 : BertiniEventTopologyProcess{count_light_ions},
16 threshold_{threshold},
17 zmin_{Zmin},
18 emin_{Emin} {}
19 virtual ~BertiniSingleNeutronProcess() = default;
20 bool acceptProjectile(const G4HadProjectile& projectile) const override {
21 return projectile.GetKineticEnergy() >= emin_;
22 }
23 bool acceptTarget(const G4Nucleus& targetNucleus) const override {
24 return targetNucleus.GetZ_asInt() >= zmin_;
25 }
26 bool acceptEvent() const override;
27
28 private:
29 double threshold_;
30 int zmin_;
31 double emin_;
32};
33
35 public:
36 BertiniSingleNeutronModel(const std::string& name,
37 const framework::config::Parameters& parameters)
38 : PhotoNuclearModel{name, parameters},
39 threshold_{parameters.getParameter<double>("hard_particle_threshold")},
40 zmin_{parameters.getParameter<int>("zmin")},
41 emin_{parameters.getParameter<double>("emin")},
42 count_light_ions_{parameters.getParameter<bool>("count_light_ions")} {}
43 virtual ~BertiniSingleNeutronModel() = default;
44 void constructGammaProcess(G4ProcessManager* processManager);
45
46 private:
47 double threshold_;
48 int zmin_;
49 double emin_;
50 bool count_light_ions_;
51};
52
53} // namespace simcore
54#endif /* SIMCORE_BERTINI_SINGLE_NEUTRON_MODEL_H */
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
void constructGammaProcess(G4ProcessManager *processManager)
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 ...