Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCLParticleTable.cc
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// Alain Boudard, CEA-Saclay, France
28// Joseph Cugnon, University of Liege, Belgium
29// Jean-Christophe David, CEA-Saclay, France
30// Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
31// Sylvie Leray, CEA-Saclay, France
32// Davide Mancusi, CEA-Saclay, France
33//
34#define INCLXX_IN_GEANT4_MODE 1
35
36#include "globals.hh"
37
40#include <algorithm>
41// #include <cassert>
42#include <cmath>
43#include <cctype>
44#include <sstream>
45#ifdef INCLXX_IN_GEANT4_MODE
46#include "G4SystemOfUnits.hh"
47#endif
48
49#ifdef INCLXX_IN_GEANT4_MODE
51#include "G4SystemOfUnits.hh"
52#endif
53
54namespace G4INCL {
55
56 namespace ParticleTable {
57
58 namespace {
59
60 /// \brief Static instance of the NaturalIsotopicAbundances class
61 const NaturalIsotopicDistributions *theNaturalIsotopicDistributions = NULL;
62
63 const G4double theINCLNucleonMass = 938.2796;
64 const G4double theINCLPionMass = 138.0;
65 const G4double theINCLLambdaMass = 1115.683;
66 //const G4double theINCLSigmaMass = 1197.45;
67 //const G4double theINCLKaonMass = 497.614;
68 const G4double theINCLEtaMass = 547.862;
69 const G4double theINCLOmegaMass = 782.65;
70 const G4double theINCLEtaPrimeMass = 957.78;
71 const G4double theINCLPhotonMass = 0.0;
72 G4ThreadLocal G4double protonMass = 0.0;
73 G4ThreadLocal G4double neutronMass = 0.0;
74 G4ThreadLocal G4double piPlusMass = 0.0;
75 G4ThreadLocal G4double piMinusMass = 0.0;
76 G4ThreadLocal G4double piZeroMass = 0.0;
77 G4ThreadLocal G4double SigmaPlusMass = 0.0;
78 G4ThreadLocal G4double SigmaZeroMass = 0.0;
79 G4ThreadLocal G4double SigmaMinusMass = 0.0;
80 G4ThreadLocal G4double LambdaMass = 0.0;
81 G4ThreadLocal G4double XiMinusMass = 0.0;
82 G4ThreadLocal G4double XiZeroMass = 0.0;
83 G4ThreadLocal G4double antiProtonMass = 0.0;
84 G4ThreadLocal G4double antiNeutronMass = 0.0;
85 G4ThreadLocal G4double antiSigmaPlusMass = 0.0;
86 G4ThreadLocal G4double antiSigmaZeroMass = 0.0;
87 G4ThreadLocal G4double antiSigmaMinusMass = 0.0;
88 G4ThreadLocal G4double antiLambdaMass = 0.0;
89 G4ThreadLocal G4double antiXiMinusMass = 0.0;
90 G4ThreadLocal G4double antiXiZeroMass = 0.0;
91 G4ThreadLocal G4double KPlusMass = 0.0;
92 G4ThreadLocal G4double KZeroMass = 0.0;
93 G4ThreadLocal G4double KZeroBarMass = 0.0;
94 G4ThreadLocal G4double KShortMass = 0.0;
95 G4ThreadLocal G4double KLongMass = 0.0;
96 G4ThreadLocal G4double KMinusMass = 0.0;
97 G4ThreadLocal G4double etaMass = 0.0;
98 G4ThreadLocal G4double omegaMass = 0.0;
99 G4ThreadLocal G4double etaPrimeMass = 0.0;
100 G4ThreadLocal G4double photonMass = 0.0;
101
102 // Hard-coded values of the real particle masses (MeV/c^2)
103 G4ThreadLocal G4double theRealProtonMass = 938.27203;
104 G4ThreadLocal G4double theRealNeutronMass = 939.56536;
105 G4ThreadLocal G4double theRealChargedPiMass = 139.57018;
106 G4ThreadLocal G4double theRealPiZeroMass = 134.9766;
107 G4ThreadLocal G4double theRealLambdaMass = 1115.683;
108 G4ThreadLocal G4double theRealSigmaPlusMass = 1189.37;
109 G4ThreadLocal G4double theRealSigmaZeroMass = 1192.64;
110 G4ThreadLocal G4double theRealSigmaMinusMass = 1197.45;
111 G4ThreadLocal G4double theRealAntiProtonMass = 938.27203;
112 G4ThreadLocal G4double theRealXiMinusMass = 1321.71;
113 G4ThreadLocal G4double theRealXiZeroMass = 1314.86;
114 G4ThreadLocal G4double theRealAntiNeutronMass = 939.56536;
115 G4ThreadLocal G4double theRealAntiLambdaMass = 1115.683;
116 G4ThreadLocal G4double theRealAntiSigmaPlusMass = 1189.37;
117 G4ThreadLocal G4double theRealAntiSigmaZeroMass = 1192.64;
118 G4ThreadLocal G4double theRealAntiSigmaMinusMass = 1197.45;
119 G4ThreadLocal G4double theRealAntiXiMinusMass = 1321.71;
120 G4ThreadLocal G4double theRealAntiXiZeroMass = 1314.86;
121 G4ThreadLocal G4double theRealChargedKaonMass = 493.677;
122 G4ThreadLocal G4double theRealNeutralKaonMass = 497.614;
123 G4ThreadLocal G4double theRealEtaMass = 547.862;
124 G4ThreadLocal G4double theRealOmegaMass = 782.65;
125 G4ThreadLocal G4double theRealEtaPrimeMass = 957.78;
126 G4ThreadLocal G4double theRealPhotonMass = 0.0;
127
128 // Width (second)
129 const G4double theChargedPiWidth = 2.6033e-08;
130 const G4double thePiZeroWidth = 8.52e-17;
131 const G4double theEtaWidth = 5.025e-19; // 1.31 keV
132 const G4double theOmegaWidth = 7.7528e-23; // 8.49 MeV
133 const G4double theEtaPrimeWidth = 3.3243e-21; // 0.198 MeV
134 const G4double theChargedKaonWidth = 1.238e-08;
135 const G4double theKShortWidth = 8.954e-11;
136 const G4double theKLongWidth = 5.116e-08;
137 const G4double theLambdaWidth = 2.632e-10;
138 const G4double theSigmaPlusWidth = 8.018e-11;
139 const G4double theSigmaZeroWidth = 7.4e-20;
140 const G4double theSigmaMinusWidth = 1.479e-10;
141 //const G4double theXiMinusWidth = 1.639e-10;
142 //const G4double theXiZeroWidth = 2.90e-10;
143 //const G4double theAntiLambdaWidth = 2.632e-10;
144 //const G4double theAntiSigmaPlusWidth = 8.018e-11;
145 //const G4double theAntiSigmaZeroWidth = 7.4e-20;
146 //const G4double theAntiSigmaMinusWidth = 1.479e-10;
147 //const G4double theAntiXiMinusWidth = 1.639e-10;
148 //const G4double theAntiXiZeroWidth = 2.90e-10;
149 G4ThreadLocal G4double piPlusWidth = 0.0;
150 G4ThreadLocal G4double piMinusWidth = 0.0;
151 G4ThreadLocal G4double piZeroWidth = 0.0;
152 G4ThreadLocal G4double etaWidth = 0.0;
153 G4ThreadLocal G4double omegaWidth = 0.0;
154 G4ThreadLocal G4double etaPrimeWidth = 0.0;
155 G4ThreadLocal G4double LambdaWidth = 0.0;
156 G4ThreadLocal G4double SigmaPlusWidth = 0.0;
157 G4ThreadLocal G4double SigmaZeroWidth = 0.0;
158 G4ThreadLocal G4double SigmaMinusWidth = 0.0;
159 G4ThreadLocal G4double KPlusWidth = 0.0;
160 G4ThreadLocal G4double KMinusWidth = 0.0;
161 G4ThreadLocal G4double KShortWidth = 0.0;
162 G4ThreadLocal G4double KLongWidth = 0.0;
163 G4ThreadLocal G4double XiMinusWidth = 0.0;
164 G4ThreadLocal G4double XiZeroWidth = 0.0;
165 G4ThreadLocal G4double antiLambdaWidth = 0.0;
166 G4ThreadLocal G4double antiSigmaZeroWidth = 0.0;
167 G4ThreadLocal G4double antiSigmaMinusWidth = 0.0;
168 G4ThreadLocal G4double antiSigmaPlusWidth = 0.0;
169 G4ThreadLocal G4double antiXiZeroWidth = 0.0;
170 G4ThreadLocal G4double antiXiMinusWidth = 0.0;
171
172 const G4int mediumNucleiTableSize = 30;
173
174 const G4double mediumDiffuseness[mediumNucleiTableSize] =
175 {0.0,0.0,0.0,0.0,0.0,1.78,1.77,1.77,1.69,1.71,
176 1.69,1.72,1.635,1.730,1.81,1.833,1.798,
177 1.93,0.567,0.571, 0.560,0.549,0.550,0.551,
178 0.580,0.575,0.569,0.537,0.0,0.0};
179 const G4double mediumRadius[mediumNucleiTableSize] =
180 {0.0,0.0,0.0,0.0,0.0,0.334,0.327,0.479,0.631,0.838,
181 0.811,0.84,1.403,1.335,1.25,1.544,1.498,1.57,
182 2.58,2.77, 2.775,2.78,2.88,2.98,3.22,3.03,2.84,
183 3.14,0.0,0.0};
184
185 const G4double positionRMS[clusterTableZSize][clusterTableASize] = {
186 /* A= 0 1 2 3 4 5 6 7 8 9 10 11 12 */
187 /* Z=0 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0},
188 /* Z=1 */ {-1.0, -1.0, 2.10, 1.80, 1.70, 1.83, 2.60, 2.50, -1.0, -1.0, -1.0, -1.0, -1.0},
189 /* Z=2 */ {-1.0, -1.0, -1.0, 1.80, 1.68, 1.70, 2.60, 2.50, 2.50, 2.50, 2.50, -1.0, -1.0},
190 /* Z=3 */ {-1.0, -1.0, -1.0, -1.0, 1.70, 1.83, 2.56, 2.40, 2.50, 2.50, 2.50, 2.50, 2.50},
191 /* Z=4 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 2.60, 2.50, 2.50, 2.51, 2.50, 2.50, 2.50},
192 /* Z=5 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 2.50, 2.50, 2.50, 2.50, 2.45, 2.40, 2.50},
193 /* Z=6 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 2.50, 2.50, 2.50, 2.50, 2.47},
194 /* Z=7 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 2.50, 2.50, 2.50},
195 /* Z=8 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 2.50}
196 };
197
198 const G4double momentumRMS[clusterTableZSize][clusterTableASize] = {
199 /* A= 0 1 2 3 4 5 6 7 8 9 10 11 12 */
200 /* Z=0 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0},
201 /* Z=1 */ {-1.0, -1.0, 77.0, 110., 153., 100., 100., 100., -1.0, -1.0, -1.0, -1.0, -1.0},
202 /* Z=2 */ {-1.0, -1.0, -1.0, 110., 153., 100., 100., 100., 100., 100., 100., -1.0, -1.0},
203 /* Z=3 */ {-1.0, -1.0, -1.0, -1.0, 153., 100., 100., 100., 100., 100., 100., 100., 100.},
204 /* Z=4 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 100., 100., 100., 100., 100., 100., 100.},
205 /* Z=5 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 100., 100., 100., 100., 100., 100., 100.},
206 /* Z=6 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 100., 100., 100., 100., 100.},
207 /* Z=7 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 100., 100., 100.},
208 /* Z=8 */ {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 100.}
209 };
210
211 const G4int elementTableSize = 123; // up to Unbibio (Ubb)
212
213 /// \brief Table of chemical element names
214 const std::string elementTable[elementTableSize] = {
215 "",
216 "H",
217 "He",
218 "Li",
219 "Be",
220 "B",
221 "C",
222 "N",
223 "O",
224 "F",
225 "Ne",
226 "Na",
227 "Mg",
228 "Al",
229 "Si",
230 "P",
231 "S",
232 "Cl",
233 "Ar",
234 "K",
235 "Ca",
236 "Sc",
237 "Ti",
238 "V",
239 "Cr",
240 "Mn",
241 "Fe",
242 "Co",
243 "Ni",
244 "Cu",
245 "Zn",
246 "Ga",
247 "Ge",
248 "As",
249 "Se",
250 "Br",
251 "Kr",
252 "Rb",
253 "Sr",
254 "Y",
255 "Zr",
256 "Nb",
257 "Mo",
258 "Tc",
259 "Ru",
260 "Rh",
261 "Pd",
262 "Ag",
263 "Cd",
264 "In",
265 "Sn",
266 "Sb",
267 "Te",
268 "I",
269 "Xe",
270 "Cs",
271 "Ba",
272 "La",
273 "Ce",
274 "Pr",
275 "Nd",
276 "Pm",
277 "Sm",
278 "Eu",
279 "Gd",
280 "Tb",
281 "Dy",
282 "Ho",
283 "Er",
284 "Tm",
285 "Yb",
286 "Lu",
287 "Hf",
288 "Ta",
289 "W",
290 "Re",
291 "Os",
292 "Ir",
293 "Pt",
294 "Au",
295 "Hg",
296 "Tl",
297 "Pb",
298 "Bi",
299 "Po",
300 "At",
301 "Rn",
302 "Fr",
303 "Ra",
304 "Ac",
305 "Th",
306 "Pa",
307 "U",
308 "Np",
309 "Pu",
310 "Am",
311 "Cm",
312 "Bk",
313 "Cf",
314 "Es",
315 "Fm",
316 "Md",
317 "No",
318 "Lr",
319 "Rf",
320 "Db",
321 "Sg",
322 "Bh",
323 "Hs",
324 "Mt",
325 "Ds",
326 "Rg",
327 "Cn",
328 "Nh",
329 "Fl",
330 "Mc",
331 "Lv",
332 "Ts",
333 "Og",
334 "Uue",
335 "Ubn",
336 "Ubu",
337 "Ubb"
338 };
339
340 /// \brief Digit names to compose IUPAC element names
341 const std::string elementIUPACDigits = "nubtqphsoe";
342
343#define INCL_DEFAULT_SEPARATION_ENERGY 6.83
344 const G4double theINCLProtonSeparationEnergy = INCL_DEFAULT_SEPARATION_ENERGY;
345 const G4double theINCLNeutronSeparationEnergy = INCL_DEFAULT_SEPARATION_ENERGY;
346 const G4double theINCLLambdaSeparationEnergy = INCL_DEFAULT_SEPARATION_ENERGY;
347 const G4double theINCLantiNeutronSeparationEnergy = INCL_DEFAULT_SEPARATION_ENERGY;
348 const G4double theINCLantiProtonSeparationEnergy = INCL_DEFAULT_SEPARATION_ENERGY;
349 const G4double theINCLantiLambdaSeparationEnergy = INCL_DEFAULT_SEPARATION_ENERGY;
351 G4ThreadLocal G4double neutronSeparationEnergy = INCL_DEFAULT_SEPARATION_ENERGY;
353 G4ThreadLocal G4double antineutronSeparationEnergy = INCL_DEFAULT_SEPARATION_ENERGY;
354 G4ThreadLocal G4double antiprotonSeparationEnergy = INCL_DEFAULT_SEPARATION_ENERGY;
355 G4ThreadLocal G4double antilambdaSeparationEnergy = INCL_DEFAULT_SEPARATION_ENERGY;
356#undef INCL_DEFAULT_SEPARATION_ENERGY
357
358 G4ThreadLocal G4double rpCorrelationCoefficient[UnknownParticle];
359
360 G4ThreadLocal bool srcPairConfig = false;
361 G4ThreadLocal float srcPairDist = 0.0;
362
363 G4ThreadLocal G4double neutronSkin = 0.0;
364 G4ThreadLocal G4double neutronHalo = 0.0;
365
366#ifdef INCLXX_IN_GEANT4_MODE
367 G4ThreadLocal G4IonTable *theG4IonTable;
368#endif
369
370 /// \brief Default value for constant Fermi momentum
371 G4ThreadLocal double constantFermiMomentum = PhysicalConstants::Pf;
372
373 /// \brief Transform a IUPAC char to an char representing an integer digit
374 char iupacToInt(char c) {
375 return (char)(((G4int)'0')+elementIUPACDigits.find(c));
376 }
377
378 /// \brief Transform an integer digit (represented by a char) to a IUPAC char
379 char intToIUPAC(char n) { return elementIUPACDigits.at(n); }
380
381 /// \brief Get the singleton instance of the natural isotopic distributions
382 const NaturalIsotopicDistributions *getNaturalIsotopicDistributions() {
383 if(!theNaturalIsotopicDistributions)
384 theNaturalIsotopicDistributions = new NaturalIsotopicDistributions;
385 return theNaturalIsotopicDistributions;
386 }
387
388 } // namespace
389
390 void initialize(Config const * const theConfig /*=0*/) {
391 protonMass = theINCLNucleonMass;
392 neutronMass = theINCLNucleonMass;
393 piPlusMass = theINCLPionMass;
394 piMinusMass = theINCLPionMass;
395 piZeroMass = theINCLPionMass;
396
397 etaMass = theINCLEtaMass;
398 omegaMass = theINCLOmegaMass;
399 etaPrimeMass = theINCLEtaPrimeMass;
400 photonMass = theINCLPhotonMass;
401
402 SigmaPlusMass = theRealSigmaPlusMass;
403 SigmaMinusMass = theRealSigmaMinusMass;
404 SigmaZeroMass = theRealSigmaZeroMass;
405 LambdaMass = theINCLLambdaMass;
406 KPlusMass = theRealChargedKaonMass;
407 KZeroMass = theRealNeutralKaonMass;
408 KZeroBarMass = theRealNeutralKaonMass;
409 KShortMass = theRealNeutralKaonMass;
410 KLongMass = theRealNeutralKaonMass;
411 KMinusMass = theRealChargedKaonMass;
412
413 antiProtonMass = theRealAntiProtonMass;
414 XiZeroMass = theRealXiZeroMass;
415 XiMinusMass = theRealXiMinusMass;
416 antiNeutronMass = theRealAntiNeutronMass;
417 antiSigmaPlusMass = theRealAntiSigmaPlusMass;
418 antiSigmaMinusMass = theRealAntiSigmaMinusMass;
419 antiSigmaZeroMass = theRealAntiSigmaZeroMass;
420 antiLambdaMass = theRealAntiLambdaMass; //!
421 antiXiZeroMass = theRealAntiXiZeroMass;
422 antiXiMinusMass = theRealAntiXiMinusMass;
423
424 if(theConfig && theConfig->getUseRealMasses()) {
427 } else {
430 }
431
432#ifndef INCLXX_IN_GEANT4_MODE
433 std::string dataFilePath;
434 if(theConfig)
435 dataFilePath = theConfig->getINCLXXDataFilePath();
436 NuclearMassTable::initialize(dataFilePath, getRealMass(Proton), getRealMass(Neutron));
437#endif
438
439#ifdef INCLXX_IN_GEANT4_MODE
441 theG4IonTable = theG4ParticleTable->GetIonTable();
442 theRealProtonMass = theG4ParticleTable->FindParticle("proton")->GetPDGMass() / MeV;
443 theRealNeutronMass = theG4ParticleTable->FindParticle("neutron")->GetPDGMass() / MeV;
444 theRealChargedPiMass = theG4ParticleTable->FindParticle("pi+")->GetPDGMass() / MeV;
445 theRealPiZeroMass = theG4ParticleTable->FindParticle("pi0")->GetPDGMass() / MeV;
446
447 theRealEtaMass = theG4ParticleTable->FindParticle("eta")->GetPDGMass() / MeV;
448 theRealOmegaMass = theG4ParticleTable->FindParticle("omega")->GetPDGMass() / MeV;
449 theRealEtaPrimeMass = theG4ParticleTable->FindParticle("eta_prime")->GetPDGMass() / MeV;
450 theRealPhotonMass = theG4ParticleTable->FindParticle("gamma")->GetPDGMass() / MeV;
451
452 theRealSigmaPlusMass = theG4ParticleTable->FindParticle("sigma+")->GetPDGMass() / MeV;
453 theRealSigmaZeroMass = theG4ParticleTable->FindParticle("sigma0")->GetPDGMass() / MeV;
454 theRealSigmaMinusMass = theG4ParticleTable->FindParticle("sigma-")->GetPDGMass() / MeV;
455 theRealLambdaMass = theG4ParticleTable->FindParticle("lambda")->GetPDGMass() / MeV;
456 theRealChargedKaonMass = theG4ParticleTable->FindParticle("kaon+")->GetPDGMass() / MeV;
457 theRealNeutralKaonMass = theG4ParticleTable->FindParticle("kaon0")->GetPDGMass() / MeV;
458
459 theRealAntiProtonMass = theG4ParticleTable->FindParticle("anti_proton")->GetPDGMass() / MeV;
460 theRealAntiNeutronMass = theG4ParticleTable->FindParticle("anti_neutron")->GetPDGMass() / MeV;
461 theRealXiZeroMass = theG4ParticleTable->FindParticle("xi0")->GetPDGMass() / MeV;
462 theRealXiMinusMass = theG4ParticleTable->FindParticle("xi-")->GetPDGMass() / MeV;
463 theRealAntiSigmaPlusMass = theG4ParticleTable->FindParticle("anti_sigma+")->GetPDGMass() / MeV;
464 theRealAntiSigmaZeroMass = theG4ParticleTable->FindParticle("anti_sigma0")->GetPDGMass() / MeV;
465 theRealAntiSigmaMinusMass = theG4ParticleTable->FindParticle("anti_sigma-")->GetPDGMass() / MeV;
466 theRealAntiLambdaMass = theG4ParticleTable->FindParticle("anti_lambda")->GetPDGMass() / MeV;
467 theRealAntiXiZeroMass = theG4ParticleTable->FindParticle("anti_xi0")->GetPDGMass() / MeV;
468 theRealAntiXiMinusMass = theG4ParticleTable->FindParticle("anti_xi-")->GetPDGMass() / MeV;
469#endif
470
471 minDeltaMass = theRealNeutronMass + theRealChargedPiMass + 0.5;
474
475 piPlusWidth = theChargedPiWidth;
476 piMinusWidth = theChargedPiWidth;
477 piZeroWidth = thePiZeroWidth;
478 etaWidth = theEtaWidth;
479 omegaWidth = theOmegaWidth;
480 etaPrimeWidth = theEtaPrimeWidth;
481
482 SigmaMinusWidth = theSigmaMinusWidth;
483 SigmaPlusWidth = theSigmaPlusWidth;
484 SigmaZeroWidth = theSigmaZeroWidth;
485 LambdaWidth = theLambdaWidth;
486 KPlusWidth = theChargedKaonWidth;
487 KMinusWidth = theChargedKaonWidth;
488 KShortWidth = theKShortWidth;
489 KLongWidth = theKLongWidth;
490
491 // Initialise HFB tables
492#ifdef INCLXX_IN_GEANT4_MODE
494#else
495 HFB::initialize(dataFilePath);
496#endif
497
498 // Initialise the separation-energy function
499 if(!theConfig || theConfig->getSeparationEnergyType()==INCLSeparationEnergy)
501 else if(theConfig->getSeparationEnergyType()==RealSeparationEnergy)
505 else {
506 INCL_FATAL("Unrecognized separation-energy type in ParticleTable initialization: " << theConfig->getSeparationEnergyType() << '\n');
507 return;
508 }
509
510 // Initialise the Fermi-momentum function
511 if(!theConfig || theConfig->getFermiMomentumType()==ConstantFermiMomentum) {
513 if(theConfig) {
514 const G4double aFermiMomentum = theConfig->getFermiMomentum();
515 if(aFermiMomentum>0.)
516 constantFermiMomentum = aFermiMomentum;
517 else
518 constantFermiMomentum = PhysicalConstants::Pf;
519 } else {
520 constantFermiMomentum = PhysicalConstants::Pf;
521 }
522 } else if(theConfig->getFermiMomentumType()==ConstantLightFermiMomentum)
526 else {
527 INCL_FATAL("Unrecognized Fermi-momentum type in ParticleTable initialization: " << theConfig->getFermiMomentumType() << '\n');
528 return;
529 }
530
531 // Initialise the r-p correlation coefficients
532 std::fill(rpCorrelationCoefficient, rpCorrelationCoefficient + UnknownParticle, 1.);
533 if(theConfig) {
534 // Initialise the rp correlations
535 rpCorrelationCoefficient[Proton] = theConfig->getRPCorrelationCoefficient(Proton);
536 rpCorrelationCoefficient[Neutron] = theConfig->getRPCorrelationCoefficient(Neutron);
537 // Initialise the SRC parameters
538 srcPairConfig = theConfig->getsrcPairConfig();
539 srcPairDist = theConfig->getsrcPairDist();
540
541 // Initialise the neutron-skin parameters
542 neutronSkin = theConfig->getNeutronSkin();
543 neutronHalo = theConfig->getNeutronHalo();
544 }
545
546 }
547
549 // Actually this is the 3rd component of isospin (I_z) multiplied by 2!
550 if(t == Proton) {
551 return 1;
552 } else if(t == Neutron) {
553 return -1;
554 } else if(t == PiPlus) {
555 return 2;
556 } else if(t == PiMinus) {
557 return -2;
558 } else if(t == PiZero) {
559 return 0;
560 } else if(t == DeltaPlusPlus) {
561 return 3;
562 } else if(t == DeltaPlus) {
563 return 1;
564 } else if(t == DeltaZero) {
565 return -1;
566 } else if(t == DeltaMinus) {
567 return -3;
568 } else if(t == Lambda) {
569 return 0;
570 } else if(t == SigmaPlus) {
571 return 2;
572 } else if(t == SigmaZero) {
573 return 0;
574 } else if(t == SigmaMinus) {
575 return -2;
576 } else if(t == KPlus) {
577 return 1;
578 } else if(t == KZero) {
579 return -1;
580 } else if(t == KZeroBar) {
581 return 1;
582 } else if(t == KShort) {
583 return 0;
584 } else if(t == KLong) {
585 return 0;
586 } else if(t == KMinus) {
587 return -1;
588 } else if(t == Eta) {
589 return 0;
590 } else if(t == Omega) {
591 return 0;
592 } else if(t == EtaPrime) {
593 return 0;
594 } else if(t == Photon) {
595 return 0;
596 } else if(t == antiProton) {
597 return -1;
598 } else if(t == XiMinus) {
599 return -1;
600 } else if(t == XiZero) {
601 return 1;
602 } else if(t == antiNeutron) {
603 return 1;
604 } else if(t == antiLambda) {
605 return 0;
606 } else if(t == antiSigmaPlus) {
607 return -2;
608 } else if(t == antiSigmaZero) {
609 return 0;
610 } else if(t == antiSigmaMinus) {
611 return 2;
612 } else if(t == antiXiMinus) {
613 return 1;
614 } else if(t == antiXiZero) {
615 return -1;
616 }
617 INCL_ERROR("Requested isospin of an unknown particle!");
618 return -10; // Unknown
619 }
620
621 std::string getShortName(const ParticleSpecies &sp) {
622 if(sp.theType==Composite && sp.theS == 0)
623 return getShortName(sp.theA,sp.theZ);
624 else if(sp.theType==Composite)
625 return getName(sp.theA,sp.theZ,sp.theS);
626 else if (sp.theType==antiComposite)
627 return getShortName(sp.theA,sp.theZ);
628 else
629 return getShortName(sp.theType);
630 }
631
632 std::string getName(const ParticleSpecies &sp) {
633 if(sp.theType==Composite && sp.theS == 0)
634 return getName(sp.theA,sp.theZ);
635 else if(sp.theType==Composite)
636 return getName(sp.theA,sp.theZ,sp.theS);
637 else if(sp.theType==antiComposite)
638 return getName(sp.theA,sp.theZ);
639 else
640 return getName(sp.theType);
641 }
642
643 std::string getName(const G4int A, const G4int Z) {
644 std::stringstream stream;
645 if(A<0)
646 stream << getElementName(-Z) << "b" << -A;
647 else
648 stream << getElementName(Z) << "-" << A;
649 return stream.str();
650 }
651
652 std::string getName(const G4int A, const G4int Z, const G4int S) {
653 std::stringstream stream;
654 if(S >= 0) // S < 0 for hypernuclei
655 return getName(A, Z);
656 else if(S == -1)
657 stream << getElementName(Z) << "-" << A << "_" << "Lambda";
658 else
659 stream << getElementName(Z) << "-" << A << "_" << -S << "-Lambda";
660 return stream.str();
661 }
662
663 std::string getShortName(const G4int A, const G4int Z) {
664 std::stringstream stream;
665 if(A>0)
666 stream << getElementName(Z) << A;
667 else if(A<0)
668 stream << getElementName(-Z) << "b" << -A;
669 else
670 stream << getElementName(Z);
671 return stream.str();
672 }
673
674 std::string getName(const ParticleType p) {
675 if(p == G4INCL::Proton) {
676 return std::string("proton");
677 } else if(p == G4INCL::Neutron) {
678 return std::string("neutron");
679 } else if(p == G4INCL::DeltaPlusPlus) {
680 return std::string("delta++");
681 } else if(p == G4INCL::DeltaPlus) {
682 return std::string("delta+");
683 } else if(p == G4INCL::DeltaZero) {
684 return std::string("delta0");
685 } else if(p == G4INCL::DeltaMinus) {
686 return std::string("delta-");
687 } else if(p == G4INCL::PiPlus) {
688 return std::string("pi+");
689 } else if(p == G4INCL::PiZero) {
690 return std::string("pi0");
691 } else if(p == G4INCL::PiMinus) {
692 return std::string("pi-");
693 } else if(p == G4INCL::Lambda) {
694 return std::string("lambda");
695 } else if(p == G4INCL::SigmaPlus) {
696 return std::string("sigma+");
697 } else if(p == G4INCL::SigmaZero) {
698 return std::string("sigma0");
699 } else if(p == G4INCL::SigmaMinus) {
700 return std::string("sigma-");
701 } else if(p == G4INCL::antiProton) {
702 return std::string("antiproton");
703 } else if(p == G4INCL::XiMinus) {
704 return std::string("xi-");
705 } else if(p == G4INCL::XiZero) {
706 return std::string("xi0");
707 } else if(p == G4INCL::antiNeutron) {
708 return std::string("antineutron");
709 } else if(p == G4INCL::antiSigmaPlus) {
710 return std::string("antisigma+");
711 } else if(p == G4INCL::antiSigmaZero) {
712 return std::string("antisigma0");
713 } else if(p == G4INCL::antiSigmaMinus) {
714 return std::string("antisigma-");
715 } else if(p == G4INCL::antiLambda) {
716 return std::string("antilambda");
717 } else if(p == G4INCL::antiXiMinus) {
718 return std::string("antixi-");
719 } else if(p == G4INCL::antiXiZero) {
720 return std::string("antixi0");
721 } else if(p == G4INCL::KPlus) {
722 return std::string("kaon+");
723 } else if(p == G4INCL::KZero) {
724 return std::string("kaon0");
725 } else if(p == G4INCL::KZeroBar) {
726 return std::string("kaon0bar");
727 } else if(p == G4INCL::KMinus) {
728 return std::string("kaon-");
729 } else if(p == G4INCL::KShort) {
730 return std::string("kaonshort");
731 } else if(p == G4INCL::KLong) {
732 return std::string("kaonlong");
733 } else if(p == G4INCL::Composite) {
734 return std::string("composite");
735 } else if(p == G4INCL::Eta) {
736 return std::string("eta");
737 } else if(p == G4INCL::Omega) {
738 return std::string("omega");
739 } else if(p == G4INCL::EtaPrime) {
740 return std::string("etaprime");
741 } else if(p == G4INCL::Photon) {
742 return std::string("photon");
743 } else if(p == G4INCL::antiComposite){
744 return std::string("anticomposite");
745 }
746 return std::string("unknown");
747 }
748
749 std::string getShortName(const ParticleType p) {
750 if(p == G4INCL::Proton) {
751 return std::string("p");
752 } else if(p == G4INCL::Neutron) {
753 return std::string("n");
754 } else if(p == G4INCL::DeltaPlusPlus) {
755 return std::string("d++");
756 } else if(p == G4INCL::DeltaPlus) {
757 return std::string("d+");
758 } else if(p == G4INCL::DeltaZero) {
759 return std::string("d0");
760 } else if(p == G4INCL::DeltaMinus) {
761 return std::string("d-");
762 } else if(p == G4INCL::PiPlus) {
763 return std::string("pi+");
764 } else if(p == G4INCL::PiZero) {
765 return std::string("pi0");
766 } else if(p == G4INCL::PiMinus) {
767 return std::string("pi-");
768 } else if(p == G4INCL::Lambda) {
769 return std::string("l");
770 } else if(p == G4INCL::SigmaPlus) {
771 return std::string("s+");
772 } else if(p == G4INCL::SigmaZero) {
773 return std::string("s0");
774 } else if(p == G4INCL::SigmaMinus) {
775 return std::string("s-");
776 } else if(p == G4INCL::antiProton) {
777 return std::string("pb");
778 } else if(p == G4INCL::XiMinus) {
779 return std::string("x-");
780 } else if(p == G4INCL::XiZero) {
781 return std::string("x0");
782 } else if(p == G4INCL::antiNeutron) {
783 return std::string("nb");
784 } else if(p == G4INCL::antiSigmaPlus) {
785 return std::string("s+b");
786 } else if(p == G4INCL::antiSigmaZero) {
787 return std::string("s0b");
788 } else if(p == G4INCL::antiSigmaMinus) {
789 return std::string("s-b");
790 } else if(p == G4INCL::antiLambda) {
791 return std::string("lb");
792 } else if(p == G4INCL::antiXiMinus) {
793 return std::string("x-b");
794 } else if(p == G4INCL::antiXiZero) {
795 return std::string("x0b");
796 } else if(p == G4INCL::KPlus) {
797 return std::string("k+");
798 } else if(p == G4INCL::KZero) {
799 return std::string("k0");
800 } else if(p == G4INCL::KZeroBar) {
801 return std::string("k0b");
802 } else if(p == G4INCL::KMinus) {
803 return std::string("k-");
804 } else if(p == G4INCL::KShort) {
805 return std::string("ks");
806 } else if(p == G4INCL::KLong) {
807 return std::string("kl");
808 } else if(p == G4INCL::Composite) {
809 return std::string("comp");
810 } else if(p == G4INCL::Eta) {
811 return std::string("eta");
812 } else if(p == G4INCL::Omega) {
813 return std::string("omega");
814 } else if(p == G4INCL::EtaPrime) {
815 return std::string("etap");
816 } else if(p == G4INCL::Photon) {
817 return std::string("photon");
818 } else if(p == G4INCL::antiComposite) {
819 return std::string("anticomp");
820 }
821 return std::string("unknown");
822 }
823
825 if(pt == Proton) {
826 return protonMass;
827 } else if(pt == Neutron) {
828 return neutronMass;
829 } else if(pt == PiPlus) {
830 return piPlusMass;
831 } else if(pt == PiMinus) {
832 return piMinusMass;
833 } else if(pt == PiZero) {
834 return piZeroMass;
835 } else if(pt == SigmaPlus) {
836 return SigmaPlusMass;
837 } else if(pt == SigmaMinus) {
838 return SigmaMinusMass;
839 } else if(pt == SigmaZero) {
840 return SigmaZeroMass;
841 } else if(pt == Lambda) {
842 return LambdaMass;
843 } else if(pt == antiProton) {
844 return antiProtonMass;
845 } else if(pt == XiMinus) {
846 return XiMinusMass;
847 } else if(pt == XiZero) {
848 return XiZeroMass;
849 } else if(pt == antiNeutron) {
850 return antiNeutronMass;
851 } else if(pt == antiSigmaPlus) {
852 return antiSigmaPlusMass;
853 } else if(pt == antiSigmaMinus) {
854 return antiSigmaMinusMass;
855 } else if(pt == antiSigmaZero) {
856 return antiSigmaZeroMass;
857 } else if(pt == antiLambda) {
858 return antiLambdaMass;
859 } else if(pt == antiXiMinus) {
860 return antiXiMinusMass;
861 } else if(pt == antiXiZero) {
862 return antiXiZeroMass;
863 } else if(pt == KPlus) {
864 return KPlusMass;
865 } else if(pt == KZero) {
866 return KZeroMass;
867 } else if(pt == KZeroBar) {
868 return KZeroBarMass;
869 } else if(pt == KMinus) {
870 return KMinusMass;
871 } else if(pt == KShort) {
872 return KShortMass;
873 } else if(pt == KLong) {
874 return KLongMass;
875 } else if(pt == Eta) {
876 return etaMass;
877 } else if(pt == Omega) {
878 return omegaMass;
879 } else if(pt == EtaPrime) {
880 return etaPrimeMass;
881 } else if(pt == Photon) {
882 return photonMass;
883 } else {
884 INCL_ERROR("getMass : Unknown particle type." << '\n');
885 return 0.0;
886 }
887 }
888
890 switch(t) {
891 case Proton:
892 return theRealProtonMass;
893 break;
894 case Neutron:
895 return theRealNeutronMass;
896 break;
897 case PiPlus:
898 case PiMinus:
899 return theRealChargedPiMass;
900 break;
901 case PiZero:
902 return theRealPiZeroMass;
903 break;
904 case Eta:
905 return theRealEtaMass;
906 break;
907 case Omega:
908 return theRealOmegaMass;
909 break;
910 case EtaPrime:
911 return theRealEtaPrimeMass;
912 break;
913 case Photon:
914 return theRealPhotonMass;
915 break;
916 case Lambda:
917 return theRealLambdaMass;
918 break;
919 case KPlus:
920 case KMinus:
921 return theRealChargedKaonMass;
922 break;
923 case KZero:
924 case KZeroBar:
925 case KShort:
926 case KLong:
927 return theRealNeutralKaonMass;
928 break;
929 case SigmaPlus:
930 return theRealSigmaPlusMass;
931 break;
932 case SigmaZero:
933 return theRealSigmaZeroMass;
934 break;
935 case SigmaMinus:
936 return theRealSigmaMinusMass;
937 break;
938 case antiProton:
939 return theRealAntiProtonMass;
940 break;
941 case XiMinus:
942 return theRealXiMinusMass;
943 break;
944 case XiZero:
945 return theRealXiZeroMass;
946 break;
947 case antiNeutron:
948 return theRealAntiNeutronMass;
949 break;
950 case antiSigmaPlus:
951 return theRealAntiSigmaPlusMass;
952 break;
953 case antiSigmaZero:
954 return theRealAntiSigmaZeroMass;
955 break;
956 case antiSigmaMinus:
957 return theRealAntiSigmaMinusMass;
958 break;
959 case antiXiMinus:
960 return theRealAntiXiMinusMass;
961 break;
962 case antiXiZero:
963 return theRealAntiXiZeroMass;
964 break;
965 case antiLambda:
966 return theRealAntiLambdaMass;
967 break;
968 default:
969 INCL_ERROR("Particle::getRealMass : Unknown particle type." << '\n');
970 return 0.0;
971 break;
972 }
973 }
974
975 G4double getRealMass(const G4int A, const G4int Z, const G4int S) {
976// assert(A>=0);
977 // For nuclei with Z<0 or Z>A, assume that the exotic charge state is due to pions
978 if(Z<0 && S<0)
979 return (A+S)*theRealNeutronMass - S*LambdaMass - Z*getRealMass(PiMinus);
980 else if(Z>A && S<0)
981 return (A+S)*theRealProtonMass - S*LambdaMass + (A+S-Z)*getRealMass(PiPlus);
982 if(Z<0)
983 return (A)*theRealNeutronMass - Z*getRealMass(PiMinus);
984 else if(Z>A)
985 return (A)*theRealProtonMass + (A-Z)*getRealMass(PiPlus);
986 else if(Z==0 && S==0)
987 return A*theRealNeutronMass;
988 else if(A==Z)
989 return A*theRealProtonMass;
990 else if(Z==0 && S<0)
991 return (A+S)*theRealNeutronMass-S*LambdaMass;
992 else if(A>1) {
993#ifndef INCLXX_IN_GEANT4_MODE
994 return ::G4INCL::NuclearMassTable::getMass(A,Z,S);
995#else
996 if(S<0) return theG4IonTable->GetNucleusMass(Z,A,std::abs(S)) / MeV;
997 else return theG4IonTable->GetNucleusMass(Z,A) / MeV;
998#endif
999 } else
1000 return 0.;
1001 }
1002
1003 G4double getINCLMass(const G4int A, const G4int Z, const G4int S) {
1004// assert(A>=0);
1005 // For nuclei with Z<0 or Z>A, assume that the exotic charge state is due to pions
1006 // Note that S<0 for lambda
1007 if(Z<0 && S<0)
1008 return (A+S)*neutronMass - S*LambdaMass - Z*getINCLMass(PiMinus);
1009 else if(Z>A && S<0)
1010 return (A+S)*protonMass - S*LambdaMass + (A+S-Z)*getINCLMass(PiPlus);
1011 else if(Z<0)
1012 return (A)*neutronMass - Z*getINCLMass(PiMinus);
1013 else if(Z>A)
1014 return (A)*protonMass + (A-Z)*getINCLMass(PiPlus);
1015 else if(A>1 && S<0)
1016 return Z*(protonMass - protonSeparationEnergy) + (A+S-Z)*(neutronMass - neutronSeparationEnergy) + std::abs(S)*(LambdaMass - lambdaSeparationEnergy);
1017 else if(A>1)
1018 return Z*(protonMass - protonSeparationEnergy) + (A-Z)*(neutronMass - neutronSeparationEnergy);
1019 else if(A==1 && Z==0 && S==0)
1020 return getINCLMass(Neutron);
1021 else if(A==1 && Z==1 && S==0)
1022 return getINCLMass(Proton);
1023 else if(A==1 && Z==0 && S==-1)
1024 return getINCLMass(Lambda);
1025 else
1026 return 0.;
1027 }
1028
1029 G4double getTableQValue(const G4int A1, const G4int Z1, const G4int S1, const G4int A2, const G4int Z2, const G4int S2) {
1030 return getTableMass(A1,Z1,S1) + getTableMass(A2,Z2,S2) - getTableMass(A1+A2,Z1+Z2,S1+S2);
1031 }
1032
1033 G4double getTableQValue(const G4int A1, const G4int Z1, const G4int S1, const G4int A2, const G4int Z2, const G4int S2, const G4int A3, const G4int Z3, const G4int S3) {
1034 return getTableMass(A1,Z1,S1) + getTableMass(A2,Z2,S2) - getTableMass(A3,Z3,S3) - getTableMass(A1+A2-A3,Z1+Z2-Z3,S1+S2-S3);
1035 }
1036
1038 if(p.theType == Composite)
1039 return (*getTableMass)(p.theA, p.theZ, p.theS);
1040 else if (p.theType == antiComposite)
1041 return (*getTableMass)(-p.theA,-p.theZ,p.theS);
1042 else
1043 return (*getTableParticleMass)(p.theType);
1044 }
1045
1047
1048 switch(t) {
1049 case Proton:
1050 case Neutron:
1051 case DeltaPlusPlus:
1052 case DeltaPlus:
1053 case DeltaZero:
1054 case DeltaMinus:
1055 case SigmaPlus:
1056 case SigmaZero:
1057 case SigmaMinus:
1058 case Lambda:
1059 case XiZero:
1060 case XiMinus:
1061 return 1;
1062 break;
1063 case antiProton:
1064 case antiNeutron:
1065 case antiSigmaPlus:
1066 case antiSigmaZero:
1067 case antiSigmaMinus:
1068 case antiLambda:
1069 case antiXiZero:
1070 case antiXiMinus:
1071 return -1;
1072 break;
1073 case PiPlus:
1074 case PiMinus:
1075 case PiZero:
1076 case KPlus:
1077 case KZero:
1078 case KZeroBar:
1079 case KShort:
1080 case KLong:
1081 case KMinus:
1082 case Eta:
1083 case Omega:
1084 case EtaPrime:
1085 case Photon:
1086 return 0;
1087 break;
1088 default:
1089 return 0;
1090 break;
1091 }
1092 }
1093
1095 switch(t) {
1096 case DeltaPlusPlus:
1097 return 2;
1098 break;
1099 case Proton:
1100 case DeltaPlus:
1101 case PiPlus:
1102 case SigmaPlus:
1103 case KPlus:
1104 case antiSigmaMinus:
1105 case antiXiMinus:
1106 return 1;
1107 break;
1108 case Neutron:
1109 case DeltaZero:
1110 case PiZero:
1111 case SigmaZero:
1112 case Lambda:
1113 case KZero:
1114 case KZeroBar:
1115 case KShort:
1116 case KLong:
1117 case Eta:
1118 case Omega:
1119 case EtaPrime:
1120 case Photon:
1121 case XiZero:
1122 case antiNeutron:
1123 case antiLambda:
1124 case antiSigmaZero:
1125 case antiXiZero:
1126 return 0;
1127 break;
1128 case DeltaMinus:
1129 case PiMinus:
1130 case SigmaMinus:
1131 case KMinus:
1132 case antiProton:
1133 case XiMinus:
1134 case antiSigmaPlus:
1135 return -1;
1136 break;
1137 default:
1138 return 0;
1139 break;
1140 }
1141 }
1142
1144 switch(t) {
1145 case DeltaPlusPlus:
1146 case DeltaPlus:
1147 case DeltaZero:
1148 case DeltaMinus:
1149 case Proton:
1150 case Neutron:
1151 case PiPlus:
1152 case PiZero:
1153 case PiMinus:
1154 case Eta:
1155 case Omega:
1156 case EtaPrime:
1157 case Photon:
1158 case antiProton:
1159 case antiNeutron:
1160 return 0;
1161 break;
1162 case XiMinus:
1163 case XiZero:
1164 case antiXiMinus:
1165 case antiXiZero:
1166 return 2;
1167 break;
1168 case antiLambda:
1169 case antiSigmaPlus:
1170 case antiSigmaZero:
1171 case antiSigmaMinus:
1172 return 1;
1173 break;
1174 case Lambda:
1175 case SigmaPlus:
1176 case SigmaZero:
1177 case SigmaMinus:
1178 case KZeroBar:
1179 case KMinus:
1180 return -1;
1181 break;
1182 case KPlus:
1183 case KZero:
1184 return 1;
1185 break;
1186 case KShort:
1187 return 0;
1188 break;
1189 case KLong:
1190 return 0;
1191 break;
1192 default:
1193 return 0;
1194 break;
1195 }
1196 }
1197
1199// assert(A>=0);
1200 if(A > 19 || (A < 6 && A >= 2)) {
1201 // For large (Woods-Saxon or Modified Harmonic Oscillator) or small
1202 // (Gaussian) nuclei, the radius parameter is just the nuclear radius
1203 return getRadiusParameter(t,A,Z);
1204 } else if(A < clusterTableASize && Z>=0 && Z < clusterTableZSize && A >= 6) {
1205 const G4double thisRMS = positionRMS[Z][A];
1206 if(thisRMS>0.0)
1207 return thisRMS;
1208 else {
1209 INCL_DEBUG("getNuclearRadius: Radius for nucleus A = " << A << " Z = " << Z << " is not available" << '\n'
1210 << "returning radius for C12");
1211 return positionRMS[6][12];
1212 }
1213 } else if(A <= 19) {
1214 const G4double theRadiusParameter = getRadiusParameter(t, A, Z);
1215 const G4double theDiffusenessParameter = getSurfaceDiffuseness(t, A, Z);
1216 // The formula yields the nuclear RMS radius based on the parameters of
1217 // the nuclear-density function
1218 return 1.225*theDiffusenessParameter*
1219 std::sqrt((2.+5.*theRadiusParameter)/(2.+3.*theRadiusParameter));
1220 } else {
1221 INCL_ERROR("getNuclearRadius: No radius for nucleus A = " << A << " Z = " << Z << '\n');
1222 return 0.0;
1223 }
1224 }
1225
1229
1231// assert(A>0);
1232 if(A > 19) {
1233 // radius fit for lambdas
1234 if(t==Lambda){
1235 G4double r0 = (1.128+0.439*std::pow(A,-2./3.)) * std::pow(A, 1.0/3.0);
1236 return r0;
1237 }
1238 // phenomenological radius fit
1239 G4double r0 = (2.745e-4 * A + 1.063) * std::pow(A, 1.0/3.0);
1240 // HFB calculations
1243 if(r0hfb>0.)r0 = r0hfb;
1244 }
1245 //
1246 if(t==Neutron)
1247 r0 += neutronSkin;
1248 return r0;
1249 } else if(A < 6 && A >= 2) {
1250 if(Z<clusterTableZSize && Z>=0) {
1251 const G4double thisRMS = positionRMS[Z][A];
1252 if(thisRMS>0.0)
1253 return thisRMS;
1254 else {
1255 INCL_DEBUG("getRadiusParameter: Radius for nucleus A = " << A << " Z = " << Z << " is not available" << '\n'
1256 << "returning radius for C12");
1257 return positionRMS[6][12];
1258 }
1259 } else {
1260 INCL_DEBUG("getRadiusParameter: Radius for nucleus A = " << A << " Z = " << Z << " is not available" << '\n'
1261 << "returning radius for C12");
1262 return positionRMS[6][12];
1263 }
1264 } else if(A <= 19 && A >= 6) {
1265 if(t==Lambda){
1266 G4double r0 = (1.128+0.439*std::pow(A,-2./3.)) * std::pow(A, 1.0/3.0);
1267 return r0;
1268 }
1269 // HFB calculations
1272 if(r0hfb>0.)return r0hfb;
1273 }
1274 return mediumRadius[A-1];
1275 // return 1.581*mediumDiffuseness[A-1]*(2.+5.*mediumRadius[A-1])/(2.+3.*mediumRadius[A-1]);
1276 } else {
1277 INCL_ERROR("getRadiusParameter: No radius for nucleus A = " << A << " Z = " << Z << '\n');
1278 return 0.0;
1279 }
1280 }
1281
1283 const G4double XFOISA = 8.0;
1284 if(A > 19) {
1285 return getNuclearRadius(t,A,Z) + XFOISA * getSurfaceDiffuseness(t,A,Z);
1286 } else if(A <= 19 && A >= 6) {
1287 return 5.5 + 0.3 * (G4double(A) - 6.0)/12.0;
1288 } else if(A >= 2) {
1289 return getNuclearRadius(t, A, Z) + 4.5;
1290 } else {
1291 INCL_ERROR("getMaximumNuclearRadius : No maximum radius for nucleus A = " << A << " Z = " << Z << '\n');
1292 return 0.0;
1293 }
1294 }
1295
1297 if(A > 19) {
1298 // phenomenological fit
1299 G4double a = 1.63e-4 * A + 0.510;
1300 // HFB calculations
1303 if(ahfb>0.)a=ahfb;
1304 }
1305 //
1306 if(t==Lambda){
1307 // Like for neutrons
1309 if(ahfb>0.)a=ahfb;
1310 }
1311 if(t==Neutron)
1312 a += neutronHalo;
1313 return a;
1314 } else if(A <= 19 && A >= 6) {
1315 // HFB calculations
1318 if(ahfb>0.)return ahfb;
1319 }
1320 return mediumDiffuseness[A-1];
1321 } else if(A < 6 && A >= 2) {
1322 INCL_ERROR("getSurfaceDiffuseness: was called for A = " << A << " Z = " << Z << '\n');
1323 return 0.0;
1324 } else {
1325 INCL_ERROR("getSurfaceDiffuseness: No diffuseness for nucleus A = " << A << " Z = " << Z << '\n');
1326 return 0.0;
1327 }
1328 }
1329
1331// assert(Z>=0 && A>=0 && Z<=A);
1333 }
1334
1335 G4double getSeparationEnergyINCL(const ParticleType t, const G4int /*A*/, const G4int /*Z*/) {
1336 if(t==Proton)
1337 return theINCLProtonSeparationEnergy;
1338 else if(t==Neutron)
1339 return theINCLNeutronSeparationEnergy;
1340 else if(t==Lambda)
1341 return theINCLLambdaSeparationEnergy;
1342 else if(t==antiLambda)
1343 return theINCLantiLambdaSeparationEnergy;
1344 else if(t==antiProton)
1345 return theINCLantiProtonSeparationEnergy;
1346 else if(t==antiNeutron)
1347 return theINCLantiNeutronSeparationEnergy;
1348 else {
1349 INCL_ERROR("ParticleTable::getSeparationEnergyINCL : Unknown particle type." << '\n');
1350 return 0.0;
1351 }
1352 }
1353
1355 // Real separation energies for all nuclei
1356 if(t==Proton)
1357 return (*getTableParticleMass)(Proton) + (*getTableMass)(A-1,Z-1,0) - (*getTableMass)(A,Z,0);
1358 else if(t==Neutron)
1359 return (*getTableParticleMass)(Neutron) + (*getTableMass)(A-1,Z,0) - (*getTableMass)(A,Z,0);
1360 else if(t==Lambda)
1361 return (*getTableParticleMass)(Lambda) + (*getTableMass)(A-1,Z,0) - (*getTableMass)(A,Z,-1);
1362 else if(t==antiLambda)
1363 return (*getTableParticleMass)(antiLambda) + (*getTableMass)(A+1,Z,0) - (*getTableMass)(A,Z,+1);
1364 else if(t==antiProton)
1365 return (*getTableParticleMass)(antiProton) + (*getTableMass)(A+1,Z+1,0) - (*getTableMass)(A,Z,0);
1366 else if(t==antiNeutron)
1367 return (*getTableParticleMass)(antiNeutron) + (*getTableMass)(A+1,Z,0) - (*getTableMass)(A,Z,0);
1368 else {
1369 INCL_ERROR("ParticleTable::getSeparationEnergyReal : Unknown particle type." << '\n');
1370 return 0.0;
1371 }
1372 }
1373
1375 // Real separation energies for light nuclei, fixed values for heavy nuclei
1377 return getSeparationEnergyReal(t, A, Z);
1378 else
1379 return getSeparationEnergyINCL(t, A, Z);
1380 }
1381
1382 G4bool getsrcPairConfig() { return srcPairConfig; }
1383
1384 G4float getsrcPairDistance() { return srcPairDist; }
1385
1386 G4double getProtonSeparationEnergy() { return protonSeparationEnergy; }
1387
1388 G4double getNeutronSeparationEnergy() { return neutronSeparationEnergy; }
1389
1390 G4double getLambdaSeparationEnergy() { return lambdaSeparationEnergy; }
1391
1392 G4double getantiLambdaSeparationEnergy() { return antilambdaSeparationEnergy; }
1393
1394 G4double getantiProtonSeparationEnergy() { return antiprotonSeparationEnergy; }
1395
1396 G4double getantiNeutronSeparationEnergy() { return antineutronSeparationEnergy; }
1397
1398 void setProtonSeparationEnergy(const G4double sen) { protonSeparationEnergy = sen; }
1399
1400 void setNeutronSeparationEnergy(const G4double sen) { neutronSeparationEnergy = sen; }
1401
1402 void setLambdaSeparationEnergy(const G4double sen) { lambdaSeparationEnergy = sen; }
1403
1404 void setantiLambdaSeparationEnergy(const G4double sen) { antilambdaSeparationEnergy = sen; }
1405
1406 std::string getElementName(const G4int Z) {
1407 if(Z<1) {
1408 INCL_WARN("getElementName called with Z<1" << '\n');
1409 return elementTable[0];
1410 } else if(Z<elementTableSize)
1411 return elementTable[Z];
1412 else
1413 return getIUPACElementName(Z);
1414 }
1415
1416 std::string getIUPACElementName(const G4int Z) {
1417 std::stringstream elementStream;
1418 elementStream << Z;
1419 std::string elementName = elementStream.str();
1420 std::transform(elementName.begin(), elementName.end(), elementName.begin(), intToIUPAC);
1421 elementName[0] = (char)std::toupper(elementName.at(0));
1422 return elementName;
1423 }
1424
1425 G4int parseElement(std::string pS) {
1426 // Normalize the element name
1427 std::transform(pS.begin(), pS.end(), pS.begin(), ::tolower);
1428 pS[0] = (char)std::toupper(pS[0]);
1429
1430 const std::string *iter = std::find(elementTable, elementTable+elementTableSize, pS);
1431 if(iter != elementTable+elementTableSize)
1432 return G4int(iter - elementTable);
1433 else
1435 }
1436
1437 G4int parseIUPACElement(std::string const &sel) {
1438 // Normalise to lower case
1439 std::string elementName(sel);
1440 std::transform(elementName.begin(), elementName.end(), elementName.begin(), ::tolower);
1441 // Return 0 if the element name contains anything but IUPAC digits
1442 if(elementName.find_first_not_of(elementIUPACDigits)!=std::string::npos)
1443 return 0;
1444 std::transform(elementName.begin(), elementName.end(), elementName.begin(), iupacToInt);
1445 std::stringstream elementStream(elementName);
1446 G4int Z;
1447 elementStream >> Z;
1448 return Z;
1449 }
1450
1452 return getNaturalIsotopicDistributions()->getIsotopicDistribution(Z);
1453 }
1454
1456 return getNaturalIsotopicDistributions()->drawRandomIsotope(Z);
1457 }
1458
1459 G4double getFermiMomentumConstant(const G4int /*A*/, const G4int /*Z*/) {
1460 return constantFermiMomentum;
1461 }
1462
1464// assert(Z>0 && A>0 && Z<=A);
1466 const G4double rms = momentumRMS[Z][A];
1467 return ((rms>0.) ? rms : momentumRMS[6][12]) * Math::sqrtFiveThirds;
1468 } else
1469 return getFermiMomentumConstant(A,Z);
1470 }
1471
1473// assert(A>0);
1474 static const G4double alphaParam = 259.416; // MeV/c
1475 static const G4double betaParam = 152.824; // MeV/c
1476 static const G4double gammaParam = 9.5157E-2;
1477 return alphaParam - betaParam*std::exp(-gammaParam*((G4double)A));
1478 }
1479
1481// assert(t==Proton || t==Neutron || t==Lambda);
1482 return rpCorrelationCoefficient[t];
1483 }
1484
1485 G4double getNeutronSkin() { return neutronSkin; }
1486
1487 G4double getNeutronHalo() { return neutronHalo; }
1488
1496
1498// assert(isosp == -2 || isosp == 0 || isosp == 2);
1499 if (isosp == -2) {
1500 return PiMinus;
1501 }
1502 else if (isosp == 0) {
1503 return PiZero;
1504 }
1505 else {
1506 return PiPlus;
1507 }
1508 }
1509
1511// assert(isosp == -1 || isosp == 1);
1512 if (isosp == -1) {
1513 return Neutron;
1514 }
1515 else {
1516 return Proton;
1517 }
1518 }
1519
1521// assert(isosp == -3 || isosp == -1 || isosp == 1 || isosp == 3);
1522 if (isosp == -3) {
1523 return DeltaMinus;
1524 }
1525 else if (isosp == -1) {
1526 return DeltaZero;
1527 }
1528 else if (isosp == 1) {
1529 return DeltaPlus;
1530 }
1531 else {
1532 return DeltaPlusPlus;
1533 }
1534 }
1535
1537// assert(isosp == -2 || isosp == 0 || isosp == 2);
1538 if (isosp == -2) {
1539 return SigmaMinus;
1540 }
1541 else if (isosp == 0) {
1542 return SigmaZero;
1543 }
1544 else {
1545 return SigmaPlus;
1546 }
1547 }
1548
1550// assert(isosp == -1 || isosp == 1);
1551 if (isosp == -1) {
1552 return XiMinus;
1553 }
1554 else {
1555 return XiZero;
1556 }
1557 }
1558
1559 /*ParticleType getAntiNucleonType(const G4int isosp) {
1560// assert(isosp == -1); //|| isosp == 1
1561 if (isosp == -1) {
1562 return antiProton;
1563 }
1564 else {
1565 return antiNeutron;
1566 }
1567 }*/
1568
1570// assert(isosp == -2 || isosp == 0 || isosp == 2);
1571 if (isosp == -2) {
1572 return antiSigmaPlus;
1573 }
1574 else if (isosp == 0) {
1575 return antiSigmaZero;
1576 }
1577 else {
1578 return antiSigmaMinus;
1579 }
1580 }
1581
1583// assert(isosp == -1 || isosp == 1);
1584 if (isosp == -1) {
1585 return antiXiZero;
1586 }
1587 else {
1588 return antiXiMinus;
1589 }
1590 }
1591
1593// assert(isosp == -1 || isosp == 1);
1594 if (isosp == -1) {
1595 return KZero;
1596 }
1597 else {
1598 return KPlus;
1599 }
1600 }
1601
1603// assert(isosp == -1 || isosp == 1);
1604 if (isosp == -1) {
1605 return KMinus;
1606 }
1607 else {
1608 return KZeroBar;
1609 }
1610 }
1611
1613// assert(pt == PiPlus || pt == PiMinus || pt == PiZero || pt == Eta || pt == Omega || pt == EtaPrime || pt == KShort || pt == KLong || pt== KPlus || pt == KMinus || pt == Lambda || pt == SigmaPlus || pt == SigmaZero || pt == SigmaMinus || pt == antiLambda || pt == antiSigmaPlus || pt == antiSigmaZero || pt == antiSigmaMinus || pt == XiMinus || pt == XiZero || pt == antiXiZero || pt == antiXiMinus || );
1614 if(pt == PiPlus) {
1615 return piPlusWidth;
1616 } else if(pt == PiMinus) {
1617 return piMinusWidth;
1618 } else if(pt == PiZero) {
1619 return piZeroWidth;
1620 } else if(pt == Eta) {
1621 return etaWidth;
1622 } else if(pt == Omega) {
1623 return omegaWidth;
1624 } else if(pt == EtaPrime) {
1625 return etaPrimeWidth;
1626 } else if(pt == SigmaPlus) {
1627 return SigmaPlusWidth;
1628 } else if(pt == SigmaZero) {
1629 return SigmaZeroWidth;
1630 } else if(pt == SigmaMinus) {
1631 return SigmaMinusWidth;
1632 } else if(pt == KPlus) {
1633 return KPlusWidth;
1634 } else if(pt == KMinus) {
1635 return KMinusWidth;
1636 } else if(pt == KShort) {
1637 return KShortWidth;
1638 } else if(pt == KLong) {
1639 return KLongWidth;
1640 } else if(pt == Lambda) {
1641 return LambdaWidth;
1642 } else if(pt == XiMinus) {
1643 return XiMinusWidth;
1644 } else if(pt == XiZero) {
1645 return XiZeroWidth;
1646 } else if(pt == antiSigmaPlus) {
1647 return antiSigmaPlusWidth;
1648 } else if(pt == antiSigmaZero) {
1649 return antiSigmaZeroWidth;
1650 } else if(pt == antiSigmaMinus) {
1651 return antiSigmaMinusWidth;
1652 } else if(pt == antiLambda) {
1653 return antiLambdaWidth;
1654 } else if(pt == antiXiMinus) {
1655 return antiXiMinusWidth;
1656 } else if(pt == antiXiZero) {
1657 return antiXiZeroWidth;
1658 } else {
1659 INCL_ERROR("getWidth : Unknown particle type." << '\n');
1660 return 0.0;
1661 }
1662 }
1663
1664 } // namespace ParticleTable
1665} // namespace G4INCL
1666
G4double S(G4double temp)
#define INCL_ERROR(x)
#define INCL_WARN(x)
#define INCL_FATAL(x)
#define INCL_DEBUG(x)
Functions that encapsulate a mass table.
#define INCL_DEFAULT_SEPARATION_ENERGY
float G4float
Definition G4Types.hh:84
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
const G4double A[17]
G4double getNeutronHalo() const
Get the neutron-halo size.
FermiMomentumType getFermiMomentumType() const
Get the Fermi-momentum type.
SeparationEnergyType getSeparationEnergyType() const
Get the separation-energy type.
G4double getRPCorrelationCoefficient(const ParticleType t) const
Get the r-p correlation coefficient.
std::string const & getINCLXXDataFilePath() const
Set the ABLAXX datafile path.
G4float getsrcPairDist() const
G4double getNeutronSkin() const
Get the neutron-skin thickness.
G4double getFermiMomentum() const
Get the Fermi momentum.
G4bool getsrcPairConfig() const
G4bool getUseRealMasses() const
Whether to use real masses.
Class that stores isotopic abundances for a given element.
G4IonTable * GetIonTable() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
void initialize()
Definition G4INCLHFB.cc:83
G4double getSurfaceDiffusenessHFB(const ParticleType t, const G4int A, const G4int Z)
Definition G4INCLHFB.cc:142
G4double getRadiusParameterHFB(const ParticleType t, const G4int A, const G4int Z)
Get the radius and diffuseness parameters from HFB calculations.
Definition G4INCLHFB.cc:132
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const G4double sqrtFiveThirds
const G4double sqrtThreeFifths
G4int getMassNumber(const ParticleType t)
Get mass number from particle type.
G4ThreadLocal FermiMomentumFn getFermiMomentum
const G4double effectiveDeltaWidth
G4int parseElement(std::string pS)
Get the name of the element from the atomic number.
G4ThreadLocal G4double minDeltaMass2
G4double(* FermiMomentumFn)(const G4int, const G4int)
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4ThreadLocal SeparationEnergyFn getSeparationEnergy
Static pointer to the separation-energy function.
G4double getTableQValue(const G4int A1, const G4int Z1, const G4int S1, const G4int A2, const G4int Z2, const G4int S2)
Get Q-value (in MeV/c^2).
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
G4double getantiProtonSeparationEnergy()
Getter for antiprotonSeparationEnergy.
void initialize(Config const *const theConfig=0)
Initialize the particle table.
const G4double effectiveDeltaMass
G4double getFermiMomentumMassDependent(const G4int A, const G4int)
Return the value Fermi momentum from a fit.
G4double getTableSpeciesMass(const ParticleSpecies &p)
G4double getLambdaSeparationEnergy()
Getter for lambdaSeparationEnergy.
G4int drawRandomNaturalIsotope(const G4int Z)
G4double getSeparationEnergyReal(const ParticleType t, const G4int A, const G4int Z)
Return the real separation energy.
G4double getNeutronSeparationEnergy()
Getter for neutronSeparationEnergy.
G4float getsrcPairDistance()
Get the distance between src nucleons.
G4ThreadLocal G4double minDeltaMass
G4double getRadiusParameter(const ParticleType t, const G4int A, const G4int Z)
G4double getLargestNuclearRadius(const G4int A, const G4int Z)
ParticleType getKaonType(const G4int isosp)
Get the type of kaon.
G4double getNeutronHalo()
Get the size of the neutron halo.
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2).
ParticleType getSigmaType(const G4int isosp)
Get the type of sigma.
G4double getINCLMass(const G4int A, const G4int Z, const G4int S)
Get INCL nuclear mass (in MeV/c^2).
G4double(* ParticleMassFn)(const ParticleType)
G4int getStrangenessNumber(const ParticleType t)
Get strangeness number from particle type.
G4double getMaximumNuclearRadius(const ParticleType t, const G4int A, const G4int Z)
void setLambdaSeparationEnergy(const G4double s)
Setter for lambdaSeparationEnergy.
G4double getRPCorrelationCoefficient(const ParticleType t)
Get the value of the r-p correlation coefficient.
G4int parseIUPACElement(std::string const &pS)
Parse a IUPAC element name.
G4double getSeparationEnergyINCL(const ParticleType t, const G4int, const G4int)
Return INCL's default separation energy.
void setNeutronSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy.
G4double getantiLambdaSeparationEnergy()
Getter for antilambdaSeparationEnergy.
G4double getFermiMomentumConstant(const G4int, const G4int)
Return the constant value of the Fermi momentum.
G4double getantiNeutronSeparationEnergy()
Getter for antineutronSeparationEnergy.
std::string getName(const ParticleType t)
Get the native INCL name of the particle.
G4ThreadLocal G4double minDeltaMassRndm
G4double(* SeparationEnergyFn)(const ParticleType, const G4int, const G4int)
G4double getNeutronSkin()
Get the thickness of the neutron skin.
std::string getIUPACElementName(const G4int Z)
Get the name of an unnamed element from the IUPAC convention.
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
ParticleType getNucleonType(const G4int isosp)
Get the type of nucleon.
ParticleType getAntiXiType(const G4int isosp)
Get the type of antidelta.
G4double getSurfaceDiffuseness(const ParticleType t, const G4int A, const G4int Z)
void setantiLambdaSeparationEnergy(const G4double s)
Setter for antilambdaSeparationEnergy.
G4double getFermiMomentumConstantLight(const G4int A, const G4int Z)
Return the constant value of the Fermi momentum - special for light.
G4bool getsrcPairConfig()
Get the configuration of src-pair correlations.
void setProtonSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy.
ParticleType getPionType(const G4int isosp)
Get the type of pion.
ParticleType getDeltaType(const G4int isosp)
Get the type of delta.
G4double(* NuclearMassFn)(const G4int, const G4int, const G4int)
G4int getChargeNumber(const ParticleType t)
Get charge number from particle type.
G4double getProtonSeparationEnergy()
Getter for protonSeparationEnergy.
IsotopicDistribution const & getNaturalIsotopicDistribution(const G4int Z)
ParticleType getAntiSigmaType(const G4int isosp)
Get the type of antisigma.
G4double getMomentumRMS(const G4int A, const G4int Z)
Return the RMS of the momentum distribution (light clusters).
ParticleType getAntiKaonType(const G4int isosp)
Get the type of antikaon.
G4double getSeparationEnergyRealForLight(const ParticleType t, const G4int A, const G4int Z)
Return the real separation energy only for light nuclei.
G4double getNuclearRadius(const ParticleType t, const G4int A, const G4int Z)
G4double getWidth(const ParticleType t)
Get particle width (in s).
std::string getShortName(const ParticleType t)
Get the short INCL name of the particle.
std::string getElementName(const G4int Z)
Get the name of the element from the atomic number.
ParticleType getXiType(const G4int isosp)
Get the type of xi.
const G4double Pf
Fermi momentum [MeV/c].
@ MassDependentFermiMomentum
@ ConstantLightFermiMomentum
@ RealForLightSeparationEnergy
#define G4ThreadLocal
Definition tls.hh:77