remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGPhysics.hh
1// Copyright (C) 2022 Luigi Pertoldi <https://orcid.org/0000-0002-0467-2571>
2//
3// This program is free software: you can redistribute it and/or modify it under
4// the terms of the GNU Lesser General Public License as published by the Free
5// Software Foundation, either version 3 of the License, or (at your option) any
6// later version.
7//
8// This program is distributed in the hope that it will be useful, but WITHOUT
9// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11// details.
12//
13// You should have received a copy of the GNU Lesser General Public License
14// along with this program. If not, see <https://www.gnu.org/licenses/>.
15
16#ifndef _RMG_PHYSICS_HH_
17#define _RMG_PHYSICS_HH_
18
19#include <map>
20#include <memory>
21
22#include "G4GenericMessenger.hh"
23#include "G4VModularPhysicsList.hh"
24#include "globals.hh"
25
32
33 public:
34
40 RMGPhysics();
41
42 RMGPhysics(RMGPhysics const&) = delete;
43 RMGPhysics& operator=(RMGPhysics const&) = delete;
44 RMGPhysics(RMGPhysics&&) = delete;
45 RMGPhysics& operator=(RMGPhysics&&) = delete;
46
50 enum class LowEnergyEMOption {
51 kOption1,
52 kOption2,
53 kOption3,
54 kOption4,
55 kPenelope,
56 kLivermore,
57 kLivermorePolarized,
58 kNone
59 };
60
65 kQGSP_BIC_HP,
66 kQGSP_BERT_HP,
67 kFTFP_BERT_HP,
68 kShielding,
69 kNone
70 };
71
72
74 struct ProdCutStore {
75 ProdCutStore() = default;
76
78 ProdCutStore(double def_cut)
79 : gamma(def_cut), electron(def_cut), positron(def_cut), proton(def_cut), alpha(def_cut),
80 generic_ion(def_cut) {}
81
82 double gamma;
83 double electron;
84 double positron;
85 double proton;
86 double alpha;
87 double generic_ion;
88 };
89
96 void SetCuts() override;
97
99 void SetLowEnergyRange(G4double low_energy) { fLowEnergyRange = low_energy; };
100
102 void SetHighEnergyRange(G4double high_energy) { fHighEnergyRange = high_energy; };
103
110 void SetDefaultProductionCut(double cut);
111
118 void SetSensitiveProductionCut(double cut);
119
121 void SetLowEnergyEMOptionString(std::string option);
122
124 void SetHadronicPhysicsListOptionString(std::string option);
125
127 void SetUseGammaAngCorr(bool);
128
129 void SetGammaTwoJMAX(int max_two_j);
130 void SetStoreICLevelData(bool);
131
132 void DumpProcessesForParticles(std::string file_name);
133
134 protected:
135
136 void ConstructParticle() override;
137 void ConstructProcess() override;
138 virtual void ConstructOptical();
139
140 private:
141
142 ProdCutStore fProdCuts = {};
143 ProdCutStore fProdCutsSensitive = {};
144 bool fConstructOptical = false;
145 bool fUseOpticalCustomWLS = true;
146 bool fUseNeutronThermalScattering = false;
147 bool fUseGrabmayrGammaCascades = false;
148 bool fUseInnerBremsstrahlung = false;
149 LowEnergyEMOption fLowEnergyEMOption = LowEnergyEMOption::kLivermore;
150 HadronicPhysicsListOption fHadronicPhysicsListOption = HadronicPhysicsListOption::kNone;
151 G4double fLowEnergyRange = 250 * CLHEP::eV;
152 G4double fHighEnergyRange = 100. * CLHEP::GeV;
153 std::unique_ptr<G4GenericMessenger> fMessenger;
154 void DefineCommands();
155};
156
157#endif
158
159// vim: tabstop=2 shiftwidth=2 expandtab
LowEnergyEMOption
Enum to specify a EM physics list from Geant4, see Geant4-manual for more information.
Definition RMGPhysics.hh:50
void SetCuts() override
Sets the production cut values, and energy range.
Definition RMGPhysics.cc:441
void SetHadronicPhysicsListOptionString(std::string option)
Set the low energy EM options from a string, for use in the messenger.
Definition RMGPhysics.cc:520
void SetLowEnergyEMOptionString(std::string option)
Set the low energy EM options from a string, for use in the messenger.
Definition RMGPhysics.cc:514
RMGPhysics()
Constructor for RMGPhysics , this sets the default choices.
Definition RMGPhysics.cc:86
void SetDefaultProductionCut(double cut)
Set the production cut for the default region.
Definition RMGPhysics.cc:498
HadronicPhysicsListOption
Enum to specify a hardronic physics list from Geant4, see Geant4-manual for more information.
Definition RMGPhysics.hh:64
void SetHighEnergyRange(G4double high_energy)
Sets the energy range for the production cut table.
Definition RMGPhysics.hh:102
void SetLowEnergyRange(G4double low_energy)
Sets the energy range for the production cut table.
Definition RMGPhysics.hh:99
void SetUseGammaAngCorr(bool)
Option to turn on gamma emisson with correct angular correlations.
Definition RMGPhysics.cc:121
void SetSensitiveProductionCut(double cut)
Set the production cut for the sensitive region.
Definition RMGPhysics.cc:482
Struct to hold the production cut values.
Definition RMGPhysics.hh:74
ProdCutStore(double def_cut)
Constructor setting the default production cut def_cut.
Definition RMGPhysics.hh:78