LDMX Software
BertiniNothingHardModel.h
1#ifndef SIMCORE_BERTINI_NOTHING_HARD_MODEL_H
2#define SIMCORE_BERTINI_NOTHING_HARD_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 {
11
13 public:
14 BertiniNothingHardProcess(double threshold, int Zmin, double Emin,
15 bool count_light_ions)
16 : BertiniEventTopologyProcess{count_light_ions},
17 threshold_{threshold},
18 zmin_{Zmin},
19 emin_{Emin} {}
20 virtual ~BertiniNothingHardProcess() = default;
21 bool acceptProjectile(const G4HadProjectile& projectile) const override {
22 return projectile.GetKineticEnergy() >= emin_;
23 }
24 bool acceptTarget(const G4Nucleus& targetNucleus) const override {
25 return targetNucleus.GetZ_asInt() >= zmin_;
26 }
27 bool acceptEvent() const override;
28
29 private:
30 double threshold_;
31 int zmin_;
32 double emin_;
33};
34
36 public:
37 BertiniNothingHardModel(const std::string& name,
38 const framework::config::Parameters& parameters)
39 : PhotoNuclearModel{name, parameters},
40 threshold_{parameters.getParameter<double>("hard_particle_threshold")},
41 zmin_{parameters.getParameter<int>("zmin")},
42 emin_{parameters.getParameter<double>("emin")},
43 count_light_ions_{parameters.getParameter<bool>("count_light_ions")} {}
44 virtual ~BertiniNothingHardModel() = default;
45 void constructGammaProcess(G4ProcessManager* processManager);
46
47 private:
48 double threshold_;
49 int zmin_;
50 double emin_;
51 bool count_light_ions_;
52};
53} // namespace simcore
54#endif /* SIMCORE_BERTINI_NOTHING_HARD_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 ...