Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#---Adding all electromagnetic examples subdirectories explicitly
|
||||
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
|
||||
add_subdirectory(TestEm0)
|
||||
add_subdirectory(TestEm1)
|
||||
|
||||
@@ -4,6 +4,12 @@ See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
|
||||
## 2023-11-15 I. Hrivnacova (electromagnetic-V11-01-01)
|
||||
- Updated vis*.mac macros:
|
||||
- Changed "/vis/open XYZ [600x600-0+0]" to "/vis/open" to allow run-time choices
|
||||
and simplified comments.
|
||||
|
||||
## 2022-12-15 Igor Semeniouk (electromagnetic-V11-01-00)
|
||||
- README, .README.txt
|
||||
- Update TestEm15 short description add GC entry to table
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
% TestEm0
|
||||
....
|
||||
Idle> /run/initialize
|
||||
....
|
||||
...
|
||||
Idle> /testem/det/setMat Silicon
|
||||
Idle> /run/setCut 100 um
|
||||
Idle> /run/setCut 100 um
|
||||
Idle> /gun/particle e-
|
||||
Idle> /gun/energy 10 MeV
|
||||
Idle> /run/beamOn
|
||||
@@ -38,7 +38,5 @@ Idle> /run/beamOn
|
||||
|
||||
DirectAccess.cc is a small batch program which shows how to compute the same
|
||||
basic data directly from the processes (indeed the models).
|
||||
|
||||
To run it, change name in the first line on GNUmakefile before to compile.
|
||||
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm0)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -92,17 +92,17 @@
|
||||
|
||||
Energy ionization bremsstra pair_prod ionization bremsstra pair_prod
|
||||
|
||||
1.01 GeV 457.217 mbarn 694.657 mubarn 685.688 mubarn 25.7582 cm 169.539 m 171.756 m
|
||||
11.01 GeV 675.132 mbarn 2.02862 mbarn 26.2282 mbarn 17.4442 cm 58.0548 m 4.49025 m
|
||||
21.01 GeV 684.489 mbarn 2.41403 mbarn 46.3852 mbarn 17.2057 cm 48.786 m 2.53898 m
|
||||
31.01 GeV 688.689 mbarn 2.63939 mbarn 62.3763 mbarn 17.1008 cm 44.6205 m 1.88808 m
|
||||
41.01 GeV 691.358 mbarn 2.79745 mbarn 75.7828 mbarn 17.0348 cm 42.0994 m 1.55406 m
|
||||
51.01 GeV 693.309 mbarn 2.91866 mbarn 87.4123 mbarn 16.9868 cm 40.3511 m 1.34731 m
|
||||
61.01 GeV 694.846 mbarn 3.01671 mbarn 97.7334 mbarn 16.9492 cm 39.0396 m 1.20502 m
|
||||
71.01 GeV 696.113 mbarn 3.09883 mbarn 107.045 mbarn 16.9184 cm 38.0051 m 1.10021 m
|
||||
81.01 GeV 697.191 mbarn 3.16935 mbarn 115.548 mbarn 16.8922 cm 37.1594 m 1.01924 m
|
||||
91.01 GeV 698.129 mbarn 3.23108 mbarn 123.39 mbarn 16.8695 cm 36.4495 m 95.446 cm
|
||||
101.01 GeV 698.96 mbarn 3.28584 mbarn 130.678 mbarn 16.8495 cm 35.8421 m 90.1234 cm
|
||||
1.01 GeV 457.217 mbarn 694.657 mubarn 685.684 mubarn 25.7582 cm 169.539 m 171.757 m
|
||||
11.01 GeV 675.132 mbarn 2.02862 mbarn 26.2249 mbarn 17.4442 cm 58.0548 m 4.49081 m
|
||||
21.01 GeV 684.489 mbarn 2.41403 mbarn 46.3873 mbarn 17.2057 cm 48.786 m 2.53886 m
|
||||
31.01 GeV 688.689 mbarn 2.63939 mbarn 62.3844 mbarn 17.1008 cm 44.6205 m 1.88783 m
|
||||
41.01 GeV 691.358 mbarn 2.79745 mbarn 75.7925 mbarn 17.0348 cm 42.0994 m 1.55386 m
|
||||
51.01 GeV 693.309 mbarn 2.91866 mbarn 87.4207 mbarn 16.9868 cm 40.3511 m 1.34718 m
|
||||
61.01 GeV 694.846 mbarn 3.01671 mbarn 97.7392 mbarn 16.9492 cm 39.0396 m 1.20495 m
|
||||
71.01 GeV 696.113 mbarn 3.09883 mbarn 107.047 mbarn 16.9184 cm 38.0051 m 1.10018 m
|
||||
81.01 GeV 697.191 mbarn 3.16935 mbarn 115.549 mbarn 16.8922 cm 37.1594 m 1.01923 m
|
||||
91.01 GeV 698.129 mbarn 3.23108 mbarn 123.388 mbarn 16.8695 cm 36.4495 m 95.4477 cm
|
||||
101.01 GeV 698.96 mbarn 3.28584 mbarn 130.673 mbarn 16.8495 cm 35.8421 m 90.1263 cm
|
||||
|
||||
####muon: StoppingPower for G4_Fe Energy cut = 10 MeV
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
- Interactively, a typical sequence will be :
|
||||
% TestEm0
|
||||
....
|
||||
Idle> /run/initialize
|
||||
....
|
||||
Idle> /testem/det/setMat Silicon
|
||||
Idle> /run/setCut 100 um
|
||||
Idle> /gun/particle e-
|
||||
Idle> /gun/energy 10 MeV
|
||||
Idle> /run/beamOn
|
||||
....
|
||||
Idle> /run/initialize
|
||||
...
|
||||
Idle> /testem/det/setMat Silicon
|
||||
Idle> /run/setCut 100 um
|
||||
Idle> /gun/particle e-
|
||||
Idle> /gun/energy 10 MeV
|
||||
Idle> /run/beamOn
|
||||
|
||||
The last command triggers BuildPhysicsTable() and executes the program.
|
||||
|
||||
@@ -36,7 +36,5 @@
|
||||
DirectAccess
|
||||
------------
|
||||
|
||||
DirectAccess is a small batch program which shows how to compute the same
|
||||
DirectAccess.cc is a small batch program which shows how to compute the same
|
||||
basic data directly from the processes (indeed the models).
|
||||
|
||||
To run it, change name in the first line on GNUmakefile before to compile.
|
||||
|
||||
@@ -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
|
||||
@@ -156,7 +156,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.000393s Sys=0.000000s
|
||||
User=0.000000s Real=0.000344s Sys=0.000000s
|
||||
|
||||
Material: Water density: 1.000 g/cm3 RadL: 36.092 cm Nucl.Int.Length: 75.356 cm
|
||||
Imean: 78.000 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
@@ -225,7 +225,7 @@ Index : 1 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.000161s Sys=0.000000s
|
||||
User=0.000000s Real=0.000198s Sys=0.000000s
|
||||
================== Deleting memory pools ===================
|
||||
Number of memory pools allocated: 9 of which, static: 0
|
||||
Dynamic pools deleted: 9 / Total memory freed: 0.012 MB
|
||||
|
||||
@@ -158,7 +158,7 @@ Idle> exit
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm1)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -4,6 +4,13 @@ See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
## 2023-11-12 Alberto Ribon (testem1-V11-01-01)
|
||||
- radioactive.mac : introduced the UI command
|
||||
/process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year
|
||||
to allow all radioactive decays (including the very long ones).
|
||||
This is necessary since G4 11.2, being 1 year the default time
|
||||
threshold above which the decays are ignored.
|
||||
|
||||
## 2023-03-19 Michel Maire (testem1-V11-01-00)
|
||||
- new macro: etaDecay.mac
|
||||
- PhysicsList::AddRadioactiveDecay(): set ARM false
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
/analysis/setFileName name (default testem1)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -345,9 +345,15 @@ Auger electron emission enabled 0
|
||||
Check EM cuts disabled for atomic de-excitation 0
|
||||
Use Bearden atomic level energies 0
|
||||
Use ANSTO fluorescence model 0
|
||||
Threshold for very long decay time at rest 3.171e+10 y
|
||||
Threshold for very long decay time at rest 1 y
|
||||
======================================================================
|
||||
|
||||
====================================================================
|
||||
HADRONIC PROCESSES SUMMARY (verbose level 1)
|
||||
-------------------------------------------------------------------------
|
||||
Hadronic Processes for GenericIon
|
||||
Process: RadioactiveDecay
|
||||
|
||||
msc: for alpha SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
UrbanMsc : Emin= 0 eV Emax= 100 TeV
|
||||
@@ -624,7 +630,7 @@ N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 2000
|
||||
User=1.150000s Real=1.153828s Sys=0.000000s
|
||||
User=1.190000s Real=1.219697s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
@@ -693,7 +699,7 @@ N=17 V[N]={317779713105008277, 1743114184808863783, 1853744490327788949, 1867994
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 2000
|
||||
User=0.060000s Real=0.062617s Sys=0.000000s
|
||||
User=0.060000s Real=0.064642s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Set a very high time threshold to allow all decays to happen
|
||||
/process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year
|
||||
#
|
||||
/process/em/fluo true
|
||||
/process/em/auger true
|
||||
#
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -77,7 +77,7 @@ Idle> /emphyslist/setXTRModel modelName
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
@@ -89,7 +89,7 @@ Idle> /emphyslist/setXTRModel modelName
|
||||
|
||||
- Execute TestEm10 in 'batch' mode from macro files e.g.
|
||||
\verbatim
|
||||
% TestEm10 run11.mac
|
||||
% TestEm10 TestEm10.in [TestEm10.large_N.in]
|
||||
\endverbatim
|
||||
|
||||
- Execute TestEm10 in 'interactive' mode with visualization e.g.
|
||||
@@ -100,4 +100,14 @@ Idle> type your commands
|
||||
....
|
||||
\endverbatim
|
||||
|
||||
\section TestEm10_s6 MACROS
|
||||
|
||||
- alice06.mac: ALICE simplified 2006 test beam setup
|
||||
- bari05.mac: setup of Bari INFN group (M. Bridgida et al, NIM A550 (2005) 157-168 (fig. 8))
|
||||
- barr90.mac: NIM A294 (1990) 465-472 (fig. 11) setup
|
||||
- harris73.mac: NIM 107 (1973) 413-422 (fig. 3b) setup
|
||||
- salice.mac: ALICE simplified 2006 test beam setup with disabled
|
||||
ionisation and multiple scattering
|
||||
- watase86.mac: NIM A248 (1986) 379-388 (fig. 7) setup
|
||||
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm10)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -5,6 +5,9 @@ which **must** added in reverse chronological order (newest at the top). It must
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
|
||||
## 2023-11-09 I. Hrivnacova (testem10-V11-01-00)
|
||||
- Coding guidelines - document macros in README files
|
||||
|
||||
## 2021-12-10 Ben Morgan (testem10-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
/analysis/setFileName name (default testem1)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
@@ -85,10 +85,19 @@
|
||||
6- HOW TO START ?
|
||||
|
||||
- execute TestEm10 in 'batch' mode from macro files e.g.
|
||||
% TestEm10 run11.mac
|
||||
|
||||
% TestEm10 TestEm10.in [TestEm10.large_N.in]
|
||||
|
||||
- execute TestEm10 in 'interactive' mode with visualization e.g.
|
||||
% TestEm10
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
% TestEm10
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
|
||||
7- MACROS
|
||||
alice06.mac: ALICE simplified 2006 test beam setup
|
||||
bari05.mac: setup of Bari INFN group (M. Bridgida et al, NIM A550 (2005) 157-168 (fig. 8))
|
||||
barr90.mac: NIM A294 (1990) 465-472 (fig. 11) setup
|
||||
harris73.mac: NIM 107 (1973) 413-422 (fig. 3b) setup
|
||||
salice.mac: ALICE simplified 2006 test beam setup with disabled
|
||||
ionisation and multiple scattering
|
||||
watase86.mac: NIM A248 (1986) 379-388 (fig. 7) setup
|
||||
|
||||
@@ -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
|
||||
@@ -215,10 +215,10 @@ Lorentz Factor XTR photon number
|
||||
8.085e+04 3.154
|
||||
9.283e+04 3.154
|
||||
|
||||
total time for build X-ray TR energy loss tables = 0.62 s
|
||||
total time for build X-ray TR energy loss tables = 0.36 s
|
||||
Build angle for energy distribution according the current radiator
|
||||
|
||||
total time for build X-ray TR angle for energy loss tables = 1.96 s
|
||||
total time for build X-ray TR angle for energy loss tables = 1.36 s
|
||||
|
||||
msc: for e+ SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
@@ -305,10 +305,10 @@ Lorentz Factor XTR photon number
|
||||
8.085e+04 3.154
|
||||
9.283e+04 3.154
|
||||
|
||||
total time for build X-ray TR energy loss tables = 0.62 s
|
||||
total time for build X-ray TR energy loss tables = 0.36 s
|
||||
Build angle for energy distribution according the current radiator
|
||||
|
||||
total time for build X-ray TR angle for energy loss tables = 1.96 s
|
||||
total time for build X-ray TR angle for energy loss tables = 1.36 s
|
||||
|
||||
msc: for proton SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
@@ -632,20 +632,20 @@ Index : 2 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1000
|
||||
User=0.200000s Real=0.207233s Sys=0.000000s
|
||||
User=0.230000s Real=0.263357s Sys=0.000000s
|
||||
================== run summary =====================
|
||||
End of Run TotNbofEvents = 1000
|
||||
Mean energy deposit in absorber = 0.0469696 +-0.0185724 MeV
|
||||
Total number of XTR gammas = 2677
|
||||
Total number of all gammas = 2759
|
||||
Mean energy deposit in absorber = 0.0479535 +-0.0189569 MeV
|
||||
Total number of XTR gammas = 2664
|
||||
Total number of all gammas = 2755
|
||||
|
||||
--------- Ranecu engine status ---------
|
||||
Initial seed (index) = 0
|
||||
Current couple of seeds = 1520903769, 1468394322
|
||||
Current couple of seeds = 2144070945, 143970008
|
||||
----------------------------------------
|
||||
... write file : testem10.root - done
|
||||
... close file : testem10.root - done
|
||||
================== Deleting memory pools ===================
|
||||
Number of memory pools allocated: 12 of which, static: 0
|
||||
Dynamic pools deleted: 12 / Total memory freed: 0.054 MB
|
||||
Dynamic pools deleted: 12 / Total memory freed: 0.045 MB
|
||||
============================================================
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Macro file 'salice.mac' for the initialization phase of "TestEm10.cc"
|
||||
# Macro file 'barr90.mac' for the initialization phase of "TestEm10.cc"
|
||||
# with NIM A294 (1990) 465-472 (fig. 11) setup
|
||||
#
|
||||
/control/verbose 2
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Macro file 'salice.mac' for the initialization phase of "TestEm10.cc"
|
||||
# Macro file 'watase86.mac' for the initialization phase of "TestEm10.cc"
|
||||
# with NIM A248 (1986) 379-388 (fig. 7) setup
|
||||
#
|
||||
/control/verbose 2
|
||||
|
||||
@@ -164,10 +164,10 @@ Idle> exit
|
||||
- 8 : longitudinal energy profile (in MeV.cm2/g), as a function of x/r0
|
||||
where r0 is the range of the primary particle
|
||||
- 9 : total energy leakage
|
||||
- 10 : total energy : Edep + Eleak
|
||||
- 11 : energy deposited in absorber 1
|
||||
- 12 : energy deposited in absorber 2
|
||||
...etc........
|
||||
- 10 : total energy : Edep + Eleak
|
||||
- 11 : energy deposited in absorber 1
|
||||
- 12 : energy deposited in absorber 2
|
||||
...etc........
|
||||
|
||||
The histograms are managed by G4Analysis classes;
|
||||
The histos can be individually activated with the command :
|
||||
@@ -182,7 +182,7 @@ Idle> exit
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm11)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -4,6 +4,16 @@ See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
## 2023-11-12 Alberto Ribon (testem11-V11-01-03)
|
||||
- radioactive.mac : introduced the UI command
|
||||
/process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year
|
||||
to allow all radioactive decays (including the very long ones).
|
||||
This is necessary since G4 11.2, being 1 year the default time
|
||||
threshold above which the decays are ignored.
|
||||
|
||||
## 2023-11-07 I. Hrivnacova (testem11-V11-01-02)
|
||||
- Fixed formatting in .README.txt
|
||||
|
||||
## 2023-03-24 Michel Maire (testem11-V11-01-01)
|
||||
- PhysicsList::RadioactiveDecay(): setARM = false
|
||||
- continue revision of header files
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
/analysis/setFileName name (default testem11)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -301,9 +301,15 @@ Auger electron emission enabled 0
|
||||
Check EM cuts disabled for atomic de-excitation 0
|
||||
Use Bearden atomic level energies 0
|
||||
Use ANSTO fluorescence model 0
|
||||
Threshold for very long decay time at rest 3.171e+10 y
|
||||
Threshold for very long decay time at rest 1 y
|
||||
======================================================================
|
||||
|
||||
====================================================================
|
||||
HADRONIC PROCESSES SUMMARY (verbose level 1)
|
||||
-------------------------------------------------------------------------
|
||||
Hadronic Processes for GenericIon
|
||||
Process: RadioactiveDecay
|
||||
|
||||
msc: for alpha SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
UrbanMsc : Emin= 0 eV Emax= 100 TeV
|
||||
@@ -540,7 +546,7 @@ Index : 1 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 20000
|
||||
User=0.820000s Real=0.862824s Sys=0.000000s
|
||||
User=0.740000s Real=0.809802s Sys=0.000000s
|
||||
|
||||
======================== run summary =====================
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Set a very high time threshold to allow all decays to happen
|
||||
/process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year
|
||||
#
|
||||
/testem/gun/setDefault
|
||||
/gun/particle ion
|
||||
/gun/ion 11 22
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm12)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -542,7 +542,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10000
|
||||
User=0.830000s Real=0.838703s Sys=0.000000s
|
||||
User=0.870000s Real=0.900457s Sys=0.000000s
|
||||
|
||||
======================== run summary =====================
|
||||
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm13)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -183,7 +183,7 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1000000
|
||||
User=1.980000s Real=1.989883s Sys=0.000000s
|
||||
User=2.330000s Real=2.688391s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
@@ -250,7 +250,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1000000
|
||||
User=2.190000s Real=2.200987s Sys=0.000000s
|
||||
User=2.230000s Real=2.295088s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -83,20 +83,14 @@
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
/analysis/h1/setAscii id
|
||||
\endverbatim
|
||||
All selected histos will be written on a file name.ascii (default testem14)
|
||||
|
||||
\subsection TestEm14_sub_s51 Using hbook format
|
||||
|
||||
Need a special treatement : the Cern Library must be installed and the
|
||||
environment variable CERNLIB correctly set. Then, *before* compiling,
|
||||
activate G4_USE_HBOOK in GNUmakefile and g4hbook.hh in HistoManager.hh
|
||||
|
||||
|
||||
\section TestEm14_s6- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main () (see TestEm14.cc).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm14)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -81,19 +81,12 @@
|
||||
/analysis/setFileName name (default testem14)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
All selected histos will be written on a file name.ascii (default testem14)
|
||||
|
||||
Using hbook format
|
||||
------------------
|
||||
|
||||
Need a special treatement : the Cern Library must be installed and the
|
||||
environment variable CERNLIB correctly set. Then, *before* compiling,
|
||||
activate G4_USE_HBOOK in GNUmakefile and g4hbook.hh in HistoManager.hh
|
||||
|
||||
6- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main().
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -183,7 +183,7 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1000000
|
||||
User=3.300000s Real=3.357536s Sys=0.000000s
|
||||
User=3.660000s Real=3.753539s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
@@ -253,7 +253,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1000000
|
||||
User=3.060000s Real=3.134396s Sys=0.000000s
|
||||
User=3.440000s Real=3.947749s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -98,7 +98,7 @@ see \link ExampleTestEm15_GC README.gamma \endlink for Histograms and UI command
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm15)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -94,8 +94,8 @@
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default testem15)
|
||||
|
||||
It is possible to choose the format of the histogram file: root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
|
||||
@@ -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
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
|
||||
Material: Carbon density: 2.267 g/cm3 RadL: 18.834 cm Nucl.Int.Length: 35.357 cm
|
||||
Imean: 78.000 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 81.000 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: C (C) Z = 6.0 N = 12 A = 12.011 g/mole
|
||||
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.930 %
|
||||
@@ -563,7 +563,7 @@ N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10000
|
||||
User=0.040000s Real=0.044355s Sys=0.000000s
|
||||
User=0.050000s Real=0.050718s Sys=0.000000s
|
||||
|
||||
The run consists of 10000 e- of 5 MeV through 100 m of Water (density: 1 g/cm3 )
|
||||
|
||||
@@ -635,7 +635,7 @@ N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10000
|
||||
User=0.060000s Real=0.057135s Sys=0.000000s
|
||||
User=0.060000s Real=0.067105s Sys=0.000000s
|
||||
|
||||
The run consists of 10000 e- of 100 keV through 100 m of Water (density: 1 g/cm3 )
|
||||
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0"?>
|
||||
<gdml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd">
|
||||
<define>
|
||||
<position name="myBox_Vol_1intoppos" x="0" y="-50" z="0" unit="cm"/>
|
||||
</define>
|
||||
<materials>
|
||||
<material name="Vacuum" Z="7">
|
||||
<D unit="g/cm3" value="9.9999999999999995e-07"/>
|
||||
<atom unit="g/mole" value="14.01"/>
|
||||
</material>
|
||||
<material name="Cu" Z="29">
|
||||
<D unit="g/cm3" value="8.9600000000000009"/>
|
||||
<atom unit="g/mole" value="63.545999999999999"/>
|
||||
</material>
|
||||
</materials>
|
||||
<solids>
|
||||
<box name="top_Solid" x="110.00000000000001" y="110.00000000000001" z="110.00000000000001" lunit="cm"/>
|
||||
<box name="myBox_Solid" x="100" y="100" z="100" lunit="cm"/>
|
||||
</solids>
|
||||
<structure>
|
||||
<volume name="myBox_Vol">
|
||||
<materialref ref="Cu"/>
|
||||
<solidref ref="myBox_Solid"/>
|
||||
</volume>
|
||||
<volume name="top">
|
||||
<materialref ref="Vacuum"/>
|
||||
<solidref ref="top_Solid"/>
|
||||
<physvol name="myBox_Vol_1" copynumber="1">
|
||||
<volumeref ref="myBox_Vol"/>
|
||||
<positionref ref="myBox_Vol_1intoppos"/>
|
||||
</physvol>
|
||||
</volume>
|
||||
</structure>
|
||||
<setup name="default" version="1.0">
|
||||
<world ref="top"/>
|
||||
</setup>
|
||||
</gdml>
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm16)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
@@ -41,7 +41,8 @@ target_link_libraries(TestEm16 ${Geant4_LIBRARIES} )
|
||||
#
|
||||
set(TestEm16_SCRIPTS
|
||||
run01.mac run01_prot.mac run02.mac TestEm16.in TestEm16.out gui.mac vis.mac
|
||||
)
|
||||
TestReflection.mac vis_TestReflection.mac Box_1m_Cu.gdml
|
||||
)
|
||||
|
||||
foreach(_script ${TestEm16_SCRIPTS})
|
||||
configure_file(
|
||||
@@ -55,4 +56,3 @@ endforeach()
|
||||
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
|
||||
#
|
||||
install(TARGETS TestEm16 DESTINATION bin)
|
||||
|
||||
|
||||
@@ -4,6 +4,16 @@ See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
## 2023-10-16 H.Burkhardt (testem16-V11-01-03)
|
||||
- minor update of SteppingAction.cc
|
||||
|
||||
## 2023-10-16 H.Burkhardt (testem16-V11-01-02)
|
||||
- use XRayReflection_data from G4EMLOW
|
||||
|
||||
## 2023-09-19 H.Burkhardt (testem16-V11-01-01)
|
||||
- extended to test the new process XrayReflection
|
||||
geometry optionally read from gdml file
|
||||
|
||||
## 2022-08-11 H.Burkhardt (testem16-V11-00-01)
|
||||
- minor cleanup in vis.mac and run01.mac to make output
|
||||
with multi threading more readable
|
||||
|
||||
@@ -30,70 +30,71 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4SteppingVerbose.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "ActionInitialization.hh"
|
||||
#include "DetectorConstruction.hh"
|
||||
#include "PhysicsList.hh"
|
||||
#include "ActionInitialization.hh"
|
||||
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "G4SteppingVerbose.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4UIExecutive.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VisExecutive.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
//detect interactive mode (if no arguments) and define UI session
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// detect interactive mode (if no arguments) and define UI session
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if (argc == 1) ui = new G4UIExecutive(argc,argv);
|
||||
if (argc == 1) ui = new G4UIExecutive(argc, argv);
|
||||
|
||||
//Use SteppingVerbose with Unit
|
||||
// Use SteppingVerbose with Unit
|
||||
G4int precision = 4;
|
||||
G4SteppingVerbose::UseBestUnit(precision);
|
||||
|
||||
//Creating run manager
|
||||
|
||||
// Creating run manager
|
||||
auto runManager = G4RunManagerFactory::CreateRunManager();
|
||||
|
||||
if (argc==3) {
|
||||
G4int nThreads = G4UIcommand::ConvertToInt(argv[2]);
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
|
||||
if (argc == 3) {
|
||||
G4int nThreads = G4UIcommand::ConvertToInt(argv[2]);
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
}
|
||||
|
||||
//set mandatory initialization classes
|
||||
// set mandatory initialization classes
|
||||
DetectorConstruction* det;
|
||||
runManager->SetUserInitialization(det = new DetectorConstruction);
|
||||
runManager->SetUserInitialization(new PhysicsList);
|
||||
|
||||
//set user action classes
|
||||
// set user action classes
|
||||
runManager->SetUserInitialization(new ActionInitialization(det));
|
||||
|
||||
//initialize visualization
|
||||
// initialize visualization
|
||||
G4VisManager* visManager = nullptr;
|
||||
|
||||
//get the pointer to the User Interface manager
|
||||
// get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if (ui) {
|
||||
//interactive mode
|
||||
if (ui) {
|
||||
// interactive mode
|
||||
visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
// define icons before SessionStart
|
||||
if (ui->IsGUI()) { UImanager->ApplyCommand("/control/execute gui.mac"); }
|
||||
if (ui->IsGUI()) {
|
||||
UImanager->ApplyCommand("/control/execute gui.mac");
|
||||
}
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
} else {
|
||||
//batch mode
|
||||
}
|
||||
else {
|
||||
// batch mode
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
UImanager->ApplyCommand(command + fileName);
|
||||
}
|
||||
|
||||
//job termination
|
||||
// job termination
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -31,7 +31,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
Material: Carbon density: 2.265 g/cm3 RadL: 18.851 cm Nucl.Int.Length: 35.388 cm
|
||||
Imean: 78.000 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 81.000 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: C (C) Z = 6.0 N = 12 A = 12.011 g/mole
|
||||
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.930 %
|
||||
@@ -194,6 +194,8 @@ Rayl: for gamma SubType=11 BuildTable=1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
LivermoreRayleigh : Emin= 0 eV Emax= 100 TeV CullenGenerator
|
||||
|
||||
XrayReflection: Gamma specular reflection for energies > 30 eV.
|
||||
|
||||
msc: for e- SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
UrbanMsc : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
|
||||
@@ -332,18 +334,18 @@ G4SynchrotronRadiation::GetRandomEnergySR :
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100
|
||||
User=0.170000s Real=0.169063s Sys=0.000000s
|
||||
User=0.180000s Real=0.212258s Sys=0.000000s
|
||||
Summary for synchrotron radiation :
|
||||
Number of photons = 65086
|
||||
Emean = 20.39 +/- 0.1444 keV
|
||||
E_rms = 36.83 keV
|
||||
Energy Max / Mean = 27.54
|
||||
MeanFreePath = 16.07 cm
|
||||
Number of photons = 64566
|
||||
Emean = 20.42 +/- 0.1465 keV
|
||||
E_rms = 37.22 keV
|
||||
Energy Max / Mean = 35.69
|
||||
MeanFreePath = 16.2 cm
|
||||
|
||||
------- MixMaxRng engine status -------
|
||||
Current state vector is:
|
||||
mixmax state, file version 1.0
|
||||
N=17 V[N]={1402135844460474226, 1250051493877681105, 260032901618238037, 1959548330058272173, 333697207877744815, 2195090962095573257, 757497238491870347, 1983172992205346680, 333986983656040467, 1332034388201043752, 1148533830487492631, 1572133571051143919, 269618836299041414, 1500430236492907451, 1379717044319899969, 489791943798559179, 1807394300704501137} counter= 13sumtot= 1528124031986278951
|
||||
N=17 V[N]={2257445806913462277, 632527905652818191, 631474175170306566, 1914435244802913599, 1306329175570610787, 762881766574265544, 719637845945592025, 1589777450882882221, 1702736512761014061, 890200915960239409, 384368303897083373, 453040775896457888, 307076404477827112, 1945929717505046236, 544360434503550427, 215256680747272403, 182941379877301700} counter= 3sumtot= 299519432642786162
|
||||
---------------------------------------
|
||||
================== Deleting memory pools ===================
|
||||
Number of memory pools allocated: 9 of which, static: 0
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/run/numberOfThreads 5 # 5
|
||||
/control/cout/setCoutFile .out #---- write to one file per thread G4W_0_.out ..
|
||||
#
|
||||
/control/verbose 1
|
||||
/process/verbose 1
|
||||
/tracking/setVerbosePrecision 10
|
||||
#
|
||||
/control/useDoublePrecision
|
||||
/testem/det/GeomFile Box_1m_Cu.gdml # geometry to test reflection
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# /process/setVerbose 3 XrayReflection
|
||||
#
|
||||
/testem/phys/SetXrayReflectionRoughness 5 nm
|
||||
#
|
||||
/globalField/setValue 0 0 0 T # turn off field - no synchrotron radiation
|
||||
/gun/particle gamma
|
||||
/gun/energy 10 keV
|
||||
#
|
||||
# set up histos
|
||||
/analysis/setFileName TestReflection
|
||||
/analysis/h1/set 1 100 0 20 keV
|
||||
/analysis/h1/set 4 100 0 0.0015 # 0 to 1.5 mrad
|
||||
/analysis/verbose 2
|
||||
# 0.25 mrad expected reflection probability 0.98
|
||||
/gun/position 0 0.000124999998697917 -0.499999984375 m
|
||||
/gun/direction 0 -0.000249999997395833 0.99999996875 # hit at 0,0,0
|
||||
/run/beamOn 1000
|
||||
# angle=1.05 mrad reflection probability 0.83
|
||||
/gun/position 0 0.000524999903531255 -0.499999724375025 m
|
||||
/gun/direction 0 -0.00104999980706251 0.999999448750051 # hit at 0,0,0
|
||||
/run/beamOn 1000
|
||||
# hadd -f merged.root TestReflection*.root
|
||||
@@ -23,10 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file ActionInitialization.hh
|
||||
/// \file electromagnetic/TestEm16/include/ActionInitialization.hh
|
||||
/// \brief Definition of the ActionInitialization class
|
||||
|
||||
//
|
||||
//
|
||||
#ifndef ActionInitialization_h
|
||||
#define ActionInitialization_h 1
|
||||
|
||||
@@ -41,7 +41,7 @@ class ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
ActionInitialization(DetectorConstruction*);
|
||||
~ActionInitialization() override;
|
||||
~ActionInitialization() override = default;
|
||||
|
||||
void BuildForMaster() const override;
|
||||
void Build() const override;
|
||||
@@ -51,5 +51,3 @@ class ActionInitialization : public G4VUserActionInitialization
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
#ifndef DetectorConstruction_h
|
||||
#define DetectorConstruction_h 1
|
||||
|
||||
#include "G4Cache.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Cache.hh"
|
||||
|
||||
class G4Material;
|
||||
class G4UserLimits;
|
||||
@@ -47,50 +47,44 @@ class G4GlobalMagFieldMessenger;
|
||||
class DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
|
||||
DetectorConstruction();
|
||||
~DetectorConstruction();
|
||||
~DetectorConstruction() override = default;
|
||||
|
||||
public:
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
void ConstructSDandField() override;
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
void SetSize (G4double);
|
||||
void SetMaterial (G4String);
|
||||
void SetMaxStepSize (G4double);
|
||||
void SetMaxStepLength (G4double);
|
||||
void SetSize(G4double);
|
||||
void SetMaterial(G4String);
|
||||
void SetMaxStepSize(G4double);
|
||||
void SetMaxStepLength(G4double);
|
||||
void SetGeomFileName(G4String);
|
||||
|
||||
public:
|
||||
const G4VPhysicalVolume* GetWorld() { return fBox; };
|
||||
|
||||
const
|
||||
G4VPhysicalVolume* GetWorld() {return fBox;};
|
||||
G4double GetSize() { return fBoxSize; };
|
||||
G4Material* GetMaterial() { return fMaterial; };
|
||||
|
||||
G4double GetSize() {return fBoxSize;};
|
||||
G4Material* GetMaterial() {return fMaterial;};
|
||||
|
||||
void PrintParameters();
|
||||
void PrintParameters();
|
||||
|
||||
private:
|
||||
G4LogicalVolume* fLBox = nullptr;
|
||||
G4VPhysicalVolume* fBox = nullptr;
|
||||
|
||||
G4LogicalVolume* fLBox;
|
||||
G4VPhysicalVolume* fBox;
|
||||
G4double fBoxSize;
|
||||
G4Material* fMaterial = nullptr;
|
||||
G4UserLimits* fUserLimits = nullptr;
|
||||
G4String fGeomFileName;
|
||||
|
||||
G4double fBoxSize;
|
||||
G4Material* fMaterial;
|
||||
G4UserLimits* fUserLimits;
|
||||
|
||||
DetectorMessenger* fDetectorMessenger;
|
||||
G4Cache<G4GlobalMagFieldMessenger*> fFieldMessenger;
|
||||
DetectorMessenger* fDetectorMessenger = nullptr;
|
||||
G4Cache<G4GlobalMagFieldMessenger*> fFieldMessenger = nullptr;
|
||||
|
||||
private:
|
||||
|
||||
void DefineMaterials();
|
||||
G4VPhysicalVolume* ConstructVolumes();
|
||||
void DefineMaterials();
|
||||
G4VPhysicalVolume* ConstructVolumes();
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#ifndef DetectorMessenger_h
|
||||
#define DetectorMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class DetectorConstruction;
|
||||
class G4UIdirectory;
|
||||
@@ -44,26 +44,25 @@ class G4UIcmdWithoutParameter;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class DetectorMessenger: public G4UImessenger
|
||||
class DetectorMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
public:
|
||||
DetectorMessenger(DetectorConstruction*);
|
||||
~DetectorMessenger() override = default;
|
||||
|
||||
DetectorMessenger(DetectorConstruction* );
|
||||
~DetectorMessenger();
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
private:
|
||||
DetectorConstruction* fDetector;
|
||||
|
||||
private:
|
||||
|
||||
DetectorConstruction* fDetector;
|
||||
|
||||
G4UIdirectory* fTestemDir;
|
||||
G4UIdirectory* fDetDir;
|
||||
G4UIdirectory* fTrackdir;
|
||||
G4UIcmdWithAString* fMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSizeCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fMaxStepCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fMaxStepLength;
|
||||
G4UIdirectory* fTestemDir = nullptr;
|
||||
G4UIdirectory* fDetDir = nullptr;
|
||||
G4UIdirectory* fTrackdir = nullptr;
|
||||
G4UIcmdWithAString* fMaterCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSizeCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fMaxStepCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fMaxStepLength = nullptr;
|
||||
G4UIcmdWithAString* fGeomFileCmd = nullptr;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,24 +23,26 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file electromagnetic/TestEm16/include/HistoManager.hh
|
||||
/// \brief Implementation of the HistoManager class
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef HistoManager_h
|
||||
#define HistoManager_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4AnalysisManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class HistoManager
|
||||
{
|
||||
public:
|
||||
HistoManager();
|
||||
~HistoManager();
|
||||
HistoManager();
|
||||
~HistoManager() = default;
|
||||
|
||||
private:
|
||||
void Book();
|
||||
@@ -50,4 +52,3 @@ class HistoManager
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -41,30 +41,29 @@
|
||||
class PhysicsListMessenger;
|
||||
class G4DecayPhysics;
|
||||
|
||||
class PhysicsList: public G4VUserPhysicsList
|
||||
class PhysicsList : public G4VUserPhysicsList
|
||||
{
|
||||
public:
|
||||
PhysicsList();
|
||||
virtual ~PhysicsList();
|
||||
public:
|
||||
PhysicsList();
|
||||
~PhysicsList() override = default;
|
||||
|
||||
// Construct particles
|
||||
virtual void ConstructParticle();
|
||||
// Construct particles
|
||||
void ConstructParticle() override;
|
||||
|
||||
// Construct processes and register them
|
||||
virtual void ConstructProcess();
|
||||
// Construct processes and register them
|
||||
void ConstructProcess() override;
|
||||
|
||||
inline void SetAnalyticSR(G4bool val) {fSRType = val;};
|
||||
inline void SetAnalyticSR(G4bool val) { fSRType = val; };
|
||||
void SetXrayReflectionRoughness(G4double SurfaceRoughness);
|
||||
|
||||
private:
|
||||
private:
|
||||
void ConstructEM();
|
||||
|
||||
void ConstructEM();
|
||||
|
||||
G4bool fSRType;
|
||||
PhysicsListMessenger* fMess;
|
||||
G4DecayPhysics* fDecayPhysics;
|
||||
G4bool fSRType;
|
||||
PhysicsListMessenger* fMess;
|
||||
G4DecayPhysics* fDecayPhysics;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,30 +33,30 @@
|
||||
#ifndef PhysicsListMessenger_h
|
||||
#define PhysicsListMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class PhysicsList;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithABool;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class PhysicsListMessenger: public G4UImessenger
|
||||
class PhysicsListMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
public:
|
||||
PhysicsListMessenger(PhysicsList*);
|
||||
~PhysicsListMessenger() override = default;
|
||||
|
||||
PhysicsListMessenger(PhysicsList*);
|
||||
~PhysicsListMessenger();
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
private:
|
||||
PhysicsList* fPhysList;
|
||||
|
||||
private:
|
||||
|
||||
PhysicsList* fPhysList;
|
||||
|
||||
G4UIdirectory* fPhysDir;
|
||||
G4UIcmdWithABool* fSRTypeCmd;
|
||||
G4UIdirectory* fPhysDir;
|
||||
G4UIcmdWithABool* fSRTypeCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fXrayReflectionRoughnessCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -46,18 +46,16 @@ class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
PrimaryGeneratorAction(DetectorConstruction*);
|
||||
~PrimaryGeneratorAction();
|
||||
~PrimaryGeneratorAction() override = default;
|
||||
|
||||
public:
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
void GeneratePrimaries(G4Event*) override;
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun;
|
||||
DetectorConstruction* fDetector;
|
||||
G4ParticleGun* fParticleGun = nullptr;
|
||||
DetectorConstruction* fDetector;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "globals.hh"
|
||||
#include <map>
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -44,20 +42,20 @@ class Run : public G4Run
|
||||
{
|
||||
public:
|
||||
Run();
|
||||
~Run();
|
||||
~Run() override = default;
|
||||
|
||||
public:
|
||||
virtual void Merge(const G4Run*);
|
||||
void Merge(const G4Run*) override;
|
||||
void EndOfRun();
|
||||
|
||||
public:
|
||||
G4int f_n_gam_sync; // nb of synchrotron radiation photons generated
|
||||
G4double f_e_gam_sync, f_e_gam_sync2; // energy of synchrotron
|
||||
G4double f_e_gam_sync_max; // radiation photons generated
|
||||
G4double f_lam_gam_sync; // step length between synchr radiation photons
|
||||
G4int f_n_gam_sync = 0; // nb of synchrotron radiation photons generated
|
||||
G4double f_e_gam_sync = 0, f_e_gam_sync2 = 0; // energy of synchrotron
|
||||
G4double f_e_gam_sync_max = 0; // radiation photons generated
|
||||
G4double f_lam_gam_sync = 0; // step length between synchr radiation photons
|
||||
G4double f_n_Xray_Refl = 0;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -47,16 +47,16 @@ class RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
RunAction();
|
||||
~RunAction();
|
||||
~RunAction() override = default;
|
||||
|
||||
public:
|
||||
virtual G4Run* GenerateRun();
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
G4Run* GenerateRun() override;
|
||||
void BeginOfRunAction(const G4Run*) override;
|
||||
void EndOfRunAction(const G4Run*) override;
|
||||
|
||||
private:
|
||||
Run* fRun;
|
||||
HistoManager* fHistoManager;
|
||||
Run* fRun = nullptr;
|
||||
HistoManager* fHistoManager = nullptr;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
|
||||
class SteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
SteppingAction();
|
||||
~SteppingAction();
|
||||
public:
|
||||
SteppingAction();
|
||||
~SteppingAction() override = default;
|
||||
|
||||
virtual void UserSteppingAction(const G4Step*);
|
||||
void UserSteppingAction(const G4Step*) override;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -26,9 +26,13 @@
|
||||
//
|
||||
/// \file ActionInitialization.cc
|
||||
/// \brief Implementation of the ActionInitialization class
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "ActionInitialization.hh"
|
||||
#include "DetectorConstruction.hh"
|
||||
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
#include "RunAction.hh"
|
||||
#include "SteppingAction.hh"
|
||||
@@ -36,32 +40,22 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ActionInitialization::ActionInitialization(DetectorConstruction* det)
|
||||
: G4VUserActionInitialization(),fDetector(det)
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ActionInitialization::~ActionInitialization()
|
||||
{ }
|
||||
: G4VUserActionInitialization(), fDetector(det)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
SetUserAction(new RunAction());
|
||||
SetUserAction(new RunAction());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void ActionInitialization::Build() const
|
||||
{
|
||||
|
||||
PrimaryGeneratorAction* prim = new PrimaryGeneratorAction(fDetector);
|
||||
SetUserAction(prim);
|
||||
|
||||
RunAction* run = new RunAction();
|
||||
SetUserAction(run);
|
||||
|
||||
SetUserAction(new PrimaryGeneratorAction(fDetector));
|
||||
SetUserAction(new RunAction);
|
||||
SetUserAction(new SteppingAction());
|
||||
}
|
||||
|
||||
|
||||
@@ -31,31 +31,29 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "DetectorConstruction.hh"
|
||||
|
||||
#include "DetectorMessenger.hh"
|
||||
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4UserLimits.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4PropagatorInField.hh"
|
||||
|
||||
#include "G4GDMLParser.hh"
|
||||
#include "G4GeometryManager.hh"
|
||||
#include "G4PhysicalVolumeStore.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4LogicalVolumeStore.hh"
|
||||
#include "G4SolidStore.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4PhysicalVolumeStore.hh"
|
||||
#include "G4PropagatorInField.hh"
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4SolidStore.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4UserLimits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorConstruction::DetectorConstruction()
|
||||
:G4VUserDetectorConstruction(),
|
||||
fLBox(0), fBox(0), fBoxSize(500*m), fMaterial(0),
|
||||
fUserLimits(0), fDetectorMessenger(0)
|
||||
: G4VUserDetectorConstruction(), fBoxSize(500 * m)
|
||||
{
|
||||
DefineMaterials();
|
||||
SetMaterial("Iron");
|
||||
@@ -69,11 +67,6 @@ DetectorConstruction::DetectorConstruction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorConstruction::~DetectorConstruction()
|
||||
{ delete fDetectorMessenger;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||
{
|
||||
return ConstructVolumes();
|
||||
@@ -83,19 +76,19 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||
|
||||
void DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
G4double a, z, density;
|
||||
G4double a, z, density;
|
||||
|
||||
new G4Material("Beryllium", z= 4., a= 9.012182*g/mole, density= 1.848*g/cm3);
|
||||
new G4Material("Carbon", z= 6., a= 12.011*g/mole, density= 2.265*g/cm3);
|
||||
new G4Material("Iron", z=26., a= 55.85*g/mole, density= 7.870*g/cm3);
|
||||
new G4Material("Beryllium", z = 4., a = 9.012182 * g / mole, density = 1.848 * g / cm3);
|
||||
new G4Material("Carbon", z = 6., a = 12.011 * g / mole, density = 2.265 * g / cm3);
|
||||
new G4Material("Iron", z = 26., a = 55.85 * g / mole, density = 7.870 * g / cm3);
|
||||
|
||||
// define a vacuum with a restgas pressure typical for accelerators
|
||||
G4double const Torr = atmosphere/760.; // 1 Torr
|
||||
G4double pressure = 10e-9*Torr, temperature = 296.150*kelvin; // 23 Celsius
|
||||
new G4Material("Vacuum", z=7., a=14.01*g/mole, density= 1.516784e-11*kg/m3,
|
||||
// define a vacuum with a restgas pressure typical for accelerators
|
||||
G4double const Torr = atmosphere / 760.; // 1 Torr
|
||||
G4double pressure = 10e-9 * Torr,
|
||||
temperature = 296.150 * kelvin; // 23 Celsius
|
||||
new G4Material("Vacuum", z = 7., a = 14.01 * g / mole, density = 1.516784e-11 * kg / m3,
|
||||
kStateGas, temperature, pressure);
|
||||
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl; // print the materials defined
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -107,29 +100,26 @@ G4VPhysicalVolume* DetectorConstruction::ConstructVolumes()
|
||||
G4LogicalVolumeStore::GetInstance()->Clean();
|
||||
G4SolidStore::GetInstance()->Clean();
|
||||
|
||||
G4Box*
|
||||
sBox = new G4Box("Container", //its name
|
||||
fBoxSize/2,fBoxSize/2,fBoxSize/2); //its dimensions
|
||||
|
||||
fLBox = new G4LogicalVolume(sBox, //its shape
|
||||
fMaterial, //its material
|
||||
fMaterial->GetName()); //its name
|
||||
|
||||
fLBox->SetUserLimits(fUserLimits);
|
||||
|
||||
fBox = new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
fLBox, //its logical volume
|
||||
fMaterial->GetName(), //its name
|
||||
0, //its mother volume
|
||||
false, //no boolean operation
|
||||
0); //copy number
|
||||
|
||||
PrintParameters();
|
||||
|
||||
//
|
||||
//always return the root volume
|
||||
//
|
||||
if (fGeomFileName == G4String()) {
|
||||
auto sBox = new G4Box("Container", fBoxSize / 2, fBoxSize / 2, fBoxSize / 2);
|
||||
fLBox = new G4LogicalVolume(sBox, fMaterial, fMaterial->GetName());
|
||||
fLBox->SetUserLimits(fUserLimits);
|
||||
fBox = new G4PVPlacement(0, G4ThreeVector(), fLBox, fMaterial->GetName(), 0, false, 0);
|
||||
PrintParameters();
|
||||
}
|
||||
else {
|
||||
G4GDMLParser parser;
|
||||
std::size_t nmat = G4Material::GetNumberOfMaterials();
|
||||
parser.Read(fGeomFileName.c_str()); // volumes and materials
|
||||
if (G4Material::GetNumberOfMaterials() > nmat) {
|
||||
const std::vector<G4Material*> MatPtrVec = *G4Material::GetMaterialTable();
|
||||
if (G4Material::GetNumberOfMaterials() > nmat)
|
||||
G4cout << "Materials defined by " << fGeomFileName << " :" << G4endl;
|
||||
for (std::size_t imat = nmat; imat < MatPtrVec.size(); ++imat)
|
||||
G4cout << MatPtrVec[imat] << G4endl;
|
||||
}
|
||||
fBox = parser.GetWorldVolume();
|
||||
}
|
||||
return fBox;
|
||||
}
|
||||
|
||||
@@ -137,8 +127,8 @@ G4VPhysicalVolume* DetectorConstruction::ConstructVolumes()
|
||||
|
||||
void DetectorConstruction::PrintParameters()
|
||||
{
|
||||
G4cout << "\n The Box is " << G4BestUnit(fBoxSize,"Length")
|
||||
<< " of " << fMaterial->GetName() << G4endl;
|
||||
G4cout << "\n The Box is " << G4BestUnit(fBoxSize, "Length") << " of " << fMaterial->GetName()
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -148,10 +138,10 @@ void DetectorConstruction::SetMaterial(G4String materialChoice)
|
||||
// search the material by its name
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
|
||||
if (pttoMaterial) {
|
||||
fMaterial = pttoMaterial;
|
||||
if ( fLBox ) fLBox->SetMaterial(fMaterial);
|
||||
}
|
||||
G4RunManager::GetRunManager()->PhysicsHasBeenModified();
|
||||
fMaterial = pttoMaterial;
|
||||
if (fLBox) fLBox->SetMaterial(fMaterial);
|
||||
}
|
||||
G4RunManager::GetRunManager()->PhysicsHasBeenModified();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -164,23 +154,21 @@ void DetectorConstruction::SetSize(G4double value)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4GlobalMagFieldMessenger.hh"
|
||||
#include "G4AutoDelete.hh"
|
||||
#include "G4GlobalMagFieldMessenger.hh"
|
||||
|
||||
void DetectorConstruction::ConstructSDandField()
|
||||
{
|
||||
if ( fFieldMessenger.Get() == 0 ) {
|
||||
// Create global magnetic field messenger.
|
||||
// Uniform magnetic field is then created automatically if
|
||||
// the field value is not zero.
|
||||
G4ThreeVector fieldValue = G4ThreeVector();
|
||||
G4GlobalMagFieldMessenger* msg =
|
||||
new G4GlobalMagFieldMessenger(fieldValue);
|
||||
//msg->SetVerboseLevel(1);
|
||||
G4AutoDelete::Register(msg);
|
||||
fFieldMessenger.Put( msg );
|
||||
|
||||
}
|
||||
if (fFieldMessenger.Get() == 0) {
|
||||
// Create global magnetic field messenger.
|
||||
// Uniform magnetic field is then created automatically if
|
||||
// the field value is not zero.
|
||||
G4ThreeVector fieldValue = G4ThreeVector();
|
||||
auto msg = new G4GlobalMagFieldMessenger(fieldValue);
|
||||
// msg->SetVerboseLevel(1);
|
||||
G4AutoDelete::Register(msg);
|
||||
fFieldMessenger.Put(msg);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -189,11 +177,11 @@ void DetectorConstruction::SetMaxStepSize(G4double val)
|
||||
{
|
||||
// set the maximum allowed step size
|
||||
//
|
||||
if (val <= DBL_MIN)
|
||||
{ G4cout << "\n --->warning from SetMaxStepSize: maxStep "
|
||||
<< val << " out of range. Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
if (val <= DBL_MIN) {
|
||||
G4cout << "\n --->warning from SetMaxStepSize: maxStep " << val
|
||||
<< " out of range. Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
fUserLimits->SetMaxAllowedStep(val);
|
||||
}
|
||||
|
||||
@@ -203,15 +191,18 @@ void DetectorConstruction::SetMaxStepLength(G4double val)
|
||||
{
|
||||
// set the maximum length of tracking step
|
||||
//
|
||||
if (val <= DBL_MIN)
|
||||
{ G4cout << "\n --->warning from SetMaxStepLength: maxStep "
|
||||
<< val << " out of range. Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
G4TransportationManager* tmanager =
|
||||
G4TransportationManager::GetTransportationManager();
|
||||
tmanager->GetPropagatorInField()
|
||||
->SetLargestAcceptableStep(val);
|
||||
if (val <= DBL_MIN) {
|
||||
G4cout << "\n --->warning from SetMaxStepLength: maxStep " << val
|
||||
<< " out of range. Command refused" << G4endl;
|
||||
return;
|
||||
}
|
||||
G4TransportationManager* tmanager = G4TransportationManager::GetTransportationManager();
|
||||
tmanager->GetPropagatorInField()->SetLargestAcceptableStep(val);
|
||||
}
|
||||
|
||||
void DetectorConstruction::SetGeomFileName(G4String GeomFileName)
|
||||
{
|
||||
fGeomFileName = GeomFileName;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -33,22 +33,16 @@
|
||||
#include "DetectorMessenger.hh"
|
||||
|
||||
#include "DetectorConstruction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithoutParameter.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
|
||||
:G4UImessenger(),fDetector(Det),
|
||||
fTestemDir(0),
|
||||
fDetDir(0),
|
||||
fTrackdir(0),
|
||||
fMaterCmd(0),
|
||||
fSizeCmd(0),
|
||||
fMaxStepCmd(0),
|
||||
fMaxStepLength(0)
|
||||
DetectorMessenger::DetectorMessenger(DetectorConstruction* Det)
|
||||
: G4UImessenger(), fDetector(Det)
|
||||
{
|
||||
fTestemDir = new G4UIdirectory("/testem/");
|
||||
fTestemDir->SetGuidance(" detector control.");
|
||||
@@ -56,32 +50,36 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
|
||||
fDetDir = new G4UIdirectory("/testem/det/");
|
||||
fDetDir->SetGuidance("detector construction commands");
|
||||
|
||||
fMaterCmd = new G4UIcmdWithAString("/testem/det/setMat",this);
|
||||
fMaterCmd = new G4UIcmdWithAString("/testem/det/setMat", this);
|
||||
fMaterCmd->SetGuidance("Select material of the box.");
|
||||
fMaterCmd->SetParameterName("choice",false);
|
||||
fMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fMaterCmd->SetParameterName("choice", false);
|
||||
fMaterCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
|
||||
fSizeCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setSize",this);
|
||||
fSizeCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setSize", this);
|
||||
fSizeCmd->SetGuidance("Set size of the box");
|
||||
fSizeCmd->SetParameterName("Size",false);
|
||||
fSizeCmd->SetParameterName("Size", false);
|
||||
fSizeCmd->SetRange("Size>0.");
|
||||
fSizeCmd->SetUnitCategory("Length");
|
||||
fSizeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fSizeCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
|
||||
fMaxStepCmd = new G4UIcmdWithADoubleAndUnit("/testem/tracking/stepMax",this);
|
||||
fGeomFileCmd = new G4UIcmdWithAString("/testem/det/GeomFile", this);
|
||||
fGeomFileCmd->SetGuidance("Give sgml input file name like Box.gdml");
|
||||
fGeomFileCmd->SetParameterName("choice", false);
|
||||
fGeomFileCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
|
||||
fMaxStepCmd = new G4UIcmdWithADoubleAndUnit("/testem/tracking/stepMax", this);
|
||||
fMaxStepCmd->SetGuidance("Set max allowed step size");
|
||||
fMaxStepCmd->SetParameterName("Size",false);
|
||||
fMaxStepCmd->SetParameterName("Size", false);
|
||||
fMaxStepCmd->SetRange("Size>0.");
|
||||
fMaxStepCmd->SetUnitCategory("Length");
|
||||
fMaxStepCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
fTrackdir = new G4UIdirectory("/testem/tracking/");
|
||||
fTrackdir->SetGuidance("step length");
|
||||
fMaxStepLength =
|
||||
new G4UIcmdWithADoubleAndUnit("/testem/tracking/setMaxStepLength",this);
|
||||
fMaxStepLength = new G4UIcmdWithADoubleAndUnit("/testem/tracking/setMaxStepLength", this);
|
||||
fMaxStepLength->SetGuidance("Set the maximum length of tracking step");
|
||||
fMaxStepLength->SetGuidance("when integrating magnetic field line.");
|
||||
fMaxStepLength->SetParameterName("Size",false);
|
||||
fMaxStepLength->SetParameterName("Size", false);
|
||||
fMaxStepLength->SetRange("Size>0.");
|
||||
fMaxStepLength->SetUnitCategory("Length");
|
||||
fMaxStepLength->AvailableForStates(G4State_Idle);
|
||||
@@ -89,32 +87,27 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorMessenger::~DetectorMessenger()
|
||||
void DetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
delete fMaterCmd;
|
||||
delete fSizeCmd;
|
||||
delete fMaxStepCmd;
|
||||
delete fMaxStepLength;
|
||||
delete fDetDir;
|
||||
delete fTestemDir;
|
||||
delete fTrackdir;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if( command == fMaterCmd )
|
||||
{ fDetector->SetMaterial(newValue);}
|
||||
|
||||
if( command == fSizeCmd )
|
||||
{ fDetector->SetSize(fSizeCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == fMaxStepCmd )
|
||||
{ fDetector->SetMaxStepSize(fMaxStepCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == fMaxStepLength )
|
||||
{ fDetector->SetMaxStepLength(fMaxStepLength->GetNewDoubleValue(newValue));}
|
||||
if (command == fMaterCmd) {
|
||||
fDetector->SetMaterial(newValue);
|
||||
}
|
||||
|
||||
if (command == fSizeCmd) {
|
||||
fDetector->SetSize(fSizeCmd->GetNewDoubleValue(newValue));
|
||||
}
|
||||
|
||||
if (command == fMaxStepCmd) {
|
||||
fDetector->SetMaxStepSize(fMaxStepCmd->GetNewDoubleValue(newValue));
|
||||
}
|
||||
|
||||
if (command == fMaxStepLength) {
|
||||
fDetector->SetMaxStepLength(fMaxStepLength->GetNewDoubleValue(newValue));
|
||||
}
|
||||
|
||||
if (command == fGeomFileCmd) {
|
||||
fDetector->SetGeomFileName(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,30 +23,27 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file electromagnetic/TestEm16/src/HistoManager.cc
|
||||
/// \brief Implementation of the HistoManager class
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "HistoManager.hh"
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
HistoManager::HistoManager()
|
||||
: fFileName("testem16")
|
||||
HistoManager::HistoManager() : fFileName("testem16")
|
||||
{
|
||||
Book();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
HistoManager::~HistoManager()
|
||||
{
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void HistoManager::Book()
|
||||
{
|
||||
// Create or get analysis manager
|
||||
@@ -55,29 +52,29 @@ void HistoManager::Book()
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
analysisManager->SetDefaultFileType("root");
|
||||
analysisManager->SetFileName(fFileName);
|
||||
if (analysisManager->GetVerboseLevel() > 1)
|
||||
G4cout << __FILE__ << " line " << __LINE__ << " " << __FUNCTION__
|
||||
<< " fFileName=" << fFileName
|
||||
<< " G4RunManager::GetRunManager()=" << G4RunManager::GetRunManager()
|
||||
<< G4endl; // booked once per thread
|
||||
analysisManager->SetVerboseLevel(1);
|
||||
analysisManager->SetActivation(true); //enable inactivation of histograms
|
||||
|
||||
analysisManager->SetActivation(true); // enable inactivation of histograms
|
||||
|
||||
// Define histograms start values
|
||||
const G4int kMaxHisto = 4;
|
||||
const G4String id[] = { "0", "1", "2", "3" };
|
||||
const G4String title[] =
|
||||
{ "dummy", //0
|
||||
"SynRad Energy", //1
|
||||
"SynRad Power ", //2
|
||||
"Path Length" //3
|
||||
};
|
||||
|
||||
// Default values (to be reset via /analysis/h1/set command)
|
||||
const std::vector<G4String> title({"dummy", "Energy", "Power ", "Path Length", "IncidentAngle"});
|
||||
// Default values (to be reset via /analysis/h1/set command)
|
||||
G4int nbins = 100;
|
||||
G4double vmin = 0.;
|
||||
G4double vmax = 100.;
|
||||
|
||||
// Create all histograms as inactivated
|
||||
// Create all histograms as inactivated
|
||||
// as we have not yet set nbins, vmin, vmax
|
||||
for (G4int k=0; k<kMaxHisto; k++) {
|
||||
G4int ih = analysisManager->CreateH1(id[k], title[k], nbins, vmin, vmax);
|
||||
for (std::size_t k = 0; k < title.size(); ++k) {
|
||||
G4int ih = analysisManager->CreateH1(ToString(k), title[k], nbins, vmin, vmax);
|
||||
analysisManager->SetH1Activation(ih, false);
|
||||
if (analysisManager->GetVerboseLevel() > 1)
|
||||
G4cout << __FILE__ << " line " << __LINE__ << " " << __FUNCTION__ << " histogram " << k
|
||||
<< " title=" << title[k] << " created, not yet active" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,64 +31,50 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysicsList.hh"
|
||||
|
||||
#include "PhysicsListMessenger.hh"
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4DecayPhysics.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
#include "G4RayleighScattering.hh"
|
||||
|
||||
#include "G4eMultipleScattering.hh"
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
|
||||
#include "G4MuMultipleScattering.hh"
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuBremsstrahlung.hh"
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4MuMultipleScattering.hh"
|
||||
#include "G4MuPairProduction.hh"
|
||||
|
||||
#include "G4hMultipleScattering.hh"
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4hBremsstrahlung.hh"
|
||||
#include "G4hPairProduction.hh"
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ProcessTable.hh"
|
||||
#include "G4RayleighScattering.hh"
|
||||
#include "G4StepLimiter.hh"
|
||||
#include "G4SynchrotronRadiation.hh"
|
||||
#include "G4SynchrotronRadiationInMat.hh"
|
||||
|
||||
#include "G4StepLimiter.hh"
|
||||
#include "G4DecayPhysics.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4XrayReflection.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eMultipleScattering.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
#include "G4hBremsstrahlung.hh"
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4hMultipleScattering.hh"
|
||||
#include "G4hPairProduction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsList::PhysicsList()
|
||||
: G4VUserPhysicsList(),
|
||||
fMess(0)
|
||||
PhysicsList::PhysicsList() : G4VUserPhysicsList(), fMess(0)
|
||||
{
|
||||
SetDefaultCutValue(1.*km);
|
||||
|
||||
fSRType = true;
|
||||
SetDefaultCutValue(1. * km);
|
||||
|
||||
fSRType = true;
|
||||
fMess = new PhysicsListMessenger(this);
|
||||
fDecayPhysics = new G4DecayPhysics();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsList::~PhysicsList()
|
||||
{
|
||||
delete fMess;
|
||||
delete fDecayPhysics;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::ConstructParticle()
|
||||
{
|
||||
fDecayPhysics->ConstructParticle();
|
||||
@@ -107,10 +93,10 @@ void PhysicsList::ConstructProcess()
|
||||
|
||||
void PhysicsList::ConstructEM()
|
||||
{
|
||||
auto particleIterator=GetParticleIterator();
|
||||
auto particleIterator = GetParticleIterator();
|
||||
particleIterator->reset();
|
||||
G4SynchrotronRadiation* fSync = new G4SynchrotronRadiation();
|
||||
while( (*particleIterator)() ){
|
||||
auto fSync = new G4SynchrotronRadiation();
|
||||
while ((*particleIterator)()) {
|
||||
G4ParticleDefinition* particle = particleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
@@ -121,56 +107,72 @@ void PhysicsList::ConstructEM()
|
||||
pmanager->AddDiscreteProcess(new G4ComptonScattering);
|
||||
pmanager->AddDiscreteProcess(new G4GammaConversion);
|
||||
pmanager->AddDiscreteProcess(new G4RayleighScattering);
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
//electron
|
||||
pmanager->AddProcess(new G4eMultipleScattering, -1, 1, -1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2, 1);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 2);
|
||||
if (fSRType) {
|
||||
pmanager->AddProcess(fSync, -1,-1, 3);
|
||||
} else {
|
||||
pmanager->AddProcess(new G4SynchrotronRadiationInMat,-1,-1, 3);
|
||||
}
|
||||
pmanager->AddProcess(new G4StepLimiter, -1,-1, 4);
|
||||
|
||||
} else if (particleName == "e+") {
|
||||
//positron
|
||||
pmanager->AddProcess(new G4eMultipleScattering, -1, 1, -1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2, 1);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 2);
|
||||
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 3);
|
||||
if (fSRType) {
|
||||
pmanager->AddProcess(fSync, -1,-1, 4);
|
||||
} else {
|
||||
pmanager->AddProcess(new G4SynchrotronRadiationInMat, -1,-1, 4);
|
||||
}
|
||||
pmanager->AddProcess(new G4StepLimiter, -1,-1, 5);
|
||||
|
||||
} else if( particleName == "mu+" ||
|
||||
particleName == "mu-" ) {
|
||||
//muon
|
||||
pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, -1);
|
||||
pmanager->AddProcess(new G4MuIonisation, -1, 2, 1);
|
||||
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 2);
|
||||
pmanager->AddProcess(new G4MuPairProduction, -1, 4, 3);
|
||||
pmanager->AddProcess(fSync, -1,-1, 4);
|
||||
pmanager->AddProcess(new G4StepLimiter, -1,-1, 5);
|
||||
|
||||
} else if( particleName == "proton") {
|
||||
//proton
|
||||
pmanager->AddProcess(new G4hMultipleScattering, -1, 1, -1);
|
||||
pmanager->AddProcess(new G4hIonisation, -1, 2, 1);
|
||||
pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 2);
|
||||
pmanager->AddProcess(new G4hPairProduction, -1, 4, 3);
|
||||
pmanager->AddProcess(fSync, -1,-1, 4);
|
||||
pmanager->AddProcess(new G4StepLimiter, -1,-1, 5);
|
||||
pmanager->AddDiscreteProcess(new G4XrayReflection);
|
||||
}
|
||||
else if (particle->GetPDGCharge() != 0.0 && !particle->IsShortLived())
|
||||
{
|
||||
pmanager->AddProcess(fSync,-1,-1, 1);
|
||||
else if (particleName == "e-") {
|
||||
// electron
|
||||
pmanager->AddProcess(new G4eMultipleScattering, -1, 1, -1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2, 1);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 2);
|
||||
if (fSRType) {
|
||||
pmanager->AddProcess(fSync, -1, -1, 3);
|
||||
}
|
||||
else {
|
||||
pmanager->AddProcess(new G4SynchrotronRadiationInMat, -1, -1, 3);
|
||||
}
|
||||
pmanager->AddProcess(new G4StepLimiter, -1, -1, 4);
|
||||
}
|
||||
else if (particleName == "e+") {
|
||||
// positron
|
||||
pmanager->AddProcess(new G4eMultipleScattering, -1, 1, -1);
|
||||
pmanager->AddProcess(new G4eIonisation, -1, 2, 1);
|
||||
pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 2);
|
||||
pmanager->AddProcess(new G4eplusAnnihilation, 0, -1, 3);
|
||||
if (fSRType) {
|
||||
pmanager->AddProcess(fSync, -1, -1, 4);
|
||||
}
|
||||
else {
|
||||
pmanager->AddProcess(new G4SynchrotronRadiationInMat, -1, -1, 4);
|
||||
}
|
||||
pmanager->AddProcess(new G4StepLimiter, -1, -1, 5);
|
||||
}
|
||||
else if (particleName == "mu+" || particleName == "mu-") {
|
||||
// muon
|
||||
pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, -1);
|
||||
pmanager->AddProcess(new G4MuIonisation, -1, 2, 1);
|
||||
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 2);
|
||||
pmanager->AddProcess(new G4MuPairProduction, -1, 4, 3);
|
||||
pmanager->AddProcess(fSync, -1, -1, 4);
|
||||
pmanager->AddProcess(new G4StepLimiter, -1, -1, 5);
|
||||
}
|
||||
else if (particleName == "proton") {
|
||||
// proton
|
||||
pmanager->AddProcess(new G4hMultipleScattering, -1, 1, -1);
|
||||
pmanager->AddProcess(new G4hIonisation, -1, 2, 1);
|
||||
pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 2);
|
||||
pmanager->AddProcess(new G4hPairProduction, -1, 4, 3);
|
||||
pmanager->AddProcess(fSync, -1, -1, 4);
|
||||
pmanager->AddProcess(new G4StepLimiter, -1, -1, 5);
|
||||
}
|
||||
else if (particle->GetPDGCharge() != 0.0 && !particle->IsShortLived()) {
|
||||
pmanager->AddProcess(fSync, -1, -1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetXrayReflectionRoughness(G4double SurfaceRoughness)
|
||||
{
|
||||
G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
|
||||
G4XrayReflection* XrayReflectionProcess =
|
||||
(G4XrayReflection*)theProcessTable->FindProcess("XrayReflection", "gamma");
|
||||
if (XrayReflectionProcess)
|
||||
XrayReflectionProcess->SetSurfaceRoughness(SurfaceRoughness);
|
||||
else
|
||||
G4cout << "Warning. No process XrayReflection found, "
|
||||
"SetXrayReflectionRoughness ignored"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -33,39 +33,47 @@
|
||||
#include "PhysicsListMessenger.hh"
|
||||
|
||||
#include "PhysicsList.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
|
||||
#include "G4UIcmdWithABool.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsListMessenger::PhysicsListMessenger(PhysicsList* physL)
|
||||
:G4UImessenger(),fPhysList(physL),
|
||||
fPhysDir(0),
|
||||
fSRTypeCmd(0)
|
||||
: G4UImessenger(), fPhysList(physL), fPhysDir(0), fSRTypeCmd(0)
|
||||
{
|
||||
fPhysDir = new G4UIdirectory("/testem/phys/");
|
||||
fPhysDir->SetGuidance("physics list commands");
|
||||
|
||||
fSRTypeCmd = new G4UIcmdWithABool("/testem/phys/analyticSR",this);
|
||||
|
||||
fSRTypeCmd = new G4UIcmdWithABool("/testem/phys/analyticSR", this);
|
||||
fSRTypeCmd->SetGuidance("choose analytic synchrotron radiation");
|
||||
fSRTypeCmd->SetParameterName("SRType",true);
|
||||
fSRTypeCmd->SetDefaultValue(true);
|
||||
}
|
||||
fSRTypeCmd->SetParameterName("SRType", true);
|
||||
fSRTypeCmd->SetDefaultValue(true);
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsListMessenger::~PhysicsListMessenger()
|
||||
{
|
||||
delete fSRTypeCmd;
|
||||
delete fPhysDir;
|
||||
fXrayReflectionRoughnessCmd =
|
||||
new G4UIcmdWithADoubleAndUnit("/testem/phys/SetXrayReflectionRoughness", this);
|
||||
fXrayReflectionRoughnessCmd->SetGuidance(
|
||||
"Set the XrayReflection surface roughness, typically between 0 and 10 "
|
||||
"nm");
|
||||
fXrayReflectionRoughnessCmd->SetParameterName("XrayReflSurfRoughness", false);
|
||||
fXrayReflectionRoughnessCmd->SetRange("XrayReflSurfRoughness>=0");
|
||||
fXrayReflectionRoughnessCmd->SetUnitCategory("Length");
|
||||
fXrayReflectionRoughnessCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsListMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
if (command == fSRTypeCmd)
|
||||
{ fPhysList->SetAnalyticSR(fSRTypeCmd->GetNewBoolValue(newValue));}
|
||||
if (command == fSRTypeCmd) {
|
||||
fPhysList->SetAnalyticSR(fSRTypeCmd->GetNewBoolValue(newValue));
|
||||
}
|
||||
|
||||
if (command == fXrayReflectionRoughnessCmd) {
|
||||
fPhysList->SetXrayReflectionRoughness(fXrayReflectionRoughnessCmd->GetNewDoubleValue(newValue));
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -35,43 +35,34 @@
|
||||
#include "DetectorConstruction.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* DC)
|
||||
:G4VUserPrimaryGeneratorAction(),fParticleGun(0),fDetector(DC)
|
||||
: G4VUserPrimaryGeneratorAction(), fDetector(DC)
|
||||
{
|
||||
fParticleGun = new G4ParticleGun(1);
|
||||
G4ParticleDefinition* particle
|
||||
= G4ParticleTable::GetParticleTable()->FindParticle("e+");
|
||||
fParticleGun = new G4ParticleGun(1);
|
||||
G4ParticleDefinition* particle = G4ParticleTable::GetParticleTable()->FindParticle("e+");
|
||||
fParticleGun->SetParticleDefinition(particle);
|
||||
fParticleGun->SetParticleEnergy(10*GeV);
|
||||
fParticleGun->SetParticleEnergy(10 * GeV);
|
||||
|
||||
//set the initial gun position and direction.
|
||||
G4double x0 = -0.5*(fDetector->GetSize());
|
||||
G4double y0 = 0.*cm, z0 = 0.*cm;
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PrimaryGeneratorAction::~PrimaryGeneratorAction()
|
||||
{
|
||||
delete fParticleGun;
|
||||
// set the initial gun position and direction.
|
||||
G4double x0 = -0.5 * (fDetector->GetSize());
|
||||
G4double y0 = 0. * cm, z0 = 0. * cm;
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(x0, y0, z0));
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(1., 0., 0.));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
//this function is called at the beginning of event
|
||||
// this function is called at the beginning of event
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -26,39 +26,27 @@
|
||||
/// \file electromagnetic/TestEm16/src/Run.cc
|
||||
/// \brief Implementation of the Run class
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "Run.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Run::Run()
|
||||
: G4Run(),
|
||||
f_n_gam_sync(0),
|
||||
f_e_gam_sync(0.),
|
||||
f_e_gam_sync2(0.),
|
||||
f_e_gam_sync_max(0.),
|
||||
f_lam_gam_sync(0.)
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Run::~Run()
|
||||
{ }
|
||||
Run::Run() : G4Run() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Run::Merge(const G4Run* run)
|
||||
{
|
||||
const Run* localRun = static_cast<const Run*>(run);
|
||||
|
||||
|
||||
// accumulate sums
|
||||
//
|
||||
f_n_gam_sync += localRun->f_n_gam_sync;
|
||||
@@ -66,30 +54,33 @@ void Run::Merge(const G4Run* run)
|
||||
f_e_gam_sync2 += localRun->f_e_gam_sync2;
|
||||
f_e_gam_sync_max = std::max(f_e_gam_sync_max, localRun->f_e_gam_sync_max);
|
||||
f_lam_gam_sync += localRun->f_lam_gam_sync;
|
||||
|
||||
G4Run::Merge(run);
|
||||
}
|
||||
f_n_Xray_Refl += localRun->f_n_Xray_Refl;
|
||||
|
||||
G4Run::Merge(run);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Run::EndOfRun()
|
||||
{
|
||||
if (f_n_gam_sync > 0)
|
||||
{
|
||||
G4double Emean = f_e_gam_sync/f_n_gam_sync;
|
||||
G4double E_rms = std::sqrt(f_e_gam_sync2/f_n_gam_sync - Emean*Emean);
|
||||
G4cout
|
||||
<< "Summary for synchrotron radiation :" << '\n' << std::setprecision(4)
|
||||
<< " Number of photons = " << f_n_gam_sync << '\n'
|
||||
<< " Emean = " << Emean/keV << " +/- "
|
||||
<< E_rms/(keV * std::sqrt((G4double) f_n_gam_sync)) << " keV" << '\n'
|
||||
<< " E_rms = " << G4BestUnit(E_rms,"Energy") << '\n'
|
||||
<< " Energy Max / Mean = " << f_e_gam_sync_max / Emean << '\n'
|
||||
<< " MeanFreePath = " << G4BestUnit(f_lam_gam_sync/f_n_gam_sync,
|
||||
"Length")
|
||||
<< G4endl;
|
||||
}
|
||||
if (f_n_gam_sync > 0) {
|
||||
G4double Emean = f_e_gam_sync / f_n_gam_sync;
|
||||
G4double E_rms = std::sqrt(f_e_gam_sync2 / f_n_gam_sync - Emean * Emean);
|
||||
G4cout << "Summary for synchrotron radiation :" << '\n'
|
||||
<< std::setprecision(4) << " Number of photons = " << f_n_gam_sync << '\n'
|
||||
<< " Emean = " << Emean / keV << " +/- "
|
||||
<< E_rms / (keV * std::sqrt((G4double)f_n_gam_sync)) << " keV" << '\n'
|
||||
<< " E_rms = " << G4BestUnit(E_rms, "Energy") << '\n'
|
||||
<< " Energy Max / Mean = " << f_e_gam_sync_max / Emean << '\n'
|
||||
<< " MeanFreePath = " << G4BestUnit(f_lam_gam_sync / f_n_gam_sync, "Length")
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
if (f_n_Xray_Refl > 0) {
|
||||
G4cout << "Summary for XrayReflection f_n_Xray_Refl=" << f_n_Xray_Refl
|
||||
<< " reflection probability = " << f_n_Xray_Refl / GetNumberOfEventToBeProcessed()
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -31,35 +31,26 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "RunAction.hh"
|
||||
|
||||
#include "HistoManager.hh"
|
||||
#include "Run.hh"
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
RunAction::RunAction()
|
||||
: G4UserRunAction(),
|
||||
fHistoManager(0)
|
||||
RunAction::RunAction() : G4UserRunAction()
|
||||
{
|
||||
fHistoManager = new HistoManager();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
RunAction::~RunAction()
|
||||
{
|
||||
delete fHistoManager;
|
||||
fHistoManager = new HistoManager();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4Run* RunAction::GenerateRun()
|
||||
{
|
||||
fRun = new Run();
|
||||
{
|
||||
fRun = new Run();
|
||||
return fRun;
|
||||
}
|
||||
|
||||
@@ -70,28 +61,39 @@ void RunAction::BeginOfRunAction(const G4Run*)
|
||||
// save Rndm status
|
||||
////G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
if (isMaster) CLHEP::HepRandom::showEngineStatus();
|
||||
|
||||
//histograms
|
||||
|
||||
// histograms
|
||||
//
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
if ( analysisManager->IsActive() ) {
|
||||
if (analysisManager->IsActive()) {
|
||||
analysisManager->OpenFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RunAction::EndOfRunAction(const G4Run*)
|
||||
{
|
||||
// compute and print statistic
|
||||
// compute and print statistic
|
||||
if (isMaster) fRun->EndOfRun();
|
||||
|
||||
|
||||
// show Rndm status
|
||||
if (isMaster) CLHEP::HepRandom::showEngineStatus();
|
||||
|
||||
//save histograms
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
if ( analysisManager->IsActive() ) {
|
||||
// save histograms
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
if (analysisManager->IsActive()) {
|
||||
G4String FileName = analysisManager->GetFileName();
|
||||
if (FileName.find("TestReflection") != std::string::npos) {
|
||||
std::ostringstream ostr;
|
||||
ostr << std::setfill('0') << std::right << std::setw(2) << fRun->GetRunID();
|
||||
// FileName="TestReflection"+ToString(fRun->GetRunID())+".root"; // add
|
||||
// RunID to histogram name
|
||||
FileName =
|
||||
"TestReflection_" + ostr.str() + ".root"; // add them later, can be done using hadd see
|
||||
// https://www.mankier.com/1/hadd
|
||||
analysisManager->SetFileName(FileName);
|
||||
}
|
||||
analysisManager->Write();
|
||||
analysisManager->CloseFile();
|
||||
}
|
||||
|
||||
@@ -31,91 +31,116 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "SteppingAction.hh"
|
||||
|
||||
#include "HistoManager.hh"
|
||||
#include "Run.hh"
|
||||
|
||||
#include "G4EmProcessSubType.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4SteppingManager.hh"
|
||||
#include "G4VProcess.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "HistoManager.hh"
|
||||
#include "G4EmProcessSubType.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4VProcess.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
SteppingAction::SteppingAction()
|
||||
:G4UserSteppingAction()
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
SteppingAction::~SteppingAction()
|
||||
{ }
|
||||
SteppingAction::SteppingAction() : G4UserSteppingAction() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void SteppingAction::UserSteppingAction(const G4Step* aStep)
|
||||
{
|
||||
Run* run = static_cast<Run*>(
|
||||
G4RunManager::GetRunManager()->GetNonConstCurrentRun());
|
||||
|
||||
const G4VProcess* process = aStep->GetPostStepPoint()->GetProcessDefinedStep();
|
||||
if (process == 0) { return; }
|
||||
Run* run = static_cast<Run*>(G4RunManager::GetRunManager()->GetNonConstCurrentRun());
|
||||
|
||||
static G4int iCalled=0;
|
||||
const G4int nprint=0; // set to 10 to get debug print for first 10 calls
|
||||
const G4VProcess* process = aStep->GetPostStepPoint()->GetProcessDefinedStep();
|
||||
if (process == nullptr) return;
|
||||
|
||||
if (fSynchrotronRadiation == process->GetProcessSubType())
|
||||
{
|
||||
++iCalled;
|
||||
const G4StepPoint* PrePoint = aStep->GetPreStepPoint();
|
||||
const G4TrackVector* secondary = fpSteppingManager->GetSecondary();
|
||||
G4int eventID = G4RunManager::GetRunManager()->GetCurrentEvent()->GetEventID();
|
||||
G4Track* trk = aStep->GetTrack();
|
||||
|
||||
//(*secondary)[lp-1] points to the last photon generated
|
||||
//
|
||||
size_t lp=(*secondary).size();
|
||||
if (lp)
|
||||
{
|
||||
G4double Egamma = (*secondary)[lp-1]->GetTotalEnergy();
|
||||
run->f_n_gam_sync++;
|
||||
run->f_e_gam_sync += Egamma;
|
||||
run->f_e_gam_sync2 += Egamma*Egamma;
|
||||
if (Egamma > run->f_e_gam_sync_max)
|
||||
{
|
||||
run->f_e_gam_sync_max = Egamma;
|
||||
}
|
||||
run->f_lam_gam_sync += aStep->GetStepLength();
|
||||
if (iCalled<nprint)
|
||||
{
|
||||
G4double Eelec = PrePoint->GetTotalEnergy();
|
||||
G4ThreeVector Pelec = PrePoint->GetMomentum();
|
||||
G4ThreeVector PGamma = (*secondary)[lp-1]->GetMomentum();
|
||||
G4bool IsGamma =
|
||||
((*secondary)[lp-1]->GetDefinition() == G4Gamma::Gamma());
|
||||
|
||||
G4cout << "UserSteppingAction processName="
|
||||
<< process->GetProcessName()
|
||||
<< " Step Length=" << std::setw(6)
|
||||
<< G4BestUnit(aStep->GetStepLength(),"Length")
|
||||
<< " Eelec=" << G4BestUnit(Eelec,"Energy")
|
||||
<< " Pelec=" << G4BestUnit(Pelec,"Energy")
|
||||
<< " IsGamma=" << IsGamma
|
||||
<< " Egamma=" << G4BestUnit(Egamma,"Energy")
|
||||
<< " PGamma=" << G4BestUnit(PGamma,"Energy")
|
||||
<< " #secondaries lp=" << lp
|
||||
<< '\n';
|
||||
}
|
||||
thread_local G4int iCalled = 0;
|
||||
const G4int nprint = 10; // set to 10 to get debug print for first 10 calls
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
analysisManager->FillH1(1,Egamma);
|
||||
|
||||
// power spectrum : gamma weighted with its energy
|
||||
analysisManager->FillH1(2,Egamma,Egamma/keV);
|
||||
|
||||
analysisManager->FillH1(3,aStep->GetStepLength());
|
||||
}
|
||||
if (fSynchrotronRadiation == process->GetProcessSubType()) {
|
||||
const G4StepPoint* PrePoint = aStep->GetPreStepPoint();
|
||||
const G4TrackVector* secondary = fpSteppingManager->GetSecondary();
|
||||
size_t lp = (*secondary).size();
|
||||
if (lp) {
|
||||
G4double Egamma = (*secondary)[lp - 1]->GetTotalEnergy();
|
||||
run->f_n_gam_sync++;
|
||||
run->f_e_gam_sync += Egamma;
|
||||
run->f_e_gam_sync2 += Egamma * Egamma;
|
||||
if (Egamma > run->f_e_gam_sync_max) run->f_e_gam_sync_max = Egamma;
|
||||
run->f_lam_gam_sync += aStep->GetStepLength();
|
||||
if (iCalled < nprint) {
|
||||
G4double Eelec = PrePoint->GetTotalEnergy();
|
||||
G4ThreeVector Pelec = PrePoint->GetMomentum();
|
||||
G4ThreeVector PGamma = (*secondary)[lp - 1]->GetMomentum();
|
||||
G4bool IsGamma = ((*secondary)[lp - 1]->GetDefinition() == G4Gamma::Gamma());
|
||||
const G4int wid = 8;
|
||||
if (analysisManager->GetVerboseLevel() > 1 && iCalled < nprint)
|
||||
G4cout << __FILE__ << " line " << __LINE__ << " " << __FUNCTION__
|
||||
<< " processName=" << process->GetProcessName()
|
||||
<< " Step Length=" << std::setw(wid)
|
||||
<< G4BestUnit(aStep->GetStepLength(), "Length") << " Eelec=" << std::setw(wid)
|
||||
<< G4BestUnit(Eelec, "Energy") << " Pelec=" << G4BestUnit(Pelec, "Energy")
|
||||
<< " IsGamma=" << IsGamma << " Egamma=" << std::setw(8)
|
||||
<< G4BestUnit(Egamma, "Energy") << " PGamma=" << std::setw(8)
|
||||
<< G4BestUnit(PGamma, "Energy") << " #secondaries lp=" << lp << '\n';
|
||||
}
|
||||
analysisManager->FillH1(1, Egamma);
|
||||
analysisManager->FillH1(2, Egamma,
|
||||
Egamma / keV); // power spectrum : gamma weighted with its energy
|
||||
analysisManager->FillH1(3, aStep->GetStepLength());
|
||||
}
|
||||
}
|
||||
|
||||
thread_local G4ThreeVector IncomingPhotonDirection;
|
||||
if (fGammaReflection == process->GetProcessSubType()) {
|
||||
const G4TrackVector* secondary = fpSteppingManager->GetSecondary();
|
||||
size_t lp = (*secondary).size();
|
||||
if (lp) {
|
||||
G4double Egamma = (*secondary)[lp - 1]->GetTotalEnergy();
|
||||
++run->f_n_Xray_Refl;
|
||||
analysisManager->FillH1(1, Egamma, 1. / run->GetNumberOfEventToBeProcessed());
|
||||
if (analysisManager->GetVerboseLevel() > 1 && run->f_n_Xray_Refl < nprint )
|
||||
G4cout << __FILE__ << " line " << __LINE__ << " " << __FUNCTION__
|
||||
<< " iCalled=" << std::setw(3) << iCalled
|
||||
<< " eventID=" << std::setw(3) << eventID
|
||||
<< " f_n_Xray_Refl=" << run->f_n_Xray_Refl
|
||||
<< " ProcessName=" << process->GetProcessName()
|
||||
<< " direction=" << trk->GetMomentumDirection() << " Egamma=" << Egamma / keV
|
||||
<< " keV" << G4endl;
|
||||
IncomingPhotonDirection = trk->GetMomentumDirection();
|
||||
}
|
||||
}
|
||||
|
||||
const G4VProcess* creator = trk->GetCreatorProcess();
|
||||
G4int CreatorProcessSubType=0;
|
||||
if (creator != nullptr) CreatorProcessSubType = creator->GetProcessSubType();
|
||||
if (CreatorProcessSubType == fGammaReflection) { // transportation after XrayReflection
|
||||
if (IncomingPhotonDirection != G4ThreeVector(0, 0, 0)) {
|
||||
G4double cos_angle =
|
||||
IncomingPhotonDirection * trk->GetMomentumDirection(); // incoming * outgoing direction
|
||||
G4double IncidentAngle = std::acos(cos_angle) / 2.;
|
||||
analysisManager->FillH1(4, IncidentAngle, 1. / run->GetNumberOfEventToBeProcessed());
|
||||
if (analysisManager->GetVerboseLevel() > 1 && iCalled < nprint)
|
||||
G4cout << __FILE__ << " line " << __LINE__ << " " << __FUNCTION__
|
||||
<< " iCalled=" << std::setw(3) << iCalled
|
||||
<< " eventID=" << std::setw(3) << eventID
|
||||
<< " CreatorProcname=" << creator->GetProcessName()
|
||||
<< " ProcessName=" << process->GetProcessName()
|
||||
<< " IncomingPhotonDirection=" << IncomingPhotonDirection
|
||||
<< " outgoing PhotonDirection=" << trk->GetMomentumDirection()
|
||||
<< " IncidentAngle=" << IncidentAngle
|
||||
<< " NumberOfEventToBeProcessed=" << run->GetNumberOfEventToBeProcessed()
|
||||
<< " RunID=" << run->GetRunID() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
++iCalled;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,20 +24,10 @@
|
||||
/gun/particle e-
|
||||
/gun/energy 9.9994890009 GeV
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/run/numberOfThreads 1 #
|
||||
/control/cout/setCoutFile .out #---- write to one file per thread
|
||||
#
|
||||
/control/verbose 1 # with 1 also echoing this
|
||||
/tracking/verbose 1 # at least 1 to get initial point, use 2 to see ustepMax, utrakMax from SteppingVerbose::TrackingStarted
|
||||
/geometry/navigator/verbose 0
|
||||
#
|
||||
/control/useDoublePrecision
|
||||
#
|
||||
/testem/det/setSize 1 m
|
||||
/testem/det/setMat Iron
|
||||
/testem/det/GeomFile /Users/hbu/www/Geom/Box_1m_Fe.gdml # geometry to test reflection
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
/globalField/setValue 0 0 0 T
|
||||
/gun/particle gamma
|
||||
/gun/energy 100 keV
|
||||
#
|
||||
# hit with 1 degree in y at 0,0,0 -- barely visible
|
||||
# /gun/position 0 0.00872620321864176 -0.499923847578196 m
|
||||
# /gun/direction 0 -0.0174524064372835 0.999847695156391
|
||||
# 30 deg - to make well visible
|
||||
/gun/position 0 0.25 -0.433012701892219 m
|
||||
/gun/direction 0 -0.5 0.866025403784439
|
||||
#
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
/vis/viewer/set/autoRefresh false
|
||||
/vis/verbose errors
|
||||
#
|
||||
# Draw geometry:
|
||||
/vis/drawVolume
|
||||
#
|
||||
# Specify view angle:
|
||||
#/vis/viewer/set/viewpointThetaPhi 90. 0.
|
||||
#
|
||||
# Specify zoom value:
|
||||
/vis/viewer/zoom 1.4
|
||||
#
|
||||
# Specify style (surface or wireframe):
|
||||
#/vis/viewer/set/style wireframe
|
||||
#
|
||||
# Draw coordinate axes:
|
||||
/vis/scene/add/axes 0 0 0 1 m
|
||||
#
|
||||
# Draw smooth trajectories at end of event, showing trajectory points
|
||||
# as markers 2 pixels wide:
|
||||
/vis/scene/add/trajectories smooth
|
||||
/vis/modeling/trajectories/create/drawByCharge
|
||||
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
|
||||
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
|
||||
# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
|
||||
#
|
||||
# Draw hits at end of event:
|
||||
#/vis/scene/add/hits
|
||||
#
|
||||
# To draw only gammas:
|
||||
#/vis/filtering/trajectories/create/particleFilter
|
||||
#/vis/filtering/trajectories/particleFilter-0/add gamma
|
||||
#
|
||||
# To invert the above, drawing all particles except gammas,
|
||||
# keep the above two lines but also add:
|
||||
#/vis/filtering/trajectories/particleFilter-0/invert true
|
||||
#
|
||||
# Many other options are available with /vis/modeling and /vis/filtering.
|
||||
# For example, to select colour by particle ID:
|
||||
#/vis/modeling/trajectories/create/drawByParticleID
|
||||
#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
|
||||
#
|
||||
# To superimpose all of the events from a given run:
|
||||
/vis/scene/endOfEventAction accumulate
|
||||
#
|
||||
# Re-establish auto refreshing and verbosity:
|
||||
/vis/viewer/set/autoRefresh true
|
||||
/vis/verbose warnings
|
||||
#
|
||||
# For file-based drivers, use this to create an empty detector view:
|
||||
#/vis/viewer/flush
|
||||
#
|
||||
#
|
||||
/vis/viewer/set/viewpointThetaPhi -80. 10.
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm17)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
Material: CaCO3 density: 2.800 g/cm3 RadL: 8.581 cm Nucl.Int.Length: 34.749 cm
|
||||
Imean: 122.680 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 123.236 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Calcium (Ca) Z = 20.0 N = 40 A = 40.080 g/mole
|
||||
---> Isotope: Ca40 Z = 20 N = 40 A = 39.96 g/mole abundance: 96.941 %
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
|
||||
Material: Carbon density: 2.265 g/cm3 RadL: 18.851 cm Nucl.Int.Length: 35.388 cm
|
||||
Imean: 78.000 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 81.000 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: C (C) Z = 6.0 N = 12 A = 12.011 g/mole
|
||||
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.930 %
|
||||
@@ -629,12 +629,12 @@ N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10000
|
||||
User=1.280000s Real=1.281203s Sys=0.000000s
|
||||
User=1.260000s Real=1.407572s Sys=0.000000s
|
||||
|
||||
The run consists of 10000 mu+ of 10 TeV through 1 m of Iron (density: 7.9 g/cm3 )
|
||||
|
||||
Number of process calls ---> CoulombScat : 5688 muIoni : 466248 muPairProd : 63850 muBrems : 683
|
||||
Simulation: total CrossSection = 0.53647 /cm MeanFreePath = 1.864 cm massicCrossSection = 0.068166 cm2/g
|
||||
Number of process calls ---> CoulombScat : 5613 muIoni : 466065 muPairProd : 63500 muBrems : 637
|
||||
Simulation: total CrossSection = 0.53581 /cm MeanFreePath = 1.8663 cm massicCrossSection = 0.068083 cm2/g
|
||||
Theory: total CrossSection = 0.52947 /cm MeanFreePath = 1.8887 cm massicCrossSection = 0.067277 cm2/g
|
||||
#
|
||||
/gun/particle pi+
|
||||
@@ -670,7 +670,7 @@ Index : 0 used in the geometry : Yes
|
||||
------- MixMaxRng engine status -------
|
||||
Current state vector is:
|
||||
mixmax state, file version 1.0
|
||||
N=17 V[N]={356575979127036268, 1480344814211241319, 2291742542844202723, 146288999262253291, 815740629441340169, 218920248175661370, 1679249731997911238, 1121119735214013805, 834864434497145169, 1977634818097967088, 614506221639392962, 1486901145154293240, 1756070025476213748, 333002099507933239, 1322572251886485279, 2008397415645341301, 1658420199214869219} counter= 4sumtot= 1655607217683749820
|
||||
N=17 V[N]={432129628493770164, 1814378723063674975, 1209460836733901477, 40378447318968385, 1166405697066150015, 1712438097955414309, 1162066631942647724, 1377996140163220349, 67315068592747067, 761465620694214575, 1743598615136346759, 196570106205536369, 93293628111674800, 2181392307262736968, 2131942092924136303, 1649029329482157720, 374520013121668153} counter= 11sumtot= 1973479919773108455
|
||||
---------------------------------------
|
||||
--> Event 0 starts.
|
||||
--> Event 1000 starts.
|
||||
@@ -685,12 +685,12 @@ N=17 V[N]={356575979127036268, 1480344814211241319, 2291742542844202723, 1462889
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10000
|
||||
User=1.200000s Real=1.207309s Sys=0.000000s
|
||||
User=1.170000s Real=1.188053s Sys=0.000000s
|
||||
|
||||
The run consists of 10000 pi+ of 10 TeV through 1 m of Iron (density: 7.9 g/cm3 )
|
||||
|
||||
Number of process calls ---> hIoni : 438019 hPairProd : 59540 CoulombScat : 5727 hBrems : 334
|
||||
Simulation: total CrossSection = 0.50362 /cm MeanFreePath = 1.9856 cm massicCrossSection = 0.063992 cm2/g
|
||||
Number of process calls ---> hPairProd : 59687 hIoni : 437672 CoulombScat : 5542 hBrems : 356
|
||||
Simulation: total CrossSection = 0.50326 /cm MeanFreePath = 1.9871 cm massicCrossSection = 0.063946 cm2/g
|
||||
#
|
||||
/gun/particle proton
|
||||
/run/beamOn 10000
|
||||
@@ -725,7 +725,7 @@ Index : 0 used in the geometry : Yes
|
||||
------- MixMaxRng engine status -------
|
||||
Current state vector is:
|
||||
mixmax state, file version 1.0
|
||||
N=17 V[N]={760258473299029110, 1090172941071924422, 730805950373528576, 1426355128780926841, 1832682333153411383, 21763228272667036, 250244081359252734, 1197931393794946046, 1295942629544953430, 817500520015246316, 2096373134087038825, 2003234735921190503, 122518389828444412, 116412624708721403, 404206958726084366, 1673411469761409521, 2253087791001170062} counter= 5sumtot= 1952000719204087329
|
||||
N=17 V[N]={666189274156109320, 913680459780043419, 495444254095043894, 163299520257719017, 104458280747222742, 272215273116300644, 932702107349058568, 885237446869949751, 1190578473375854215, 1090243270728123887, 915443789560795790, 1352586357148823147, 1049018277636030738, 2005118987467449020, 2146158333251440373, 695781257761596764, 1124268770556695881} counter= 9sumtot= 2167366078576093464
|
||||
---------------------------------------
|
||||
--> Event 0 starts.
|
||||
--> Event 1000 starts.
|
||||
@@ -740,12 +740,12 @@ N=17 V[N]={760258473299029110, 1090172941071924422, 730805950373528576, 14263551
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10000
|
||||
User=1.130000s Real=1.211861s Sys=0.000000s
|
||||
User=1.100000s Real=1.111559s Sys=0.000000s
|
||||
|
||||
The run consists of 10000 proton of 10 TeV through 1 m of Iron (density: 7.9 g/cm3 )
|
||||
|
||||
Number of process calls ---> hIoni : 437619 hPairProd : 34338 CoulombScat : 5611 hBrems : 10
|
||||
Simulation: total CrossSection = 0.47758 /cm MeanFreePath = 2.0939 cm massicCrossSection = 0.060683 cm2/g
|
||||
Number of process calls ---> hIoni : 436930 hPairProd : 34302 CoulombScat : 5625 hBrems : 3
|
||||
Simulation: total CrossSection = 0.47686 /cm MeanFreePath = 2.0971 cm massicCrossSection = 0.060592 cm2/g
|
||||
#
|
||||
G4 kernel has come to Quit state.
|
||||
UserDetectorConstruction deleted.
|
||||
@@ -765,15 +765,15 @@ G4RNGHelper object is deleted.
|
||||
================== Deleting memory pools ===================
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.00673 MB
|
||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.0154 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.0163 MB
|
||||
Pool ID '7G4Event', size : 0.000961 MB
|
||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
||||
Pool ID '7G4Track', size : 0.0298 MB
|
||||
Pool ID '7G4Track', size : 0.0317 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.000961 MB
|
||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||
Number of memory pools allocated: 9 of which, static: 0
|
||||
Dynamic pools deleted: 9 / Total memory freed: 0.058 MB
|
||||
Dynamic pools deleted: 9 / Total memory freed: 0.061 MB
|
||||
============================================================
|
||||
G4Allocator objects are deleted.
|
||||
UImanager deleted.
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm18)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
@@ -215,7 +215,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100000
|
||||
User=0.530000s Real=0.533965s Sys=0.000000s
|
||||
User=0.580000s Real=0.617245s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm2)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -599,7 +599,7 @@ N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100
|
||||
User=1.980000s Real=1.986584s Sys=0.000000s
|
||||
User=2.170000s Real=2.232780s Sys=0.000000s
|
||||
LOGITUDINAL PROFILE CUMULATIVE LOGITUDINAL PROFILE
|
||||
|
||||
bin Mean rms bin Mean rms
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm3)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -547,7 +547,7 @@ Index : 2 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100
|
||||
User=1.310000s Real=1.319357s Sys=0.000000s
|
||||
User=1.460000s Real=1.514329s Sys=0.000000s
|
||||
|
||||
------------------------------------------------------------
|
||||
material Edep RMS sqrt(E0(GeV))*rmsE/Emean total tracklen
|
||||
@@ -622,7 +622,7 @@ Index : 2 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100
|
||||
User=1.140000s Real=1.143307s Sys=0.000000s
|
||||
User=1.230000s Real=1.544856s Sys=0.000000s
|
||||
|
||||
------------------------------------------------------------
|
||||
material Edep RMS sqrt(E0(GeV))*rmsE/Emean total tracklen
|
||||
|
||||
@@ -9,20 +9,10 @@
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm4)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -20,7 +20,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
**************************************************************
|
||||
|
||||
Material: FluorCarbonate density: 1.610 g/cm3 RadL: 22.435 cm Nucl.Int.Length: 54.514 cm
|
||||
Imean: 98.459 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 99.957 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Carbon (C) Z = 6.0 N = 12 A = 12.010 g/mole
|
||||
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.930 %
|
||||
@@ -209,16 +209,16 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100000
|
||||
User=0.610000s Real=0.613729s Sys=0.010000s
|
||||
User=0.650000s Real=0.666691s Sys=0.000000s
|
||||
|
||||
--------------------End of Global Run------------------------
|
||||
The run consists of 100000 gamma of 9 MeV in a volume of C6F6
|
||||
Energy deposit per event: mean = 930.463 keV rms = 2.35286 MeV
|
||||
Energy deposit per event: mean = 928.584 keV rms = 2.34926 MeV
|
||||
------------------------------------------------------------
|
||||
|
||||
--------- Ranecu engine status ---------
|
||||
Initial seed (index) = 0
|
||||
Current couple of seeds = 1651901614, 2137790871
|
||||
Current couple of seeds = 2851671, 824097029
|
||||
----------------------------------------
|
||||
... write file : testem4.root - done
|
||||
... close file : testem4.root - done
|
||||
|
||||
@@ -7,20 +7,10 @@
|
||||
/control/verbose 2
|
||||
/run/verbose 2
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -161,20 +161,14 @@
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
/analysis/h1/setAscii id
|
||||
\endverbatim
|
||||
All selected histos will be written on a file name.ascii (default testem5)
|
||||
|
||||
\subsection TestEm5_subs1 Using hbook format
|
||||
|
||||
Need a special treatement : the Cern Library must be installed and the
|
||||
environment variable CERNLIB correctly set. Then, *before* compiling,
|
||||
activate G4_USE_HBOOK in GNUmakefile and g4hbook.hh in HistoManager.hh
|
||||
|
||||
|
||||
\section TestEm5_s8 GEANT4/GEANT3/DATA COMPARISON
|
||||
|
||||
A Geant4/Geant3/exp. data comparison is given here for a few cases.
|
||||
@@ -245,19 +239,20 @@ Macros provided in this example:
|
||||
- mumsc.mac: 100 GeV mu+, transmitted through 1 m of iron
|
||||
- mutev.mac: 1 TeV mu+, transmitted through 1 m of iron
|
||||
- pixe.mac: to illustrate atomic deexcitation options
|
||||
- pixe_ANSTO.mac: to illustrate how to activate the ANSTO PIXE data libraries.
|
||||
- pixe_ANSTO.mac: to illustrate how to activate the ANSTO PIXE data libraries,
|
||||
for both cross sections and fluorescence radiation yields (for materials with Z < 93).
|
||||
The cross sections are available for protons with energy < 5 MeV
|
||||
and alpha particles with energy < 10 MeV/nucleon.
|
||||
(S. Bakr et al. (2021) NIM B, 507:1119)
|
||||
(S. Bakr et al (2018), NIMB B, 436: 285-291)
|
||||
(S. Bakr et al. (2021) NIM B, 507:1119),
|
||||
(S. Bakr et al (2018), NIMB B, 436: 285-291)
|
||||
- posi.mac: to test PhysListEm19DStandard for positron
|
||||
- shen1.mac: Angle distribution of high energy (50-200 GeV/c) protons
|
||||
transmitted through different targets.
|
||||
(G. Shen et al. Phys.Rev. D20 (1979) page 1584.)
|
||||
- shen2.mac: proton 175 GeV/c, transmitted through 8.004 mm Al
|
||||
(G. Shen et al. Phys.Rev. D20 (1979) page 1584.)
|
||||
- stepMax.cc: to test the command /testem/stepMax
|
||||
- stepMax.mac: to test the command /testem/stepMax
|
||||
- subcut.mac: to test the control sub-cutoff production
|
||||
- tavora.mac: Back scattering of 35 keV electrons in Silver.
|
||||
(L.M. Tavora et al. J.Phys.D: Appl. Phys. 33 (2000) page 2497,
|
||||
Fig. 7)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm5)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -4,6 +4,9 @@ See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
## 2023-11-09 I. Hrivnacova (testem5-V11-01-01)
|
||||
- Coding guidelines - document macros in README files
|
||||
|
||||
## 2023-04-28 Michel Maire (testem5-V11-01-00)
|
||||
- revision of all headers
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
/analysis/setFileName name (default testem5)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
hdf5, xml, csv, by changing the default file type in HistoManager.cc
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
@@ -186,10 +186,10 @@
|
||||
|
||||
9- HOW TO START ?
|
||||
|
||||
- execute TestEm5 in 'batch' mode from macro files e.g.
|
||||
- Execute TestEm5 in 'batch' mode from macro files e.g.
|
||||
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm5 myMacro.mac
|
||||
|
||||
- execute TestEm5 in 'interactive' mode with visualization e.g.
|
||||
- Execute TestEm5 in 'interactive' mode with visualization e.g.
|
||||
% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm5
|
||||
Then type your commands, for instance :
|
||||
Idle> control/execute vis.mac
|
||||
@@ -232,14 +232,15 @@
|
||||
The cross sections are available for protons with energy < 5 MeV
|
||||
and alpha particles with energy < 10 MeV/nucleon.
|
||||
(S. Bakr et al. (2021) NIM B, 507:1119),
|
||||
(S. Bakr et al (2018), NIMB B, 436: 285-291).
|
||||
(S. Bakr et al (2018), NIMB B, 436: 285-291)
|
||||
- posi.mac: to test PhysListEm19DStandard for positron
|
||||
- shen1.mac: Angle distribution of high energy (50-200 GeV/c) protons
|
||||
transmitted through different targets.
|
||||
(G. Shen et al. Phys.Rev. D20 (1979) page 1584.)
|
||||
- shen2.mac: proton 175 GeV/c, transmitted through 8.004 mm Al
|
||||
(G. Shen et al. Phys.Rev. D20 (1979) page 1584.)
|
||||
- stepMax.cc: to test the command /testem/stepMax
|
||||
- stepMax.mac: to test the command /testem/stepMax
|
||||
- subcut.mac: to test the control sub-cutoff production
|
||||
- tavora.mac: Back scattering of 35 keV electrons in Silver.
|
||||
(L.M. Tavora et al. J.Phys.D: Appl. Phys. 33 (2000) page 2497,
|
||||
Fig. 7)
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -105,7 +105,7 @@ Step# X Y Z KineE dEStep StepLeng T
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.000366s Sys=0.000000s
|
||||
User=0.000000s Real=0.000352s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
@@ -185,7 +185,7 @@ N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 6
|
||||
User=0.000000s Real=0.000093s Sys=0.000000s
|
||||
User=0.000000s Real=0.000076s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -236,7 +236,7 @@ N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100000
|
||||
User=70.830000s Real=82.246290s Sys=0.010000s
|
||||
User=71.090000s Real=85.232415s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
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
|
||||
@@ -515,7 +515,7 @@ N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100000
|
||||
User=0.840000s Real=0.843798s Sys=0.000000s
|
||||
User=0.900000s Real=0.920446s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
@@ -615,7 +615,7 @@ N=17 V[N]={2251962729139529066, 2255809157296117052, 1561220629868467436, 119547
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 50000
|
||||
User=0.430000s Real=0.436952s Sys=0.000000s
|
||||
User=0.480000s Real=0.490276s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
@@ -720,7 +720,7 @@ N=17 V[N]={2127184459213952784, 1452207038256057524, 383772375008462944, 1938816
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 50000
|
||||
User=1.630000s Real=1.651983s Sys=0.000000s
|
||||
User=1.730000s Real=1.754772s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
@@ -831,19 +831,19 @@ N=17 V[N]={743852330670488035, 2136169146287051088, 849070234196116409, 10993341
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 50000
|
||||
User=0.430000s Real=0.429887s Sys=0.000000s
|
||||
User=0.470000s Real=0.470470s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
The run was 50000 proton of 175 GeV through 8 mm of Aluminium (density: 2.7 g/cm3 )
|
||||
|
||||
Total energy deposit in absorber per event = 4.795 MeV +- 122.2 keV
|
||||
Total energy deposit in absorber per event = 4.793 MeV +- 122.2 keV
|
||||
|
||||
-----> Mean dE/dx = 5.991 MeV/cm (2.219 MeV*cm2/g)
|
||||
-----> Mean dE/dx = 5.988 MeV/cm (2.218 MeV*cm2/g)
|
||||
|
||||
From formulas :
|
||||
restricted dEdx = 4.024 MeV/cm (1.49 MeV*cm2/g)
|
||||
full dEdx = 6.048 MeV/cm (2.24 MeV*cm2/g)
|
||||
full dEdx = 6.049 MeV/cm (2.24 MeV*cm2/g)
|
||||
|
||||
Leakage : primary = 174.7 GeV +- 122.2 keV secondaries = 0 eV +- 0 eV
|
||||
Energy balance : edep + eleak = 174.7 GeV
|
||||
@@ -851,10 +851,10 @@ Run Summary
|
||||
Total track length (charged) in absorber per event = 8.004 mm +- 0 fm
|
||||
Total track length (neutral) in absorber per event = 0 fm +- 0 fm
|
||||
|
||||
Number of steps (charged) in absorber per event = 1.267 +- 0.002306
|
||||
Number of steps (charged) in absorber per event = 1.266 +- 0.002306
|
||||
Number of steps (neutral) in absorber per event = 0 +- 0
|
||||
|
||||
Number of secondaries per event : Gammas = 0 electrons = 0.2666 positrons = 0.00086
|
||||
Number of secondaries per event : Gammas = 0 electrons = 0.2663 positrons = 0.00086
|
||||
|
||||
Number of events with the primary particle transmitted = 100 %
|
||||
Number of events with at least 1 particle transmitted (same charge as primary) = 100 %
|
||||
@@ -865,7 +865,7 @@ Run Summary
|
||||
MultipleScattering:
|
||||
rms proj angle of transmit primary particle = 0.02067 mrad (central part only)
|
||||
computed theta0 (Highland formula) = 0.02111 mrad
|
||||
central part defined as +- 0.06333 mrad Tail ratio = 1.304 %
|
||||
central part defined as +- 0.06333 mrad Tail ratio = 1.307 %
|
||||
|
||||
Gamma process counts:
|
||||
Photoeffect 0
|
||||
@@ -876,7 +876,7 @@ Run Summary
|
||||
------- MixMaxRng engine status -------
|
||||
Current state vector is:
|
||||
mixmax state, file version 1.0
|
||||
N=17 V[N]={229283173202294728, 2183691285638226244, 620326498413005005, 885130391089783417, 787727864755907687, 1074060692936664022, 640618028724210808, 1556753036198792096, 778117101884391675, 1312434234085935294, 546990018900134803, 28655440584924331, 2276502795822625937, 1045042082374896511, 1054385297299224609, 449440916096920264, 2205084925893285649} counter= 14sumtot= 1533342719405365423
|
||||
N=17 V[N]={775294422527063030, 1855950618543048797, 703544342320453912, 363532291261201457, 2103143170360180487, 1953367138948480261, 1017246842915337138, 1030454086387337673, 980516073623600517, 524928575304318138, 1257770971269639, 1876495656239076439, 532118752613963113, 1074609018677060156, 2234437348099190838, 1930350380788564325, 2049173042674958042} counter= 8sumtot= 253832449331858403
|
||||
---------------------------------------
|
||||
#
|
||||
/testem/det/setAbsMat Iron
|
||||
@@ -933,7 +933,7 @@ Index : 5 used in the geometry : Yes
|
||||
------- MixMaxRng engine status -------
|
||||
Current state vector is:
|
||||
mixmax state, file version 1.0
|
||||
N=17 V[N]={229283173202294728, 2183691285638226244, 620326498413005005, 885130391089783417, 787727864755907687, 1074060692936664022, 640618028724210808, 1556753036198792096, 778117101884391675, 1312434234085935294, 546990018900134803, 28655440584924331, 2276502795822625937, 1045042082374896511, 1054385297299224609, 449440916096920264, 2205084925893285649} counter= 14sumtot= 1533342719405365423
|
||||
N=17 V[N]={775294422527063030, 1855950618543048797, 703544342320453912, 363532291261201457, 2103143170360180487, 1953367138948480261, 1017246842915337138, 1030454086387337673, 980516073623600517, 524928575304318138, 1257770971269639, 1876495656239076439, 532118752613963113, 1074609018677060156, 2234437348099190838, 1930350380788564325, 2049173042674958042} counter= 8sumtot= 253832449331858403
|
||||
---------------------------------------
|
||||
--> Event 0 starts.
|
||||
--> Event 10000 starts.
|
||||
@@ -943,30 +943,30 @@ N=17 V[N]={229283173202294728, 2183691285638226244, 620326498413005005, 88513039
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 50000
|
||||
User=7.490000s Real=7.638230s Sys=0.000000s
|
||||
User=7.620000s Real=8.994611s Sys=0.000000s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
The run was 50000 mu+ of 100 GeV through 1 m of Iron (density: 7.87 g/cm3 )
|
||||
|
||||
Total energy deposit in absorber per event = 2.155 GeV +- 14.22 MeV
|
||||
Total energy deposit in absorber per event = 2.164 GeV +- 14.93 MeV
|
||||
|
||||
-----> Mean dE/dx = 21.55 MeV/cm (2.738 MeV*cm2/g)
|
||||
-----> Mean dE/dx = 21.64 MeV/cm (2.749 MeV*cm2/g)
|
||||
|
||||
From formulas :
|
||||
restricted dEdx = 11.21 MeV/cm (1.425 MeV*cm2/g)
|
||||
full dEdx = 21.61 MeV/cm (2.745 MeV*cm2/g)
|
||||
full dEdx = 21.61 MeV/cm (2.746 MeV*cm2/g)
|
||||
|
||||
Leakage : primary = 97.84 GeV +- 14.22 MeV secondaries = 0 eV +- 0 eV
|
||||
Leakage : primary = 97.83 GeV +- 14.95 MeV secondaries = 0 eV +- 0 eV
|
||||
Energy balance : edep + eleak = 100 GeV
|
||||
|
||||
Total track length (charged) in absorber per event = 1 m +- 6.333 nm
|
||||
Total track length (charged) in absorber per event = 100 cm +- 7.917 um
|
||||
Total track length (neutral) in absorber per event = 0 fm +- 0 fm
|
||||
|
||||
Number of steps (charged) in absorber per event = 47.55 +- 0.03041
|
||||
Number of steps (charged) in absorber per event = 47.58 +- 0.03059
|
||||
Number of steps (neutral) in absorber per event = 0 +- 0
|
||||
|
||||
Number of secondaries per event : Gammas = 0.05136 electrons = 46.49 positrons = 1.264
|
||||
Number of secondaries per event : Gammas = 0.0484 electrons = 46.52 positrons = 1.268
|
||||
|
||||
Number of events with the primary particle transmitted = 100 %
|
||||
Number of events with at least 1 particle transmitted (same charge as primary) = 100 %
|
||||
@@ -975,9 +975,9 @@ Run Summary
|
||||
Number of events with at least 1 particle reflected (same charge as primary) = 0 %
|
||||
|
||||
MultipleScattering:
|
||||
rms proj angle of transmit primary particle = 1.179 mrad (central part only)
|
||||
rms proj angle of transmit primary particle = 1.173 mrad (central part only)
|
||||
computed theta0 (Highland formula) = 1.182 mrad
|
||||
central part defined as +- 3.546 mrad Tail ratio = 0.561 %
|
||||
central part defined as +- 3.546 mrad Tail ratio = 0.571 %
|
||||
|
||||
Gamma process counts:
|
||||
Photoeffect 0
|
||||
@@ -988,7 +988,7 @@ Run Summary
|
||||
------- MixMaxRng engine status -------
|
||||
Current state vector is:
|
||||
mixmax state, file version 1.0
|
||||
N=17 V[N]={204717756033304856, 724309485040076549, 2042106297155167544, 736575988112398030, 1043545919384348766, 1066100194176683821, 1370180578678059578, 2276035369146421509, 54524033950891282, 1697501097594485980, 1886792253039231551, 837597529950614712, 464061031041513128, 394626740474736535, 2213225000856736945, 2226742419321754442, 2270117469262072624} counter= 17sumtot= 756172080295252293
|
||||
N=17 V[N]={84878422293006497, 54957677254634122, 196118820711308097, 925278316009438259, 1763972601420489975, 273958580846165510, 246071391963918994, 310400718642064816, 1501358119477150621, 1157260365094656625, 1094381272101485232, 463629973342779924, 702180093389130547, 833273816340765539, 18154155211668357, 1205209454890212179, 1072034807464557125} counter= 10sumtot= 373903540384962664
|
||||
---------------------------------------
|
||||
#
|
||||
================== Deleting memory pools ===================
|
||||
|
||||
@@ -7,20 +7,10 @@
|
||||
/run/verbose 2
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -75,26 +75,30 @@
|
||||
allows to activate/inactivate the processes one by one.
|
||||
|
||||
The threshold for producing secondaries can be changed.
|
||||
eg:
|
||||
eg:
|
||||
\verbatim
|
||||
/run/particle/setCut 100 micrometer
|
||||
/run/initialize
|
||||
\endverbatim
|
||||
|
||||
|
||||
To visualize the GammaConversionToMuons :
|
||||
\verbatim
|
||||
/control/execute run01.mac
|
||||
/control/execute vis.mac
|
||||
/run/beamOn
|
||||
\endverbatim
|
||||
|
||||
|
||||
To visualize the AnnihiToMuPair :
|
||||
\verbatim
|
||||
/control/execute run11.mac
|
||||
/control/execute vis.mac
|
||||
/run/beamOn
|
||||
\endverbatim
|
||||
|
||||
|
||||
Other macros:
|
||||
- run02.mac: the final state of the GammaConversionToMuons
|
||||
- run12.mac: test on carbon target with biasing of cross section
|
||||
|
||||
\section TestEm6_s6 HOW TO START ?
|
||||
|
||||
- Execute Test in 'batch' mode from macro files
|
||||
@@ -129,12 +133,16 @@ Idle> exit
|
||||
|
||||
\section TestEm6_s8 HISTOGRAMS
|
||||
|
||||
Testem6 produces 6 histograms which illustrate the final state of
|
||||
the GammaConversionToMuons process. See their definitions in RunAction.cc
|
||||
|
||||
Testem6 produces 6 histograms, h1 - h6, which illustrate
|
||||
the final state of the GammaConversionToMuons. The histograms are produced
|
||||
with run02.mac and can be displayed with the ROOT macro plotHisto.C.
|
||||
|
||||
The remaining histograms h7 - h16 show various cross sections and h17 the ratio
|
||||
of eeToHadr/eeToMu, see their definitions in RunAction.cc
|
||||
|
||||
By default the histograms are saved as testem6.root
|
||||
|
||||
The format of the histogram file can be : root (default), xml, csv,
|
||||
by selecting g4nnn.hh in RunAction.hh
|
||||
by selecting the analysis manager default file type in RunAction.cc
|
||||
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(TestEm6)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
@@ -41,6 +41,7 @@ target_link_libraries(TestEm6 ${Geant4_LIBRARIES} )
|
||||
#
|
||||
set(TestEm6_SCRIPTS
|
||||
run01.mac run02.mac run11.mac run12.mac TestEm6.in TestEm6.out vis.mac
|
||||
plotHisto.C
|
||||
)
|
||||
|
||||
foreach(_script ${TestEm6_SCRIPTS})
|
||||
|
||||
@@ -5,6 +5,12 @@ which **must** added in reverse chronological order (newest at the top). It must
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
|
||||
## 2023-11-09 I. Hrivnacova (testem6-V11-00-02)
|
||||
- Coding guidelines - removed tabulations from RunAction.cc
|
||||
- Removed useless macro TestEm6_xs.in
|
||||
- Updated README's
|
||||
- Fixed warning in plotHisto.C
|
||||
|
||||
## 2022-02-08 Vladimir Ivanchenko (testem6-V11-00-01)
|
||||
- RunAction - fixed compilation warning
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user