Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -1,6 +1,6 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.16...3.21)
cmake_minimum_required(VERSION 3.16...3.27)
project(HadronNucleusXS)
#----------------------------------------------------------------------------
@@ -14,6 +14,9 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
## 2023-11-09 I. Hrivnacova (HadronNucleusXS-V11-01-01)
- Coding guidelines - split long lines in XSHistoManager.cc
06-01-23 Gabrielle Hugo (HadronNucleusXS-V11-01-00)
- Created this example.
@@ -10,7 +10,7 @@
**************************************************************
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
Geant4 version Name: geant4-11-02-ref-00 (8-December-2023)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -247,14 +247,15 @@ void XSHistoManager::Book() {
fXSProfileIndex.insert(std::make_pair(fElasticPerVolumeXSIndex,
elasticPerVolumeXSProfileIndex));
const G4int inelasticPerVolumeXSProfileIndex = fAnalysisManager->CreateH1("InelasticPerVolumeXS",
"Inelastic XS per volume",
fNumBins,
fMinKineticEnergy,
fMaxKineticEnergy,
fRootEnergyUnit,
fFunctionName,
fBinSchemeName);
const G4int inelasticPerVolumeXSProfileIndex =
fAnalysisManager->CreateH1("InelasticPerVolumeXS",
"Inelastic XS per volume",
fNumBins,
fMinKineticEnergy,
fMaxKineticEnergy,
fRootEnergyUnit,
fFunctionName,
fBinSchemeName);
fXSProfileIndex.insert(std::make_pair(fInelasticPerVolumeXSIndex,
inelasticPerVolumeXSProfileIndex));
}
@@ -274,7 +275,8 @@ void XSHistoManager::EndOfRun() {
// Fill XS profiles.
const G4double logMinKineticEnergy = std::log10(fMinKineticEnergy);
const G4double logMaxKineticEnergy = std::log10(fMaxKineticEnergy);
const G4double deltaLogKineticEnergy = (logMaxKineticEnergy - logMinKineticEnergy) / fNumBins;
const G4double deltaLogKineticEnergy =
(logMaxKineticEnergy - logMinKineticEnergy) / fNumBins;
G4double logKineticEnergy = logMinKineticEnergy - deltaLogKineticEnergy/2.;
@@ -38,7 +38,7 @@ you will need to install and setup `FLUKA` and its interface. <br>
See the compulsory "Dependencies" paragraph below.
A version of the interface to `FLUKA` is directly located at `geant4/examples/extended/hadronic/FlukaCern/FlukaInterface`. <br>
Note that for consistency, all calls to the random engine rely on the G4 random engine (including the calls from within the downloaded `FLUKA` release; see the `FlukaInterface` `Makefile` to see how this is handled).
Note that for consistency, all calls to the random engine rely on the G4 random engine (including the calls from within the downloaded `FLUKA` release; see the `FlukaInterface` `GNUmakefile` to see how this is handled).
# FLUKA inelastic hadron-nucleus interactions
@@ -1,6 +1,6 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.16...3.21)
cmake_minimum_required(VERSION 3.16...3.27)
project(HadNucIneEvents)
#----------------------------------------------------------------------------
@@ -14,6 +14,9 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
08-12-22 Gabrielle Hugo (exHadNucIneEvents-V11-01-00)
## 2023-09-13 I. Hrivnacova (exHadNucIneEvents-V11-01-01)
- Removed unused function HadronicGenerator::getAllHadronicProcesses()
## 2023-12-08 Gabrielle Hugo (exHadNucIneEvents-V11-01-00)
- Created this example (from `Hadr09`).
@@ -49,103 +49,97 @@ Correlated gamma emission flag 0
Max 2J for sampling of angular correlations 10
=======================================================================
--> #secondaries=44 impactParameter[fm]=2.20708 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=10 #NNcollisions=2
--> #secondaries=43 impactParameter[fm]=2.20708 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=10 #NNcollisions=2
List of produced secondaries:
j=0 pi0 p=(-278.056,-54.2443,249603249603) MeV
j=1 pi+ p=(230.029,220.459,171303171304) MeV
j=2 pi0 p=(-469.822,62.0587,83597.283598.7) MeV
j=3 kaon0L p=(-807.182,-630.872,7481.167567.36) MeV
j=4 pi+ p=(-18.2834,94.391,4761.174764.19) MeV
j=5 pi- p=(-65.525,38.2802,21213.921214.5) MeV
j=6 kaon+ p=(902.744,526.473,225354225357) MeV
j=7 pi- p=(-25.0614,-160.697,62327.162327.5) MeV
j=8 proton p=(457.791,307.539,357.451145.55) MeV
j=9 pi+ p=(187.049,258.114,13773.813778.2) MeV
j=10 eta_prime p=(407.557,161.798,29438.329457.2) MeV
j=11 pi- p=(129.938,-141.881,4209.444216.15) MeV
j=12 pi0 p=(71.0042,453.782,6627.166644.43) MeV
j=13 neutron p=(-16.419,129.541,310.001997.965) MeV
j=14 proton p=(135.377,-168.25,28.0742963.212) MeV
j=15 pi0 p=(125.272,-388.858,1.53492e+061.53492e+06) MeV
j=16 neutron p=(-255.463,71.5904,3.54864e+063.54864e+06) MeV
j=17 pi0 p=(117.323,-60.3735,-34.8848191.951) MeV
j=18 neutron p=(446.611,-171.762,1383.281739.32) MeV
j=19 pi- p=(210.496,175.307,1032.121076.94) MeV
j=20 kaon+ p=(690.16,73.5808,9055.49095.37) MeV
j=21 pi- p=(177.308,-219.884,3488.423502.62) MeV
j=22 pi0 p=(-53.4748,65.7408,2602.062606.93) MeV
j=23 pi+ p=(-144.662,198.791,3725.553736.26) MeV
j=24 pi- p=(429.909,309.238,52688.552691.4) MeV
j=25 pi+ p=(-15.7564,-416.423,91345.391346.3) MeV
j=26 pi- p=(-35.5745,175.967,45452.845453.3) MeV
j=27 pi+ p=(-361.018,-259.16,2125021255.1) MeV
j=28 pi- p=(-1222.43,64.7139,89625.989634.4) MeV
j=29 pi0 p=(-295.877,103.056,27493.927496) MeV
j=30 pi+ p=(-308.863,130.216,5371453715.3) MeV
j=31 pi0 p=(-106.131,119.136,43773.943774.4) MeV
j=32 kaon0S p=(810.072,-3.24422,165782165785) MeV
j=33 pi0 p=(-115.05,-174.435,1450.991472.16) MeV
j=34 pi- p=(291.714,445.213,3613.763655.41) MeV
j=35 pi+ p=(72.3103,36.167,1728917289.7) MeV
j=36 anti_proton p=(-817.196,-1045.02,300634300639) MeV
j=37 pi0 p=(11.2051,-189.687,20817.620818.9) MeV
j=38 proton p=(-249.068,59.6892,80867.280873) MeV
j=39 He3 p=(117.034,-199.489,-159.672822.42) MeV
j=40 deuteron p=(-211.988,-209.404,-136.1621904.01) MeV
j=41 neutron p=(23.8186,-71.9476,-141.265953.144) MeV
j=42 neutron p=(-190.541,431.213,494.9871161.91) MeV
j=43 proton p=(18.7242,-146.424,-86.6639953.759) MeV
j=0 pi0 p=(-278.058,-54.2447,249604249604) MeV
j=1 pi+ p=(230.03,220.461,171304171305) MeV
j=2 pi0 p=(-469.825,62.0591,83597.883599.2) MeV
j=3 kaon0L p=(-807.187,-630.876,7481.197567.39) MeV
j=4 pi+ p=(-18.2835,94.3916,4761.184764.19) MeV
j=5 pi- p=(-65.5255,38.2805,2121421214.6) MeV
j=6 kaon+ p=(902.75,526.476,225356225358) MeV
j=7 pi- p=(-25.0616,-160.698,62327.562327.9) MeV
j=8 proton p=(457.794,307.541,357.4451145.55) MeV
j=9 pi+ p=(187.05,258.116,13773.913778.3) MeV
j=10 eta_prime p=(407.559,161.799,29438.329457.2) MeV
j=11 pi- p=(129.939,-141.882,4209.464216.16) MeV
j=12 pi0 p=(71.0046,453.785,6627.26644.47) MeV
j=13 neutron p=(-16.4191,129.542,309.995997.963) MeV
j=14 proton p=(135.378,-168.251,28.0683963.212) MeV
j=15 pi0 p=(124.056,-385.893,1.52753e+061.52753e+06) MeV
j=16 neutron p=(-254.248,68.6241,3.55606e+063.55606e+06) MeV
j=17 pi0 p=(117.21,-60.3051,-34.7261191.832) MeV
j=18 neutron p=(446.727,-171.832,1382.091738.41) MeV
j=19 pi- p=(210.497,175.307,1032.121076.94) MeV
j=20 kaon+ p=(690.165,73.5822,9055.49095.37) MeV
j=21 pi- p=(177.16,-219.676,3483.773497.96) MeV
j=22 pi0 p=(-53.4315,65.671,2601.32606.17) MeV
j=23 pi+ p=(-144.559,198.653,3722.023732.73) MeV
j=24 pi- p=(429.198,308.328,52681.852684.6) MeV
j=25 pi+ p=(-15.0435,-415.515,91322.191323.1) MeV
j=26 pi- p=(-35.5784,175.965,45452.945453.5) MeV
j=27 pi+ p=(-361.017,-259.158,2125021255.2) MeV
j=28 pi- p=(-1222.39,64.7204,89624.689633) MeV
j=29 pi0 p=(-295.902,103.055,2749627498.1) MeV
j=30 pi+ p=(-308.892,130.212,53713.953715.1) MeV
j=31 pi0 p=(-106.13,119.136,43774.143774.6) MeV
j=32 kaon0S p=(810.076,-3.24364,165783165786) MeV
j=33 pi0 p=(-115.122,-174.545,1451.851473.02) MeV
j=34 pi- p=(291.788,445.326,3615.883657.53) MeV
j=35 pi+ p=(71.6095,35.5851,17300.817301.6) MeV
j=36 anti_proton p=(-816.5,-1044.45,300607300612) MeV
j=37 pi0 p=(11.3286,-190.312,2085820859.3) MeV
j=38 proton p=(-249.193,60.3146,80839.980845.8) MeV
j=39 alpha p=(-363.424,209.746,-842.2813844.33) MeV
j=40 deuteron p=(-129.813,-6.02731,324.7681907.95) MeV
j=41 neutron p=(5.33356,-28.2918,306.082988.584) MeV
j=42 proton p=(244.952,-371.478,182.6581054.38) MeV
Collision 1 projectile=proton Ekin[MeV]=7e+06 direction=(0,0,1) material=G4_C
--> #secondaries=37 impactParameter[fm]=2.60398 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=1
--> #secondaries=22 impactParameter[fm]=1.85456 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=10 #NNcollisions=1
Collision 2 projectile=proton Ekin[MeV]=7e+06 direction=(0,0,1) material=G4_C
--> #secondaries=31 impactParameter[fm]=3.28119 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=1
--> #secondaries=33 impactParameter[fm]=2.93443 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=1
Collision 3 projectile=proton Ekin[MeV]=7e+06 direction=(0,0,1) material=G4_C
--> #secondaries=46 impactParameter[fm]=3.13666 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=10 #NNcollisions=2
--> #secondaries=27 impactParameter[fm]=1.91246 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=1
Collision 4 projectile=proton Ekin[MeV]=7e+06 direction=(0,0,1) material=G4_C
--> #secondaries=7 impactParameter[fm]=3.17708 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=0
--> #secondaries=8 impactParameter[fm]=1.18725 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=0
Collision 5 projectile=proton Ekin[MeV]=7e+06 direction=(0,0,1) material=G4_C
--> #secondaries=21 impactParameter[fm]=3.03126 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=1
--> #secondaries=30 impactParameter[fm]=2.59294 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=10 #NNcollisions=2
Collision 6 projectile=proton Ekin[MeV]=7e+06 direction=(0,0,1) material=G4_C
--> #secondaries=63 impactParameter[fm]=1.55971 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=9 #NNcollisions=3
--> #secondaries=22 impactParameter[fm]=2.38324 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=1
Collision 7 projectile=proton Ekin[MeV]=7e+06 direction=(0,0,1) material=G4_C
--> #secondaries=6 impactParameter[fm]=2.7974 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=0
--> #secondaries=34 impactParameter[fm]=1.95621 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=9 #NNcollisions=2
Collision 8 projectile=proton Ekin[MeV]=7e+06 direction=(0,0,1) material=G4_C
--> #secondaries=26 impactParameter[fm]=2.42631 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=1
--> #secondaries=5 impactParameter[fm]=3.38892 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=11 #NNcollisions=0
Collision 9 projectile=proton Ekin[MeV]=7e+06 direction=(0,0,1) material=G4_C
--> #secondaries=42 impactParameter[fm]=2.60456 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=10 #NNcollisions=1
--> #secondaries=48 impactParameter[fm]=2.4417 #projectileSpectatorNucleons=0 #targetSpectatorNucleons=9 #NNcollisions=3
========================================================
Number of events 10
Average (per event) number of B10[718.380] 0.1
Average (per event) number of He3 0.3
Average (per event) number of He3 0.4
Average (per event) number of Li6 0.1
Average (per event) number of alpha 0.8
Average (per event) number of anti_lambda 0.1
Average (per event) number of anti_proton 0.4
Average (per event) number of deuteron 0.8
Average (per event) number of eta 0.8
Average (per event) number of eta_prime 0.9
Average (per event) number of gamma 0.3
Average (per event) number of kaon+ 0.9
Average (per event) number of anti_neutron 0.1
Average (per event) number of anti_proton 0.2
Average (per event) number of deuteron 0.9
Average (per event) number of eta 0.4
Average (per event) number of eta_prime 0.5
Average (per event) number of kaon+ 0.5
Average (per event) number of kaon- 0.4
Average (per event) number of kaon0L 0.7
Average (per event) number of kaon0S 1
Average (per event) number of kaon0S 0.5
Average (per event) number of lambda 0.1
Average (per event) number of neutron 2.2
Average (per event) number of pi+ 6.4
Average (per event) number of pi- 6.2
Average (per event) number of pi0 6
Average (per event) number of proton 3
Average (per event) number of sigma+ 0.1
Average (per event) number of sigma- 0.2
Average (per event) number of sigma0 0.3
Average (per event) number of triton 0.3
Average (per event) number of neutron 3.2
Average (per event) number of pi+ 5.1
Average (per event) number of pi- 4.8
Average (per event) number of pi0 5.3
Average (per event) number of proton 3.2
========================================================
### All histograms saved to all_secondaries.root
### All histograms saved to all_secondaries.hist
Final random number = 0.957412
Final random number = 0.677923
Processed 10 events (collisions) in 2.706730e-01 seconds. Average: 27.0673 ms / event.
Processed 10 events (collisions) in 2.712950e-01 seconds. Average: 27.1295 ms / event.
=== End of test ===
@@ -32,7 +32,7 @@ you will need to install and setup `FLUKA` and its interface.
See the compulsory "Dependencies" paragraph below.
A version of the interface to `FLUKA` is directly located at `geant4/examples/extended/hadronic/FlukaCern/FlukaInterface`.
Note that for consistency, all calls to the random engine rely on the G4 random engine (including the calls from within the downloaded `FLUKA` release; see the `FlukaInterface` `Makefile` to see how this is handled).
Note that for consistency, all calls to the random engine rely on the G4 random engine (including the calls from within the downloaded `FLUKA` release; see the `FlukaInterface` `GNUmakefile` to see how this is handled).
# FLUKA inelastic hadron-nucleus interactions
@@ -136,9 +136,6 @@ class HadronicGenerator {
// If the required hadronic collision is not possible, then the method returns
// immediately an empty "G4VParticleChange", i.e. without secondaries produced.
const std::map<G4ParticleDefinition*, G4HadronicProcess*>& getAllHadronicProcesses() const {
return fProcessMap;
}
inline G4HadronicProcess* GetHadronicProcess() const;
inline G4HadronicInteraction* GetHadronicInteraction() const;
// Returns the hadronic process and the hadronic interaction, respectively,