Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLConfig.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// INCL++ intra-nuclear cascade model
27// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28// Davide Mancusi, CEA
29// Alain Boudard, CEA
30// Sylvie Leray, CEA
31// Joseph Cugnon, University of Liege
32//
33// INCL++ revision: v5.1.8
34//
35#define INCLXX_IN_GEANT4_MODE 1
36
37#include "globals.hh"
38
39#ifndef G4INCLConfig_hh
40#define G4INCLConfig_hh 1
41
43#include "G4INCLConfigEnums.hh"
45#include <iostream>
46#include <string>
47#include <sstream>
48
49namespace G4INCL {
50
51 /**
52 * The INCL configuration object
53 *
54 * The Config object keeps track of various INCL physics options
55 * (e.g. which Pauli blocking scheme to use, whether to use local
56 * energy option or not, etc.
57 */
58 class Config {
59 public:
60 /// \brief Default constructor
61 Config();
62
63 /**
64 * Constructor for INCL++ with specified target A, Z, projectile
65 * type and energy. All other options are the default ones.
66 */
68
69 /** \brief Constructor based on command-line and config-file options.
70 *
71 * \param argc command-line parameters
72 * \param argv command-line parameters
73 * \param isFullRun is this a real calculation: true = yes; false = no, it's just a unit test
74 */
75 Config(G4int argc, char *argv[], G4bool isFullRun);
76
77 /// \brief Default destructor
78 ~Config();
79
80 /// \brief Initialise the members
81 void init();
82
83 /// \brief Return a summary of the run configuration.
84 std::string summary();
85
86 /// \brief Get the verbosity.
87 G4int getVerbosity() const { return verbosity; }
88
89 /// \brief Get the run title.
90 std::string const &getCalculationTitle() const { return title; }
91
92 /// \brief Get the output file root.
93 std::string const &getOutputFileRoot() const { return outputFileRoot; }
94
95 /// \brief Get the number of shots.
96 G4int getNumberOfShots() const { return nShots; }
97
98 /// \brief Natural targets.
99 G4bool isNaturalTarget() const { return naturalTarget; }
100
101 /** \brief Get the target mass number.
102 *
103 * Note that A==0 means natural target. You should first check the
104 * isNaturalTarget() method.
105 */
106 G4int getTargetA() const { return targetSpecies.theA; }
107
108 /// \brief Get the target charge number.
109 G4int getTargetZ() const { return targetSpecies.theZ; }
110
111 /// \brief Set target mass number
112 void setTargetA(G4int A) { targetSpecies.theA = A; }
113
114 /// \brief Set target charge number
115 void setTargetZ(G4int Z) { targetSpecies.theZ = Z; }
116
117 /// \brief Get the projectile type
118 ParticleType getProjectileType() const { return projectileSpecies.theType; }
119
120 /// \brief Get the projectile species
121 ParticleSpecies getProjectileSpecies() const { return projectileSpecies; }
122
123 /// \brief Set the projectile species
124 void setProjectileSpecies(ParticleSpecies const &ps) { projectileSpecies=ps; }
125
126 /// \brief Get the projectile kinetic energy.
127 G4float getProjectileKineticEnergy() const { return projectileKineticEnergy; }
128
129 /// \brief Set the projectile kinetic energy.
130 void setProjectileKineticEnergy(G4float const kinE) { projectileKineticEnergy=kinE; }
131
132 /// \brief Get the number of the verbose event.
133 G4int getVerboseEvent() const { return verboseEvent; }
134
135 /// \brief Get the INCL version ID.
136 static std::string const getVersionID();
137
138 /// \brief Get the seeds for the random-number generator.
140 SeedVector s;
141 s.push_back(randomSeed1);
142 s.push_back(randomSeed2);
143 return s;
144 }
145
146 /// \brief Get the Pauli-blocking algorithm.
147 PauliType getPauliType() const { return pauliType; }
148
149 /// \brief Do we want CDPP?
150 G4bool getCDPP() const { return CDPP; }
151
152 /// \brief Do we want the pion potential?
153 G4bool getPionPotential() const { return pionPotential; }
154
155 /// \brief Get the Coulomb-distortion algorithm.
156 CoulombType getCoulombType() const { return coulombType; }
157
158 /// \brief Get the type of the potential for nucleons.
159 PotentialType getPotentialType() const { return potentialType; }
160
161 /// \brief Set the type of the potential for nucleons.
162 void setPotentialType(PotentialType type) { potentialType = type; }
163
164 /// \brief Set the type of the potential for nucleons.
165 void setPionPotential(const G4bool pionPot) { pionPotential = pionPot; }
166
167 /// \brief Get the type of local energy for N-N avatars.
168 LocalEnergyType getLocalEnergyBBType() const { return localEnergyBBType; }
169
170 /// \brief Get the type of local energy for pi-N and decay avatars.
171 LocalEnergyType getLocalEnergyPiType() const { return localEnergyPiType; }
172
173 /// \brief Set the type of local energy for N-N avatars.
174 void setLocalEnergyBBType(const LocalEnergyType t) { localEnergyBBType=t; }
175
176 /// \brief Set the type of local energy for N-N avatars.
177 void setLocalEnergyPiType(const LocalEnergyType t) { localEnergyPiType=t; }
178
179 /// \brief Get the log file name.
180 std::string const &getLogFileName() const { return logFileName; }
181
182 /// \brief Get the de-excitation model.
183 DeExcitationType getDeExcitationType() const { return deExcitationType; }
184
185 /// \brief Get the clustering algorithm.
186 ClusterAlgorithmType getClusterAlgorithm() const { return clusterAlgorithmType; }
187
188 /// \brief Get the maximum mass for production of clusters.
189 G4int getClusterMaxMass() const { return clusterMaxMass; }
190
191 /// \brief Set the maximum mass for production of clusters.
192 void setClusterMaxMass(const G4int m){ clusterMaxMass=m; }
193
194 /// \brief Get back-to-spectator
195 G4bool getBackToSpectator() const { return backToSpectator; }
196
197 /// \brief Whether to use real masses
198 G4bool getUseRealMasses() const { return useRealMasses; }
199
200 /// \brief Set whether to use real masses
201 void setUseRealMasses(G4bool use) { useRealMasses = use; }
202
203 /// \brief Echo the input options.
204 std::string const echo() const;
205
206 std::string const &getINCLXXDataFilePath() const {
207 return INCLXXDataFilePath;
208 }
209
210#ifdef INCL_DEEXCITATION_ABLAXX
211 std::string const &getABLAv3pCxxDataFilePath() const {
212 return ablav3pCxxDataFilePath;
213 }
214#endif
215
216#ifdef INCL_DEEXCITATION_ABLA07
217 std::string const &getABLA07DataFilePath() const {
218 return abla07DataFilePath;
219 }
220#endif
221#ifdef INCL_DEEXCITATION_GEMINIXX
222 std::string const &getGEMINIXXDataFilePath() const {
223 return geminixxDataFilePath;
224 }
225#endif
226
227 G4double getImpactParameter() const { return impactParameter; }
228
229 /// \brief Get the separation-energy type.
230 SeparationEnergyType getSeparationEnergyType() const { return separationEnergyType; }
231
232 private:
233 G4int verbosity;
234 std::string inputFileName;
235 std::string title;
236 std::string outputFileRoot;
237 std::string logFileName;
238
239 G4int nShots;
240
241 std::string targetString;
242 ParticleSpecies targetSpecies;
243 G4bool naturalTarget;
244
245 std::string projectileString;
246 ParticleSpecies projectileSpecies;
247 G4float projectileKineticEnergy;
248
249 G4int verboseEvent;
250
251 G4int randomSeed1, randomSeed2;
252
253 std::string pauliString;
254 PauliType pauliType;
255 G4bool CDPP;
256
257 std::string coulombString;
258 CoulombType coulombType;
259
260 std::string potentialString;
261 PotentialType potentialType;
262 G4bool pionPotential;
263
264 std::string localEnergyBBString;
265 LocalEnergyType localEnergyBBType;
266
267 std::string localEnergyPiString;
268 LocalEnergyType localEnergyPiType;
269
270 std::string deExcitationString;
271 DeExcitationType deExcitationType;
272#ifdef INCL_DEEXCITATION_ABLAXX
273 std::string ablav3pCxxDataFilePath;
274#endif
275#ifdef INCL_DEEXCITATION_ABLA07
276 std::string abla07DataFilePath;
277#endif
278#ifdef INCL_DEEXCITATION_GEMINIXX
279 std::string geminixxDataFilePath;
280#endif
281 std::string INCLXXDataFilePath;
282
283 std::string clusterAlgorithmString;
284 ClusterAlgorithmType clusterAlgorithmType;
285
286 G4int clusterMaxMass;
287
288 G4bool backToSpectator;
289
290 G4bool useRealMasses;
291
292 G4double impactParameter;
293
294 std::string separationEnergyString;
295 SeparationEnergyType separationEnergyType;
296
297 };
298
299}
300
301#endif
double G4double
Definition: G4Types.hh:64
float G4float
Definition: G4Types.hh:65
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
PauliType getPauliType() const
Get the Pauli-blocking algorithm.
void setProjectileSpecies(ParticleSpecies const &ps)
Set the projectile species.
G4bool getPionPotential() const
Do we want the pion potential?
PotentialType getPotentialType() const
Get the type of the potential for nucleons.
static std::string const getVersionID()
Get the INCL version ID.
void setProjectileKineticEnergy(G4float const kinE)
Set the projectile kinetic energy.
G4double getImpactParameter() const
void setLocalEnergyPiType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
SeparationEnergyType getSeparationEnergyType() const
Get the separation-energy type.
std::string const & getINCLXXDataFilePath() const
G4int getClusterMaxMass() const
Get the maximum mass for production of clusters.
G4int getVerboseEvent() const
Get the number of the verbose event.
G4int getTargetA() const
Get the target mass number.
std::string const & getCalculationTitle() const
Get the run title.
Definition: G4INCLConfig.hh:90
G4int getVerbosity() const
Get the verbosity.
Definition: G4INCLConfig.hh:87
std::string const & getLogFileName() const
Get the log file name.
DeExcitationType getDeExcitationType() const
Get the de-excitation model.
void setTargetA(G4int A)
Set target mass number.
ParticleSpecies getProjectileSpecies() const
Get the projectile species.
ClusterAlgorithmType getClusterAlgorithm() const
Get the clustering algorithm.
std::string const echo() const
Echo the input options.
void setTargetZ(G4int Z)
Set target charge number.
void setPionPotential(const G4bool pionPot)
Set the type of the potential for nucleons.
~Config()
Default destructor.
void setPotentialType(PotentialType type)
Set the type of the potential for nucleons.
LocalEnergyType getLocalEnergyPiType() const
Get the type of local energy for pi-N and decay avatars.
G4bool isNaturalTarget() const
Natural targets.
Definition: G4INCLConfig.hh:99
G4bool getBackToSpectator() const
Get back-to-spectator.
Config()
Default constructor.
Definition: G4INCLConfig.cc:58
G4bool getCDPP() const
Do we want CDPP?
LocalEnergyType getLocalEnergyBBType() const
Get the type of local energy for N-N avatars.
std::string summary()
Return a summary of the run configuration.
void init()
Initialise the members.
G4int getTargetZ() const
Get the target charge number.
void setLocalEnergyBBType(const LocalEnergyType t)
Set the type of local energy for N-N avatars.
void setUseRealMasses(G4bool use)
Set whether to use real masses.
ParticleType getProjectileType() const
Get the projectile type.
G4bool getUseRealMasses() const
Whether to use real masses.
CoulombType getCoulombType() const
Get the Coulomb-distortion algorithm.
G4int getNumberOfShots() const
Get the number of shots.
Definition: G4INCLConfig.hh:96
void setClusterMaxMass(const G4int m)
Set the maximum mass for production of clusters.
G4float getProjectileKineticEnergy() const
Get the projectile kinetic energy.
std::string const & getOutputFileRoot() const
Get the output file root.
Definition: G4INCLConfig.hh:93
SeedVector const getRandomSeeds() const
Get the seeds for the random-number generator.
std::vector< long > SeedVector