LDMX Software
BertiniNothingHardModel.h
1#ifndef SIMCORE_BERTINI_NOTHING_HARD_MODEL_H
2#define SIMCORE_BERTINI_NOTHING_HARD_MODEL_H
3#include <G4CrossSectionDataSetRegistry.hh>
4#include <G4Gamma.hh>
5#include <G4HadProjectile.hh>
6#include <G4HadronInelasticProcess.hh>
7#include <G4Nucleus.hh>
8#include <G4PhotoNuclearCrossSection.hh>
9#include <G4ProcessManager.hh>
10
11#include "Framework/Configure/Parameters.h"
12#include "SimCore/PhotoNuclearModel.h"
13#include "SimCore/PhotoNuclearModels/BertiniEventTopologyProcess.h"
14namespace simcore {
15
17 public:
18 BertiniNothingHardProcess(double threshold, int Zmin, double Emin,
19 bool count_light_ions)
20 : BertiniEventTopologyProcess{count_light_ions},
21 threshold_{threshold},
22 Zmin_{Zmin},
23 Emin_{Emin} {}
24 virtual ~BertiniNothingHardProcess() = default;
25 bool acceptProjectile(const G4HadProjectile& projectile) const override {
26 return projectile.GetKineticEnergy() >= Emin_;
27 }
28 bool acceptTarget(const G4Nucleus& targetNucleus) const override {
29 return targetNucleus.GetZ_asInt() >= Zmin_;
30 }
31 bool acceptEvent() const override;
32
33 private:
34 double threshold_;
35 int Zmin_;
36 double Emin_;
37};
38
40 public:
41 BertiniNothingHardModel(const std::string& name,
42 const framework::config::Parameters& parameters)
43 : PhotoNuclearModel{name, parameters},
44 threshold_{parameters.getParameter<double>("hard_particle_threshold")},
45 Zmin_{parameters.getParameter<int>("zmin")},
46 Emin_{parameters.getParameter<double>("emin")},
47 count_light_ions_{parameters.getParameter<bool>("count_light_ions")} {}
48 virtual ~BertiniNothingHardModel() = default;
49 void ConstructGammaProcess(G4ProcessManager* processManager) override;
50
51 private:
52 double threshold_;
53 int Zmin_;
54 double Emin_;
55 bool count_light_ions_;
56};
57} // namespace simcore
58#endif /* SIMCORE_BERTINI_NOTHING_HARD_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 ...