LDMX Software
BertiniSingleNeutronModel.h
1#ifndef SIMCORE_BERTINI_SINGLE_NEUTRON_MODEL_H
2#define SIMCORE_BERTINI_SINGLE_NEUTRON_MODEL_H
3#include <G4CrossSectionDataSetRegistry.hh>
4#include <G4Gamma.hh>
5#include <G4HadProjectile.hh>
6#include <G4HadronInelasticProcess.hh>
7#include <G4Nucleus.hh>
8#include <G4ProcessManager.hh>
9
10#include "Framework/Configure/Parameters.h"
11#include "SimCore/PhotoNuclearModel.h"
12#include "SimCore/PhotoNuclearModels/BertiniEventTopologyProcess.h"
13namespace simcore {
15 public:
16 BertiniSingleNeutronProcess(double threshold, int Zmin, double Emin,
17 bool count_light_ions)
18 : BertiniEventTopologyProcess{count_light_ions},
19 threshold_{threshold},
20 Zmin_{Zmin},
21 Emin_{Emin} {}
22 virtual ~BertiniSingleNeutronProcess() = default;
23 bool acceptProjectile(const G4HadProjectile& projectile) const override {
24 return projectile.GetKineticEnergy() >= Emin_;
25 }
26 bool acceptTarget(const G4Nucleus& targetNucleus) const override {
27 return targetNucleus.GetZ_asInt() >= Zmin_;
28 }
29 bool acceptEvent() const override;
30
31 private:
32 double threshold_;
33 int Zmin_;
34 double Emin_;
35};
36
38 public:
39 BertiniSingleNeutronModel(const std::string& name,
40 const framework::config::Parameters& parameters)
41 : PhotoNuclearModel{name, parameters},
42 threshold_{parameters.getParameter<double>("hard_particle_threshold")},
43 Zmin_{parameters.getParameter<int>("zmin")},
44 Emin_{parameters.getParameter<double>("emin")},
45 count_light_ions_{parameters.getParameter<bool>("count_light_ions")} {}
46 virtual ~BertiniSingleNeutronModel() = default;
47 void ConstructGammaProcess(G4ProcessManager* processManager) override;
48
49 private:
50 double threshold_;
51 int Zmin_;
52 double Emin_;
53 bool count_light_ions_;
54};
55
56} // namespace simcore
57#endif /* SIMCORE_BERTINI_SINGLE_NEUTRON_MODEL_H */
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
Definition Parameters.h:89
void ConstructGammaProcess(G4ProcessManager *processManager) override
The primary part of the model interface, responsible for adding the desired G4HadronicInteraction to ...