Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -11,6 +11,7 @@ find_package(ROOT QUIET)
|
||||
add_subdirectory(air_shower)
|
||||
add_subdirectory(amsEcal)
|
||||
add_subdirectory(brachytherapy)
|
||||
add_subdirectory(stim_pixe_tomography)
|
||||
|
||||
if(Geant4_gdml_FOUND)
|
||||
add_subdirectory(ChargeExchangeMC)
|
||||
|
||||
@@ -38,7 +38,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -188,7 +188,7 @@ eBrem: for e- XStype:4 SubType=3
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -220,7 +220,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -252,7 +252,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -265,7 +265,6 @@ ionIoni: for GenericIon XStype:3 SubType=2
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
|
||||
Stopping Power data for 17 ion/material pairs
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
@@ -311,7 +310,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -343,7 +342,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -375,7 +374,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -407,7 +406,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -439,7 +438,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -471,7 +470,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -503,7 +502,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -888,12 +887,21 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
|
||||
================================================================
|
||||
=======================================================================
|
||||
====== Pre-compound/De-excitation Physics Parameters ========
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
Type of pre-compound inverse x-section 3
|
||||
Pre-compound model active 1
|
||||
Pre-compound excitation low energy 100 keV
|
||||
Pre-compound excitation high energy 30 MeV
|
||||
Angular generator for pre-compound model 1
|
||||
Use NeverGoBack option for pre-compound model 0
|
||||
Use SoftCutOff option for pre-compound model 0
|
||||
Use CEM transitions for pre-compound model 1
|
||||
Use GNASH transitions for pre-compound model 0
|
||||
Use HETC submodel for pre-compound model 0
|
||||
=======================================================================
|
||||
====== Nuclear De-excitation Module Parameters ========
|
||||
=======================================================================
|
||||
Type of de-excitation inverse x-section 3
|
||||
Type of de-excitation factory Evaporation+GEM
|
||||
Number of de-excitation channels 68
|
||||
@@ -911,4 +919,4 @@ Correlated gamma emission flag 0
|
||||
Max 2J for sampling of angular correlations 10
|
||||
=======================================================================
|
||||
writing Event: 0
|
||||
TimeTotal> 5.254 2.780
|
||||
TimeTotal> 3.700 2.610
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -1746,7 +1746,7 @@ eBrem: for e- XStype:4 SubType=3
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -1778,7 +1778,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -1810,7 +1810,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -1823,7 +1823,6 @@ ionIoni: for GenericIon XStype:3 SubType=2
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
|
||||
Stopping Power data for 17 ion/material pairs
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
@@ -1869,7 +1868,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -1901,7 +1900,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -1933,7 +1932,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -1965,7 +1964,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -1997,7 +1996,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -2029,7 +2028,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -2061,7 +2060,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -2446,12 +2445,21 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
|
||||
================================================================
|
||||
=======================================================================
|
||||
====== Pre-compound/De-excitation Physics Parameters ========
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
Type of pre-compound inverse x-section 3
|
||||
Pre-compound model active 1
|
||||
Pre-compound excitation low energy 100 keV
|
||||
Pre-compound excitation high energy 30 MeV
|
||||
Angular generator for pre-compound model 1
|
||||
Use NeverGoBack option for pre-compound model 0
|
||||
Use SoftCutOff option for pre-compound model 0
|
||||
Use CEM transitions for pre-compound model 1
|
||||
Use GNASH transitions for pre-compound model 0
|
||||
Use HETC submodel for pre-compound model 0
|
||||
=======================================================================
|
||||
====== Nuclear De-excitation Module Parameters ========
|
||||
=======================================================================
|
||||
Type of de-excitation inverse x-section 3
|
||||
Type of de-excitation factory Evaporation+GEM
|
||||
Number of de-excitation channels 68
|
||||
|
||||
@@ -34,11 +34,14 @@ file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
|
||||
# Add the executable, and link it to the Geant4 libraries
|
||||
#
|
||||
add_executable(ICRP110phantoms ICRP110phantoms.cc ${sources} ${headers})
|
||||
add_executable(ICRP110standalone ICRP110standalone.cc ${sources} ${headers})
|
||||
|
||||
target_link_libraries(ICRP110phantoms ${Geant4_LIBRARIES} )
|
||||
target_link_libraries(ICRP110standalone ${Geant4_LIBRARIES} )
|
||||
|
||||
# Depend on data for runtime
|
||||
add_dependencies(ICRP110phantoms ICRPdata)
|
||||
add_dependencies(ICRP110standalone ICRPdata)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Copy all scripts to the build directory, i.e. the directory in which we
|
||||
@@ -46,7 +49,7 @@ add_dependencies(ICRP110phantoms ICRPdata)
|
||||
# relies on these scripts being in the current working directory.
|
||||
#
|
||||
set(ICRPphantoms_SCRIPTS
|
||||
female.in female_head.in female_trunk.in male.in male_head.in male_trunk.in vis.mac primary.mac ColourMap.dat openGLVis.mac g4views/g4_00.g4view g4views/g4_01.g4view
|
||||
female.in female_head.in female_trunk.in male.in male_head.in male_trunk.in vis.mac primary.mac ColourMap.dat openGLVis.mac g4views/g4_00.g4view g4views/g4_01.g4view standalone.mac
|
||||
# ICRPdata/Data.dat
|
||||
# "ICRPdata/ICRP110_g4dat/AF/*.g4dat"
|
||||
# "ICRPdata/ICRP110_g4dat/AM/*.g4dat"
|
||||
@@ -82,9 +85,11 @@ ExternalProject_Add(ICRPdata
|
||||
# (this avoids the need of typing the program name after make)
|
||||
#
|
||||
add_custom_target(ICRPphantoms DEPENDS phantom)
|
||||
add_custom_target(ICRPstandalone DEPENDS phantom)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
|
||||
#
|
||||
install(TARGETS ICRP110phantoms DESTINATION bin)
|
||||
install(TARGETS ICRP110standalone DESTINATION bin)
|
||||
|
||||
|
||||
@@ -4,6 +4,20 @@ 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-03-21 John Allison (ICRP110Phantoms-V11-01-01)
|
||||
- standalone.mac: Disable auto refresh *before* creating scene.
|
||||
- For auto-refresh viewers, without this change the viewer attempts
|
||||
to draw the detector with the default view parameters, and in
|
||||
the case of this phantom, it overwhelms the graphics system.
|
||||
- This phantom should be displayed with special mesh rendering.
|
||||
|
||||
## 2023-01-10 John Allison (ICRP110Phantoms-V11-01-00)
|
||||
- Introduce ICRP110standalone.
|
||||
- "make" builds two executables - ICRP110phantoms and ICRP110standalone.
|
||||
- ICRP110standalone allows you to visualise the phantom without the
|
||||
overhead of the run manager and initialising all the physics tables.
|
||||
Of course, you cannot run or visualise trajectories.
|
||||
|
||||
## 2022-06-02 Susanna Guatelli (ICRP110Phantoms-V11-00-01)
|
||||
- Error reading the first voxels (in x=0, y=0) corrected
|
||||
- Migration to features of C++11/14/17
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -46,7 +46,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -300,7 +302,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -340,7 +342,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -372,7 +374,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -458,7 +460,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -490,7 +492,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -522,7 +524,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -554,7 +556,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -586,7 +588,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
NeutronHP: /Capture file for Z = 6, A = 12 is not found and NeutronHP will use /cvmfs/geant4.cern.ch/share/data/G4NDL4.7/Capture/CrossSection/6_nat_Carbon
|
||||
@@ -604,6 +606,7 @@ NeutronHP: /Elastic file for Z = 6, A = 12 is not found and NeutronHP will use /
|
||||
ProduceFissionFragments ? 0
|
||||
UseWendtFissionModel ? 0
|
||||
UseNRESP71Model ? 0
|
||||
UseDBRC ? 0
|
||||
=======================================================
|
||||
|
||||
@@@ G4ParticleHPInelastic instantiated for particle neutron data directory variable is G4NEUTRONHPDATA pointing to /cvmfs/geant4.cern.ch/share/data/G4NDL4.7/Inelastic
|
||||
@@ -637,7 +640,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -669,7 +672,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
======================================================================
|
||||
@@ -1078,12 +1081,21 @@ Threshold for very long decay time at rest 3.171e+10 y
|
||||
|
||||
================================================================
|
||||
=======================================================================
|
||||
====== Pre-compound/De-excitation Physics Parameters ========
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
Type of pre-compound inverse x-section 3
|
||||
Pre-compound model active 1
|
||||
Pre-compound excitation low energy 100 keV
|
||||
Pre-compound excitation high energy 30 MeV
|
||||
Angular generator for pre-compound model 1
|
||||
Use NeverGoBack option for pre-compound model 0
|
||||
Use SoftCutOff option for pre-compound model 0
|
||||
Use CEM transitions for pre-compound model 1
|
||||
Use GNASH transitions for pre-compound model 0
|
||||
Use HETC submodel for pre-compound model 0
|
||||
=======================================================================
|
||||
====== Nuclear De-excitation Module Parameters ========
|
||||
=======================================================================
|
||||
Type of de-excitation inverse x-section 3
|
||||
Type of de-excitation factory Evaporation+GEM
|
||||
Number of de-excitation channels 68
|
||||
@@ -1146,7 +1158,7 @@ Reading AM_organs.dat
|
||||
Reading OrganMasses.dat
|
||||
NOrganIDs: 142
|
||||
Writing output to ICRP110.out
|
||||
Total energy deposited over all Organs within the Phantom is 1.47643e-09 J
|
||||
Total absorbed dose over all phantom organs is 3.47423e-09 Gy
|
||||
Total energy deposited over all Organs within the Phantom is 1.4709e-09 J
|
||||
Total absorbed dose over all phantom organs is 3.00768e-09 Gy
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file visualization/standalone/standalone.cc
|
||||
/// \brief Main program of the visualization/standalone example
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VisExecutive.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIExecutive.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "ICRP110StandaloneVisAction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
|
||||
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->RegisterRunDurationUserVisAction
|
||||
("ICRP110_HumanPhantoms standalone example",
|
||||
new ICRP110StandaloneVisAction,
|
||||
G4VisExtent(-1*m,1*m,-1*m,1*m,-1*m,1*m));
|
||||
visManager->Initialize ();
|
||||
|
||||
G4UImanager::GetUIpointer()->ApplyCommand ("/control/execute standalone.mac");
|
||||
ui->SessionStart();
|
||||
|
||||
delete ui;
|
||||
delete visManager;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -2,37 +2,31 @@
|
||||
--------------------------------
|
||||
OrganID Edep (J) Dose (Gy)
|
||||
--------------------------------
|
||||
4 | 2.83284e-12 9.97129e-11
|
||||
9 | 3.24562e-13 3.81838e-10
|
||||
26 | 3.64795e-10 6.48122e-10
|
||||
27 | 2.54909e-10 5.65134e-10
|
||||
40 | 2.88523e-15 3.90424e-14
|
||||
47 | 5.95845e-12 5.7894e-11
|
||||
48 | 2.25479e-12 3.06566e-11
|
||||
61 | 5.45841e-10 3.76442e-10
|
||||
69 | 3.38154e-20 4.61329e-18
|
||||
102 | 1.872e-20 3.13043e-18
|
||||
106 | 8.40322e-11 6.90027e-11
|
||||
116 | 1.40393e-10 1.33897e-10
|
||||
120 | 1.98869e-11 4.68036e-10
|
||||
121 | 2.25296e-11 5.30234e-10
|
||||
122 | 3.23132e-11 1.10912e-10
|
||||
141 | 3.57028e-13 2.31386e-12
|
||||
4 | 1.02241e-12 3.59875e-11
|
||||
26 | 3.57659e-10 6.35443e-10
|
||||
27 | 2.69866e-10 5.98293e-10
|
||||
39 | 5.73388e-13 7.53269e-12
|
||||
40 | 7.39457e-13 1.00062e-11
|
||||
47 | 5.37409e-15 5.22162e-14
|
||||
61 | 5.27772e-10 3.63981e-10
|
||||
106 | 6.89286e-11 5.66005e-11
|
||||
116 | 1.62874e-10 1.55339e-10
|
||||
120 | 1.77526e-11 4.17807e-10
|
||||
121 | 2.52684e-11 5.9469e-10
|
||||
122 | 3.84415e-11 1.31947e-10
|
||||
141 | 3.10958e-20 2.01528e-19
|
||||
----------------------------------------------------------------------------
|
||||
-------------------------------ORGAN INFO-----------------------------------
|
||||
-----------------(of organs where edep/dose was recorded)-------------------
|
||||
----------------------------------------------------------------------------
|
||||
ID Organ Name Material ID Density (g/cm^3)
|
||||
4 Posterior nasal passage down to larynx (ET2) 45 1.030
|
||||
9 Blood vessels, head 28 1.060
|
||||
26 Cranium, cortical 2 1.920
|
||||
27 Cranium, spongiosa 8 1.157
|
||||
39 Mandible, cortical 2 1.920
|
||||
40 Mandible, spongiosa 13 1.228
|
||||
47 Cervical spine, cortical 2 1.920
|
||||
48 Cervical spine, spongiosa 17 1.050
|
||||
61 Brain 32 1.050
|
||||
69 Eye bulb, right 34 1.050
|
||||
102 Lymphatic nodes, head 47 1.030
|
||||
106 Muscle, head 29 1.050
|
||||
116 Residual tissue, head 49 0.950
|
||||
120 Salivary glands, left 45 1.030
|
||||
@@ -40,8 +34,8 @@ ID Organ Name Material ID Density (g/cm^3)
|
||||
122 Skin, head 27 1.090
|
||||
141 Phantom Top/Bottom Skin Layer
|
||||
|
||||
Total Edep over all organs = 1.47643e-09 J
|
||||
Total dose absorbed over all organs = 3.47423e-09 Gy
|
||||
Total Edep over all organs = 1.4709e-09 J
|
||||
Total dose absorbed over all organs = 3.00768e-09 Gy
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
----------------ORGAN ENERGY DEPOSITIONS AND ABSORBED DOSE------------------
|
||||
@@ -50,16 +44,16 @@ Total dose absorbed over all organs = 3.47423e-09 Gy
|
||||
----------------------------------------------------------------------------
|
||||
OrganID Edep (J) Dose (Gy)
|
||||
-------------------------------
|
||||
0 | 1.57913e-11 0
|
||||
0 | 1.18105e-11 0
|
||||
1 | 0 0
|
||||
2 | 0 0
|
||||
3 | 0 0
|
||||
4 | 2.83284e-12 9.97129e-11
|
||||
4 | 1.02241e-12 3.59875e-11
|
||||
5 | 0 0
|
||||
6 | 0 0
|
||||
7 | 0 0
|
||||
8 | 0 0
|
||||
9 | 3.24562e-13 3.81838e-10
|
||||
9 | 0 0
|
||||
10 | 0 0
|
||||
11 | 0 0
|
||||
12 | 0 0
|
||||
@@ -76,8 +70,8 @@ OrganID Edep (J) Dose (Gy)
|
||||
23 | 0 0
|
||||
24 | 0 0
|
||||
25 | 0 0
|
||||
26 | 3.64795e-10 6.48122e-10
|
||||
27 | 2.54909e-10 5.65134e-10
|
||||
26 | 3.57659e-10 6.35443e-10
|
||||
27 | 2.69866e-10 5.98293e-10
|
||||
28 | 0 0
|
||||
29 | 0 0
|
||||
30 | 0 0
|
||||
@@ -89,16 +83,16 @@ OrganID Edep (J) Dose (Gy)
|
||||
36 | 0 0
|
||||
37 | 0 0
|
||||
38 | 0 0
|
||||
39 | 0 0
|
||||
40 | 2.88523e-15 3.90424e-14
|
||||
39 | 5.73388e-13 7.53269e-12
|
||||
40 | 7.39457e-13 1.00062e-11
|
||||
41 | 0 0
|
||||
42 | 0 0
|
||||
43 | 0 0
|
||||
44 | 0 0
|
||||
45 | 0 0
|
||||
46 | 0 0
|
||||
47 | 5.95845e-12 5.7894e-11
|
||||
48 | 2.25479e-12 3.06566e-11
|
||||
47 | 5.37409e-15 5.22162e-14
|
||||
48 | 0 0
|
||||
49 | 0 0
|
||||
50 | 0 0
|
||||
51 | 0 0
|
||||
@@ -111,7 +105,7 @@ OrganID Edep (J) Dose (Gy)
|
||||
58 | 0 0
|
||||
59 | 0 0
|
||||
60 | 0 0
|
||||
61 | 5.45841e-10 3.76442e-10
|
||||
61 | 5.27772e-10 3.63981e-10
|
||||
62 | 0 0
|
||||
63 | 0 0
|
||||
64 | 0 0
|
||||
@@ -119,7 +113,7 @@ OrganID Edep (J) Dose (Gy)
|
||||
66 | 0 0
|
||||
67 | 0 0
|
||||
68 | 0 0
|
||||
69 | 3.38154e-20 4.61329e-18
|
||||
69 | 0 0
|
||||
70 | 0 0
|
||||
71 | 0 0
|
||||
72 | 0 0
|
||||
@@ -152,11 +146,11 @@ OrganID Edep (J) Dose (Gy)
|
||||
99 | 0 0
|
||||
100 | 0 0
|
||||
101 | 0 0
|
||||
102 | 1.872e-20 3.13043e-18
|
||||
102 | 0 0
|
||||
103 | 0 0
|
||||
104 | 0 0
|
||||
105 | 0 0
|
||||
106 | 8.40322e-11 6.90027e-11
|
||||
106 | 6.89286e-11 5.66005e-11
|
||||
107 | 0 0
|
||||
108 | 0 0
|
||||
109 | 0 0
|
||||
@@ -166,13 +160,13 @@ OrganID Edep (J) Dose (Gy)
|
||||
113 | 0 0
|
||||
114 | 0 0
|
||||
115 | 0 0
|
||||
116 | 1.40393e-10 1.33897e-10
|
||||
116 | 1.62874e-10 1.55339e-10
|
||||
117 | 0 0
|
||||
118 | 0 0
|
||||
119 | 0 0
|
||||
120 | 1.98869e-11 4.68036e-10
|
||||
121 | 2.25296e-11 5.30234e-10
|
||||
122 | 3.23132e-11 1.10912e-10
|
||||
120 | 1.77526e-11 4.17807e-10
|
||||
121 | 2.52684e-11 5.9469e-10
|
||||
122 | 3.84415e-11 1.31947e-10
|
||||
123 | 0 0
|
||||
124 | 0 0
|
||||
125 | 0 0
|
||||
@@ -190,7 +184,7 @@ OrganID Edep (J) Dose (Gy)
|
||||
137 | 0 0
|
||||
138 | 0 0
|
||||
139 | 0 0
|
||||
140 | 2.72307e-14 1.36153e-10
|
||||
141 | 3.57028e-13 2.31386e-12
|
||||
Total energy depositied over all organs = 1.47643e-09 J
|
||||
Total absorbed dose over all organs = 3.47423e-09 Gy
|
||||
140 | 3.21175e-14 1.60588e-10
|
||||
141 | 3.10958e-20 2.01528e-19
|
||||
Total energy depositied over all organs = 1.4709e-09 J
|
||||
Total absorbed dose over all organs = 3.00768e-09 Gy
|
||||
|
||||
@@ -155,17 +155,23 @@ The AF human phantom is voxelised in x,y,z with 299 x 137 x 348 voxels with dime
|
||||
|
||||
- Compile and link to generate the executable (in your CMAKE build directory):
|
||||
% make
|
||||
This should make two executables - ICRP110phantoms and ICRP110standalone.
|
||||
|
||||
- Execute the application in 'interactive' mode with visualization:
|
||||
% ./ICRP110phantoms
|
||||
|
||||
- Execute the "standalone" application in 'interactive' mode with visualization:
|
||||
% ./ICRP110standalone
|
||||
This allows you to visualise the phantom without the overhead of the run manager and initialising all the physics tables.
|
||||
Of course, you cannot run or visualise trajectories.
|
||||
|
||||
- Execute the application in 'batch' mode from macro files:
|
||||
% ./ICRP110phantoms female_head.in
|
||||
|
||||
-----------------------------
|
||||
AVAILABLE MACRO FILES
|
||||
-----------------------------
|
||||
For the users convinience, macro files have been created which are designed to construct partial head
|
||||
For the users convenience, macro files have been created which are designed to construct partial head
|
||||
and trunk phantoms for both the male and female models. These macro files can be called upon in batch
|
||||
mode when executing the application as specified above. If the user wishes to construct a completed/full
|
||||
male or female phantom, the macros male.in and female.in can be called upon, respectively.
|
||||
@@ -178,7 +184,7 @@ male or female phantom, the macros male.in and female.in can be called upon, res
|
||||
'ICRPdata/FemaleData.dat' if the user wishes to create their own custom partial phantom section.
|
||||
- openGLVis.mac : macro for visualisation with openGL.
|
||||
- vis.mac (default) : Executed by default when the simulation is run in 'interactive' mode.
|
||||
- primary.mac : Contains the definition of the primary radiation field.
|
||||
- primary.mac : Contains the definition of the primary radiation field.
|
||||
|
||||
At the very top of the various '.in' macro files (pre-initialization), there are a series of commands
|
||||
which define the sex and section of the phantom to create. These commands are listed below:
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file visualization/standalone/include/ICRP110StandaloneVisAction.hh
|
||||
/// \brief Definition of the ICRP110StandaloneVisAction class
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef ICRP110STANDALONEVISACTION_HH
|
||||
#define ICRP110STANDALONEVISACTION_HH
|
||||
|
||||
#include "G4VUserVisAction.hh"
|
||||
|
||||
class ICRP110PhantomConstruction;
|
||||
|
||||
class ICRP110StandaloneVisAction: public G4VUserVisAction {
|
||||
public:
|
||||
ICRP110StandaloneVisAction();
|
||||
private:
|
||||
void Draw() override;
|
||||
ICRP110PhantomConstruction* fICRP110PhantomConstruction = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file visualization/standalone/src/StandaloneVisAction.cc
|
||||
/// \brief Implementation of the StandaloneVisAction class
|
||||
//
|
||||
//
|
||||
|
||||
#include "ICRP110StandaloneVisAction.hh"
|
||||
|
||||
#include "ICRP110PhantomConstruction.hh"
|
||||
#include "ICRP110PhantomMessenger.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ICRP110StandaloneVisAction::ICRP110StandaloneVisAction()
|
||||
{
|
||||
fICRP110PhantomConstruction = new ICRP110PhantomConstruction;
|
||||
new ICRP110PhantomMessenger(fICRP110PhantomConstruction);
|
||||
// Don't instantiate the detector here - give time for /phantom/ commands.
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void ICRP110StandaloneVisAction::Draw() {
|
||||
// Instantiate the detector "just in time" *after* possible /phantom/ commands.
|
||||
// Instantiatie as "static" so that it is instantiated only once.
|
||||
static auto theWorld = fICRP110PhantomConstruction->Construct();
|
||||
G4VVisManager* pVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if (pVisManager) {
|
||||
pVisManager->DrawGeometry(theWorld);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -0,0 +1,34 @@
|
||||
/control/verbose 2
|
||||
/phantom/setPhantomSection full
|
||||
|
||||
/vis/open OGL
|
||||
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
/vis/viewer/set/autoRefresh false
|
||||
/vis/verbose errors
|
||||
|
||||
# The above creates a scene handler and a viewer but needs a scene.
|
||||
# (Normally this would be /vis/drawVolume but we need to specialise.)
|
||||
/vis/scene/create
|
||||
/vis/scene/add/userAction
|
||||
/vis/scene/add/axes
|
||||
/vis/scene/add/scale
|
||||
/vis/sceneHandler/attach
|
||||
|
||||
# View parameters
|
||||
/vis/viewer/set/specialMeshRendering
|
||||
/vis/viewer/set/hiddenMarker true
|
||||
/vis/viewer/set/rotationStyle freeRotation
|
||||
/vis/viewer/set/viewpointVector -0.47 -0.88 0.069
|
||||
/vis/viewer/set/upVector 0.83 -0.42 0.37
|
||||
/vis/viewer/zoomTo 3.4
|
||||
|
||||
# Re-establish auto refreshing and verbosity:
|
||||
/vis/viewer/set/autoRefresh true
|
||||
/vis/verbose warnings
|
||||
# Try "/vis/viewer/interpolate g4views 1000 0", which runs a cutaway
|
||||
# plane through the phantom.
|
||||
# (See examples/extended/visualization/movies for how to create view
|
||||
# files for interpolation.)
|
||||
|
||||
@@ -99,7 +99,8 @@
|
||||
#
|
||||
# For file-based drivers, use this to create an empty detector view:
|
||||
#/vis/viewer/flush
|
||||
#Define the primary particles
|
||||
#
|
||||
# Define the primary particles
|
||||
/control/execute primary.mac
|
||||
#
|
||||
# Try "/vis/viewer/interpolate g4views 1000 0", which runs a cutaway
|
||||
|
||||
@@ -34,10 +34,14 @@ file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
|
||||
# Add the executable, and link it to the Geant4 libraries
|
||||
#
|
||||
add_executable(ICRP145phantoms ICRP145phantoms.cc ${sources} ${headers})
|
||||
add_executable(ICRP145standalone ICRP145standalone.cc ${sources} ${headers})
|
||||
|
||||
target_link_libraries(ICRP145phantoms ${Geant4_LIBRARIES})
|
||||
target_link_libraries(ICRP145standalone ${Geant4_LIBRARIES} )
|
||||
|
||||
# Depend on data for runtime
|
||||
add_dependencies(ICRP145phantoms ICRP145data)
|
||||
add_dependencies(ICRP145standalone ICRP145data)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Copy all scripts to the build directory. This is so that we can run the
|
||||
@@ -49,6 +53,7 @@ set(EXTERNAL_SCRIPTS
|
||||
init_vis.mac
|
||||
source.mac
|
||||
vis.mac
|
||||
standalone.mac
|
||||
)
|
||||
|
||||
foreach(_script ${EXTERNAL_SCRIPTS})
|
||||
@@ -73,3 +78,4 @@ ExternalProject_Add(ICRP145data
|
||||
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
|
||||
#
|
||||
install(TARGETS ICRP145phantoms DESTINATION bin)
|
||||
install(TARGETS ICRP145standalone DESTINATION bin)
|
||||
|
||||
@@ -5,6 +5,22 @@ 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-04-08 Susanna Guatelli (ICRP145Phantoms-V11-01-02)
|
||||
- Code revision in the TETRun class
|
||||
|
||||
## 2023-03-21 John Allison (ICRP145Phantoms-V11-01-01)
|
||||
- standalone.mac: Disable auto refresh *before* creating scene.
|
||||
- For auto-refresh viewers, without this change the viewer attempts
|
||||
to draw the detector with the default view parameters, and in
|
||||
the case of this phantom, it overwhelms the graphics system.
|
||||
- This phantom should be displayed with special mesh rendering.
|
||||
|
||||
## 2023-03-19 John Allison (ICRP145Phantoms-V11-01-00)
|
||||
- Introduce ICRP145standalone.
|
||||
- "make" builds two executables - ICRP145phantoms and ICRP145standalone.
|
||||
- ICRP145standalone allows you to visualise the phantom without the
|
||||
overhead of the run manager and physics tables and geometry
|
||||
initialisation. Of course, you cannot run or visualise trajectories.
|
||||
|
||||
## 2022-10-04 Gabriele Cosmo (ICRP145Phantoms-V11-00-03)
|
||||
- Fixed compilation warnings on Intel-icx compiler for set but unused variable
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -249,7 +249,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -436,7 +438,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100.000000 MeV to 100.000000 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin=100.000000 MeV Emax=100.000000 TeV
|
||||
|
||||
@@ -476,7 +478,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100.000000 MeV to 100.000000 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin=100.000000 MeV Emax=100.000000 TeV
|
||||
|
||||
@@ -508,7 +510,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100.000000 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin=0.000000 eV Emax=100.000000 TeV
|
||||
|
||||
@@ -594,7 +596,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100.000000 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin=0.000000 eV Emax=100.000000 TeV
|
||||
|
||||
@@ -626,7 +628,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100.000000 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin=0.000000 eV Emax=100.000000 TeV
|
||||
|
||||
@@ -658,7 +660,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin=0.000000 eV Emax=100.000000 TeV
|
||||
|
||||
@@ -690,7 +692,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100.000000 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin=0.000000 eV Emax=100.000000 TeV
|
||||
|
||||
@@ -722,7 +724,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin=0.000000 eV Emax=100.000000 TeV
|
||||
NeutronHP: /Capture file for Z = 6, A = 12 is not found and NeutronHP will use /cvmfs/geant4.cern.ch/share/data/G4NDL4.7/Capture/CrossSection/6_nat_Carbon
|
||||
@@ -740,6 +742,7 @@ NeutronHP: /Elastic file for Z = 6, A = 12 is not found and NeutronHP will use /
|
||||
ProduceFissionFragments ? 0
|
||||
UseWendtFissionModel ? 0
|
||||
UseNRESP71Model ? 0
|
||||
UseDBRC ? 0
|
||||
=======================================================
|
||||
|
||||
@@@ G4ParticleHPInelastic instantiated for particle neutron data directory variable is G4NEUTRONHPDATA pointing to /cvmfs/geant4.cern.ch/share/data/G4NDL4.7/Inelastic
|
||||
@@ -773,7 +776,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100.000000 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin=0.000000 eV Emax=100.000000 TeV
|
||||
|
||||
@@ -805,7 +808,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin=0.000000 eV Emax=100.000000 TeV
|
||||
======================================================================
|
||||
@@ -1214,12 +1217,21 @@ Threshold for very long decay time at rest 31709791983.76459 y
|
||||
|
||||
================================================================
|
||||
=======================================================================
|
||||
====== Pre-compound/De-excitation Physics Parameters ========
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
Type of pre-compound inverse x-section 3
|
||||
Pre-compound model active 1
|
||||
Pre-compound excitation low energy 100.00000 keV
|
||||
Pre-compound excitation high energy 30.00000 MeV
|
||||
Angular generator for pre-compound model 1
|
||||
Use NeverGoBack option for pre-compound model 0
|
||||
Use SoftCutOff option for pre-compound model 0
|
||||
Use CEM transitions for pre-compound model 1
|
||||
Use GNASH transitions for pre-compound model 0
|
||||
Use HETC submodel for pre-compound model 0
|
||||
=======================================================================
|
||||
====== Nuclear De-excitation Module Parameters ========
|
||||
=======================================================================
|
||||
Type of de-excitation inverse x-section 3
|
||||
Type of de-excitation factory Evaporation+GEM
|
||||
Number of de-excitation channels 68
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file visualization/standalone/standalone.cc
|
||||
/// \brief Main program of the visualization/standalone example
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VisExecutive.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIExecutive.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "ICRP145StandaloneVisAction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
|
||||
|
||||
// sex: male/female: false/true
|
||||
G4bool female = false;
|
||||
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->RegisterRunDurationUserVisAction
|
||||
("ICRP145_HumanPhantoms standalone example",
|
||||
new ICRP145StandaloneVisAction(female,ui),
|
||||
G4VisExtent(-1*m,1*m,-1*m,1*m,-1*m,1*m));
|
||||
visManager->Initialize ();
|
||||
|
||||
G4UImanager::GetUIpointer()->ApplyCommand ("/control/execute standalone.mac");
|
||||
ui->SessionStart();
|
||||
|
||||
delete ui;
|
||||
delete visManager;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -40,6 +40,7 @@ e-mail inquiries to: haeginh@hanyang.ac.kr, susanna@uow.edu.au, MRCP.ICRP@gmail.
|
||||
% cd example_build
|
||||
% cmake ..
|
||||
% make
|
||||
This should make two executables - ICRP145phantoms and ICRP145standalone.
|
||||
|
||||
2) How to run
|
||||
|
||||
@@ -78,14 +79,25 @@ e-mail inquiries to: haeginh@hanyang.ac.kr, susanna@uow.edu.au, MRCP.ICRP@gmail.
|
||||
*** source organ can be defined by using -i option.
|
||||
*** source particle and the particle energy can be specified
|
||||
in source.mac file by using macro commands for G4ParticlGun (/gun/)
|
||||
c) Notes
|
||||
|
||||
c) To see the phantom alone:
|
||||
|
||||
% ./ICRP145standalone
|
||||
|
||||
This allows you to visualise the phantom without the overhead of
|
||||
the run manager and physics tables and geometry initialisation.
|
||||
Of course, you cannot run or visualise trajectories.
|
||||
|
||||
d) Notes
|
||||
|
||||
- Regarding the interactive mode with visualisation:
|
||||
|
||||
* you can run the codes in interactive mode with visualisation by
|
||||
omitting -m option.
|
||||
* the memory required for the visualisation is ~35 GB when the code is
|
||||
run on a single thread. (it is less than 10 GB in batch mode)
|
||||
* with "special mesh rendering" (see vis.mac) the memory required
|
||||
for the visualisation about 1.5 GB (without, it's ~35 GB!).
|
||||
* original data takes about 3 GB, physics tables and geometry
|
||||
voxelisation consume about 5 GB, so a typical app is about 10 GB.
|
||||
* in interactive mode, user should start a run by using
|
||||
/run/beamOn command. (Idle> /run/beamOn [number of events])
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file visualization/standalone/include/ICRP145StandaloneVisAction.hh
|
||||
/// \brief Definition of the ICRP145StandaloneVisAction class
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef ICRP145STANDALONEVISACTION_HH
|
||||
#define ICRP145STANDALONEVISACTION_HH
|
||||
|
||||
#include "G4VUserVisAction.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4UIExecutive;
|
||||
class TETDetectorConstruction;
|
||||
|
||||
class ICRP145StandaloneVisAction: public G4VUserVisAction {
|
||||
public:
|
||||
// sex: male/female: false/true
|
||||
ICRP145StandaloneVisAction(G4bool sex, G4UIExecutive* ui);
|
||||
private:
|
||||
void Draw() override;
|
||||
TETDetectorConstruction* fTETDetectorConstruction = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -64,5 +64,6 @@ public:
|
||||
|
||||
private:
|
||||
EDEPMAP fEdepMap;
|
||||
G4int fCollID;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file visualization/standalone/src/StandaloneVisAction.cc
|
||||
/// \brief Implementation of the StandaloneVisAction class
|
||||
//
|
||||
//
|
||||
|
||||
#include "ICRP145StandaloneVisAction.hh"
|
||||
|
||||
#include "TETDetectorConstruction.hh"
|
||||
#include "TETModelImport.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ICRP145StandaloneVisAction::ICRP145StandaloneVisAction(G4bool sex, G4UIExecutive* ui)
|
||||
{
|
||||
auto pTETModelImport = new TETModelImport(sex, ui);
|
||||
fTETDetectorConstruction = new TETDetectorConstruction(pTETModelImport);
|
||||
// Don't instantiate the detector here - give time for /phantom/ commands.
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void ICRP145StandaloneVisAction::Draw() {
|
||||
// Instantiate the detector "just in time" *after* possible /phantom/ commands.
|
||||
// Instantiatie as "static" so that it is instantiated only once.
|
||||
static auto theWorld = fTETDetectorConstruction->Construct();
|
||||
G4VVisManager* pVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if (pVisManager) {
|
||||
pVisManager->DrawGeometry(theWorld);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "TETRun.hh"
|
||||
|
||||
TETRun::TETRun()
|
||||
:G4Run()
|
||||
:G4Run(), fCollID(-1)
|
||||
{}
|
||||
|
||||
TETRun::~TETRun()
|
||||
@@ -43,19 +43,17 @@ TETRun::~TETRun()
|
||||
|
||||
void TETRun::RecordEvent(const G4Event* event)
|
||||
{
|
||||
auto fCollID
|
||||
= G4SDManager::GetSDMpointer()->GetCollectionID("PhantomSD/eDep");
|
||||
if(fCollID<0)
|
||||
fCollID = G4SDManager::GetSDMpointer()->GetCollectionID("PhantomSD/eDep");
|
||||
|
||||
// Hits collections
|
||||
//
|
||||
G4HCofThisEvent* HCE = event->GetHCofThisEvent();
|
||||
if(!HCE) return;
|
||||
|
||||
//G4THitsMap<G4double>* evtMap =
|
||||
// static_cast<G4THitsMap<G4double>*>(HCE->GetHC(fCollID));
|
||||
auto* evtMap = static_cast<G4THitsMap<G4double>*>(HCE->GetHC(fCollID));
|
||||
// sum up the energy deposition and the square of it
|
||||
for (auto itr : *evtMap->GetMap()) {
|
||||
// Hits collections
|
||||
//
|
||||
G4HCofThisEvent* HCE = event->GetHCofThisEvent();
|
||||
if(!HCE) return;
|
||||
|
||||
auto* evtMap = static_cast<G4THitsMap<G4double>*>(HCE->GetHC(fCollID));
|
||||
// sum up the energy deposition and the square of it
|
||||
for (auto itr : *evtMap->GetMap()) {
|
||||
fEdepMap[itr.first].first += *itr.second; //sum
|
||||
fEdepMap[itr.first].second += (*itr.second) * (*itr.second); //sum square
|
||||
}
|
||||
@@ -71,7 +69,7 @@ void TETRun::Merge(const G4Run* run)
|
||||
fEdepMap[itr.first].second += itr.second.second;
|
||||
}
|
||||
|
||||
G4Run::Merge(run);
|
||||
G4Run::Merge(run);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/control/verbose 2
|
||||
|
||||
/vis/open OGL
|
||||
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
/vis/viewer/set/autoRefresh false
|
||||
/vis/verbose errors
|
||||
|
||||
# The above creates a scene handler and a viewer but needs a scene.
|
||||
# (Normally this would be /vis/drawVolume but we need to specialise.)
|
||||
/vis/scene/create
|
||||
/vis/scene/add/userAction
|
||||
/vis/sceneHandler/attach
|
||||
|
||||
# Decorations
|
||||
# Axes, scale, etc.
|
||||
/vis/scene/add/scale # Simple scale line
|
||||
/vis/scene/add/axes 50 0 -60 20 cm # Simple axes: x=red, y=green, z=blue.
|
||||
/vis/scene/add/eventID # Drawn at end of event
|
||||
/vis/scene/add/date # Date stamp
|
||||
#
|
||||
# Frame
|
||||
/vis/set/colour red
|
||||
/vis/set/lineWidth 2
|
||||
/vis/scene/add/frame # Simple frame around the view
|
||||
#/vis/set/colour # Revert to default colour (white)
|
||||
/vis/set/lineWidth # Revert to default line width (1.)
|
||||
|
||||
# To get nice view
|
||||
# Make the "World" box invisible
|
||||
/vis/geometry/set/visibility worldLogical 0 false
|
||||
/vis/geometry/set/visibility phantomLogical 0 false
|
||||
|
||||
# View parameters
|
||||
/vis/viewer/set/specialMeshRendering
|
||||
/vis/viewer/set/specialMeshRenderingOption surfaces
|
||||
/vis/viewer/set/style surface
|
||||
/vis/viewer/set/hiddenMarker true
|
||||
/vis/viewer/set/background 1 1 1 1
|
||||
#
|
||||
# Specify view angle:
|
||||
/vis/viewer/set/upVector 0 0 1
|
||||
/vis/viewer/set/lightsVector -1 0 0
|
||||
/vis/viewer/zoomTo 2
|
||||
#/vis/viewer/set/viewpointVector -0.5 -1 0.3
|
||||
/vis/viewer/set/viewpointVector 0 -1 0
|
||||
/vis/viewer/set/targetPoint 0 0 0 mm
|
||||
#
|
||||
# Re-establish auto refreshing and verbosity:
|
||||
/vis/viewer/set/autoRefresh true
|
||||
/vis/verbose warnings
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -539,10 +539,22 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
... create file : SolidTargetCyclotron.root - done
|
||||
... open analysis file : SolidTargetCyclotron.root - done
|
||||
... open analysis file : SolidTargetCyclotron.root - done
|
||||
|
||||
-------- WWWW ------- G4Exception-START -------- WWWW -------
|
||||
*** G4Exception : had012
|
||||
issued by : G4HadronicProcess:CheckResult()
|
||||
Warning: Bad energy non-conservation detected, will re-sample the interaction
|
||||
Process / Model: protonInelastic / ParticleHPInelastic
|
||||
Primary: proton (2212), E= 949.004, target nucleus (78, 195)
|
||||
E(initial - final) = -360327 MeV.
|
||||
|
||||
*** This is just a warning message. ***
|
||||
-------- WWWW -------- G4Exception-END --------- WWWW -------
|
||||
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10
|
||||
User=21.280000s Real=21.426749s Sys=0.000000s
|
||||
User=20.430000s Real=20.615740s Sys=0.000000s
|
||||
... write file : SolidTargetCyclotron.root - done
|
||||
... close file : SolidTargetCyclotron.root - done
|
||||
G4 kernel has come to Quit state.
|
||||
@@ -558,24 +570,24 @@ G4SDManager deleted.
|
||||
EventManager deleted.
|
||||
Units table cleared.
|
||||
TransportationManager deleted.
|
||||
Total navigation history collections cleaned: 11
|
||||
Total navigation history collections cleaned: 10
|
||||
G4RNGHelper object is deleted.
|
||||
================== Deleting memory pools ===================
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0154 MB
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0135 MB
|
||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.396 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.484 MB
|
||||
Pool ID '16G4SmartVoxelNode', size : 0.00192 MB
|
||||
Pool ID '17G4SmartVoxelProxy', size : 0.000961 MB
|
||||
Pool ID '7G4Event', size : 0.000961 MB
|
||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||
Pool ID '17G4PrimaryParticle', size : 0.258 MB
|
||||
Pool ID '7G4Track', size : 0.792 MB
|
||||
Pool ID '7G4Track', size : 0.968 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.000961 MB
|
||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||
Pool ID '17G4ReactionProduct', size : 0.00192 MB
|
||||
Pool ID '10G4Fragment', size : 0.000961 MB
|
||||
Number of memory pools allocated: 13 of which, static: 0
|
||||
Dynamic pools deleted: 13 / Total memory freed: 1.5 MB
|
||||
Dynamic pools deleted: 13 / Total memory freed: 1.7 MB
|
||||
============================================================
|
||||
G4Allocator objects are deleted.
|
||||
UImanager deleted.
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -106,7 +106,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -311,7 +313,7 @@ eBrem: for e- XStype:4 SubType=3
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -343,7 +345,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -375,7 +377,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -388,7 +390,6 @@ ionIoni: for GenericIon XStype:3 SubType=2
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
|
||||
Stopping Power data for 17 ion/material pairs
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
@@ -434,7 +435,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -466,7 +467,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -498,7 +499,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -530,7 +531,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -562,7 +563,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -594,7 +595,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -626,7 +627,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -698,8 +699,8 @@ See commands in /vis/modeling/trajectories/ for other options.
|
||||
ooo Run 0 starts (global).
|
||||
|
||||
--------- Ranlux engine status ---------
|
||||
Initial seed = 1686681308
|
||||
float_seed_table[] = 0.24429 0.19203 0.930385 0.579489 0.677383 0.853754 0.255059 0.124678 0.0119871 0.792396 0.137899 0.0594917 0.697128 0.895791 0.221125 0.205631 0.122251 0.805305 0.524881 0.656697 0.105557 0.780275 0.101231 0.763505
|
||||
Initial seed = 1687915079
|
||||
float_seed_table[] = 0.813233 0.868755 0.525554 0.630249 0.949336 0.741437 0.0196044 0.551251 0.788266 0.679422 0.587881 0.560283 0.230776 0.328666 0.33805 0.853895 0.901859 0.0414808 0.955325 0.413566 0.61962 0.565286 0.371511 0.667219
|
||||
i_lag = 23, j_lag = 9
|
||||
carry = 0, count24 = 0
|
||||
luxury = 3 nskip = 199
|
||||
@@ -710,7 +711,7 @@ mu- Mono Plane
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100
|
||||
User=2.430000s Real=2.438739s Sys=0.000000s
|
||||
User=2.000000s Real=2.013808s Sys=0.010000s
|
||||
### Run 0 (global) ended.
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
@@ -743,7 +744,7 @@ Pool ID '16G4HitsCollection', size : 0.000961 MB
|
||||
Pool ID '7G4Track', size : 0.05 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.000961 MB
|
||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||
Pool ID '15UltraOpticalHit', size : 0.00385 MB
|
||||
Pool ID '15UltraOpticalHit', size : 0.00481 MB
|
||||
Number of memory pools allocated: 14 of which, static: 0
|
||||
Dynamic pools deleted: 14 / Total memory freed: 0.1 MB
|
||||
============================================================
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -187,7 +187,7 @@ N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10000
|
||||
User=6.530000s Real=6.580281s Sys=0.000000s
|
||||
User=5.930000s Real=5.952257s Sys=0.000000s
|
||||
|
||||
-------------------------------------------------------------
|
||||
---> The calorimeter is 9 Modules
|
||||
@@ -210,107 +210,107 @@ Run Summary
|
||||
|
||||
total Energy (rms/mean) visible Energy (rms/mean)
|
||||
|
||||
layer 1: 1.5564 MeV +- 2.687 MeV (1.7e+02 %) 163.84 keV +- 930.6 keV (5.7e+02 %)
|
||||
layer 2: 1.5443 MeV +- 2.8 MeV (1.8e+02 %) 152.71 keV +- 755.6 keV (4.9e+02 %)
|
||||
layer 3: 1.5492 MeV +- 2.225 MeV (1.4e+02 %) 167.34 keV +- 838.8 keV (5e+02 %)
|
||||
layer 4: 1.5271 MeV +- 2.22 MeV (1.5e+02 %) 157.91 keV +- 915.3 keV (5.8e+02 %)
|
||||
layer 5: 1.5234 MeV +- 2.301 MeV (1.5e+02 %) 156.6 keV +- 495.6 keV (3.2e+02 %)
|
||||
layer 6: 1.545 MeV +- 2.417 MeV (1.6e+02 %) 162.72 keV +- 823.1 keV (5.1e+02 %)
|
||||
layer 7: 1.5432 MeV +- 2.461 MeV (1.6e+02 %) 177.09 keV +- 1.213 MeV (6.9e+02 %)
|
||||
layer 8: 1.5418 MeV +- 2.494 MeV (1.6e+02 %) 148.02 keV +- 297.7 keV (2e+02 %)
|
||||
layer 9: 1.511 MeV +- 2.303 MeV (1.5e+02 %) 161.26 keV +- 873.6 keV (5.4e+02 %)
|
||||
layer 10: 1.5273 MeV +- 2.369 MeV (1.6e+02 %) 147.78 keV +- 350.7 keV (2.4e+02 %)
|
||||
layer 11: 1.5422 MeV +- 2.68 MeV (1.7e+02 %) 169.53 keV +- 1.314 MeV (7.7e+02 %)
|
||||
layer 12: 1.4978 MeV +- 2.098 MeV (1.4e+02 %) 151.89 keV +- 375.4 keV (2.5e+02 %)
|
||||
layer 13: 1.5257 MeV +- 2.119 MeV (1.4e+02 %) 154.54 keV +- 423.2 keV (2.7e+02 %)
|
||||
layer 14: 1.5421 MeV +- 2.546 MeV (1.7e+02 %) 162.65 keV +- 836.2 keV (5.1e+02 %)
|
||||
layer 15: 1.5218 MeV +- 2.251 MeV (1.5e+02 %) 157.32 keV +- 637 keV (4e+02 %)
|
||||
layer 16: 1.5749 MeV +- 2.783 MeV (1.8e+02 %) 173.21 keV +- 872.6 keV (5e+02 %)
|
||||
layer 17: 1.5075 MeV +- 1.961 MeV (1.3e+02 %) 149.84 keV +- 390.3 keV (2.6e+02 %)
|
||||
layer 18: 1.5331 MeV +- 2.316 MeV (1.5e+02 %) 155.99 keV +- 739 keV (4.7e+02 %)
|
||||
layer 19: 1.5089 MeV +- 2.008 MeV (1.3e+02 %) 153.51 keV +- 396.3 keV (2.6e+02 %)
|
||||
layer 20: 1.5616 MeV +- 3.018 MeV (1.9e+02 %) 171.76 keV +- 1.076 MeV (6.3e+02 %)
|
||||
layer 21: 1.5773 MeV +- 2.614 MeV (1.7e+02 %) 165.16 keV +- 686.3 keV (4.2e+02 %)
|
||||
layer 22: 1.5263 MeV +- 2.17 MeV (1.4e+02 %) 167.71 keV +- 1.023 MeV (6.1e+02 %)
|
||||
layer 23: 1.5215 MeV +- 2.074 MeV (1.4e+02 %) 150.17 keV +- 473.5 keV (3.2e+02 %)
|
||||
layer 24: 1.5383 MeV +- 2.354 MeV (1.5e+02 %) 154.41 keV +- 573.1 keV (3.7e+02 %)
|
||||
layer 25: 1.5615 MeV +- 2.501 MeV (1.6e+02 %) 166.75 keV +- 646.6 keV (3.9e+02 %)
|
||||
layer 26: 1.509 MeV +- 2.102 MeV (1.4e+02 %) 155.12 keV +- 660.7 keV (4.3e+02 %)
|
||||
layer 27: 1.5357 MeV +- 2.234 MeV (1.5e+02 %) 165.36 keV +- 892.8 keV (5.4e+02 %)
|
||||
layer 28: 1.5344 MeV +- 2.329 MeV (1.5e+02 %) 152.07 keV +- 542.1 keV (3.6e+02 %)
|
||||
layer 29: 1.5279 MeV +- 2.407 MeV (1.6e+02 %) 153.89 keV +- 569.3 keV (3.7e+02 %)
|
||||
layer 30: 1.5291 MeV +- 2.588 MeV (1.7e+02 %) 154.49 keV +- 663.9 keV (4.3e+02 %)
|
||||
layer 31: 1.5185 MeV +- 1.911 MeV (1.3e+02 %) 158.18 keV +- 613.4 keV (3.9e+02 %)
|
||||
layer 32: 1.5022 MeV +- 2.039 MeV (1.4e+02 %) 162.11 keV +- 690.5 keV (4.3e+02 %)
|
||||
layer 33: 1.5823 MeV +- 2.58 MeV (1.6e+02 %) 159.91 keV +- 784.2 keV (4.9e+02 %)
|
||||
layer 34: 1.4905 MeV +- 1.792 MeV (1.2e+02 %) 156.86 keV +- 613.6 keV (3.9e+02 %)
|
||||
layer 35: 1.5419 MeV +- 2.407 MeV (1.6e+02 %) 155.66 keV +- 806.6 keV (5.2e+02 %)
|
||||
layer 36: 1.5441 MeV +- 2.557 MeV (1.7e+02 %) 154.06 keV +- 590.2 keV (3.8e+02 %)
|
||||
layer 37: 1.5469 MeV +- 2.208 MeV (1.4e+02 %) 151.97 keV +- 357.2 keV (2.4e+02 %)
|
||||
layer 38: 1.5355 MeV +- 2.427 MeV (1.6e+02 %) 161.09 keV +- 770.4 keV (4.8e+02 %)
|
||||
layer 39: 1.5334 MeV +- 2.172 MeV (1.4e+02 %) 155.14 keV +- 674 keV (4.3e+02 %)
|
||||
layer 40: 1.5473 MeV +- 2.632 MeV (1.7e+02 %) 147.67 keV +- 340.2 keV (2.3e+02 %)
|
||||
layer 41: 1.5009 MeV +- 2.02 MeV (1.3e+02 %) 157.6 keV +- 443.3 keV (2.8e+02 %)
|
||||
layer 42: 1.5722 MeV +- 2.568 MeV (1.6e+02 %) 154.51 keV +- 592.4 keV (3.8e+02 %)
|
||||
layer 43: 1.543 MeV +- 2.625 MeV (1.7e+02 %) 156.24 keV +- 544.3 keV (3.5e+02 %)
|
||||
layer 44: 1.5021 MeV +- 2.005 MeV (1.3e+02 %) 162.06 keV +- 656.1 keV (4e+02 %)
|
||||
layer 45: 1.5386 MeV +- 2.344 MeV (1.5e+02 %) 159.85 keV +- 687 keV (4.3e+02 %)
|
||||
layer 46: 1.5002 MeV +- 1.917 MeV (1.3e+02 %) 153.97 keV +- 436.7 keV (2.8e+02 %)
|
||||
layer 47: 1.5385 MeV +- 2.359 MeV (1.5e+02 %) 155.47 keV +- 701.9 keV (4.5e+02 %)
|
||||
layer 48: 1.5417 MeV +- 2.495 MeV (1.6e+02 %) 156.37 keV +- 716.3 keV (4.6e+02 %)
|
||||
layer 49: 1.561 MeV +- 2.553 MeV (1.6e+02 %) 170.44 keV +- 1.172 MeV (6.9e+02 %)
|
||||
layer 50: 1.5134 MeV +- 2.148 MeV (1.4e+02 %) 159.65 keV +- 572.4 keV (3.6e+02 %)
|
||||
layer 51: 1.5349 MeV +- 2.29 MeV (1.5e+02 %) 160.48 keV +- 739 keV (4.6e+02 %)
|
||||
layer 52: 1.5131 MeV +- 2.053 MeV (1.4e+02 %) 168.28 keV +- 852.8 keV (5.1e+02 %)
|
||||
layer 53: 1.5452 MeV +- 2.306 MeV (1.5e+02 %) 158.53 keV +- 699 keV (4.4e+02 %)
|
||||
layer 54: 1.538 MeV +- 2.229 MeV (1.4e+02 %) 159.63 keV +- 872.6 keV (5.5e+02 %)
|
||||
layer 55: 1.5369 MeV +- 2.331 MeV (1.5e+02 %) 166.32 keV +- 774.8 keV (4.7e+02 %)
|
||||
layer 56: 1.5216 MeV +- 2.13 MeV (1.4e+02 %) 156.03 keV +- 613.4 keV (3.9e+02 %)
|
||||
layer 57: 1.5137 MeV +- 2.071 MeV (1.4e+02 %) 153.85 keV +- 508.1 keV (3.3e+02 %)
|
||||
layer 58: 1.4985 MeV +- 1.845 MeV (1.2e+02 %) 157.54 keV +- 468.8 keV (3e+02 %)
|
||||
layer 59: 1.5389 MeV +- 2.42 MeV (1.6e+02 %) 156.89 keV +- 651.1 keV (4.1e+02 %)
|
||||
layer 60: 1.4922 MeV +- 1.502 MeV (1e+02 %) 152.86 keV +- 417.8 keV (2.7e+02 %)
|
||||
layer 61: 1.5428 MeV +- 2.652 MeV (1.7e+02 %) 182.94 keV +- 1.355 MeV (7.4e+02 %)
|
||||
layer 62: 1.4924 MeV +- 1.548 MeV (1e+02 %) 154.1 keV +- 746.2 keV (4.8e+02 %)
|
||||
layer 63: 1.519 MeV +- 2.166 MeV (1.4e+02 %) 164.21 keV +- 743.8 keV (4.5e+02 %)
|
||||
layer 64: 1.5099 MeV +- 2.123 MeV (1.4e+02 %) 156.3 keV +- 588.3 keV (3.8e+02 %)
|
||||
layer 65: 1.5154 MeV +- 2.029 MeV (1.3e+02 %) 147.12 keV +- 353 keV (2.4e+02 %)
|
||||
layer 66: 1.4972 MeV +- 1.901 MeV (1.3e+02 %) 150.69 keV +- 430.6 keV (2.9e+02 %)
|
||||
layer 67: 1.4917 MeV +- 1.704 MeV (1.1e+02 %) 154.84 keV +- 523.5 keV (3.4e+02 %)
|
||||
layer 68: 1.4987 MeV +- 2.094 MeV (1.4e+02 %) 157.36 keV +- 556.4 keV (3.5e+02 %)
|
||||
layer 69: 1.5532 MeV +- 2.44 MeV (1.6e+02 %) 161.36 keV +- 696.9 keV (4.3e+02 %)
|
||||
layer 70: 1.4953 MeV +- 2.043 MeV (1.4e+02 %) 153.45 keV +- 611.9 keV (4e+02 %)
|
||||
layer 71: 1.5088 MeV +- 2.101 MeV (1.4e+02 %) 155.44 keV +- 544.2 keV (3.5e+02 %)
|
||||
layer 72: 1.5165 MeV +- 1.937 MeV (1.3e+02 %) 156.97 keV +- 641.3 keV (4.1e+02 %)
|
||||
layer 73: 1.5281 MeV +- 2.218 MeV (1.5e+02 %) 149.81 keV +- 369.6 keV (2.5e+02 %)
|
||||
layer 74: 1.5062 MeV +- 1.906 MeV (1.3e+02 %) 155.97 keV +- 685.6 keV (4.4e+02 %)
|
||||
layer 75: 1.4923 MeV +- 2.044 MeV (1.4e+02 %) 150.88 keV +- 316.1 keV (2.1e+02 %)
|
||||
layer 76: 1.5399 MeV +- 2.348 MeV (1.5e+02 %) 148.1 keV +- 384.6 keV (2.6e+02 %)
|
||||
layer 77: 1.5244 MeV +- 2.32 MeV (1.5e+02 %) 152.48 keV +- 440.6 keV (2.9e+02 %)
|
||||
layer 78: 1.5058 MeV +- 2.086 MeV (1.4e+02 %) 152.7 keV +- 424.5 keV (2.8e+02 %)
|
||||
layer 79: 1.531 MeV +- 2.237 MeV (1.5e+02 %) 164.93 keV +- 1.004 MeV (6.1e+02 %)
|
||||
layer 80: 1.5383 MeV +- 2.311 MeV (1.5e+02 %) 156.9 keV +- 700.3 keV (4.5e+02 %)
|
||||
layer 81: 1.5499 MeV +- 2.58 MeV (1.7e+02 %) 166.2 keV +- 858.6 keV (5.2e+02 %)
|
||||
layer 82: 1.5327 MeV +- 2.137 MeV (1.4e+02 %) 161.77 keV +- 870.5 keV (5.4e+02 %)
|
||||
layer 83: 1.5235 MeV +- 2.038 MeV (1.3e+02 %) 152.2 keV +- 509.5 keV (3.3e+02 %)
|
||||
layer 84: 1.4889 MeV +- 1.979 MeV (1.3e+02 %) 148.2 keV +- 455.6 keV (3.1e+02 %)
|
||||
layer 85: 1.5257 MeV +- 2.292 MeV (1.5e+02 %) 157.55 keV +- 787.1 keV (5e+02 %)
|
||||
layer 86: 1.5151 MeV +- 2.276 MeV (1.5e+02 %) 172.36 keV +- 1.04 MeV (6e+02 %)
|
||||
layer 87: 1.5074 MeV +- 1.965 MeV (1.3e+02 %) 162.06 keV +- 707.1 keV (4.4e+02 %)
|
||||
layer 88: 1.5178 MeV +- 1.913 MeV (1.3e+02 %) 151.38 keV +- 373.2 keV (2.5e+02 %)
|
||||
layer 89: 1.5282 MeV +- 2.468 MeV (1.6e+02 %) 157.97 keV +- 659.8 keV (4.2e+02 %)
|
||||
layer 90: 1.5307 MeV +- 2.362 MeV (1.5e+02 %) 161.53 keV +- 839.4 keV (5.2e+02 %)
|
||||
layer 1: 1.5909 MeV +- 2.656 MeV (1.7e+02 %) 176.1 keV +- 1.128 MeV (6.4e+02 %)
|
||||
layer 2: 1.5646 MeV +- 2.609 MeV (1.7e+02 %) 167.36 keV +- 788.6 keV (4.7e+02 %)
|
||||
layer 3: 1.5176 MeV +- 2.029 MeV (1.3e+02 %) 174.78 keV +- 1.196 MeV (6.8e+02 %)
|
||||
layer 4: 1.5127 MeV +- 2.063 MeV (1.4e+02 %) 173.22 keV +- 820.6 keV (4.7e+02 %)
|
||||
layer 5: 1.5389 MeV +- 2.57 MeV (1.7e+02 %) 171.14 keV +- 903.5 keV (5.3e+02 %)
|
||||
layer 6: 1.5521 MeV +- 2.746 MeV (1.8e+02 %) 170.26 keV +- 1.105 MeV (6.5e+02 %)
|
||||
layer 7: 1.5055 MeV +- 2.023 MeV (1.3e+02 %) 177.05 keV +- 1.261 MeV (7.1e+02 %)
|
||||
layer 8: 1.5098 MeV +- 2.372 MeV (1.6e+02 %) 156.45 keV +- 435.1 keV (2.8e+02 %)
|
||||
layer 9: 1.5554 MeV +- 2.47 MeV (1.6e+02 %) 153.44 keV +- 611.2 keV (4e+02 %)
|
||||
layer 10: 1.4966 MeV +- 2.051 MeV (1.4e+02 %) 151.04 keV +- 324.5 keV (2.1e+02 %)
|
||||
layer 11: 1.5293 MeV +- 2.481 MeV (1.6e+02 %) 162.76 keV +- 809.1 keV (5e+02 %)
|
||||
layer 12: 1.5518 MeV +- 2.481 MeV (1.6e+02 %) 150.9 keV +- 366.9 keV (2.4e+02 %)
|
||||
layer 13: 1.5108 MeV +- 1.998 MeV (1.3e+02 %) 147.5 keV +- 335 keV (2.3e+02 %)
|
||||
layer 14: 1.5573 MeV +- 2.665 MeV (1.7e+02 %) 165.67 keV +- 1.067 MeV (6.4e+02 %)
|
||||
layer 15: 1.5478 MeV +- 2.612 MeV (1.7e+02 %) 156.37 keV +- 463.5 keV (3e+02 %)
|
||||
layer 16: 1.5019 MeV +- 1.916 MeV (1.3e+02 %) 165.04 keV +- 1.057 MeV (6.4e+02 %)
|
||||
layer 17: 1.4947 MeV +- 2.165 MeV (1.4e+02 %) 166.16 keV +- 991.1 keV (6e+02 %)
|
||||
layer 18: 1.5238 MeV +- 1.956 MeV (1.3e+02 %) 165.19 keV +- 660.6 keV (4e+02 %)
|
||||
layer 19: 1.5238 MeV +- 2.303 MeV (1.5e+02 %) 160.56 keV +- 858.8 keV (5.3e+02 %)
|
||||
layer 20: 1.5623 MeV +- 2.44 MeV (1.6e+02 %) 155.17 keV +- 615.4 keV (4e+02 %)
|
||||
layer 21: 1.5085 MeV +- 2.136 MeV (1.4e+02 %) 161.27 keV +- 806.5 keV (5e+02 %)
|
||||
layer 22: 1.5755 MeV +- 3.019 MeV (1.9e+02 %) 163.21 keV +- 908.1 keV (5.6e+02 %)
|
||||
layer 23: 1.5314 MeV +- 2.482 MeV (1.6e+02 %) 161.8 keV +- 850.8 keV (5.3e+02 %)
|
||||
layer 24: 1.5619 MeV +- 2.659 MeV (1.7e+02 %) 166.95 keV +- 980.3 keV (5.9e+02 %)
|
||||
layer 25: 1.5477 MeV +- 2.437 MeV (1.6e+02 %) 153.78 keV +- 399.4 keV (2.6e+02 %)
|
||||
layer 26: 1.5152 MeV +- 1.939 MeV (1.3e+02 %) 163.47 keV +- 764.1 keV (4.7e+02 %)
|
||||
layer 27: 1.519 MeV +- 2.235 MeV (1.5e+02 %) 155.25 keV +- 648.3 keV (4.2e+02 %)
|
||||
layer 28: 1.5035 MeV +- 1.883 MeV (1.3e+02 %) 153.41 keV +- 711.6 keV (4.6e+02 %)
|
||||
layer 29: 1.5254 MeV +- 2.339 MeV (1.5e+02 %) 157.19 keV +- 462.5 keV (2.9e+02 %)
|
||||
layer 30: 1.5403 MeV +- 2.536 MeV (1.6e+02 %) 168.58 keV +- 1.041 MeV (6.2e+02 %)
|
||||
layer 31: 1.5631 MeV +- 2.603 MeV (1.7e+02 %) 157.27 keV +- 510.4 keV (3.2e+02 %)
|
||||
layer 32: 1.5193 MeV +- 2.302 MeV (1.5e+02 %) 160.17 keV +- 542.9 keV (3.4e+02 %)
|
||||
layer 33: 1.5525 MeV +- 2.564 MeV (1.7e+02 %) 156.91 keV +- 795.2 keV (5.1e+02 %)
|
||||
layer 34: 1.5031 MeV +- 1.848 MeV (1.2e+02 %) 156.29 keV +- 562.9 keV (3.6e+02 %)
|
||||
layer 35: 1.5107 MeV +- 1.911 MeV (1.3e+02 %) 150.06 keV +- 443.7 keV (3e+02 %)
|
||||
layer 36: 1.5369 MeV +- 2.297 MeV (1.5e+02 %) 169.74 keV +- 1.171 MeV (6.9e+02 %)
|
||||
layer 37: 1.5271 MeV +- 2.287 MeV (1.5e+02 %) 148.86 keV +- 430.3 keV (2.9e+02 %)
|
||||
layer 38: 1.5112 MeV +- 2.082 MeV (1.4e+02 %) 154.88 keV +- 455.5 keV (2.9e+02 %)
|
||||
layer 39: 1.5265 MeV +- 2.063 MeV (1.4e+02 %) 149.43 keV +- 473 keV (3.2e+02 %)
|
||||
layer 40: 1.4947 MeV +- 1.835 MeV (1.2e+02 %) 156.1 keV +- 475.8 keV (3e+02 %)
|
||||
layer 41: 1.5366 MeV +- 2.447 MeV (1.6e+02 %) 154.02 keV +- 557.8 keV (3.6e+02 %)
|
||||
layer 42: 1.5292 MeV +- 2.362 MeV (1.5e+02 %) 167.42 keV +- 1.206 MeV (7.2e+02 %)
|
||||
layer 43: 1.5378 MeV +- 2.365 MeV (1.5e+02 %) 157.55 keV +- 726.4 keV (4.6e+02 %)
|
||||
layer 44: 1.5618 MeV +- 2.524 MeV (1.6e+02 %) 159.78 keV +- 468.4 keV (2.9e+02 %)
|
||||
layer 45: 1.5186 MeV +- 1.994 MeV (1.3e+02 %) 153.95 keV +- 480.5 keV (3.1e+02 %)
|
||||
layer 46: 1.5297 MeV +- 2.2 MeV (1.4e+02 %) 167.08 keV +- 1.038 MeV (6.2e+02 %)
|
||||
layer 47: 1.5651 MeV +- 2.479 MeV (1.6e+02 %) 164.36 keV +- 902.2 keV (5.5e+02 %)
|
||||
layer 48: 1.5647 MeV +- 2.578 MeV (1.6e+02 %) 156.71 keV +- 812.1 keV (5.2e+02 %)
|
||||
layer 49: 1.5125 MeV +- 2.149 MeV (1.4e+02 %) 153.18 keV +- 471 keV (3.1e+02 %)
|
||||
layer 50: 1.5248 MeV +- 2.337 MeV (1.5e+02 %) 164.4 keV +- 921 keV (5.6e+02 %)
|
||||
layer 51: 1.5294 MeV +- 2.455 MeV (1.6e+02 %) 155.96 keV +- 871.4 keV (5.6e+02 %)
|
||||
layer 52: 1.554 MeV +- 2.581 MeV (1.7e+02 %) 175.23 keV +- 1.179 MeV (6.7e+02 %)
|
||||
layer 53: 1.5471 MeV +- 2.396 MeV (1.5e+02 %) 145.65 keV +- 390 keV (2.7e+02 %)
|
||||
layer 54: 1.5309 MeV +- 2.245 MeV (1.5e+02 %) 169.77 keV +- 1.125 MeV (6.6e+02 %)
|
||||
layer 55: 1.513 MeV +- 2.207 MeV (1.5e+02 %) 153.39 keV +- 515.6 keV (3.4e+02 %)
|
||||
layer 56: 1.5024 MeV +- 2.061 MeV (1.4e+02 %) 151.58 keV +- 358.3 keV (2.4e+02 %)
|
||||
layer 57: 1.4889 MeV +- 1.827 MeV (1.2e+02 %) 150.51 keV +- 369.4 keV (2.5e+02 %)
|
||||
layer 58: 1.5307 MeV +- 2.137 MeV (1.4e+02 %) 163.01 keV +- 556.1 keV (3.4e+02 %)
|
||||
layer 59: 1.5119 MeV +- 1.844 MeV (1.2e+02 %) 154.55 keV +- 527.6 keV (3.4e+02 %)
|
||||
layer 60: 1.5087 MeV +- 1.995 MeV (1.3e+02 %) 148.87 keV +- 362.6 keV (2.4e+02 %)
|
||||
layer 61: 1.5339 MeV +- 2.292 MeV (1.5e+02 %) 155.7 keV +- 473.2 keV (3e+02 %)
|
||||
layer 62: 1.5279 MeV +- 2.163 MeV (1.4e+02 %) 157.55 keV +- 522.5 keV (3.3e+02 %)
|
||||
layer 63: 1.5441 MeV +- 2.33 MeV (1.5e+02 %) 155.87 keV +- 590.7 keV (3.8e+02 %)
|
||||
layer 64: 1.5068 MeV +- 2.143 MeV (1.4e+02 %) 162.66 keV +- 766.8 keV (4.7e+02 %)
|
||||
layer 65: 1.5261 MeV +- 2.138 MeV (1.4e+02 %) 165.78 keV +- 802.1 keV (4.8e+02 %)
|
||||
layer 66: 1.4897 MeV +- 1.91 MeV (1.3e+02 %) 149.49 keV +- 491.9 keV (3.3e+02 %)
|
||||
layer 67: 1.528 MeV +- 2.169 MeV (1.4e+02 %) 156.3 keV +- 460.9 keV (2.9e+02 %)
|
||||
layer 68: 1.4954 MeV +- 1.944 MeV (1.3e+02 %) 155.74 keV +- 629.6 keV (4e+02 %)
|
||||
layer 69: 1.5124 MeV +- 2.08 MeV (1.4e+02 %) 150.82 keV +- 537.6 keV (3.6e+02 %)
|
||||
layer 70: 1.5192 MeV +- 2.235 MeV (1.5e+02 %) 155.17 keV +- 665.7 keV (4.3e+02 %)
|
||||
layer 71: 1.5377 MeV +- 2.093 MeV (1.4e+02 %) 159.17 keV +- 828.7 keV (5.2e+02 %)
|
||||
layer 72: 1.5137 MeV +- 2.072 MeV (1.4e+02 %) 154.74 keV +- 836.8 keV (5.4e+02 %)
|
||||
layer 73: 1.5149 MeV +- 2.189 MeV (1.4e+02 %) 164.22 keV +- 890.1 keV (5.4e+02 %)
|
||||
layer 74: 1.5431 MeV +- 2.198 MeV (1.4e+02 %) 169.28 keV +- 814.2 keV (4.8e+02 %)
|
||||
layer 75: 1.5174 MeV +- 2.251 MeV (1.5e+02 %) 157.68 keV +- 525.8 keV (3.3e+02 %)
|
||||
layer 76: 1.5371 MeV +- 2.381 MeV (1.5e+02 %) 161.66 keV +- 864.3 keV (5.3e+02 %)
|
||||
layer 77: 1.5103 MeV +- 2.205 MeV (1.5e+02 %) 164.53 keV +- 912.2 keV (5.5e+02 %)
|
||||
layer 78: 1.5301 MeV +- 2.307 MeV (1.5e+02 %) 154.44 keV +- 724.5 keV (4.7e+02 %)
|
||||
layer 79: 1.5195 MeV +- 2.238 MeV (1.5e+02 %) 160.57 keV +- 708.9 keV (4.4e+02 %)
|
||||
layer 80: 1.5318 MeV +- 2.363 MeV (1.5e+02 %) 156.93 keV +- 745.5 keV (4.8e+02 %)
|
||||
layer 81: 1.5612 MeV +- 2.626 MeV (1.7e+02 %) 153.42 keV +- 504.2 keV (3.3e+02 %)
|
||||
layer 82: 1.5079 MeV +- 1.888 MeV (1.3e+02 %) 166.81 keV +- 858.7 keV (5.1e+02 %)
|
||||
layer 83: 1.5132 MeV +- 2.142 MeV (1.4e+02 %) 158.66 keV +- 883.3 keV (5.6e+02 %)
|
||||
layer 84: 1.5269 MeV +- 2.358 MeV (1.5e+02 %) 162.22 keV +- 931.2 keV (5.7e+02 %)
|
||||
layer 85: 1.5175 MeV +- 2.344 MeV (1.5e+02 %) 170.48 keV +- 1.022 MeV (6e+02 %)
|
||||
layer 86: 1.5219 MeV +- 2.059 MeV (1.4e+02 %) 148.79 keV +- 248.4 keV (1.7e+02 %)
|
||||
layer 87: 1.4942 MeV +- 1.902 MeV (1.3e+02 %) 154.76 keV +- 549.8 keV (3.6e+02 %)
|
||||
layer 88: 1.5121 MeV +- 2.088 MeV (1.4e+02 %) 169.53 keV +- 979 keV (5.8e+02 %)
|
||||
layer 89: 1.4943 MeV +- 1.835 MeV (1.2e+02 %) 147.05 keV +- 334.5 keV (2.3e+02 %)
|
||||
layer 90: 1.5042 MeV +- 2.051 MeV (1.4e+02 %) 160.77 keV +- 689.5 keV (4.3e+02 %)
|
||||
|
||||
total calor : 149.93 MeV +- 22.15 MeV ( 15 %) 14.238 MeV +- 6.682 MeV ( 47 %)
|
||||
total calor : 149.81 MeV +- 21.99 MeV ( 15 %) 14.359 MeV +- 7.173 MeV ( 50 %)
|
||||
------------------------------------------------------------
|
||||
|
||||
Leakage : 850.07 MeV +- 22.15 MeV
|
||||
Eleak/Ebeam = 85 % ( forward = 85 % backward = 0 % lateral =0.00563 %)
|
||||
Leakage : 850.19 MeV +- 21.99 MeV
|
||||
Eleak/Ebeam = 85 % ( forward = 85 % backward =0.00609 % lateral = 0 %)
|
||||
|
||||
------- MixMaxRng engine status -------
|
||||
Current state vector is:
|
||||
mixmax state, file version 1.0
|
||||
N=17 V[N]={913785480964397581, 758708089138958951, 512837396174773248, 364019762387443911, 227981048687142520, 1793243795905947603, 1330771379932463971, 1882448914219819135, 2233873876355778306, 788041446220860046, 1952579403311736228, 1743856099635947558, 1985919791136845935, 193054626673977153, 1796668647638512857, 2246921724815697498, 55631510838562738} counter= 13sumtot= 27755911115619680
|
||||
N=17 V[N]={1822786039505024351, 451739014868820147, 1164805617051389993, 1988509177009954377, 1061872345902142530, 450944991230973789, 1368184653629848322, 803803675477224967, 1765281351029302180, 1941711124970290233, 1346266529720313019, 11507093520180130, 538993874075141425, 896937691016120703, 1951454627675545704, 2023874181048844542, 562197892581109933} counter= 9sumtot= 1704125806602674737
|
||||
---------------------------------------
|
||||
G4 kernel has come to Quit state.
|
||||
UserDetectorConstruction deleted.
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -46,7 +46,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -387,7 +389,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -426,7 +428,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -459,7 +461,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -546,7 +548,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -579,7 +581,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -612,7 +614,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -645,7 +647,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -678,7 +680,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -711,7 +713,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -744,7 +746,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
======================================================================
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -78,6 +78,7 @@ HcalTB96 is registered to the default region.
|
||||
* Magnetic Field is off *
|
||||
* *
|
||||
***************************
|
||||
G4ChordFinder: stepperDriverId: 2
|
||||
*******************************************************
|
||||
* *
|
||||
* Constructing a CCaloSD with name HadronCalorimeter
|
||||
@@ -216,7 +217,7 @@ eBrem: for e- XStype:4 SubType=3
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -248,7 +249,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -280,7 +281,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -293,7 +294,6 @@ ionIoni: for GenericIon XStype:3 SubType=2
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
|
||||
Stopping Power data for 17 ion/material pairs
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
@@ -339,7 +339,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -371,7 +371,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -403,7 +403,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -435,7 +435,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -467,7 +467,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -499,7 +499,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -531,7 +531,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -917,12 +917,21 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
================================================================
|
||||
### G4LevelReader: broken transition 0 from level 24 to 24 for isotope Z= 89 A= 219 - use ground level
|
||||
=======================================================================
|
||||
====== Pre-compound/De-excitation Physics Parameters ========
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
Type of pre-compound inverse x-section 3
|
||||
Pre-compound model active 1
|
||||
Pre-compound excitation low energy 100 keV
|
||||
Pre-compound excitation high energy 30 MeV
|
||||
Angular generator for pre-compound model 1
|
||||
Use NeverGoBack option for pre-compound model 0
|
||||
Use SoftCutOff option for pre-compound model 0
|
||||
Use CEM transitions for pre-compound model 1
|
||||
Use GNASH transitions for pre-compound model 0
|
||||
Use HETC submodel for pre-compound model 0
|
||||
=======================================================================
|
||||
====== Nuclear De-excitation Module Parameters ========
|
||||
=======================================================================
|
||||
Type of de-excitation inverse x-section 3
|
||||
Type of de-excitation factory Evaporation+GEM
|
||||
Number of de-excitation channels 68
|
||||
@@ -1084,7 +1093,7 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 20
|
||||
User=15.470000s Real=15.602755s Sys=0.010000s
|
||||
User=13.680000s Real=13.774063s Sys=0.000000s
|
||||
### Run 0 end.
|
||||
... write file : ccal.root - done
|
||||
... close file : ccal.root - done
|
||||
@@ -1102,12 +1111,12 @@ G4SDManager deleted.
|
||||
EventManager deleted.
|
||||
Units table cleared.
|
||||
TransportationManager deleted.
|
||||
Total navigation history collections cleaned: 51
|
||||
Total navigation history collections cleaned: 47
|
||||
G4RNGHelper object is deleted.
|
||||
================== Deleting memory pools ===================
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0731 MB
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0692 MB
|
||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.0298 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.0423 MB
|
||||
Pool ID '16G4SmartVoxelNode', size : 0.00769 MB
|
||||
Pool ID '17G4SmartVoxelProxy', size : 0.00385 MB
|
||||
Pool ID '7G4Event', size : 0.000961 MB
|
||||
@@ -1115,13 +1124,13 @@ Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
||||
Pool ID '15G4HCofThisEvent', size : 0.000961 MB
|
||||
Pool ID '16G4HitsCollection', size : 0.000961 MB
|
||||
Pool ID '7G4Track', size : 0.0586 MB
|
||||
Pool ID '7G4Track', size : 0.0836 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.00577 MB
|
||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||
Pool ID '17G4ReactionProduct', size : 0.0163 MB
|
||||
Pool ID '17G4ReactionProduct', size : 0.0135 MB
|
||||
Pool ID '10G4Fragment', size : 0.00577 MB
|
||||
Number of memory pools allocated: 15 of which, static: 0
|
||||
Dynamic pools deleted: 15 / Total memory freed: 0.21 MB
|
||||
Dynamic pools deleted: 15 / Total memory freed: 0.24 MB
|
||||
============================================================
|
||||
G4Allocator objects are deleted.
|
||||
UImanager deleted.
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -817,14 +817,14 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Voxelisation: top CPU users:
|
||||
Percent Total CPU System CPU Memory Volume
|
||||
------- ---------- ---------- -------- ----------
|
||||
100.00 0.01 0.00 69k world_logicalV
|
||||
0.00 0.00 0.00 406k airBox_logicalV
|
||||
100.00 0.01 0.00 406k airBox_logicalV
|
||||
0.00 0.00 0.00 69k world_logicalV
|
||||
|
||||
Voxelisation: top memory users:
|
||||
Percent Memory Heads Nodes Pointers Total CPU Volume
|
||||
------- -------- ------ ------ -------- ---------- ----------
|
||||
85.51 406k 931 5788 8898 0.00 airBox_logicalV
|
||||
14.49 68k 182 683 3080 0.01 world_logicalV
|
||||
85.51 406k 931 5788 8898 0.01 airBox_logicalV
|
||||
14.49 68k 182 683 3080 0.00 world_logicalV
|
||||
### Run 0 starts.
|
||||
### Begin of Run 0 start.
|
||||
|
||||
@@ -866,7 +866,7 @@ N=17 V[N]={87900885656017340, 2136126672992718976, 110623987125446578, 176001763
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1000000
|
||||
User=123.620000s Real=126.554271s Sys=1.860000s
|
||||
User=106.510000s Real=109.183284s Sys=1.390000s
|
||||
|
||||
### End of Run (1000000 events)
|
||||
G4 kernel has come to Quit state.
|
||||
@@ -882,19 +882,19 @@ G4SDManager deleted.
|
||||
EventManager deleted.
|
||||
Units table cleared.
|
||||
TransportationManager deleted.
|
||||
Total navigation history collections cleaned: 14
|
||||
Total navigation history collections cleaned: 13
|
||||
G4RNGHelper object is deleted.
|
||||
================== Deleting memory pools ===================
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0202 MB
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0183 MB
|
||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.0125 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.0115 MB
|
||||
Pool ID '16G4SmartVoxelNode', size : 0.201 MB
|
||||
Pool ID '17G4SmartVoxelProxy', size : 0.116 MB
|
||||
Pool ID '7G4Event', size : 0.000961 MB
|
||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
||||
Pool ID '19G4ElectronOccupancy', size : 0.000961 MB
|
||||
Pool ID '7G4Track', size : 0.024 MB
|
||||
Pool ID '7G4Track', size : 0.0221 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.00192 MB
|
||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||
Number of memory pools allocated: 12 of which, static: 0
|
||||
|
||||
@@ -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-06-19 G. Milluzzo (eFLASH_radiotherapy-V11-01-00)
|
||||
- Removed visualization in batch mode
|
||||
|
||||
## 2022-11-18 F. Romano (eFLASH_radiotherapy-V11-00-00)
|
||||
- Added the new advanced example eFLASH_radiotherapy
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -43,7 +43,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -349,7 +351,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -389,7 +391,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -421,7 +423,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -507,7 +509,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -539,7 +541,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -571,7 +573,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -603,7 +605,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -635,7 +637,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -667,7 +669,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -699,7 +701,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
======================================================================
|
||||
@@ -816,7 +818,7 @@ See commands in /vis/modeling/trajectories/ for other options.
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 500000
|
||||
User=1184.030000s Real=1200.808567s Sys=6.140000s
|
||||
User=939.860000s Real=952.397755s Sys=5.140000s
|
||||
|
||||
--------------------End of Global Run-----------------------
|
||||
The run was 500000 events /score/dumpQuantityToFile boxMesh_1 dose dose.out
|
||||
|
||||
@@ -46,10 +46,7 @@
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
G4UIExecutive *ui = 0;
|
||||
if (argc == 1) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
|
||||
// G4Random::setTheEngine(new CLHEP::MTwistEngine);
|
||||
|
||||
@@ -72,18 +69,20 @@ int main(int argc, char **argv) {
|
||||
G4UImanager *UImanager = G4UImanager::GetUIpointer();
|
||||
G4ScoringManager::GetScoringManager();
|
||||
|
||||
|
||||
if (!ui) {
|
||||
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command + fileName);
|
||||
} else {
|
||||
|
||||
G4UIExecutive *ui = 0;
|
||||
if (argc == 1) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command + fileName);
|
||||
|
||||
}
|
||||
|
||||
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-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -78,7 +78,7 @@ New sensitive detector <TrackerChamberSD> is registered at /eRosita/
|
||||
=======================================================================
|
||||
====== Electromagnetic Physics Parameters ========
|
||||
=======================================================================
|
||||
LPM effect enabled 1
|
||||
LPM effect enabled 0
|
||||
Enable creation and use of sampling tables 0
|
||||
Apply cuts on all EM processes 0
|
||||
Use combined TransportationWithMsc Disabled
|
||||
@@ -183,7 +183,7 @@ eIoni: for e- XStype:3 SubType=2
|
||||
eBrem: for e- XStype:4 SubType=3
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
|
||||
LPM flag: 0 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
LowEnBrem : Emin= 0 eV Emax= 1 GeV AngularGen2BS
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV ModifiedTsai
|
||||
@@ -203,7 +203,7 @@ eIoni: for e+ XStype:3 SubType=2
|
||||
eBrem: for e+ XStype:4 SubType=3
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
|
||||
LPM flag: 0 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
LowEnBrem : Emin= 0 eV Emax= 1 GeV AngularGen2BS
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV ModifiedTsai
|
||||
@@ -524,9 +524,9 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1000
|
||||
User=3.830000s Real=3.855846s Sys=0.000000s
|
||||
User=3.710000s Real=3.725513s Sys=0.010000s
|
||||
--- Run 0 (master) end. Total number of events: 1000.
|
||||
User=3.840000s Real=3.856168s Sys=0.000000s
|
||||
User=3.710000s Real=3.725783s Sys=0.010000s
|
||||
G4 kernel has come to Quit state.
|
||||
UserDetectorConstruction deleted.
|
||||
UserPhysicsList deleted.
|
||||
|
||||
@@ -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-04-24 Susanna Guatelli (fastAerosol-V11-01-00)
|
||||
- General cleaning of the code, including run-clang-tidy
|
||||
|
||||
## 2022-09-09 Susanna Guatelli (fastAerosol-V11-00-01)
|
||||
- Ranecu engine removed, default engine used now
|
||||
|
||||
|
||||
@@ -51,68 +51,65 @@ int main(int argc,char** argv)
|
||||
G4int nThreads = 4;
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
|
||||
// Detect interactive mode (if no arguments) and define UI session
|
||||
//
|
||||
G4UIExecutive* ui = 0;
|
||||
if ( argc == 1 ) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
//G4ScoringManager* scoringManager =
|
||||
G4ScoringManager::GetScoringManager();
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
//G4ScoringManager* scoringManager =
|
||||
G4ScoringManager::GetScoringManager();
|
||||
// Detector construction initialization
|
||||
runManager->SetUserInitialization(new DetectorConstruction());
|
||||
|
||||
// Detector construction initialization
|
||||
runManager->SetUserInitialization(new DetectorConstruction());
|
||||
// Physics list
|
||||
G4VModularPhysicsList* physicsList = new QGSP_BIC;
|
||||
physicsList->SetVerboseLevel(1);
|
||||
|
||||
// Physics list
|
||||
G4VModularPhysicsList* physicsList = new QGSP_BIC;
|
||||
physicsList->SetVerboseLevel(1);
|
||||
// Physics list - step limiter
|
||||
auto* stepLimiter = new G4StepLimiterPhysics;
|
||||
stepLimiter->SetApplyToAll(true); // apply step limit to all particles. Default we set limit to DBL_MAX
|
||||
|
||||
// Physics list - step limiter
|
||||
G4StepLimiterPhysics* stepLimiter = new G4StepLimiterPhysics;
|
||||
stepLimiter->SetApplyToAll(true); // apply step limit to all particles. Default we set limit to DBL_MAX
|
||||
physicsList->RegisterPhysics(stepLimiter);
|
||||
physicsList->RegisterPhysics(stepLimiter);
|
||||
|
||||
// Physics list initialization
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
// Physics list initialization
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
// User action initialization
|
||||
runManager->SetUserInitialization(new ActionInitialization());
|
||||
// User action initialization
|
||||
runManager->SetUserInitialization(new ActionInitialization());
|
||||
|
||||
// Initialize visualization
|
||||
//
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
|
||||
// G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
// Initialize visualization
|
||||
//
|
||||
auto* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
// Get the pointer to the User Interface manager
|
||||
auto* UImanager = G4UImanager::GetUIpointer();
|
||||
// Detect interactive mode (if no arguments) and define UI session
|
||||
//
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( argc == 1 ) ui = new G4UIExecutive(argc, argv);
|
||||
// Process macro or start UI session
|
||||
//
|
||||
if ( ! ui )
|
||||
{
|
||||
// batch mode
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// interactive mode
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
// Process macro or start UI session
|
||||
//
|
||||
if ( ! ui ) {
|
||||
// batch mode
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
}
|
||||
else {
|
||||
// interactive mode
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
// Job termination
|
||||
// Free the store: user actions, physics_list and detector_description are
|
||||
// owned and deleted by the run manager, so they should not be deleted
|
||||
// in the main() program !
|
||||
// Job termination
|
||||
// Free the store: user actions, physics_list and detector_description are
|
||||
// owned and deleted by the run manager, so they should not be deleted
|
||||
// in the main() program !
|
||||
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
//delete scoringManager;
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -45,7 +45,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -222,7 +224,7 @@ eBrem: for e- XStype:4 SubType=3
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -254,7 +256,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -286,7 +288,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -299,7 +301,6 @@ ionIoni: for GenericIon XStype:3 SubType=2
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
|
||||
Stopping Power data for 17 ion/material pairs
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
@@ -345,7 +346,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -377,7 +378,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -409,7 +410,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -441,7 +442,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -473,7 +474,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -505,7 +506,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -537,7 +538,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -910,12 +911,21 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
|
||||
================================================================
|
||||
=======================================================================
|
||||
====== Pre-compound/De-excitation Physics Parameters ========
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
Type of pre-compound inverse x-section 3
|
||||
Pre-compound model active 1
|
||||
Pre-compound excitation low energy 100 keV
|
||||
Pre-compound excitation high energy 30 MeV
|
||||
Angular generator for pre-compound model 1
|
||||
Use NeverGoBack option for pre-compound model 0
|
||||
Use SoftCutOff option for pre-compound model 0
|
||||
Use CEM transitions for pre-compound model 1
|
||||
Use GNASH transitions for pre-compound model 0
|
||||
Use HETC submodel for pre-compound model 0
|
||||
=======================================================================
|
||||
====== Nuclear De-excitation Module Parameters ========
|
||||
=======================================================================
|
||||
Type of de-excitation inverse x-section 3
|
||||
Type of de-excitation factory Evaporation+GEM
|
||||
Number of de-excitation channels 68
|
||||
@@ -13863,7 +13873,7 @@ Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolu
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10
|
||||
User=1.280000s Real=1.323262s Sys=0.030000s
|
||||
User=1.180000s Real=1.271009s Sys=0.020000s
|
||||
|
||||
--------------------End of Global Run-----------------------
|
||||
The run consists of 10 proton of 50 MeV
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// (copied from B1ActionInitialization)
|
||||
|
||||
#ifndef ActionInitialization_h
|
||||
@@ -36,13 +35,12 @@
|
||||
class ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
ActionInitialization();
|
||||
virtual ~ActionInitialization();
|
||||
explicit ActionInitialization();
|
||||
virtual ~ActionInitialization()=default;
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
virtual void BuildForMaster() const override;
|
||||
virtual void Build() const override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// (adapted from B2bChamberParameterisation)
|
||||
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||
|
||||
@@ -56,9 +55,9 @@ class CloudParameterisation : public G4VPVParameterisation
|
||||
{
|
||||
public:
|
||||
|
||||
CloudParameterisation(const std::vector<G4ThreeVector>& positions);
|
||||
explicit CloudParameterisation(const std::vector<G4ThreeVector>& positions);
|
||||
|
||||
virtual ~CloudParameterisation();
|
||||
virtual ~CloudParameterisation()=default;
|
||||
|
||||
void ComputeTransformation (const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol) const;
|
||||
@@ -90,8 +89,6 @@ class CloudParameterisation : public G4VPVParameterisation
|
||||
void ComputeDimensions (G4Sphere&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
private:
|
||||
|
||||
std::vector<G4ThreeVector> fPositions;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,47 +45,49 @@ class DetectorConstructionMessenger;
|
||||
|
||||
class DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
DetectorConstruction();
|
||||
virtual ~DetectorConstruction();
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
public:
|
||||
explicit DetectorConstruction();
|
||||
virtual ~DetectorConstruction();
|
||||
virtual G4VPhysicalVolume* Construct() override;
|
||||
|
||||
G4LogicalVolume* GetScoringVolume() const { return fScoringVolume; }
|
||||
G4LogicalVolume* GetScoringVolume() const { return fScoringVolume; }
|
||||
|
||||
// Physics
|
||||
G4double fStepLim = DBL_MAX; // global step limit
|
||||
G4UserLimits* fStepLimits; // physics implementation of limit
|
||||
// Physics
|
||||
G4double fStepLim = DBL_MAX;// global step limit
|
||||
G4UserLimits* fStepLimits;// physics implementation of limit
|
||||
|
||||
// Cloud build choice
|
||||
G4bool fFastAerosolCloud = false;
|
||||
G4bool fParameterisedCloud = false;
|
||||
G4bool fSmoothCloud = false;
|
||||
// Cloud build choice
|
||||
G4bool fFastAerosolCloud = false;
|
||||
G4bool fParameterisedCloud = false;
|
||||
G4bool fSmoothCloud = false;
|
||||
|
||||
// Cloud droplet details
|
||||
G4double fDropletR = 1;
|
||||
// Cloud droplet details
|
||||
G4double fDropletR = 1;
|
||||
|
||||
// FastAerosol cloud details
|
||||
FastAerosol* fCloud = NULL; // the cloud bulk and droplet positions
|
||||
G4bool fPrePopulate = false; // whether to pre-load droplet positions (true) or not (false)
|
||||
G4double fDropletNumDens = 0; // number density of droplets
|
||||
G4double fMinSpacing = 0.0; // minimum spacing between droplets
|
||||
int fCloudSeed = 0; // random seed dictating droplet distribution
|
||||
// FastAerosol cloud details
|
||||
FastAerosol* fCloud = NULL; // the cloud bulk and droplet positions
|
||||
|
||||
G4bool fPrePopulate = false;
|
||||
// whether to pre-load droplet positions (true) or not (false)
|
||||
G4double fDropletNumDens = 0; //number density of droplets
|
||||
G4double fMinSpacing = 0.0;// minimum spacing between droplets
|
||||
G4int fCloudSeed = 0; // random seed dictating droplet distribution
|
||||
|
||||
// parameterised cloud details
|
||||
G4double fSmartless = 2.0; // control the 'fSmartless' property of parameterised solid. Roughly how many voxels the volume is split into for geometry optimization
|
||||
// parameterised cloud details
|
||||
G4double fSmartless = 2.0;
|
||||
// control the 'fSmartless' property of parameterised solid. Roughly how many voxels the volume is split into for geometry optimization
|
||||
|
||||
G4String fCloudShapeStr = "box"; // cloud bulk shape
|
||||
G4String fDropletShapeStr = "sphere"; // droplet shape
|
||||
G4String fCloudShapeStr = "box"; // cloud bulk shape
|
||||
G4String fDropletShapeStr = "sphere"; // droplet shape
|
||||
|
||||
G4VSolid* fCloudShape; // actual cloud bulk shape
|
||||
G4VSolid* fDropletShape; // actual droplet solid
|
||||
G4VSolid* fCloudShape; // actual cloud bulk shape
|
||||
G4VSolid* fDropletShape;// actual droplet solid
|
||||
|
||||
protected:
|
||||
G4LogicalVolume* fScoringVolume;
|
||||
protected:
|
||||
G4LogicalVolume* fScoringVolume;
|
||||
|
||||
private:
|
||||
DetectorConstructionMessenger* fMessenger;
|
||||
private:
|
||||
DetectorConstructionMessenger* fMessenger;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// (copied from B1EventAction)
|
||||
|
||||
#ifndef EventAction_h
|
||||
@@ -39,20 +38,19 @@ class RunAction;
|
||||
|
||||
class EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
EventAction(RunAction* runAction);
|
||||
virtual ~EventAction();
|
||||
public:
|
||||
explicit EventAction(RunAction* runAction);
|
||||
virtual ~EventAction()=default;
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event* event);
|
||||
virtual void EndOfEventAction(const G4Event* event);
|
||||
virtual void BeginOfEventAction(const G4Event* event) override;
|
||||
virtual void EndOfEventAction(const G4Event* event) override;
|
||||
|
||||
void AddEdep(G4double edep) { fEdep += edep; }
|
||||
void AddEdep(G4double edep) { fEdep += edep; }
|
||||
|
||||
private:
|
||||
RunAction* fRunAction;
|
||||
G4double fEdep;
|
||||
private:
|
||||
RunAction* fRunAction;
|
||||
G4double fEdep;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// (adapted from B1PrimaryGeneratorAction)
|
||||
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||
|
||||
@@ -40,19 +39,18 @@ class G4Box;
|
||||
|
||||
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
PrimaryGeneratorAction();
|
||||
virtual ~PrimaryGeneratorAction();
|
||||
public:
|
||||
explicit PrimaryGeneratorAction();
|
||||
virtual ~PrimaryGeneratorAction();
|
||||
|
||||
// method from the base class
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
// method from the base class
|
||||
virtual void GeneratePrimaries(G4Event*) override;
|
||||
|
||||
// method to access particle gun
|
||||
const G4ParticleGun* GetParticleGun() const { return fParticleGun; }
|
||||
// method to access particle gun
|
||||
const G4ParticleGun* GetParticleGun() const { return fParticleGun; }
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun;
|
||||
G4Box* fWorldBox;
|
||||
private:
|
||||
G4ParticleGun* fParticleGun;
|
||||
G4Box* fWorldBox;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// (copied from B1RunAction)
|
||||
|
||||
#ifndef RunAction_h
|
||||
@@ -43,20 +42,19 @@ class G4Run;
|
||||
|
||||
class RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
RunAction();
|
||||
virtual ~RunAction();
|
||||
public:
|
||||
explicit RunAction();
|
||||
virtual ~RunAction()=default;
|
||||
|
||||
// virtual G4Run* GenerateRun();
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
// virtual G4Run* GenerateRun();
|
||||
virtual void BeginOfRunAction(const G4Run*) override;
|
||||
virtual void EndOfRunAction(const G4Run*) override;
|
||||
|
||||
void AddEdep (G4double edep);
|
||||
void AddEdep (G4double edep);
|
||||
|
||||
private:
|
||||
G4Accumulable<G4double> fEdep;
|
||||
G4Accumulable<G4double> fEdep2;
|
||||
private:
|
||||
G4Accumulable<G4double> fEdep;
|
||||
G4Accumulable<G4double> fEdep2;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// (copied from B1SteppingAction)
|
||||
|
||||
#ifndef SteppingAction_h
|
||||
@@ -41,16 +40,16 @@ class G4LogicalVolume;
|
||||
|
||||
class SteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
SteppingAction(EventAction* eventAction);
|
||||
virtual ~SteppingAction();
|
||||
public:
|
||||
explicit SteppingAction(EventAction* eventAction);
|
||||
virtual ~SteppingAction()=default;
|
||||
|
||||
// method from the base class
|
||||
virtual void UserSteppingAction(const G4Step*);
|
||||
// method from the base class
|
||||
virtual void UserSteppingAction(const G4Step*) override;
|
||||
|
||||
private:
|
||||
EventAction* fEventAction;
|
||||
G4LogicalVolume* fScoringVolume;
|
||||
private:
|
||||
EventAction* fEventAction;
|
||||
G4LogicalVolume* fScoringVolume;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -54,183 +54,209 @@
|
||||
|
||||
//using namespace std;
|
||||
|
||||
class FastAerosol {
|
||||
public:
|
||||
// Constructor; creates a random cloud of droplets
|
||||
FastAerosol(const G4String& pName, G4VSolid* pCloud,
|
||||
G4double pR, G4double pMinD, G4double pAvgNumDens, G4double pdR,
|
||||
std::function<G4double (G4ThreeVector)> pNumDensDistribution);
|
||||
class FastAerosol
|
||||
{
|
||||
public:
|
||||
// Constructor; creates a random cloud of droplets
|
||||
FastAerosol(const G4String& pName, G4VSolid* pCloud,
|
||||
G4double pR, G4double pMinD,
|
||||
G4double pAvgNumDens, G4double pdR,
|
||||
std::function<G4double (G4ThreeVector)> pNumDensDistribution);
|
||||
|
||||
FastAerosol(const G4String& pName, G4VSolid* pCloud,
|
||||
G4double pR, G4double pMinD, G4double pNumDens, G4double pdR);
|
||||
FastAerosol(const G4String& pName, G4VSolid* pCloud,
|
||||
G4double pR, G4double pMinD,
|
||||
G4double pNumDens, G4double pdR);
|
||||
|
||||
FastAerosol(const G4String& pName, G4VSolid* pCloud,
|
||||
G4double pR, G4double pMinD, G4double pNumDens);
|
||||
FastAerosol(const G4String& pName, G4VSolid* pCloud,
|
||||
G4double pR, G4double pMinD, G4double pNumDens);
|
||||
|
||||
// Destructor; frees memory
|
||||
~FastAerosol();
|
||||
~FastAerosol()=default;
|
||||
|
||||
// Populate all grids. Otherwise, they are populated on-the-fly
|
||||
void PopulateAllGrids();
|
||||
// Populate all grids. Otherwise, they are populated on-the-fly
|
||||
void PopulateAllGrids();
|
||||
|
||||
// Save locations of droplets to a file for visualization/analysis purposes
|
||||
void SaveToFile(const char *filename);
|
||||
// Save locations of droplets to a file for visualization/analysis purposes
|
||||
void SaveToFile(const char *filename);
|
||||
|
||||
// Get absolutely nearest droplet - must be public as FastAerosolSolid uses it
|
||||
bool GetNearestDroplet(const G4ThreeVector &p, G4ThreeVector ¢er, G4double &closestDistance, G4double stepLim, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||
// Get absolutely nearest droplet - must be public as FastAerosolSolid uses it
|
||||
bool GetNearestDroplet(const G4ThreeVector &p, G4ThreeVector ¢er, G4double &closestDistance, G4double stepLim, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||
|
||||
// Get nearest droplet along a vector - must be public as FastAerosolSolid uses it
|
||||
bool GetNearestDroplet(const G4ThreeVector &p, const G4ThreeVector &v, G4ThreeVector ¢er, G4double &closestDistance, G4double stepLim, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||
// Get nearest droplet along a vector - must be public as FastAerosolSolid uses it
|
||||
bool GetNearestDroplet(const G4ThreeVector &p, const G4ThreeVector &v, G4ThreeVector ¢er, G4double &closestDistance, G4double stepLim, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||
|
||||
// ======
|
||||
// Inline
|
||||
// ======
|
||||
// Input quantities
|
||||
inline G4String GetName() const; // aerosol name
|
||||
inline G4VSolid* GetBulk() const; // bulk shape
|
||||
inline G4double GetRadius() const; // droplet radius
|
||||
inline G4double GetAvgNumDens() const; // droplet number density
|
||||
//inline G4double GetPitch() const; // grid pitch
|
||||
// ======
|
||||
// Inline
|
||||
// ======
|
||||
// Input quantities
|
||||
inline G4String GetName() const; //fasterosol name
|
||||
inline G4VSolid* GetBulk() const; // bulk shape
|
||||
inline G4double GetRadius() const; // droplet radius
|
||||
inline G4double GetAvgNumDens() const; // droplet number density
|
||||
//inline G4double GetPitch() const; // grid pitch
|
||||
|
||||
inline G4int GetNumDroplets() const; // in case the absolute number is more relevant than density
|
||||
inline G4int GetNumDroplets() const;
|
||||
// in case the absolute number is more relevant than density
|
||||
|
||||
// Bulk quantities
|
||||
inline G4double GetXHalfLength() const;
|
||||
inline G4double GetYHalfLength() const;
|
||||
inline G4double GetZHalfLength() const;
|
||||
inline void GetBoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const;
|
||||
inline G4double GetCubicVolume() const;
|
||||
// Bulk quantities
|
||||
inline G4double GetXHalfLength() const;
|
||||
inline G4double GetYHalfLength() const;
|
||||
inline G4double GetZHalfLength() const;
|
||||
inline void GetBoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const;
|
||||
inline G4double GetCubicVolume() const;
|
||||
|
||||
inline G4double DistanceToCloud(const G4ThreeVector &p);
|
||||
inline G4double DistanceToCloud(const G4ThreeVector &p, const G4ThreeVector &v);
|
||||
inline G4double DistanceToCloud(const G4ThreeVector &p);
|
||||
inline G4double DistanceToCloud(const G4ThreeVector &p, const G4ThreeVector &v);
|
||||
|
||||
// Misc getters and setters
|
||||
inline long GetSeed();
|
||||
inline void SetSeed(long seed);
|
||||
// Misc getters and setters
|
||||
inline long GetSeed();
|
||||
inline void SetSeed(long seed);
|
||||
|
||||
inline G4int GetNumPlacementTries();
|
||||
inline void SetNumPlacementTries(G4int numTries);
|
||||
inline G4int GetNumPlacementTries();
|
||||
inline void SetNumPlacementTries(G4int numTries);
|
||||
|
||||
inline G4int GetPreSphereR();
|
||||
inline void SetPreSphereR(G4int fPreSphereRIn);
|
||||
inline G4int GetPreSphereR();
|
||||
inline void SetPreSphereR(G4int fPreSphereRIn);
|
||||
|
||||
inline std::function<G4double (G4ThreeVector)> GetDistribution(); // the droplet number density distribution
|
||||
inline std::function<G4double (G4ThreeVector)> GetDistribution(); // the droplet number density distribution
|
||||
|
||||
inline G4double GetDropletsPerVoxel();
|
||||
inline void SetDropletsPerVoxel(G4double newDropletsPerVoxel);
|
||||
inline G4double GetDropletsPerVoxel();
|
||||
inline void SetDropletsPerVoxel(G4double newDropletsPerVoxel);
|
||||
|
||||
// Printing diagnostic tool
|
||||
inline void PrintPopulationReport();
|
||||
// Printing diagnostic tool
|
||||
inline void PrintPopulationReport();
|
||||
|
||||
private:
|
||||
G4double kCarTolerance;
|
||||
private:
|
||||
G4double kCarTolerance;
|
||||
|
||||
// Parameters, set in constructor
|
||||
G4String fName;
|
||||
// Parameters, set in constructor
|
||||
G4String fName;
|
||||
G4VSolid* fCloud; // Solid volume of the cloud
|
||||
G4double fDx, fDy, fDz; // Half widths
|
||||
G4double fR; // Bounding radius of each droplet
|
||||
G4double fR2; // Bounding radius squared of each droplet
|
||||
G4double fdR; // Uncertainty in DistanceToIn droplet when just using knowledge of droplet center
|
||||
|
||||
G4VSolid* fCloud; // Solid volume of the cloud
|
||||
G4double fDx, fDy, fDz; // Half widths
|
||||
G4double fMinD; // Minimum distance allowed between faces of droplets when constructing random array of droplets
|
||||
|
||||
G4double fR; // Bounding radius of each droplet
|
||||
G4double fR2; // Bounding radius squared of each droplet
|
||||
std::function<G4double (G4ThreeVector)> fDistribution;
|
||||
G4double fAvgNumDens; // Average droplet number density
|
||||
|
||||
G4double fdR; // Uncertainty in DistanceToIn droplet when just using knowledge of droplet center
|
||||
long int fNumDroplets = 0;
|
||||
// Number of droplets that have been created
|
||||
|
||||
G4double fMinD; // Minimum distance allowed between faces of droplets when constructing random array of droplets
|
||||
G4double fGridPitch;
|
||||
// Pitch of collision detection grid. Must be greater than diameter of droplets for correctness of collision detection.
|
||||
|
||||
std::function<G4double (G4ThreeVector)> fDistribution;
|
||||
G4double fAvgNumDens; // Average droplet number density
|
||||
long int fNumDroplets = 0; // Number of droplets that have been created
|
||||
// Ramdom engine
|
||||
CLHEP::HepJamesRandom fCloudEngine;
|
||||
long fSeed = 0; // Global random seed
|
||||
|
||||
G4double fGridPitch; // Pitch of collision detection grid. Must be greater than diameter of droplets for correctness of collision detection.
|
||||
G4double fDropletsPerVoxel = 4.0;
|
||||
// Expected number of droplets per voxel
|
||||
|
||||
// Ramdom engine
|
||||
CLHEP::HepJamesRandom fCloudEngine;
|
||||
long fSeed = 0; // Global random seed
|
||||
// How far the voxel center must be inside the bulk
|
||||
//order for there to be no risk of placing a droplet outside
|
||||
G4double fEdgeDistance;
|
||||
|
||||
G4double fDropletsPerVoxel = 4.0; // Expected number of droplets per voxel
|
||||
// Grid variables
|
||||
std::vector<std::vector<G4ThreeVector>> fGrid;
|
||||
// Grid of lists of inidices to grid points,
|
||||
//used for fast collsion checking
|
||||
|
||||
// How far the voxel center must be inside the bulk order for there to be no risk of placing a droplet outside
|
||||
G4double fEdgeDistance;
|
||||
std::vector<G4double> fGridMean;
|
||||
// Array listing mean count for each voxel
|
||||
|
||||
// Grid variables
|
||||
std::vector<std::vector<G4ThreeVector>> fGrid;// Grid of lists of inidices to grid points, used for fast collsion checking
|
||||
std::vector<G4double> fGridMean; // Array listing mean count for each voxel
|
||||
std::atomic<bool> *fGridValid; // Array listing validity of each grid. uses atomic variables
|
||||
std::atomic<bool> *fGridValid;
|
||||
// Array listing validity of each grid. uses atomic variables
|
||||
|
||||
G4int fNx, fNy, fNz; // Number of x, y, and z elements in fGrid
|
||||
G4int fNxy; // Cached fNx*fNy
|
||||
long int fNumGridCells; // Cached fNx*fNy*fNz
|
||||
G4int fNx, fNy, fNz; // Number of x, y, and z elements in fGrid
|
||||
|
||||
G4int fNxy; // Cached fNx*fNy
|
||||
long int fNumGridCells; // Cached fNx*fNy*fNz
|
||||
|
||||
G4double fCollisionLimit2; // Threshold distance squared when checking for collsion
|
||||
G4int fNumNewPointTries = 100; // How many times we try to place droplets
|
||||
G4double fMaxDropPercent = 1.0; // The maximal percentage of skipped droplets before crashing0
|
||||
G4int fMaxDropCount; // The maximal number of skipped droplets before crashing
|
||||
G4int fNumDropped = 0; // Number of skipped droplets due to collisions/out of bulk placement
|
||||
|
||||
G4int fNumCollisions = 0; // How many collisions occured when attempting to place
|
||||
|
||||
// Droplet search variables
|
||||
G4int fVectorSearchRadius; // maximum vector search radius
|
||||
|
||||
// Droplet placement functions
|
||||
// ===========================
|
||||
void InitializeGrid();
|
||||
|
||||
G4bool FindNewPoint(G4bool edgeVoxel, G4double dX, G4double dY, G4double dZ, G4double minX, G4double minY, G4double minZ, G4ThreeVector &foundVec);
|
||||
|
||||
G4double VoxelOverlap(G4ThreeVector voxelCenter, G4int nStat, G4double epsilon);
|
||||
|
||||
bool CheckCollision(G4double x, G4double y, G4double z);
|
||||
bool CheckCollisionInsideGrid(G4double x, G4double y, G4double z, unsigned int xi, unsigned int yi, unsigned int zi);
|
||||
bool CheckCollisionWithDroplet(G4double x, G4double y, G4double z, G4ThreeVector p);
|
||||
|
||||
// Droplet distance functions
|
||||
// ==========================
|
||||
void SearchSphere(G4int searchRad, G4double &minDistance, std::vector<G4ThreeVector> &candidates, std::vector<G4double> &distances2, G4int xGrid, G4int yGrid, G4int zGrid, const G4ThreeVector &p);
|
||||
void GetNearestDropletInsideRegion(G4double &minDistance, G4ThreeVector ¢er, int xGrid, int yGrid, int zGrid, int xWidth, int yWidth, int zWidth, const G4ThreeVector &p, const G4ThreeVector &v, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||
void GetNearestDropletInsideGrid(G4double &minDistance, std::vector<G4ThreeVector> &candidates, std::vector<G4double> &distances2, unsigned int xGrid, unsigned int yGrid, unsigned int zGrid, const G4ThreeVector &p);
|
||||
void GetNearestDropletInsideGrid(G4double &minDistance, G4ThreeVector ¢er, unsigned int xGrid, unsigned int yGrid, unsigned int zGrid, const G4ThreeVector &p, const G4ThreeVector &v, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||
|
||||
// Voxelized sphere methods
|
||||
// ========================
|
||||
// a collection of points as in {{x1,y1},{x2,y2},...}
|
||||
typedef std::vector<std::vector<int>> fCircleType;
|
||||
|
||||
// a collection of points describing a spherical shell
|
||||
// with points (x,y,z)=(i-R,j-R,sphere[i][j][k])
|
||||
// that is, first index gives x-position, second index
|
||||
// gives y-position, and the value gives z-position
|
||||
//
|
||||
// this is done so that searching may be optimized:
|
||||
// if searching some x=i-R that is outside the
|
||||
// aerosol's bounding box, immediately increment i
|
||||
// (similar for y).
|
||||
typedef std::vector<std::vector<std::vector<int>>> fSphereType;
|
||||
|
||||
G4int fMaxCircleR;
|
||||
G4int fMaxSphereR;
|
||||
G4int fPreSphereR = 20;
|
||||
std::vector<fCircleType> fCircleCollection;
|
||||
std::vector<fSphereType> fSphereCollection;
|
||||
G4double fCollisionLimit2;
|
||||
// Threshold distance squared when checking for collsion
|
||||
|
||||
fSphereType MakeSphere(G4int R);
|
||||
fCircleType MakeCircle(G4int R);
|
||||
fCircleType MakeHalfCircle(G4int R);
|
||||
G4int fNumNewPointTries = 100;
|
||||
// How many times we try to place droplets
|
||||
|
||||
G4double fMaxDropPercent = 1.0;
|
||||
// The maximal percentage of skipped droplets before crashing0
|
||||
|
||||
void PopulateGrid(unsigned int xi, unsigned int yi, unsigned int zi, unsigned int& gi);
|
||||
G4int fMaxDropCount;
|
||||
// The maximal number of skipped droplets before crashing
|
||||
|
||||
G4int fNumDropped = 0;
|
||||
// Number of skipped droplets due to collisions/out of bulk placement
|
||||
|
||||
// ======
|
||||
// Inline
|
||||
// ======
|
||||
inline bool GetGrid(const G4ThreeVector &p, G4int &xGrid, G4int &yGrid, G4int &zGrid);
|
||||
inline bool AnyIndexOutOfBounds(G4int xGrid, G4int yGrid, G4int zGrid);
|
||||
G4int fNumCollisions = 0;
|
||||
// How many collisions occured when attempting to place
|
||||
|
||||
inline unsigned int GetGridIndex(unsigned int xi, unsigned int yi, unsigned int zi);
|
||||
inline G4ThreeVector GetIndexCoord(G4int index);
|
||||
// Droplet search variables
|
||||
G4int fVectorSearchRadius;
|
||||
// maximum vector search radius
|
||||
|
||||
inline std::pair<G4int, G4int> GetMinMaxSide(G4int index, G4int numGrids);
|
||||
// Droplet placement functions
|
||||
// ===========================
|
||||
void InitializeGrid();
|
||||
|
||||
G4bool FindNewPoint(G4bool edgeVoxel, G4double dX, G4double dY, G4double dZ, G4double minX, G4double minY, G4double minZ, G4ThreeVector &foundVec);
|
||||
|
||||
G4double VoxelOverlap(G4ThreeVector voxelCenter, G4int nStat, G4double epsilon);
|
||||
|
||||
bool CheckCollision(G4double x, G4double y, G4double z);
|
||||
bool CheckCollisionInsideGrid(G4double x, G4double y, G4double z, unsigned int xi, unsigned int yi, unsigned int zi);
|
||||
bool CheckCollisionWithDroplet(G4double x, G4double y, G4double z, G4ThreeVector p);
|
||||
|
||||
// Droplet distance functions
|
||||
// ==========================
|
||||
void SearchSphere(G4int searchRad, G4double &minDistance, std::vector<G4ThreeVector> &candidates, std::vector<G4double> &distances2, G4int xGrid, G4int yGrid, G4int zGrid, const G4ThreeVector &p);
|
||||
|
||||
void GetNearestDropletInsideRegion(G4double &minDistance, G4ThreeVector ¢er, int xGrid, int yGrid, int zGrid, int xWidth, int yWidth, int zWidth, const G4ThreeVector &p, const G4ThreeVector &v, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||
|
||||
void GetNearestDropletInsideGrid(G4double &minDistance, std::vector<G4ThreeVector> &candidates, std::vector<G4double> &distances2, unsigned int xGrid, unsigned int yGrid, unsigned int zGrid, const G4ThreeVector &p);
|
||||
|
||||
void GetNearestDropletInsideGrid(G4double &minDistance, G4ThreeVector ¢er, unsigned int xGrid, unsigned int yGrid, unsigned int zGrid, const G4ThreeVector &p, const G4ThreeVector &v, G4VSolid* droplet, std::function<G4RotationMatrix (G4ThreeVector)> rotation);
|
||||
|
||||
// Voxelized sphere methods
|
||||
// ========================
|
||||
// a collection of points as in {{x1,y1},{x2,y2},...}
|
||||
typedef std::vector<std::vector<int>> fCircleType;
|
||||
|
||||
// a collection of points describing a spherical shell
|
||||
// with points (x,y,z)=(i-R,j-R,sphere[i][j][k])
|
||||
// that is, first index gives x-position, second index
|
||||
// gives y-position, and the value gives z-position
|
||||
//
|
||||
// this is done so that searching may be optimized:
|
||||
// if searching some x=i-R that is outside the
|
||||
// aerosol's bounding box, immediately increment i
|
||||
// (similar for y).
|
||||
typedef std::vector<std::vector<std::vector<int>>> fSphereType;
|
||||
|
||||
G4int fMaxCircleR;
|
||||
G4int fMaxSphereR;
|
||||
G4int fPreSphereR = 20;
|
||||
std::vector<fCircleType> fCircleCollection;
|
||||
std::vector<fSphereType> fSphereCollection;
|
||||
fSphereType MakeSphere(G4int R);
|
||||
fCircleType MakeCircle(G4int R);
|
||||
fCircleType MakeHalfCircle(G4int R);
|
||||
|
||||
void PopulateGrid(unsigned int xi, unsigned int yi, unsigned int zi, unsigned int& gi);
|
||||
|
||||
// ======
|
||||
// Inline
|
||||
// ======
|
||||
inline bool GetGrid(const G4ThreeVector &p, G4int &xGrid, G4int &yGrid, G4int &zGrid);
|
||||
|
||||
inline bool AnyIndexOutOfBounds(G4int xGrid, G4int yGrid, G4int zGrid);
|
||||
|
||||
inline unsigned int GetGridIndex(unsigned int xi, unsigned int yi, unsigned int zi);
|
||||
|
||||
inline G4ThreeVector GetIndexCoord(G4int index);
|
||||
|
||||
inline std::pair<G4int, G4int> GetMinMaxSide(G4int index, G4int numGrids);
|
||||
};
|
||||
|
||||
#include "FastAerosol.icc"
|
||||
|
||||
@@ -58,93 +58,94 @@
|
||||
|
||||
class FastAerosolSolid : public G4VSolid
|
||||
{
|
||||
public:
|
||||
FastAerosolSolid(const G4String& pName,
|
||||
FastAerosol* pCloud,
|
||||
G4VSolid* pDroplet,
|
||||
std::function<G4RotationMatrix (G4ThreeVector)> pRotation);
|
||||
public:
|
||||
FastAerosolSolid(const G4String& pName, FastAerosol* pCloud,
|
||||
G4VSolid* pDroplet,
|
||||
std::function<G4RotationMatrix (G4ThreeVector)> pRotation);
|
||||
|
||||
FastAerosolSolid(const G4String& pName,
|
||||
FastAerosol* pCloud,
|
||||
G4VSolid* pDroplet);
|
||||
~FastAerosolSolid();
|
||||
FastAerosolSolid(const G4String& pName, FastAerosol* pCloud,
|
||||
G4VSolid* pDroplet);
|
||||
~FastAerosolSolid()=default;
|
||||
|
||||
// Access functions
|
||||
inline G4double GetCubicVolume();
|
||||
inline G4double GetSurfaceArea();
|
||||
// Access functions
|
||||
inline G4double GetCubicVolume();
|
||||
inline G4double GetSurfaceArea();
|
||||
|
||||
// Solid standard methods
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pmin, G4double& pmax) const;
|
||||
EInside Inside(const G4ThreeVector& p) const;
|
||||
G4ThreeVector SurfaceNormal( const G4ThreeVector& p) const;
|
||||
G4double DistanceToIn(const G4ThreeVector& p,
|
||||
const G4ThreeVector& v) const;
|
||||
G4double DistanceToIn(const G4ThreeVector& p) const;
|
||||
G4double DistanceToOut(const G4ThreeVector& p,
|
||||
const G4ThreeVector& v,
|
||||
const G4bool calcNorm=G4bool(false),
|
||||
G4bool *validNorm=0,
|
||||
G4ThreeVector *n=0) const;
|
||||
G4double DistanceToOut(const G4ThreeVector& p) const;
|
||||
// Solid standard methods
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pmin, G4double& pmax) const;
|
||||
|
||||
G4GeometryType GetEntityType() const;
|
||||
EInside Inside(const G4ThreeVector& p) const;
|
||||
|
||||
G4ThreeVector SurfaceNormal(const G4ThreeVector& p) const;
|
||||
|
||||
G4double DistanceToIn(const G4ThreeVector& p,
|
||||
const G4ThreeVector& v) const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
G4double DistanceToIn(const G4ThreeVector& p) const;
|
||||
G4double DistanceToOut(const G4ThreeVector& p,
|
||||
const G4ThreeVector& v,
|
||||
const G4bool calcNorm=G4bool(false),
|
||||
G4bool *validNorm=0, G4ThreeVector *n=0) const;
|
||||
|
||||
G4double DistanceToOut(const G4ThreeVector& p) const;
|
||||
|
||||
std::ostream& StreamInfo(std::ostream& os) const;
|
||||
G4GeometryType GetEntityType() const;
|
||||
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
G4Polyhedron* GetPolyhedron () const;
|
||||
void DescribeYourselfTo(G4VGraphicsScene& scene) const;
|
||||
G4VisExtent GetExtent() const;
|
||||
G4Polyhedron* CreatePolyhedron() const;
|
||||
std::ostream& StreamInfo(std::ostream& os) const;
|
||||
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
|
||||
public: // without description
|
||||
|
||||
FastAerosolSolid(__void__&);
|
||||
//
|
||||
// Fake default constructor for usage restricted to direct object
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
G4Polyhedron* GetPolyhedron () const;
|
||||
void DescribeYourselfTo(G4VGraphicsScene& scene) const;
|
||||
G4VisExtent GetExtent() const;
|
||||
G4Polyhedron* CreatePolyhedron() const;
|
||||
|
||||
FastAerosolSolid(const FastAerosolSolid& rhs);
|
||||
FastAerosolSolid& operator=(const FastAerosolSolid& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
public: // without description
|
||||
FastAerosolSolid(__void__&);
|
||||
//
|
||||
// Fake default constructor for usage restricted to direct object
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
inline void SetStepLim(G4double newLim);
|
||||
FastAerosolSolid(const FastAerosolSolid& rhs);
|
||||
FastAerosolSolid& operator=(const FastAerosolSolid& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
private:
|
||||
inline void SetStepLim(G4double newLim);
|
||||
|
||||
private:
|
||||
|
||||
inline void Initialize();
|
||||
//
|
||||
// Reset relevant values to zero
|
||||
inline void Initialize();
|
||||
//
|
||||
// Reset relevant values to zero
|
||||
|
||||
G4double fStepLim = DBL_MAX; // Maximum step length. Allows speed up in droplet search
|
||||
G4double fStepLim = DBL_MAX; // Maximum step length. Allows speed up in droplet search
|
||||
|
||||
FastAerosol* fCloud; // FastAerosol which handles brunt of work
|
||||
G4VSolid* fDroplet; // Droplet shape
|
||||
G4VSolid* fBulk; // Aerosol bulk
|
||||
FastAerosol* fCloud; // FastAerosol which handles brunt of work
|
||||
G4VSolid* fDroplet; // Droplet shape
|
||||
G4VSolid* fBulk; // Aerosol bulk
|
||||
|
||||
G4double fR = 0.0; // Droplet bounding radius
|
||||
G4double fR = 0.0; // Droplet bounding radius
|
||||
|
||||
G4double fVisDx, fVisDy, fVisDz; // Visual extent
|
||||
G4double fVisDx, fVisDy, fVisDz; // Visual extent
|
||||
|
||||
G4double fCubicVolume = 0.0; // Cubic volume of all droplets
|
||||
G4double fSurfaceArea = 0.0; // Surface area of all droplets
|
||||
G4double fCubicVolume = 0.0; // Cubic volume of all droplets
|
||||
G4double fSurfaceArea = 0.0; // Surface area of all droplets
|
||||
|
||||
G4double farFromCloudDist;
|
||||
G4double farFromCloudDist;
|
||||
|
||||
std::function<G4RotationMatrix (G4ThreeVector)> fRotation; // rotation function
|
||||
std::function<G4RotationMatrix (G4ThreeVector)> fRotation;
|
||||
// rotation function
|
||||
|
||||
protected: // without description
|
||||
protected: // without description
|
||||
|
||||
mutable G4bool fRebuildPolyhedron;
|
||||
mutable G4Polyhedron* fpPolyhedron;
|
||||
mutable G4bool fRebuildPolyhedron;
|
||||
mutable G4Polyhedron* fpPolyhedron;
|
||||
};
|
||||
|
||||
#include "FastAerosolSolid.icc"
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// (copied from B1ActionInitialization)
|
||||
|
||||
#include "FAActionInitialization.hh"
|
||||
@@ -36,12 +35,9 @@ ActionInitialization::ActionInitialization()
|
||||
: G4VUserActionInitialization()
|
||||
{}
|
||||
|
||||
ActionInitialization::~ActionInitialization()
|
||||
{}
|
||||
|
||||
void ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
RunAction* runAction = new RunAction;
|
||||
auto* runAction = new RunAction;
|
||||
SetUserAction(runAction);
|
||||
}
|
||||
|
||||
@@ -49,10 +45,10 @@ void ActionInitialization::Build() const
|
||||
{
|
||||
SetUserAction(new PrimaryGeneratorAction);
|
||||
|
||||
RunAction* runAction = new RunAction;
|
||||
auto* runAction = new RunAction;
|
||||
SetUserAction(runAction);
|
||||
|
||||
EventAction* eventAction = new EventAction(runAction);
|
||||
auto* eventAction = new EventAction(runAction);
|
||||
SetUserAction(eventAction);
|
||||
|
||||
SetUserAction(new SteppingAction(eventAction));
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// (adapted from B2bChamberParameterisation)
|
||||
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||
|
||||
@@ -38,14 +37,11 @@ CloudParameterisation::CloudParameterisation(
|
||||
const std::vector<G4ThreeVector>& positions)
|
||||
: G4VPVParameterisation()
|
||||
{
|
||||
fPositions = positions;
|
||||
fPositions = positions;
|
||||
}
|
||||
|
||||
CloudParameterisation::~CloudParameterisation()
|
||||
{ }
|
||||
|
||||
void CloudParameterisation::ComputeTransformation
|
||||
(const G4int copyNo, G4VPhysicalVolume* physVol) const
|
||||
{
|
||||
physVol->SetTranslation(fPositions[copyNo]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,499 +63,437 @@
|
||||
|
||||
// to save distribution
|
||||
#include <sys/stat.h>
|
||||
#include <ctime> // for measuring FastAerosol droplet center population time
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
#include <ctime>
|
||||
// for measuring FastAerosol droplet center population time
|
||||
|
||||
DetectorConstruction::DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fScoringVolume(0)
|
||||
fScoringVolume(nullptr)
|
||||
{
|
||||
fMessenger = new DetectorConstructionMessenger(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
DetectorConstruction::~DetectorConstruction()
|
||||
{
|
||||
delete fMessenger;
|
||||
|
||||
delete fStepLimits;
|
||||
|
||||
delete fCloudShape;
|
||||
delete fDropletShape;
|
||||
|
||||
delete fCloud;
|
||||
delete fMessenger;
|
||||
delete fStepLimits;
|
||||
delete fCloudShape;
|
||||
delete fDropletShape;
|
||||
delete fCloud;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||
{
|
||||
//
|
||||
// Check cloud build settings
|
||||
//
|
||||
if (fFastAerosolCloud + fParameterisedCloud + fSmoothCloud > 1)
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Must select at most one build type! Selections:" << G4endl
|
||||
<< " fFastAerosolCloud = " << fFastAerosolCloud << G4endl
|
||||
<< " fParameterisedCloud = " << fParameterisedCloud << G4endl
|
||||
<< " fSmoothCloud = " << fSmoothCloud << G4endl;
|
||||
//
|
||||
// Check cloud build settings
|
||||
//
|
||||
if (fFastAerosolCloud + fParameterisedCloud + fSmoothCloud > 1)
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Must select at most one build type! Selections:" << G4endl
|
||||
<< " fFastAerosolCloud = " << fFastAerosolCloud << G4endl
|
||||
<< " fParameterisedCloud = " << fParameterisedCloud << G4endl
|
||||
<< " fSmoothCloud = " << fSmoothCloud << G4endl;
|
||||
G4Exception("DetectorConstruction::Construct()", "GeomSolids0002",
|
||||
FatalException, message);
|
||||
}
|
||||
//
|
||||
// Get nist material manager
|
||||
//
|
||||
G4NistManager* nist = G4NistManager::Instance();
|
||||
//
|
||||
// Option to switch on/off checking of volumes overlaps
|
||||
//
|
||||
G4bool checkOverlaps = false;
|
||||
//
|
||||
// Large scale geometry dimensions
|
||||
//
|
||||
G4double cloud_sizeXY = 0.5*m;
|
||||
G4double cloud_sizeZ = 5.0*m;
|
||||
|
||||
G4double world_sizeXY = 1.1*(cloud_sizeXY);
|
||||
G4double world_sizeZ= 1.1*(cloud_sizeZ);
|
||||
//
|
||||
// Cloud shape
|
||||
//
|
||||
if (fCloudShapeStr == "box")
|
||||
{
|
||||
G4cout << "Cloud shape = box" << G4endl;
|
||||
fCloudShape = new G4Box("cloudShape", 0.5*cloud_sizeXY, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ);
|
||||
}
|
||||
else if (fCloudShapeStr == "ellipsoid")
|
||||
{
|
||||
G4cout << "Cloud shape = ellipsoid" << G4endl;
|
||||
fCloudShape = new G4Ellipsoid("cloudShape", 0.5*cloud_sizeXY, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ, 0, 0);
|
||||
}
|
||||
else if (fCloudShapeStr == "cylinder")
|
||||
{
|
||||
G4cout << "Cloud shape = cylinder" << G4endl;
|
||||
fCloudShape = new G4Tubs("cloudShape", 0.0, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ, 0, 360*deg);
|
||||
}
|
||||
else if (fCloudShapeStr == "pipe")
|
||||
{
|
||||
G4cout << "Cloud shape = pipe" << G4endl;
|
||||
fCloudShape = new G4Tubs("cloudShape", 0.25*cloud_sizeXY, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ, 0, 360.*deg);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Invalid cloud shape = " << fCloudShapeStr << "!";
|
||||
G4Exception("DetectorConstruction::Construct()", "GeomSolids0002",
|
||||
FatalException, message);
|
||||
}
|
||||
|
||||
//
|
||||
// Droplet Shape
|
||||
//
|
||||
|
||||
// The difference in radii of the maximal sphere (centered at the origin) contained in the droplet and the minimal sphere (centered at the origin) containing the droplet
|
||||
G4double sphericalUncertainty = 0.0;
|
||||
if (fDropletShapeStr == "sphere")
|
||||
{
|
||||
G4cout << "Droplet shape = sphere" << G4endl;
|
||||
fDropletShape = new G4Orb("dropletSV", fDropletR);
|
||||
sphericalUncertainty = 0.0;
|
||||
}
|
||||
else if (fDropletShapeStr == "halfSphere")
|
||||
{
|
||||
G4cout << "Droplet shape = halfSphere" << G4endl;
|
||||
fDropletShape = new G4Sphere("dropletSV", 0.0, fDropletR, 0.0, 180.*deg, 0.0, 180.*deg);
|
||||
sphericalUncertainty = fDropletR;
|
||||
}
|
||||
else if (fDropletShapeStr == "cylinder")
|
||||
{
|
||||
G4cout << "Droplet shape = cylinder" << G4endl;
|
||||
fDropletShape = new G4Tubs("dropletSV", 0, fDropletR/std::sqrt(3), fDropletR/std::sqrt(3), 0, 360.*deg);
|
||||
sphericalUncertainty = fDropletR*(1-1/std::sqrt(3));
|
||||
}
|
||||
else if (fDropletShapeStr == "box")
|
||||
{
|
||||
G4cout << "Droplet shape = box" << G4endl;
|
||||
fDropletShape = new G4Box("dropletSV", fDropletR/std::sqrt(3), fDropletR/std::sqrt(3), fDropletR/std::sqrt(3));
|
||||
sphericalUncertainty = fDropletR*(1-1/std::sqrt(3));
|
||||
}
|
||||
else
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Invalid droplet shape = " << fCloudShapeStr << "!";
|
||||
G4Exception("DetectorConstruction::Construct()", "GeomSolids0002",
|
||||
FatalException, message);
|
||||
}
|
||||
|
||||
//
|
||||
// Materials
|
||||
//
|
||||
// Compute the density of air at 14 km using the Barometric formula
|
||||
// see, e.g., https://en.wikipedia.org/wiki/Density_of_air
|
||||
G4double h = 14.0*km;
|
||||
G4double p0 = 101325*hep_pascal;
|
||||
G4double T0 = 288.15*kelvin;
|
||||
G4double grav = 9.80665*m/(s*s);
|
||||
G4double La = 0.0065*kelvin/m;
|
||||
G4double R = 8.31447*joule/(mole*kelvin);
|
||||
G4double M = 0.0289644*kg/mole;
|
||||
G4double T = T0 - La*h;
|
||||
G4double p = p0*std::pow(1-La*h/T0,grav*M/(R*La));
|
||||
G4double air_density = p*M/(R*T);
|
||||
|
||||
//
|
||||
// Get nist material manager
|
||||
//
|
||||
G4NistManager* nist = G4NistManager::Instance();
|
||||
// make materials and set densities
|
||||
G4Material* air_mat = nist->BuildMaterialWithNewDensity("Atmosphere","G4_AIR",air_density);
|
||||
G4Material* water_mat = nist->FindOrBuildMaterial("G4_WATER");
|
||||
|
||||
|
||||
//
|
||||
// Option to switch on/off checking of volumes overlaps
|
||||
//
|
||||
G4bool checkOverlaps = false;
|
||||
|
||||
|
||||
//
|
||||
// Large scale geometry dimensions
|
||||
//
|
||||
G4double cloud_sizeXY = 0.5*m;
|
||||
G4double cloud_sizeZ = 5.0*m;
|
||||
|
||||
G4double world_sizeXY = 1.1*(cloud_sizeXY);
|
||||
G4double world_sizeZ= 1.1*(cloud_sizeZ);
|
||||
|
||||
|
||||
//
|
||||
// Cloud shape
|
||||
//
|
||||
if (fCloudShapeStr == "box")
|
||||
{
|
||||
G4cout << "Cloud shape = box" << G4endl;
|
||||
fCloudShape = new G4Box("cloudShape", 0.5*cloud_sizeXY, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ);
|
||||
}
|
||||
else if (fCloudShapeStr == "ellipsoid")
|
||||
{
|
||||
G4cout << "Cloud shape = ellipsoid" << G4endl;
|
||||
fCloudShape = new G4Ellipsoid("cloudShape", 0.5*cloud_sizeXY, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ, 0, 0);
|
||||
}
|
||||
else if (fCloudShapeStr == "cylinder")
|
||||
{
|
||||
G4cout << "Cloud shape = cylinder" << G4endl;
|
||||
fCloudShape = new G4Tubs("cloudShape", 0.0, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ, 0, 360*deg);
|
||||
}
|
||||
else if (fCloudShapeStr == "pipe")
|
||||
{
|
||||
G4cout << "Cloud shape = pipe" << G4endl;
|
||||
fCloudShape = new G4Tubs("cloudShape", 0.25*cloud_sizeXY, 0.5*cloud_sizeXY, 0.5*cloud_sizeZ, 0, 360.*deg);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Invalid cloud shape = " << fCloudShapeStr << "!";
|
||||
G4Exception("DetectorConstruction::Construct()", "GeomSolids0002",
|
||||
FatalException, message);
|
||||
}
|
||||
|
||||
//
|
||||
// Droplet Shape
|
||||
//
|
||||
|
||||
// The difference in radii of the maximal sphere (centered at the origin) contained in the droplet and the minimal sphere (centered at the origin) containing the droplet
|
||||
G4double sphericalUncertainty = 0.0;
|
||||
|
||||
if (fDropletShapeStr == "sphere")
|
||||
{
|
||||
G4cout << "Droplet shape = sphere" << G4endl;
|
||||
fDropletShape = new G4Orb("dropletSV", fDropletR);
|
||||
sphericalUncertainty = 0.0;
|
||||
}
|
||||
else if (fDropletShapeStr == "halfSphere")
|
||||
{
|
||||
G4cout << "Droplet shape = halfSphere" << G4endl;
|
||||
fDropletShape = new G4Sphere("dropletSV", 0.0, fDropletR,
|
||||
0.0, 180.*deg,
|
||||
0.0, 180.*deg);
|
||||
sphericalUncertainty = fDropletR;
|
||||
}
|
||||
else if (fDropletShapeStr == "cylinder")
|
||||
{
|
||||
G4cout << "Droplet shape = cylinder" << G4endl;
|
||||
fDropletShape = new G4Tubs("dropletSV", 0, fDropletR/std::sqrt(3), fDropletR/std::sqrt(3), 0, 360.*deg);
|
||||
sphericalUncertainty = fDropletR*(1-1/std::sqrt(3));
|
||||
}
|
||||
else if (fDropletShapeStr == "box")
|
||||
{
|
||||
G4cout << "Droplet shape = box" << G4endl;
|
||||
fDropletShape = new G4Box("dropletSV", fDropletR/std::sqrt(3), fDropletR/std::sqrt(3), fDropletR/std::sqrt(3));
|
||||
sphericalUncertainty = fDropletR*(1-1/std::sqrt(3));
|
||||
}
|
||||
else
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Invalid droplet shape = " << fCloudShapeStr << "!";
|
||||
G4Exception("DetectorConstruction::Construct()", "GeomSolids0002",
|
||||
FatalException, message);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Materials
|
||||
//
|
||||
|
||||
// Compute the density of air at 14 km using the Barometric formula
|
||||
// see, e.g., https://en.wikipedia.org/wiki/Density_of_air
|
||||
G4double h = 14.0*km;
|
||||
G4double p0 = 101325*hep_pascal;
|
||||
G4double T0 = 288.15*kelvin;
|
||||
G4double grav = 9.80665*m/(s*s);
|
||||
G4double La = 0.0065*kelvin/m;
|
||||
G4double R = 8.31447*joule/(mole*kelvin);
|
||||
G4double M = 0.0289644*kg/mole;
|
||||
G4double T = T0 - La*h;
|
||||
G4double p = p0*std::pow(1-La*h/T0,grav*M/(R*La));
|
||||
G4double air_density = p*M/(R*T);
|
||||
|
||||
// make materials and set densities
|
||||
G4Material* air_mat = nist->BuildMaterialWithNewDensity("Atmosphere","G4_AIR",air_density);
|
||||
G4Material* water_mat = nist->FindOrBuildMaterial("G4_WATER");
|
||||
|
||||
G4double water_density = water_mat->GetDensity();
|
||||
G4double ice_density = 0.9168*g/cm3;
|
||||
G4double water_density = water_mat->GetDensity();
|
||||
G4double ice_density = 0.9168*g/cm3;
|
||||
|
||||
G4Material* ice_mat = new G4Material("Water ice ", ice_density, 1, kStateSolid, T, p);
|
||||
ice_mat->AddMaterial(water_mat, 1.);
|
||||
G4Material* ice_mat = new G4Material("Water ice ", ice_density, 1, kStateSolid, T, p);
|
||||
ice_mat->AddMaterial(water_mat, 1.);
|
||||
|
||||
//
|
||||
// Droplets
|
||||
//
|
||||
G4double droplet_density = water_density;
|
||||
G4Material* droplet_mat = water_mat;
|
||||
|
||||
//
|
||||
// Droplets
|
||||
//
|
||||
G4double droplet_density = water_density;
|
||||
G4Material* droplet_mat = water_mat;
|
||||
G4double droplet_count = fDropletNumDens*(fCloudShape->GetCubicVolume());
|
||||
|
||||
G4double droplet_count = fDropletNumDens*(fCloudShape->GetCubicVolume());
|
||||
G4double droplet_volume = fDropletShape->GetCubicVolume();
|
||||
G4double droplet_total_volume = droplet_count*droplet_volume;
|
||||
|
||||
G4double droplet_volume = fDropletShape->GetCubicVolume();
|
||||
G4double droplet_total_volume = droplet_count*droplet_volume;
|
||||
G4double droplet_total_mass = droplet_total_volume*droplet_density;
|
||||
|
||||
G4double droplet_total_mass = droplet_total_volume*droplet_density;
|
||||
//
|
||||
// Cloud macroscopic quantities
|
||||
//
|
||||
G4double cloud_volume = fCloudShape->GetCubicVolume();
|
||||
G4double cloud_air_volume = cloud_volume - droplet_total_volume;
|
||||
G4double cloud_air_mass = air_density*cloud_air_volume;
|
||||
|
||||
//
|
||||
// Step limit
|
||||
//
|
||||
fStepLimits = new G4UserLimits(fStepLim);
|
||||
|
||||
//
|
||||
// Cloud macroscopic quantities
|
||||
//
|
||||
G4double cloud_volume = fCloudShape->GetCubicVolume();
|
||||
G4double cloud_air_volume = cloud_volume - droplet_total_volume;
|
||||
G4double cloud_air_mass = air_density*cloud_air_volume;
|
||||
//
|
||||
// Build world
|
||||
//
|
||||
G4Box* solidWorld =new G4Box("World",//its name
|
||||
0.5*world_sizeXY,//half x-span
|
||||
0.5*world_sizeXY,//half y-span
|
||||
0.5*world_sizeZ);//half z-span
|
||||
|
||||
G4LogicalVolume* logicWorld =
|
||||
new G4LogicalVolume(solidWorld, //its solid
|
||||
air_mat, //its material
|
||||
"World");//its name
|
||||
|
||||
//
|
||||
// Step limit
|
||||
//
|
||||
fStepLimits = new G4UserLimits(fStepLim);
|
||||
|
||||
|
||||
//
|
||||
// Build world
|
||||
//
|
||||
G4Box* solidWorld =
|
||||
new G4Box("World", //its name
|
||||
0.5*world_sizeXY, //half x-span
|
||||
0.5*world_sizeXY, //half y-span
|
||||
0.5*world_sizeZ); //half z-span
|
||||
|
||||
G4LogicalVolume* logicWorld =
|
||||
new G4LogicalVolume(solidWorld, //its solid
|
||||
air_mat, //its material
|
||||
"World"); //its name
|
||||
|
||||
logicWorld->SetUserLimits(fStepLimits);
|
||||
logicWorld->SetUserLimits(fStepLimits);
|
||||
|
||||
G4VPhysicalVolume* physWorld =
|
||||
new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
logicWorld, //its logical volume
|
||||
"World", //its name
|
||||
0, //its mothervolume
|
||||
false, //no boolean operation
|
||||
0, //copy number
|
||||
checkOverlaps); //overlaps checking
|
||||
G4VPhysicalVolume* physWorld = new G4PVPlacement(nullptr,//no rotation
|
||||
G4ThreeVector(),//at (0,0,0)
|
||||
logicWorld,//its logical volume
|
||||
"World",//its name
|
||||
nullptr,//its mothervolume
|
||||
false,//no boolean operation
|
||||
0, //copy number
|
||||
checkOverlaps); //overlaps checking
|
||||
|
||||
//
|
||||
// Build cloud
|
||||
//
|
||||
G4LogicalVolume* logicCloud;
|
||||
|
||||
//
|
||||
// Build cloud
|
||||
//
|
||||
G4LogicalVolume* logicCloud;
|
||||
// **********************************************************
|
||||
//
|
||||
// Build the cloud using the FastAerosol geometry class
|
||||
//
|
||||
// ***********************************************************
|
||||
|
||||
// **********************************************************
|
||||
//
|
||||
// Build the cloud using the FastAerosol geometry class
|
||||
//
|
||||
// ***********************************************************
|
||||
if (fFastAerosolCloud) {
|
||||
G4cout << "\nFastAerosol geometry with n=" << fDropletNumDens*mm3 << "/mm3, r=" << fDropletR/mm << "mm spheres.\n" << G4endl;
|
||||
if (fFastAerosolCloud)
|
||||
{
|
||||
G4cout << "\nFastAerosol geometry with n=" << fDropletNumDens*mm3 << "/mm3, r=" << fDropletR/mm << "mm spheres.\n" << G4endl;
|
||||
|
||||
fCloud = new FastAerosol("cloud",
|
||||
fCloudShape, //cloud shape
|
||||
fDropletR, //bounding radius of droplets
|
||||
fMinSpacing, //minimum spacing between droplets
|
||||
fDropletNumDens, //approximate number of droplets in cloud
|
||||
sphericalUncertainty); //uncertainty in distance to droplet surface from outside using just droplet's origin as info
|
||||
fCloud->SetDropletsPerVoxel(4);
|
||||
|
||||
/*
|
||||
fCloud = new FastAerosol("fCloud",
|
||||
fCloudShape, //cloud shape
|
||||
fDropletR, //bounding radius of droplets
|
||||
fMinSpacing, //minimum spacing between droplets
|
||||
fDropletNumDens, //approximate number of droplets in cloud
|
||||
sphericalUncertainty, //uncertainty in distance to droplet surface from outside using just droplet's origin as info
|
||||
[](G4ThreeVector pos) {return pos.x();}); //number density distribution function
|
||||
*/
|
||||
fCloud = new FastAerosol("cloud", fCloudShape,//cloud shape
|
||||
fDropletR, //bounding radius of droplets
|
||||
fMinSpacing,//minimum spacing between droplets
|
||||
fDropletNumDens, //approximate number of droplets in cloud
|
||||
sphericalUncertainty); //uncertainty in distance to droplet surface from outside using just droplet's origin as info
|
||||
fCloud->SetDropletsPerVoxel(4);
|
||||
|
||||
FastAerosolSolid* solidCloud =
|
||||
new FastAerosolSolid("cloudSV", //its name
|
||||
fCloud, //its shape
|
||||
fDropletShape); //its droplets
|
||||
FastAerosolSolid* solidCloud = new FastAerosolSolid("cloudSV",//its name
|
||||
fCloud, //its shape
|
||||
fDropletShape); //its droplets
|
||||
|
||||
/*
|
||||
FastAerosolSolid* solidCloud =
|
||||
new FastAerosolSolid("cloudSV", //its name
|
||||
fCloud, //its shape
|
||||
fDropletShape, //its droplets
|
||||
[](G4ThreeVector) {G4RotationMatrix rotm = G4RotationMatrix(); rotm.rotateY(90.0*deg); return rotm;}); //droplet rotation function
|
||||
*/
|
||||
solidCloud->SetStepLim(fStepLim);
|
||||
//FastAerosol can use step limit to speed calculations
|
||||
|
||||
solidCloud->SetStepLim(fStepLim); //FastAerosol can use step limit to speed calculations
|
||||
logicCloud = new G4LogicalVolume(solidCloud,//its solid
|
||||
droplet_mat,//its material
|
||||
"cloudLV");//its name
|
||||
logicCloud->SetUserLimits(fStepLimits);
|
||||
logicCloud->SetVisAttributes(G4VisAttributes(G4Colour(0.0,0.0,1.0,0.4)));
|
||||
|
||||
logicCloud =
|
||||
new G4LogicalVolume(solidCloud, //its solid
|
||||
droplet_mat, //its material
|
||||
"cloudLV"); //its name
|
||||
logicCloud->SetUserLimits(fStepLimits);
|
||||
logicCloud->SetVisAttributes(G4VisAttributes(G4Colour(0.0,0.0,1.0,0.4)));
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(), logicCloud, "cloudPV", //its name
|
||||
logicWorld,//its mother volume
|
||||
false, //no boolean operation
|
||||
0,//copy number
|
||||
checkOverlaps);//overlaps checking
|
||||
|
||||
new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at position
|
||||
logicCloud, //its logical volume
|
||||
"cloudPV", //its name
|
||||
logicWorld, //its mother volume
|
||||
false, //no boolean operation
|
||||
0, //copy number
|
||||
checkOverlaps); //overlaps checking
|
||||
fCloud->SetSeed(fCloudSeed);
|
||||
|
||||
// fPrePopulate = whether to populate all voxels at the beginning or on the fly
|
||||
if (fPrePopulate)
|
||||
{
|
||||
// populate (proving it to the user by printing population reports)
|
||||
clock_t t;
|
||||
t = clock();
|
||||
|
||||
fCloud->SetSeed(fCloudSeed);
|
||||
G4cout << "\nBefore populating" << G4endl;
|
||||
G4cout << "=================" << G4endl;
|
||||
fCloud->PrintPopulationReport();
|
||||
G4cout << "\nPopulating..." << G4endl;
|
||||
fCloud->PopulateAllGrids();
|
||||
G4cout << "\nAfter populating" << G4endl;
|
||||
G4cout << "================" << G4endl;
|
||||
fCloud->PrintPopulationReport();
|
||||
G4cout << G4endl;
|
||||
|
||||
// fPrePopulate = whether to populate all voxels at the beginning or on the fly
|
||||
if (fPrePopulate) {
|
||||
// populate (proving it to the user by printing population reports)
|
||||
clock_t t;
|
||||
t = clock();
|
||||
t = clock() - t;
|
||||
|
||||
G4cout << "\nBefore populating" << G4endl;
|
||||
G4cout << "=================" << G4endl;
|
||||
fCloud->PrintPopulationReport();
|
||||
G4cout << "\nPopulating..." << G4endl;
|
||||
fCloud->PopulateAllGrids();
|
||||
G4cout << "\nAfter populating" << G4endl;
|
||||
G4cout << "================" << G4endl;
|
||||
fCloud->PrintPopulationReport();
|
||||
G4cout << G4endl;
|
||||
G4cout << "\nThis took " << ((float)t)/CLOCKS_PER_SEC << "s\n" << G4endl;
|
||||
|
||||
t = clock() - t;
|
||||
// make filename variables to save data
|
||||
G4String rStr = std::to_string(fDropletR/mm);
|
||||
rStr.erase ( rStr.find_last_not_of('0') + 1, std::string::npos ); // drop trailing 0
|
||||
replace( rStr.begin(), rStr.end(), '.', 'p');
|
||||
if (rStr.back() == 'p') { rStr.pop_back(); } // don't write "3p" for 3.0, just write "3"
|
||||
|
||||
G4cout << "\nThis took " << ((float)t)/CLOCKS_PER_SEC << "s\n" << G4endl;
|
||||
// want to represent the number density as 1E-ApB for some A, B
|
||||
G4int order10 = (G4int) -round(10*std::log10(fDropletNumDens*mm3)); // gives 10x the exponent rounded to the int (10x so we get two decimals)
|
||||
G4int leading = order10 / 10; // first number
|
||||
G4int trailing = order10 % 10; // second number
|
||||
G4String nStr = "1E-" + std::to_string(leading) + "p" + std::to_string(trailing);
|
||||
|
||||
// make filename variables to save data
|
||||
G4String rStr = std::to_string(fDropletR/mm);
|
||||
rStr.erase ( rStr.find_last_not_of('0') + 1, std::string::npos ); // drop trailing 0
|
||||
replace( rStr.begin(), rStr.end(), '.', 'p');
|
||||
if (rStr.back() == 'p') { rStr.pop_back(); } // don't write "3p" for 3.0, just write "3"
|
||||
// save population time
|
||||
std::ofstream file;
|
||||
file.open("popTime_r" + rStr + "mm_n" + nStr + "mm-3.csv");
|
||||
file << ((float)t)/CLOCKS_PER_SEC;
|
||||
file.close();
|
||||
|
||||
// want to represent the number density as 1E-ApB for some A, B
|
||||
G4int order10 = (G4int) -round(10*std::log10(fDropletNumDens*mm3)); // gives 10x the exponent rounded to the int (10x so we get two decimals)
|
||||
G4int leading = order10 / 10; // first number
|
||||
G4int trailing = order10 % 10; // second number
|
||||
G4String nStr = "1E-" + std::to_string(leading) + "p" + std::to_string(trailing);
|
||||
|
||||
|
||||
// save population time
|
||||
std::ofstream file;
|
||||
file.open("popTime_r" + rStr + "mm_n" + nStr + "mm-3.csv");
|
||||
file << ((float)t)/CLOCKS_PER_SEC;
|
||||
file.close();
|
||||
|
||||
|
||||
|
||||
// save distribution
|
||||
G4String fName = "distribution_r" + rStr + "mm_n" + nStr + "mm-3.csv";
|
||||
fCloud->SaveToFile(fName);
|
||||
}
|
||||
}
|
||||
// **********************************************************
|
||||
//
|
||||
// (For comparision/benchmarking) Build the cloud using G4VParameterized (does not use FastAerosol)
|
||||
//
|
||||
// ***********************************************************
|
||||
|
||||
// the droplet positions for this cloud are those saved in the "distribution" folder of our data
|
||||
// this is to make comparable simulations between FastAerosol and parameterised clouds
|
||||
// this requires that we first simulate FastAerosol (pre-populated) to generate the positions
|
||||
// save distribution
|
||||
G4String fName = "distribution_r" + rStr + "mm_n" + nStr + "mm-3.csv";
|
||||
fCloud->SaveToFile(fName);
|
||||
}
|
||||
}
|
||||
// **********************************************************
|
||||
//
|
||||
// (For comparision/benchmarking) Build the cloud using G4VParameterized (does not use FastAerosol)
|
||||
//
|
||||
// ***********************************************************
|
||||
// the droplet positions for this cloud are those saved in the "distribution" folder of our data
|
||||
// this is to make comparable simulations between FastAerosol and parameterised clouds
|
||||
// this requires that we first simulate FastAerosol (pre-populated) to generate the positions
|
||||
|
||||
else if (fParameterisedCloud)
|
||||
{
|
||||
G4cout << "\nParameterised geometry with n=" << fDropletNumDens*mm3 << "/mm3 and r=" << fDropletR/mm << "mm spheres.\n" << G4endl;
|
||||
else if (fParameterisedCloud)
|
||||
{
|
||||
G4cout << "\nParameterised geometry with n=" << fDropletNumDens*mm3 << "/mm3 and r=" << fDropletR/mm << "mm spheres.\n" << G4endl;
|
||||
std::vector<G4ThreeVector> positions;
|
||||
G4double x,y,z;
|
||||
|
||||
// load distribution file
|
||||
G4String fName;
|
||||
|
||||
G4String rStr = std::to_string(fDropletR/mm);
|
||||
// load distribution file
|
||||
G4String fName;
|
||||
G4String rStr = std::to_string(fDropletR/mm);
|
||||
rStr.erase ( rStr.find_last_not_of('0') + 1, std::string::npos ); // drop trailing 0
|
||||
replace( rStr.begin(), rStr.end(), '.', 'p');
|
||||
if (rStr.back() == 'p') { rStr.pop_back(); } // don't write "3p" for 3.0, just write "3"
|
||||
|
||||
// want to represent the number density as 1E-ApB for some A, B
|
||||
G4int order10 = (G4int) -round(10*std::log10(fDropletNumDens*mm3)); // gives 10x the exponent rounded to the int (10x so we get two decimals)
|
||||
G4int leading = order10 / 10; // first number
|
||||
G4int trailing = order10 % 10; // second number
|
||||
G4String nStr = "1E-" + std::to_string(leading) + "p" + std::to_string(trailing);
|
||||
// want to represent the number density as 1E-ApB for some A, B
|
||||
G4int order10 = (G4int) -round(10*std::log10(fDropletNumDens*mm3)); // gives 10x the exponent rounded to the int (10x so we get two decimals)
|
||||
G4int leading = order10 / 10; // first number
|
||||
G4int trailing = order10 % 10; // second number
|
||||
G4String nStr = "1E-" + std::to_string(leading) + "p" + std::to_string(trailing);
|
||||
|
||||
fName = "distribution_r" + rStr + "mm_n" + nStr + "mm-3.csv";
|
||||
|
||||
std::ifstream infile(fName);
|
||||
std::string line;
|
||||
fName = "distribution_r" + rStr + "mm_n" + nStr + "mm-3.csv";
|
||||
std::ifstream infile(fName);
|
||||
std::string line;
|
||||
|
||||
while (getline(infile,line)) {
|
||||
std::istringstream stream(line);
|
||||
std::string field;
|
||||
while (getline(infile,line)) {
|
||||
std::istringstream stream(line);
|
||||
std::string field;
|
||||
getline(stream,field,','); x = stod(field)*mm;
|
||||
getline(stream,field,','); y = stod(field)*mm;
|
||||
getline(stream,field,','); z = stod(field)*mm;
|
||||
|
||||
getline(stream,field,','); x = stod(field)*mm;
|
||||
getline(stream,field,','); y = stod(field)*mm;
|
||||
getline(stream,field,','); z = stod(field)*mm;
|
||||
|
||||
positions.push_back(G4ThreeVector(x,y,z));
|
||||
positions.push_back(G4ThreeVector(x,y,z));
|
||||
}
|
||||
|
||||
G4VPVParameterisation* cloudParam =
|
||||
G4VPVParameterisation* cloudParam =
|
||||
new CloudParameterisation(positions);
|
||||
|
||||
G4Box* cloudBounding =
|
||||
new G4Box("cloudBounding", //its name
|
||||
0.5*cloud_sizeXY, //half x-span
|
||||
0.5*cloud_sizeXY, //half y-span
|
||||
0.5*cloud_sizeZ); //half z-span
|
||||
|
||||
logicCloud =
|
||||
new G4LogicalVolume(cloudBounding, //its solid
|
||||
air_mat, //its material
|
||||
"cloudLV"); //its name
|
||||
|
||||
logicCloud->SetSmartless(fSmartless);
|
||||
logicCloud->SetUserLimits(fStepLimits);
|
||||
logicCloud->SetVisAttributes(G4VisAttributes(false));
|
||||
|
||||
new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at position
|
||||
logicCloud, //its logical volume
|
||||
"cloudPV", //its name
|
||||
logicWorld, //its mothervolume
|
||||
false, //no boolean operation
|
||||
0, //copy number
|
||||
checkOverlaps); //overlaps checking
|
||||
|
||||
G4LogicalVolume* logicDroplet =
|
||||
new G4LogicalVolume(fDropletShape, //its solid
|
||||
droplet_mat, //its material
|
||||
"dropletLV"); //its name
|
||||
|
||||
logicDroplet->SetUserLimits(fStepLimits);
|
||||
|
||||
/*G4PVParameterised* paramDroplet =*/
|
||||
new G4PVParameterised("droplets", //its name
|
||||
logicDroplet, //droplet logical volume
|
||||
logicCloud, //mother logical volume
|
||||
kUndefined, //droplets placed along this axis
|
||||
positions.size(), //number of droplets
|
||||
cloudParam); //the parametrisation
|
||||
}
|
||||
// **********************************************************
|
||||
//
|
||||
// (For comparision/benchmarking) Simulate the cloud by smearing droplets out into a single solid (does not use FastAerosol)
|
||||
//
|
||||
// ***********************************************************
|
||||
else if (fSmoothCloud)
|
||||
{
|
||||
G4cout << "\nSmooth geometry based on a cloud of n=" << fDropletNumDens*mm3 << "/mm3 and r=" << fDropletR/mm << "mm spheres.\n" << G4endl;
|
||||
// build cloud by smearing the droplets uniformly across the cloud volume, for comparison/benchmarking purposes (does not use FastAerosol)
|
||||
G4Material* cloud_mat = new G4Material("Cloud", (droplet_total_mass+cloud_air_mass)/cloud_volume, 2);
|
||||
cloud_mat->AddMaterial(droplet_mat, droplet_total_mass/(cloud_air_mass+droplet_total_mass));
|
||||
cloud_mat->AddMaterial(air_mat, cloud_air_mass/(cloud_air_mass+droplet_total_mass));
|
||||
|
||||
logicCloud =
|
||||
new G4LogicalVolume(fCloudShape, //its solid
|
||||
cloud_mat, //its material
|
||||
"cloudLV"); //its name
|
||||
logicCloud->SetUserLimits(fStepLimits);
|
||||
logicCloud->SetVisAttributes(G4VisAttributes(G4Colour(0.0,0.0,1.0,0.4)));
|
||||
|
||||
new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at position
|
||||
logicCloud, //its logical volume
|
||||
"cloudPV", //its name
|
||||
logicWorld, //its mothervolume
|
||||
false, //no boolean operation
|
||||
0, //copy number
|
||||
checkOverlaps); //overlaps checking
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "\nNo cloud.\n" << G4endl;
|
||||
}
|
||||
|
||||
//
|
||||
// Build detector
|
||||
//
|
||||
G4double detector_sizeXY = cloud_sizeXY;
|
||||
G4double detector_sizeZ = 0.05*m;
|
||||
G4Material* detector_mat = nist->FindOrBuildMaterial("G4_Al");
|
||||
G4ThreeVector detector_pos = G4ThreeVector(0, 0, 0.5*1.05*cloud_sizeZ);
|
||||
|
||||
G4Box* soldDetector =
|
||||
new G4Box("detectorSV", //its name
|
||||
0.5*detector_sizeXY, //half x-span
|
||||
0.5*detector_sizeXY, //half y-span
|
||||
0.5*detector_sizeZ); //half z-span
|
||||
G4Box* cloudBounding = new G4Box("cloudBounding",//its name
|
||||
0.5*cloud_sizeXY,//half x-span
|
||||
0.5*cloud_sizeXY, //half y-span
|
||||
0.5*cloud_sizeZ); //half z-span
|
||||
|
||||
G4LogicalVolume* logicDetector =
|
||||
logicCloud = new G4LogicalVolume(cloudBounding, //its solid
|
||||
air_mat,//its material
|
||||
"cloudLV");//its name
|
||||
|
||||
logicCloud->SetSmartless(fSmartless);
|
||||
logicCloud->SetUserLimits(fStepLimits);
|
||||
logicCloud->SetVisAttributes(G4VisAttributes(false));
|
||||
|
||||
new G4PVPlacement(nullptr,//no rotation
|
||||
G4ThreeVector(),//at position
|
||||
logicCloud,//its logical volume
|
||||
"cloudPV",//its name
|
||||
logicWorld, //its mothervolume
|
||||
false, //no boolean operation
|
||||
0,//copy number
|
||||
checkOverlaps);//overlaps checking
|
||||
|
||||
G4LogicalVolume* logicDroplet =
|
||||
new G4LogicalVolume(fDropletShape,//its solid
|
||||
droplet_mat,//its material
|
||||
"dropletLV");//its name
|
||||
|
||||
logicDroplet->SetUserLimits(fStepLimits);
|
||||
|
||||
new G4PVParameterised("droplets",//its name
|
||||
logicDroplet,//droplet logical volume
|
||||
logicCloud,//mother logical volume
|
||||
kUndefined,//droplets placed along this axis
|
||||
positions.size(),//number of droplets
|
||||
cloudParam);//the parametrisation
|
||||
}
|
||||
// **********************************************************
|
||||
//
|
||||
// (For comparision/benchmarking) Simulate the cloud by smearing droplets out into a single solid (does not use FastAerosol)
|
||||
//
|
||||
// ***********************************************************
|
||||
else if (fSmoothCloud)
|
||||
{
|
||||
G4cout << "\nSmooth geometry based on a cloud of n=" << fDropletNumDens*mm3 << "/mm3 and r=" << fDropletR/mm << "mm spheres.\n" << G4endl;
|
||||
// build cloud by smearing the droplets uniformly across the cloud volume, for comparison/benchmarking purposes (does not use FastAerosol)
|
||||
G4Material* cloud_mat = new G4Material("Cloud", (droplet_total_mass+cloud_air_mass)/cloud_volume, 2);
|
||||
|
||||
cloud_mat->AddMaterial(droplet_mat, droplet_total_mass/(cloud_air_mass+droplet_total_mass));
|
||||
|
||||
cloud_mat->AddMaterial(air_mat, cloud_air_mass/(cloud_air_mass+droplet_total_mass));
|
||||
|
||||
logicCloud = new G4LogicalVolume(fCloudShape, //its solid
|
||||
cloud_mat, //its material
|
||||
"cloudLV"); //its name
|
||||
|
||||
logicCloud->SetUserLimits(fStepLimits);
|
||||
logicCloud->SetVisAttributes(G4VisAttributes(G4Colour(0.0,0.0,1.0,0.4)));
|
||||
|
||||
new G4PVPlacement(nullptr, //no rotation
|
||||
G4ThreeVector(), //at position
|
||||
logicCloud,//its logical volume
|
||||
"cloudPV", //its name
|
||||
logicWorld, //its mothervolume
|
||||
false, //no boolean operation
|
||||
0,//copy number
|
||||
checkOverlaps); //overlaps checking
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << "\nNo cloud.\n" << G4endl;
|
||||
}
|
||||
|
||||
//
|
||||
// Build detector
|
||||
//
|
||||
G4double detector_sizeXY = cloud_sizeXY;
|
||||
G4double detector_sizeZ = 0.05*m;
|
||||
G4Material* detector_mat = nist->FindOrBuildMaterial("G4_Al");
|
||||
G4ThreeVector detector_pos = G4ThreeVector(0, 0, 0.5*1.05*cloud_sizeZ);
|
||||
|
||||
G4Box* soldDetector = new G4Box("detectorSV", //its name
|
||||
0.5*detector_sizeXY, //half x-span
|
||||
0.5*detector_sizeXY, //half y-span
|
||||
0.5*detector_sizeZ); //half z-span
|
||||
|
||||
G4LogicalVolume* logicDetector =
|
||||
new G4LogicalVolume(soldDetector, //its solid
|
||||
detector_mat, //its material
|
||||
"detectorLV"); //its name
|
||||
detector_mat, //its material
|
||||
"detectorLV"); //its name
|
||||
|
||||
logicDetector->SetUserLimits(fStepLimits);
|
||||
logicDetector->SetUserLimits(fStepLimits);
|
||||
|
||||
new G4PVPlacement(0, //no rotation
|
||||
detector_pos, //at position
|
||||
logicDetector, //its logical volume
|
||||
"detectorPV", //its name
|
||||
logicWorld, //its mothervolume
|
||||
false, //no boolean operation
|
||||
0, //copy number
|
||||
checkOverlaps); //overlaps checking
|
||||
new G4PVPlacement(nullptr,//no rotation
|
||||
detector_pos, //at position
|
||||
logicDetector, //its logical volume
|
||||
"detectorPV", //its name
|
||||
logicWorld, //its mothervolume
|
||||
false, //no boolean operation
|
||||
0, //copy number
|
||||
checkOverlaps); //overlaps checking
|
||||
//
|
||||
// Scoring Volume
|
||||
//
|
||||
fScoringVolume = logicDetector;
|
||||
|
||||
|
||||
//
|
||||
// Scoring Volume
|
||||
//
|
||||
fScoringVolume = logicDetector;
|
||||
|
||||
return physWorld;
|
||||
return physWorld;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// (copied from B1EventAction)
|
||||
|
||||
#include "FAEventAction.hh"
|
||||
@@ -32,21 +31,16 @@
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
EventAction::EventAction(RunAction* runAction)
|
||||
: G4UserEventAction(),
|
||||
fRunAction(runAction),
|
||||
fEdep(0.)
|
||||
{}
|
||||
|
||||
EventAction::~EventAction()
|
||||
: G4UserEventAction(), fRunAction(runAction), fEdep(0.)
|
||||
{}
|
||||
|
||||
void EventAction::BeginOfEventAction(const G4Event*)
|
||||
{
|
||||
fEdep = 0.;
|
||||
fEdep = 0.;
|
||||
}
|
||||
|
||||
void EventAction::EndOfEventAction(const G4Event*)
|
||||
{
|
||||
// accumulate statistics in run action
|
||||
fRunAction->AddEdep(fEdep);
|
||||
// accumulate statistics in run action
|
||||
fRunAction->AddEdep(fEdep);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// (adapted from B1PrimaryGeneratorAction)
|
||||
// Author: A.Knaian (ara@nklabs.com), N.MacFadden (natemacfadden@gmail.com)
|
||||
|
||||
@@ -39,61 +38,59 @@
|
||||
#include "Randomize.hh"
|
||||
|
||||
PrimaryGeneratorAction::PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0),
|
||||
fWorldBox(0)
|
||||
: G4VUserPrimaryGeneratorAction(), fParticleGun(nullptr), fWorldBox(nullptr)
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
G4int n_particle = 1;
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
// default particle kinematic
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String particleName;
|
||||
G4ParticleDefinition* particle
|
||||
// default particle kinematic
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String particleName;
|
||||
G4ParticleDefinition* particle
|
||||
= particleTable->FindParticle(particleName="proton");
|
||||
fParticleGun->SetParticleDefinition(particle);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
|
||||
fParticleGun->SetParticleEnergy(50.*MeV);
|
||||
fParticleGun->SetParticleDefinition(particle);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
|
||||
fParticleGun->SetParticleEnergy(50.*MeV);
|
||||
}
|
||||
|
||||
PrimaryGeneratorAction::~PrimaryGeneratorAction()
|
||||
{
|
||||
delete fParticleGun;
|
||||
delete fParticleGun;
|
||||
}
|
||||
|
||||
void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
G4double worldSizeXY = 0;
|
||||
G4double worldSizeZ = 0;
|
||||
G4double worldSizeXY = 0;
|
||||
G4double worldSizeZ = 0;
|
||||
|
||||
if (!fWorldBox)
|
||||
{
|
||||
G4LogicalVolume* worldLV
|
||||
= G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||
if ( worldLV ) fWorldBox = dynamic_cast<G4Box*>(worldLV->GetSolid());
|
||||
}
|
||||
|
||||
if ( fWorldBox ) {
|
||||
worldSizeXY = fWorldBox->GetXHalfLength()*2.;
|
||||
worldSizeZ = fWorldBox->GetZHalfLength()*2.;
|
||||
}
|
||||
else {
|
||||
G4ExceptionDescription msg;
|
||||
msg << "World volume of box shape not found.\n";
|
||||
msg << "Perhaps you have changed geometry.\n";
|
||||
msg << "The gun will be place at the center.";
|
||||
G4Exception("PrimaryGeneratorAction::GeneratePrimaries()",
|
||||
if (!fWorldBox)
|
||||
{
|
||||
G4LogicalVolume* worldLV
|
||||
= G4LogicalVolumeStore::GetInstance()->GetVolume("World");
|
||||
if ( worldLV ) fWorldBox = dynamic_cast<G4Box*>(worldLV->GetSolid());
|
||||
}
|
||||
if ( fWorldBox )
|
||||
{
|
||||
worldSizeXY = fWorldBox->GetXHalfLength()*2.;
|
||||
worldSizeZ = fWorldBox->GetZHalfLength()*2.;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4ExceptionDescription msg;
|
||||
msg << "World volume of box shape not found.\n";
|
||||
msg << "Perhaps you have changed geometry.\n";
|
||||
msg << "The gun will be place at the center.";
|
||||
G4Exception("PrimaryGeneratorAction::GeneratePrimaries()",
|
||||
"MyCode0002",JustWarning,msg);
|
||||
}
|
||||
}
|
||||
|
||||
// shoot on XY disk centered on Z-axis behind the cloud
|
||||
G4double sigma = worldSizeXY/10.0; // spread in x and y
|
||||
G4double x0 = G4RandGauss::shoot(0,sigma);
|
||||
G4double y0 = G4RandGauss::shoot(0,sigma);
|
||||
G4double z0 = 0.95 * (-0.5) * worldSizeZ;
|
||||
// shoot on XY disk centered on Z-axis behind the cloud
|
||||
G4double sigma = worldSizeXY/10.0; // spread in x and y
|
||||
G4double x0 = G4RandGauss::shoot(0,sigma);
|
||||
G4double y0 = G4RandGauss::shoot(0,sigma);
|
||||
G4double z0 = 0.95 * (-0.5) * worldSizeZ;
|
||||
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
|
||||
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,18 +61,14 @@ RunAction::RunAction()
|
||||
accumulableManager->RegisterAccumulable(fEdep2);
|
||||
}
|
||||
|
||||
RunAction::~RunAction()
|
||||
{}
|
||||
|
||||
void RunAction::BeginOfRunAction(const G4Run*)
|
||||
{
|
||||
// inform the runManager to save random number seed
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
|
||||
|
||||
// reset accumulables to their initial values
|
||||
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||
accumulableManager->Reset();
|
||||
// inform the runManager to save random number seed
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
|
||||
|
||||
// reset accumulables to their initial values
|
||||
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
|
||||
accumulableManager->Reset();
|
||||
}
|
||||
|
||||
void RunAction::EndOfRunAction(const G4Run* run)
|
||||
@@ -92,7 +88,7 @@ void RunAction::EndOfRunAction(const G4Run* run)
|
||||
G4double rms = edep2 - edep*edep/nofEvents;
|
||||
if (rms > 0.) rms = std::sqrt(rms); else rms = 0.;
|
||||
|
||||
const DetectorConstruction* detectorConstruction
|
||||
const auto* detectorConstruction
|
||||
= static_cast<const DetectorConstruction*>
|
||||
(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
|
||||
G4double mass = detectorConstruction->GetScoringVolume()->GetMass();
|
||||
@@ -102,7 +98,7 @@ void RunAction::EndOfRunAction(const G4Run* run)
|
||||
// Run conditions
|
||||
// note: There is no primary generator action object for "master"
|
||||
// run manager for multi-threaded mode.
|
||||
const PrimaryGeneratorAction* generatorAction
|
||||
const auto* generatorAction
|
||||
= static_cast<const PrimaryGeneratorAction*>
|
||||
(G4RunManager::GetRunManager()->GetUserPrimaryGeneratorAction());
|
||||
G4String runCondition;
|
||||
|
||||
@@ -38,16 +38,13 @@
|
||||
SteppingAction::SteppingAction(EventAction* eventAction)
|
||||
: G4UserSteppingAction(),
|
||||
fEventAction(eventAction),
|
||||
fScoringVolume(0)
|
||||
{}
|
||||
|
||||
SteppingAction::~SteppingAction()
|
||||
fScoringVolume(nullptr)
|
||||
{}
|
||||
|
||||
void SteppingAction::UserSteppingAction(const G4Step* step)
|
||||
{
|
||||
if (!fScoringVolume) {
|
||||
const DetectorConstruction* detectorConstruction
|
||||
const auto* detectorConstruction
|
||||
= static_cast<const DetectorConstruction*>
|
||||
(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
|
||||
fScoringVolume = detectorConstruction->GetScoringVolume();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,7 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
G4Mutex polyhedronMutex = G4MUTEX_INITIALIZER;
|
||||
G4Mutex polyhedronMutex = G4MUTEX_INITIALIZER;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,11 +57,9 @@ namespace
|
||||
//
|
||||
// Constructor
|
||||
//
|
||||
FastAerosolSolid::FastAerosolSolid(const G4String& pName,
|
||||
FastAerosol* pCloud,
|
||||
G4VSolid* pDroplet,
|
||||
FastAerosolSolid::FastAerosolSolid(const G4String& pName, FastAerosol* pCloud, G4VSolid* pDroplet,
|
||||
std::function<G4RotationMatrix (G4ThreeVector)> pRotation)
|
||||
: G4VSolid(pName), fCloud(pCloud), fDroplet(pDroplet), fRotation(pRotation), fRebuildPolyhedron(false), fpPolyhedron(0)
|
||||
: G4VSolid(pName), fCloud(pCloud), fDroplet(pDroplet), fRotation(pRotation), fRebuildPolyhedron(false), fpPolyhedron(nullptr)
|
||||
{
|
||||
// Get cloud size from fCloud
|
||||
G4ThreeVector cloudPMin, cloudPMax;
|
||||
@@ -105,17 +103,10 @@ FastAerosolSolid::FastAerosolSolid( __void__& a )
|
||||
fCubicVolume(0.), fSurfaceArea(0.),
|
||||
farFromCloudDist(0.),
|
||||
fRotation([](G4ThreeVector) {return G4RotationMatrix();}),
|
||||
fRebuildPolyhedron(false), fpPolyhedron(0)
|
||||
fRebuildPolyhedron(false), fpPolyhedron(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Destructor
|
||||
//
|
||||
FastAerosolSolid::~FastAerosolSolid() {
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copy constructor
|
||||
@@ -453,4 +444,4 @@ G4Polyhedron* FastAerosolSolid::GetPolyhedron () const
|
||||
l.unlock();
|
||||
}
|
||||
return fpPolyhedron;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -222,19 +222,19 @@ Index : 3 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100000
|
||||
User=156.380000s Real=157.658563s Sys=0.010000s
|
||||
User=126.920000s Real=127.924804s Sys=0.000000s
|
||||
/control/doifBatch /score/dumpAllQuantitiesToFile Probes Probes.csv
|
||||
/score/dumpAllQuantitiesToFile Probes Probes.csv
|
||||
# Mesh or volume name: Probes -- # Primitive scorer name: dose
|
||||
bin 0,0,0 : statistical error 38.3446(%)
|
||||
to reduce the statistical error below 10%, increase number of events approximately 14.7031 times.
|
||||
bin 0,0,0 : statistical error 24.7746(%)
|
||||
to reduce the statistical error below 10%, increase number of events approximately 6.13782 times.
|
||||
# Mesh or volume name: Probes -- # Primitive scorer name: protonFlux
|
||||
bin 0,0,0 : statistical error 30.7962(%)
|
||||
to reduce the statistical error below 10%, increase number of events approximately 9.48408 times.
|
||||
bin 0,0,0 : statistical error 21.2599(%)
|
||||
to reduce the statistical error below 10%, increase number of events approximately 4.51983 times.
|
||||
# Mesh or volume name: Probes -- # Primitive scorer name: volFlx
|
||||
bin 0,0,0 : statistical error 27.6707(%)
|
||||
to reduce the statistical error below 10%, increase number of events approximately 7.65669 times.
|
||||
bin 0,0,0 : statistical error 19.3005(%)
|
||||
to reduce the statistical error below 10%, increase number of events approximately 3.72508 times.
|
||||
================== Deleting memory pools ===================
|
||||
Number of memory pools allocated: 12 of which, static: 0
|
||||
Dynamic pools deleted: 12 / Total memory freed: 1.5 MB
|
||||
Dynamic pools deleted: 12 / Total memory freed: 1.2 MB
|
||||
============================================================
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -46,7 +46,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -269,7 +271,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -309,7 +311,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -341,7 +343,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -410,7 +412,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -442,7 +444,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -474,7 +476,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -506,7 +508,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -538,7 +540,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -570,7 +572,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -602,7 +604,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -688,12 +690,12 @@ Run 0 starts ...
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 500
|
||||
User=5.220000s Real=5.314105s Sys=0.050000s
|
||||
User=4.800000s Real=4.979722s Sys=0.050000s
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
The simulation took: 8.36214 s to run (real time)
|
||||
The simulation took: 8.03673 s to run (real time)
|
||||
Dose is being written to Dose.out
|
||||
i j k Dose(Gy)================== Deleting memory pools ===================
|
||||
Number of memory pools allocated: 14 of which, static: 0
|
||||
Dynamic pools deleted: 14 / Total memory freed: 0.46 MB
|
||||
Dynamic pools deleted: 14 / Total memory freed: 0.57 MB
|
||||
============================================================
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -43,7 +43,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -538,7 +540,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -578,7 +580,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -611,7 +613,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -681,7 +683,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -714,7 +716,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -747,7 +749,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -780,7 +782,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -813,7 +815,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -846,7 +848,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -879,7 +881,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -42,7 +42,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -590,7 +592,7 @@ Run 0 starts ...
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 2000
|
||||
User=9.460000s Real=9.814651s Sys=0.260000s
|
||||
User=9.450000s Real=10.013765s Sys=0.200000s
|
||||
/score/dumpQuantityToFile boxMesh_1 dose dose.out
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -50,7 +50,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -214,7 +216,7 @@ eBrem: for e- XStype:4 SubType=3
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -246,7 +248,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -278,7 +280,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -291,7 +293,6 @@ ionIoni: for GenericIon XStype:3 SubType=2
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
|
||||
Stopping Power data for 17 ion/material pairs
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
@@ -337,7 +338,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -369,7 +370,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -401,7 +402,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -433,7 +434,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -465,7 +466,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -497,7 +498,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 7 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -529,7 +530,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -915,12 +916,21 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
================================================================
|
||||
### G4LevelReader: broken transition 0 from level 24 to 24 for isotope Z= 89 A= 219 - use ground level
|
||||
=======================================================================
|
||||
====== Pre-compound/De-excitation Physics Parameters ========
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
Type of pre-compound inverse x-section 3
|
||||
Pre-compound model active 1
|
||||
Pre-compound excitation low energy 100 keV
|
||||
Pre-compound excitation high energy 30 MeV
|
||||
Angular generator for pre-compound model 1
|
||||
Use NeverGoBack option for pre-compound model 0
|
||||
Use SoftCutOff option for pre-compound model 0
|
||||
Use CEM transitions for pre-compound model 1
|
||||
Use GNASH transitions for pre-compound model 0
|
||||
Use HETC submodel for pre-compound model 0
|
||||
=======================================================================
|
||||
====== Nuclear De-excitation Module Parameters ========
|
||||
=======================================================================
|
||||
Type of de-excitation inverse x-section 3
|
||||
Type of de-excitation factory Evaporation+GEM
|
||||
Number of de-excitation channels 68
|
||||
@@ -1050,13 +1060,13 @@ Start closing geometry.
|
||||
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
|
||||
Total memory consumed for geometry optimisation: 395 kByte
|
||||
Total CPU time elapsed for geometry optimisation: 0.32 seconds
|
||||
Total CPU time elapsed for geometry optimisation: 0.26 seconds
|
||||
|
||||
Voxelisation: top CPU users:
|
||||
Percent Total CPU System CPU Memory Volume
|
||||
------- ---------- ---------- -------- ----------
|
||||
50.00 0.16 0.00 152k EmModuleLogical
|
||||
50.00 0.16 0.00 238k HadModuleLogical
|
||||
50.00 0.13 0.00 152k EmModuleLogical
|
||||
50.00 0.13 0.00 238k HadModuleLogical
|
||||
0.00 0.00 0.00 4k Mother
|
||||
0.00 0.00 0.00 0k CryostatLogical
|
||||
0.00 0.00 0.00 0k LArgLogical
|
||||
@@ -1067,8 +1077,8 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Voxelisation: top memory users:
|
||||
Percent Memory Heads Nodes Pointers Total CPU Volume
|
||||
------- -------- ------ ------ -------- ---------- ----------
|
||||
60.17 238k 1385 2370 3792 0.16 HadModuleLogical
|
||||
38.50 152k 1129 1152 2426 0.16 EmModuleLogical
|
||||
60.17 238k 1385 2370 3792 0.13 HadModuleLogical
|
||||
38.50 152k 1129 1152 2426 0.13 EmModuleLogical
|
||||
0.93 3k 8 42 146 0.00 Mother
|
||||
0.12 0k 1 7 8 0.00 SolidWLogical
|
||||
0.12 0k 1 7 8 0.00 CuPlateLogical
|
||||
@@ -1086,352 +1096,352 @@ Read 2001 events from file data-tracks/tracks-20GeV.dat
|
||||
---> Begin of event: 1
|
||||
**** Primary : 1
|
||||
Vertex : (5.55552,7.16569,32740)
|
||||
Number of F1 Tiles with Positive energy : 59
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.71231 2.9493 3.44161
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 32.0741
|
||||
Visible Energy in Upstream Dead Materials
|
||||
1372.65
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 61
|
||||
N Secondaries 86
|
||||
EmEdep is=17610.5 MeV
|
||||
HadEdep is=13.7131 MeV
|
||||
Edep in FCAL1 FCAl2 : 17610.5 13.7131
|
||||
**** Primary : 2
|
||||
Vertex : (-3.76032,10.9751,32740)
|
||||
Number of F1 Tiles with Positive energy : 55
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.71231 2.98995 3.52679
|
||||
1.52701 1.90627 1.52244
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 59.2601
|
||||
0 137.097
|
||||
Visible Energy in Upstream Dead Materials
|
||||
1744.46
|
||||
1303.18
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 51
|
||||
N Secondaries 86
|
||||
EmEdep is=17318.5 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 17318.5 0
|
||||
**** Primary : 2
|
||||
Vertex : (-3.76032,10.9751,32740)
|
||||
Number of F1 Tiles with Positive energy : 49
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.87162 1.92888 1.72147
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 114.393
|
||||
Visible Energy in Upstream Dead Materials
|
||||
2341.52
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 95
|
||||
N Secondaries 113
|
||||
EmEdep is=16041 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 16041 0
|
||||
N Tracks out of world 58
|
||||
N Secondaries 128
|
||||
EmEdep is=17359.5 MeV
|
||||
HadEdep is=0.770403 MeV
|
||||
Edep in FCAL1 FCAl2 : 17359.5 0.770403
|
||||
**** Primary : 3
|
||||
Vertex : (13.1951,2.677,32740)
|
||||
Number of F1 Tiles with Positive energy : 47
|
||||
Number of F1 Tiles with Positive energy : 43
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.82234 1.64612 1.57421
|
||||
1.85161 1.72217 1.54485
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
30.6329
|
||||
7.78697
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 5
|
||||
N Secondaries 287
|
||||
EmEdep is=19697.6 MeV
|
||||
HadEdep is=6.17895 MeV
|
||||
Edep in FCAL1 FCAl2 : 19697.6 6.17895
|
||||
N Tracks out of world 1
|
||||
N Secondaries 209
|
||||
EmEdep is=19900 MeV
|
||||
HadEdep is=1.8511 MeV
|
||||
Edep in FCAL1 FCAl2 : 19900 1.8511
|
||||
**** Primary : 4
|
||||
Vertex : (-8.66148,-8.80731,32740)
|
||||
Number of F1 Tiles with Positive energy : 48
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
2.24023 1.5691 1.99345
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
6.62809
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 6
|
||||
N Secondaries 298
|
||||
EmEdep is=19854.6 MeV
|
||||
HadEdep is=2.18466 MeV
|
||||
Edep in FCAL1 FCAl2 : 19854.6 2.18466
|
||||
**** Primary : 5
|
||||
Vertex : (4.75859,7.01622,32740)
|
||||
Number of F1 Tiles with Positive energy : 44
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.71216 1.57322 1.81781
|
||||
1.74477 1.72368 1.57059
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
7.393
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 3
|
||||
N Secondaries 193
|
||||
EmEdep is=19779.2 MeV
|
||||
HadEdep is=7.92109 MeV
|
||||
Edep in FCAL1 FCAl2 : 19779.2 7.92109
|
||||
**** Primary : 6
|
||||
Vertex : (1.94335,14.9228,32740)
|
||||
Number of F1 Tiles with Positive energy : 40
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
2.80826 1.83647 1.71984
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 56.4375
|
||||
Visible Energy in Upstream Dead Materials
|
||||
591.166
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 24
|
||||
N Secondaries 216
|
||||
EmEdep is=18665.4 MeV
|
||||
HadEdep is=2.03402 MeV
|
||||
Edep in FCAL1 FCAl2 : 18665.4 2.03402
|
||||
**** Primary : 7
|
||||
Vertex : (-10.9878,-6.7949,32740)
|
||||
Number of F1 Tiles with Positive energy : 42
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.5804 1.96594 1.88546
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
8.46772
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 5
|
||||
N Secondaries 128
|
||||
EmEdep is=19800.9 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 19800.9 0
|
||||
**** Primary : 8
|
||||
Vertex : (10.9757,-1.49585,32740)
|
||||
Number of F1 Tiles with Positive energy : 44
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.57833 1.6999 1.67647
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
3.29726
|
||||
6.52953
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 2
|
||||
N Secondaries 298
|
||||
EmEdep is=19874.7 MeV
|
||||
N Secondaries 203
|
||||
EmEdep is=19703 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 19874.7 0
|
||||
**** Primary : 9
|
||||
Vertex : (-27.7734,3.36444,32740)
|
||||
Number of F1 Tiles with Positive energy : 59
|
||||
Edep in FCAL1 FCAl2 : 19703 0
|
||||
**** Primary : 5
|
||||
Vertex : (4.75859,7.01622,32740)
|
||||
Number of F1 Tiles with Positive energy : 54
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.93688 2.49148 1.68114
|
||||
1.55138 4.94933 1.7509
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 69.3636
|
||||
0 73.5589
|
||||
Visible Energy in Upstream Dead Materials
|
||||
7002.76
|
||||
821.666
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 191
|
||||
N Secondaries 152
|
||||
EmEdep is=10752.3 MeV
|
||||
HadEdep is=0.652787 MeV
|
||||
Edep in FCAL1 FCAl2 : 10752.3 0.652787
|
||||
**** Primary : 10
|
||||
Vertex : (-22.5474,4.1006,32740)
|
||||
Number of F1 Tiles with Positive energy : 51
|
||||
N Tracks out of world 34
|
||||
N Secondaries 73
|
||||
EmEdep is=17927.8 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 17927.8 0
|
||||
**** Primary : 6
|
||||
Vertex : (1.94335,14.9228,32740)
|
||||
Number of F1 Tiles with Positive energy : 57
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.67064 2.37068 4.58452
|
||||
1.54202 2.68524 1.85422
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 144.546
|
||||
Visible Energy in Upstream Dead Materials
|
||||
1011.66
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 65
|
||||
N Secondaries 133
|
||||
EmEdep is=17463.2 MeV
|
||||
HadEdep is=6.00078 MeV
|
||||
Edep in FCAL1 FCAl2 : 17463.2 6.00078
|
||||
**** Primary : 7
|
||||
Vertex : (-10.9878,-6.7949,32740)
|
||||
Number of F1 Tiles with Positive energy : 75
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.90567 3.40503 2.48706
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 139.211
|
||||
Visible Energy in Upstream Dead Materials
|
||||
5765.37
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 184
|
||||
N Secondaries 251
|
||||
EmEdep is=11968 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 11968 0
|
||||
**** Primary : 8
|
||||
Vertex : (10.9757,-1.49585,32740)
|
||||
Number of F1 Tiles with Positive energy : 47
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.66122 2.81189 3.22355
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
4.37874
|
||||
3.07205
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0.0548004 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0.00228468 0 0 0 0 0
|
||||
N Tracks out of world 7
|
||||
N Secondaries 268
|
||||
EmEdep is=19709.1 MeV
|
||||
HadEdep is=2.32481 MeV
|
||||
Edep in FCAL1 FCAl2 : 19709.1 2.32481
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 1
|
||||
N Secondaries 294
|
||||
EmEdep is=19819 MeV
|
||||
HadEdep is=8.67455 MeV
|
||||
Edep in FCAL1 FCAl2 : 19819 8.67455
|
||||
**** Primary : 9
|
||||
Vertex : (-27.7734,3.36444,32740)
|
||||
Number of F1 Tiles with Positive energy : 67
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.52472 2.44428 1.84001
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 129.115
|
||||
Visible Energy in Upstream Dead Materials
|
||||
8699.4
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 251
|
||||
N Secondaries 320
|
||||
EmEdep is=8992.89 MeV
|
||||
HadEdep is=2.55865 MeV
|
||||
Edep in FCAL1 FCAl2 : 8992.89 2.55865
|
||||
**** Primary : 10
|
||||
Vertex : (-22.5474,4.1006,32740)
|
||||
Number of F1 Tiles with Positive energy : 42
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.56407 1.53001 1.82565
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
4.49519
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 0
|
||||
N Secondaries 195
|
||||
EmEdep is=19800.3 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 19800.3 0
|
||||
|
||||
---> Begin of event: 11
|
||||
**** Primary : 11
|
||||
Vertex : (-6.31939,21.5056,32740)
|
||||
Number of F1 Tiles with Positive energy : 76
|
||||
Number of F1 Tiles with Positive energy : 71
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.81065 1.66862 1.8954
|
||||
1.54164 1.71126 1.59721
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 96.6734
|
||||
0 176.532
|
||||
Visible Energy in Upstream Dead Materials
|
||||
6898.98
|
||||
6686.54
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 169
|
||||
N Secondaries 72
|
||||
EmEdep is=10591.5 MeV
|
||||
HadEdep is=1.08337 MeV
|
||||
Edep in FCAL1 FCAl2 : 10591.5 1.08337
|
||||
0.118848 0 0 0 0 0
|
||||
N Tracks out of world 242
|
||||
N Secondaries 113
|
||||
EmEdep is=10533.2 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 10533.2 0
|
||||
**** Primary : 12
|
||||
Vertex : (17.1015,6.30557,32740)
|
||||
Number of F1 Tiles with Positive energy : 53
|
||||
Number of F1 Tiles with Positive energy : 45
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.63468 1.58395 1.68024
|
||||
1.48206 1.52776 1.68422
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
7.32858
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 5
|
||||
N Secondaries 210
|
||||
EmEdep is=19821.1 MeV
|
||||
HadEdep is=0.715842 MeV
|
||||
Edep in FCAL1 FCAl2 : 19821.1 0.715842
|
||||
**** Primary : 13
|
||||
Vertex : (-24.9484,11.8659,32740)
|
||||
Number of F1 Tiles with Positive energy : 6
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.57473 2.597 2.02058
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 41.2781
|
||||
Visible Energy in Upstream Dead Materials
|
||||
19234.2
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 156
|
||||
N Secondaries 270
|
||||
EmEdep is=154.305 MeV
|
||||
HadEdep is=0.74704 MeV
|
||||
Edep in FCAL1 FCAl2 : 154.305 0.74704
|
||||
**** Primary : 14
|
||||
Vertex : (-0.133696,18.3151,32740)
|
||||
Number of F1 Tiles with Positive energy : 46
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
2.28961 3.49663 2.25446
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
21.9865
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 3
|
||||
N Secondaries 202
|
||||
EmEdep is=19696.6 MeV
|
||||
HadEdep is=15.3392 MeV
|
||||
Edep in FCAL1 FCAl2 : 19696.6 15.3392
|
||||
**** Primary : 15
|
||||
Vertex : (17.3196,17.6617,32740)
|
||||
Number of F1 Tiles with Positive energy : 48
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
2.78029 2.20745 1.84498
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
4.84631
|
||||
3.81244
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 2
|
||||
N Secondaries 196
|
||||
EmEdep is=19832.6 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 19832.6 0
|
||||
N Secondaries 159
|
||||
EmEdep is=19848.9 MeV
|
||||
HadEdep is=0.219479 MeV
|
||||
Edep in FCAL1 FCAl2 : 19848.9 0.219479
|
||||
**** Primary : 13
|
||||
Vertex : (-24.9484,11.8659,32740)
|
||||
Number of F1 Tiles with Positive energy : 58
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
2.44751 1.90267 1.66902
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 178.901
|
||||
Visible Energy in Upstream Dead Materials
|
||||
8717.33
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 212
|
||||
N Secondaries 76
|
||||
EmEdep is=9371.29 MeV
|
||||
HadEdep is=1.80074 MeV
|
||||
Edep in FCAL1 FCAl2 : 9371.29 1.80074
|
||||
**** Primary : 14
|
||||
Vertex : (-0.133696,18.3151,32740)
|
||||
Number of F1 Tiles with Positive energy : 44
|
||||
Number of F2 tiles with Positive energy : 1
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
2.66622 1.59886 1.54882
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
11.1094
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 3
|
||||
N Secondaries 170
|
||||
EmEdep is=19724.8 MeV
|
||||
HadEdep is=12.2943 MeV
|
||||
Edep in FCAL1 FCAl2 : 19724.8 12.2943
|
||||
**** Primary : 15
|
||||
Vertex : (17.3196,17.6617,32740)
|
||||
Number of F1 Tiles with Positive energy : 47
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.55148 1.77448 1.57078
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
10.0732
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 7
|
||||
N Secondaries 220
|
||||
EmEdep is=19809.2 MeV
|
||||
HadEdep is=0.799317 MeV
|
||||
Edep in FCAL1 FCAl2 : 19809.2 0.799317
|
||||
**** Primary : 16
|
||||
Vertex : (-20.8489,10.8988,32740)
|
||||
Number of F1 Tiles with Positive energy : 49
|
||||
Number of F1 Tiles with Positive energy : 70
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.90825 1.84779 1.53285
|
||||
1.49907 1.65655 1.60126
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 42.9954
|
||||
0 104.195
|
||||
Visible Energy in Upstream Dead Materials
|
||||
765.322
|
||||
4855.68
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 37
|
||||
N Secondaries 165
|
||||
EmEdep is=18342.9 MeV
|
||||
HadEdep is=4.41746 MeV
|
||||
Edep in FCAL1 FCAl2 : 18342.9 4.41746
|
||||
N Tracks out of world 149
|
||||
N Secondaries 224
|
||||
EmEdep is=12949.8 MeV
|
||||
HadEdep is=0.927821 MeV
|
||||
Edep in FCAL1 FCAl2 : 12949.8 0.927821
|
||||
**** Primary : 17
|
||||
Vertex : (-9.96316,-9.33478,32740)
|
||||
Number of F1 Tiles with Positive energy : 40
|
||||
Number of F1 Tiles with Positive energy : 37
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.64259 1.91545 1.68632
|
||||
1.53181 1.74553 1.50282
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 13.568
|
||||
0 0
|
||||
Visible Energy in Upstream Dead Materials
|
||||
124.717
|
||||
13.3302
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 5
|
||||
N Secondaries 222
|
||||
EmEdep is=19688.5 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 19688.5 0
|
||||
N Tracks out of world 2
|
||||
N Secondaries 135
|
||||
EmEdep is=19856.1 MeV
|
||||
HadEdep is=4.95649 MeV
|
||||
Edep in FCAL1 FCAl2 : 19856.1 4.95649
|
||||
**** Primary : 18
|
||||
Vertex : (-9.96316,-9.33478,32740)
|
||||
Number of F1 Tiles with Positive energy : 63
|
||||
Number of F1 Tiles with Positive energy : 45
|
||||
Number of F2 tiles with Positive energy : 0
|
||||
Visisble Energy in S1 , S2 , S3 in (MeV)
|
||||
1.58896 2.0655 2.17158
|
||||
2.45427 1.57577 2.00021
|
||||
Visible Energy in Hole Counter (MeV)
|
||||
0 122.447
|
||||
0 0.546005
|
||||
Visible Energy in Upstream Dead Materials
|
||||
3752.91
|
||||
5.05385
|
||||
Visible Energy in Tail Catcher Scintillator
|
||||
0 0 0 0 0 0 0
|
||||
Visible Energy in Tail Catcher Absorber
|
||||
0 0 0 0 0 0
|
||||
N Tracks out of world 140
|
||||
N Secondaries 234
|
||||
EmEdep is=14452.3 MeV
|
||||
HadEdep is=0 MeV
|
||||
Edep in FCAL1 FCAl2 : 14452.3 0
|
||||
N Tracks out of world 8
|
||||
N Secondaries 102
|
||||
EmEdep is=19752.8 MeV
|
||||
HadEdep is=38.8907 MeV
|
||||
Edep in FCAL1 FCAl2 : 19752.8 38.8907
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 18
|
||||
User=7.310000s Real=7.367683s Sys=0.010000s
|
||||
User=6.520000s Real=6.567476s Sys=0.010000s
|
||||
There are 4 h1 histograms
|
||||
0 with 0 entries: Number of Out Of World
|
||||
1 with 0 entries: Number of Secondaries
|
||||
@@ -1454,25 +1464,25 @@ G4SDManager deleted.
|
||||
EventManager deleted.
|
||||
Units table cleared.
|
||||
TransportationManager deleted.
|
||||
Total navigation history collections cleaned: 44
|
||||
Total navigation history collections cleaned: 42
|
||||
G4RNGHelper object is deleted.
|
||||
================== Deleting memory pools ===================
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0615 MB
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0606 MB
|
||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.103 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.0856 MB
|
||||
Pool ID '16G4SmartVoxelNode', size : 0.112 MB
|
||||
Pool ID '17G4SmartVoxelProxy', size : 0.0942 MB
|
||||
Pool ID '7G4Event', size : 0.000961 MB
|
||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
||||
Pool ID '15G4HCofThisEvent', size : 0.000961 MB
|
||||
Pool ID '7G4Track', size : 0.206 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.00577 MB
|
||||
Pool ID '7G4Track', size : 0.17 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.00481 MB
|
||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||
Pool ID '10G4Fragment', size : 0.00192 MB
|
||||
Pool ID '17G4ReactionProduct', size : 0.00192 MB
|
||||
Number of memory pools allocated: 14 of which, static: 0
|
||||
Dynamic pools deleted: 14 / Total memory freed: 0.59 MB
|
||||
Dynamic pools deleted: 14 / Total memory freed: 0.54 MB
|
||||
============================================================
|
||||
G4Allocator objects are deleted.
|
||||
UImanager deleted.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -393,7 +393,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -432,7 +432,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -464,7 +464,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -533,7 +533,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -565,7 +565,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -597,7 +597,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -629,7 +629,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -661,7 +661,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -693,7 +693,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -725,7 +725,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -973,10 +973,10 @@ Launched 50000 random primary particles
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 50000
|
||||
User=17.640000s Real=17.789949s Sys=0.000000s
|
||||
User=14.340000s Real=14.424118s Sys=0.000000s
|
||||
PrimitiveScorer RUN PhantomSD,TotalDose
|
||||
Number of entries 144
|
||||
loop elapsed time [s] : 17.68
|
||||
loop elapsed time [s] : 14.39
|
||||
|
||||
|
||||
Region <DefaultRegionForTheWorld> -- -- appears in <worldPV> world volume
|
||||
@@ -1200,10 +1200,10 @@ Launched 50000 random primary particles
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 50000
|
||||
User=17.110000s Real=17.247989s Sys=0.000000s
|
||||
User=14.440000s Real=14.522564s Sys=0.000000s
|
||||
PrimitiveScorer RUN PhantomSD,TotalDose
|
||||
Number of entries 181
|
||||
loop elapsed time [s] : 17.14
|
||||
loop elapsed time [s] : 14.48
|
||||
|
||||
################ END NEW GEOMETRY ########################
|
||||
/run/geometryModified
|
||||
@@ -1497,10 +1497,10 @@ Launched 50000 random primary particles
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 50000
|
||||
User=17.440000s Real=17.590274s Sys=0.000000s
|
||||
User=14.330000s Real=14.403898s Sys=0.000000s
|
||||
PrimitiveScorer RUN PhantomSD,TotalDose
|
||||
Number of entries 166
|
||||
loop elapsed time [s] : 17.48
|
||||
loop elapsed time [s] : 14.37
|
||||
|
||||
|
||||
Region <DefaultRegionForTheWorld> -- -- appears in <worldPV> world volume
|
||||
@@ -1724,13 +1724,13 @@ Launched 50000 random primary particles
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 50000
|
||||
User=17.310000s Real=17.454879s Sys=0.010000s
|
||||
User=14.370000s Real=14.445436s Sys=0.000000s
|
||||
PrimitiveScorer RUN PhantomSD,TotalDose
|
||||
Number of entries 154
|
||||
loop elapsed time [s] : 17.35
|
||||
loop elapsed time [s] : 14.41
|
||||
|
||||
################ END NEW GEOMETRY ########################
|
||||
loop elapsed time [s] : 73.15
|
||||
loop elapsed time [s] : 60.76
|
||||
|
||||
G4 kernel has come to Quit state.
|
||||
UserDetectorConstruction deleted.
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -468,7 +468,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
UserMaxStep: SubType= 401 Step limit(mm)= 1
|
||||
@@ -508,7 +508,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -540,7 +540,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -609,7 +609,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -641,7 +641,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -673,7 +673,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -705,7 +705,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -737,7 +737,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -769,7 +769,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -801,10 +801,10 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
##### Create analysis manager 0xf4f0a0
|
||||
##### Create analysis manager 0x171ee70
|
||||
Using analysis manager
|
||||
All Ntuples have been created
|
||||
-> Event # 1 generated
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -47,7 +47,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -263,7 +265,6 @@ ionIoni: for GenericIon XStype:3 SubType=2
|
||||
dE/dx and range tables from 100 meV to 10 TeV in 280 bins
|
||||
Lambda tables from threshold to 10 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
|
||||
Stopping Power data for 17 ion/material pairs
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 2 MeV deltaVI
|
||||
BetheBloch : Emin= 2 MeV Emax= 10 TeV deltaVI
|
||||
@@ -338,7 +339,7 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
|
||||
See commands in /vis/modeling/trajectories/ for other options.
|
||||
### Run 0 starts.
|
||||
##### Create analysis manager 0x22f6c30
|
||||
##### Create analysis manager 0x2817030
|
||||
Using analysis manager
|
||||
... set ntuple merging row mode : row-wise - done
|
||||
... create file : microelectronics.root - done
|
||||
@@ -350,24 +351,25 @@ Si
|
||||
Reading TCS file
|
||||
Elastic Total Cross file : Elastic/elsepa_elastic_cross_e_Si
|
||||
loaddata : Elastic/elsepa_elastic_cross_e_Si
|
||||
Elastic Cumulated Diff Cross : /cvmfs/geant4.cern.ch/share/data/G4EMLOW8.2/microelec/Elastic/elsepa_elastic_cumulated_diffcross_e_Si.dat
|
||||
Elastic Cumulated Diff Cross : /cvmfs/geant4.cern.ch/share/data/G4EMLOW8.4/microelec/Elastic/elsepa_elastic_cumulated_diffcross_e_Si.dat
|
||||
MicroElasticModel, Material 2 / 2 : G4_Si
|
||||
Si
|
||||
Reading TCS file
|
||||
Elastic Total Cross file : Elastic/elsepa_elastic_cross_e_Si
|
||||
loaddata : Elastic/elsepa_elastic_cross_e_Si
|
||||
Elastic Cumulated Diff Cross : /cvmfs/geant4.cern.ch/share/data/G4EMLOW8.2/microelec/Elastic/elsepa_elastic_cumulated_diffcross_e_Si.dat
|
||||
Elastic Cumulated Diff Cross : /cvmfs/geant4.cern.ch/share/data/G4EMLOW8.4/microelec/Elastic/elsepa_elastic_cumulated_diffcross_e_Si.dat
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10
|
||||
User=0.330000s Real=0.345914s Sys=0.010000s
|
||||
User=0.330000s Real=0.373924s Sys=0.020000s
|
||||
... write file : microelectronics.root - done
|
||||
... close file : microelectronics.root - done
|
||||
... clear all data - done
|
||||
Number and type of particles created outside region "Target" :
|
||||
N e- : 1
|
||||
_______________________
|
||||
Number and type of particles created in region "Target" :
|
||||
N e- : 2432
|
||||
N e- : 6212
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
G4 kernel has come to Quit state.
|
||||
@@ -391,12 +393,12 @@ Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||
Pool ID '7G4Event', size : 0.000961 MB
|
||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.0115 MB
|
||||
Pool ID '7G4Track', size : 0.0221 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.0221 MB
|
||||
Pool ID '7G4Track', size : 0.0433 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.047 MB
|
||||
Dynamic pools deleted: 9 / Total memory freed: 0.079 MB
|
||||
============================================================
|
||||
G4Allocator objects are deleted.
|
||||
UImanager deleted.
|
||||
|
||||
Executable → Regular
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -43,6 +43,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
G2 (T/m) = 16.4947
|
||||
G3 (T/m) = 9.86677
|
||||
G4 (T/m) = -6.24449
|
||||
G4ChordFinder: stepperDriverId: 2
|
||||
PhysicsList::SetCuts:CutLength : 1 um
|
||||
|
||||
-------- WWWW ------- G4Exception-START -------- WWWW -------
|
||||
@@ -98,6 +99,7 @@ G4Material WARNING: duplicate name of material Vacuum
|
||||
G2 (T/m) = 16.4953
|
||||
G3 (T/m) = 9.86726
|
||||
G4 (T/m) = -6.2448
|
||||
G4ChordFinder: stepperDriverId: 2
|
||||
=======================================================================
|
||||
====== Electromagnetic Physics Parameters ========
|
||||
=======================================================================
|
||||
@@ -264,7 +266,6 @@ ionIoni: for GenericIon XStype:3 SubType=2
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
|
||||
Stopping Power data for 17 ion/material pairs
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
@@ -293,7 +294,7 @@ Index : 0 used in the geometry : Yes
|
||||
|
||||
==================================================================
|
||||
|
||||
##### Create analysis manager 0x1e7ab50
|
||||
##### Create analysis manager 0x13c4a00
|
||||
Using analysis manager
|
||||
Ntuple-1 created
|
||||
Ntuple-2 created
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -43,7 +43,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -229,6 +231,7 @@ After reordering if neccesary
|
||||
---> Dif values x,y,z (range): 10 22 36 cm in z
|
||||
-----------------------------------------------------------
|
||||
DeltaStep 0.01mm
|
||||
G4ChordFinder: stepperDriverId: 2
|
||||
PurgMagPhysicsList::SetCuts:CutLength : 1 um
|
||||
|
||||
-------- WWWW ------- G4Exception-START -------- WWWW -------
|
||||
@@ -382,7 +385,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -422,7 +425,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -454,7 +457,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -523,7 +526,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -555,7 +558,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -587,7 +590,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -619,7 +622,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -651,7 +654,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -683,7 +686,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -715,7 +718,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -774,7 +777,7 @@ Total number of event = 100000
|
||||
------- MixMaxRng engine status -------
|
||||
Current state vector is:
|
||||
mixmax state, file version 1.0
|
||||
N=17 V[N]={178715393884003041, 1924215168640207574, 195555616801611567, 53107534660245820, 1825856043083475140, 1792951263768582503, 438669518415037562, 2246688480621702590, 2057578841139869913, 2169294347317174467, 1861954794404699023, 55325311607728307, 849425583492111153, 1865477072846557918, 2097575288325327119, 667094300280606690, 274384931326759230} counter= 13sumtot= 2107125416906148009
|
||||
N=17 V[N]={77748014430414613, 1916023684659400533, 1170895291302529645, 1308717968961542533, 617576989286624977, 4159304169773412, 1773860259953165952, 1170460085642752549, 1346723549001032558, 2164775407857314692, 1400227920416410176, 1742052209028641158, 51329690927869269, 1772437326104352635, 406661536190202989, 1018565785029837114, 1261036022485472146} counter= 10sumtot= 756506971737785343
|
||||
---------------------------------------
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-patch-02 (15-June-2023)
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -43,7 +43,9 @@ Registered graphics systems are:
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -241,7 +243,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for e- XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -280,7 +282,7 @@ annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
|
||||
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
|
||||
|
||||
@@ -314,7 +316,7 @@ hPairProd: for proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -404,7 +406,7 @@ hPairProd: for anti_proton XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for anti_proton XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -438,7 +440,7 @@ hPairProd: for kaon+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -472,7 +474,7 @@ hPairProd: for kaon- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -506,7 +508,7 @@ muPairProd: for mu+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -540,7 +542,7 @@ muPairProd: for mu- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
NeutronHP: /Capture file for Z = 6, A = 12 is not found and NeutronHP will use /cvmfs/geant4.cern.ch/share/data/G4NDL4.7/Capture/CrossSection/6_nat_Carbon
|
||||
@@ -562,6 +564,7 @@ NeutronHP: /Elastic file for Z = 6, A = 12 is not found and NeutronHP will use /
|
||||
ProduceFissionFragments ? 0
|
||||
UseWendtFissionModel ? 0
|
||||
UseNRESP71Model ? 0
|
||||
UseDBRC ? 0
|
||||
=======================================================
|
||||
|
||||
@@@ G4ParticleHPInelastic instantiated for particle neutron data directory variable is G4NEUTRONHPDATA pointing to /cvmfs/geant4.cern.ch/share/data/G4NDL4.7/Inelastic
|
||||
@@ -598,7 +601,7 @@ hPairProd: for pi+ XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi+ XStype:1 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 0
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -632,7 +635,7 @@ hPairProd: for pi- XStype:1 SubType=4
|
||||
|
||||
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
|
||||
======================================================================
|
||||
@@ -967,12 +970,21 @@ Threshold for very long decay time at rest 3.171e+10 y
|
||||
|
||||
================================================================
|
||||
=======================================================================
|
||||
====== Pre-compound/De-excitation Physics Parameters ========
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
Type of pre-compound inverse x-section 3
|
||||
Pre-compound model active 1
|
||||
Pre-compound excitation low energy 100 keV
|
||||
Pre-compound excitation high energy 30 MeV
|
||||
Angular generator for pre-compound model 1
|
||||
Use NeverGoBack option for pre-compound model 0
|
||||
Use SoftCutOff option for pre-compound model 0
|
||||
Use CEM transitions for pre-compound model 1
|
||||
Use GNASH transitions for pre-compound model 0
|
||||
Use HETC submodel for pre-compound model 0
|
||||
=======================================================================
|
||||
====== Nuclear De-excitation Module Parameters ========
|
||||
=======================================================================
|
||||
Type of de-excitation inverse x-section 3
|
||||
Type of de-excitation factory Evaporation+GEM
|
||||
Number of de-excitation channels 68
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
project(stim_pixe_tomography)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Find Geant4 package, activating all available UI and Vis drivers by default
|
||||
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
|
||||
# to build a batch mode only executable
|
||||
#
|
||||
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
|
||||
if (WITH_GEANT4_UIVIS)
|
||||
find_package(Geant4 REQUIRED ui_all vis_all)
|
||||
else ()
|
||||
find_package(Geant4 REQUIRED)
|
||||
endif ()
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup Geant4 include directories and compile definitions
|
||||
#
|
||||
include(${Geant4_USE_FILE})
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Locate sources and headers for this project
|
||||
#
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include
|
||||
${Geant4_INCLUDE_DIR})
|
||||
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
|
||||
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add the executable, and link it to the Geant4 libraries
|
||||
#
|
||||
add_executable(stim_pixe_tomography stim_pixe_tomography.cc ${sources} ${headers})
|
||||
target_link_libraries(stim_pixe_tomography ${Geant4_LIBRARIES})
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Copy all scripts to the build directory, i.e. the directory in which we
|
||||
# build stim_pixe_tomography. This is so that we can run the executable directly because it
|
||||
# relies on these scripts being in the current working directory.
|
||||
#
|
||||
set(stim_pixe_tomography_SCRIPTS
|
||||
pixe3d.mac
|
||||
pixe3d_stim.mac
|
||||
pixe3d_initial.mac
|
||||
GPSPointLoop.C
|
||||
test.in
|
||||
vis.mac
|
||||
init_vis.mac
|
||||
)
|
||||
|
||||
foreach (_script ${stim_pixe_tomography_SCRIPTS})
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/${_script}
|
||||
${PROJECT_BINARY_DIR}/${_script}
|
||||
COPYONLY
|
||||
)
|
||||
endforeach ()
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
|
||||
#
|
||||
install(TARGETS stim_pixe_tomography DESTINATION bin)
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
//***********************************************************************************************************
|
||||
// GPSPointLoop.C
|
||||
// Root command file
|
||||
// Type: root GPSPointLoop.C
|
||||
//
|
||||
// It generates a macro file to run the simulation.
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
// include <stdio.h>
|
||||
// include <string.h>
|
||||
// include <stdint.h>
|
||||
// include <vector>
|
||||
// include <math.h>
|
||||
// using namespace std;
|
||||
|
||||
void GPSPointLoop()
|
||||
{
|
||||
gSystem->CopyFile("pixe3d_initial.mac", "pixe3d.mac", true);
|
||||
FILE* pfile = fopen("pixe3d.mac", "a+");
|
||||
|
||||
// gSystem->CopyFile("pixe3d_initial.mac", "pixe3d_stim.mac", true);
|
||||
// FILE* pfile = fopen("pixe3d_stim.mac", "a+");
|
||||
|
||||
//***********************************************
|
||||
//***(begin)** Define scan parameters************
|
||||
//***********************************************
|
||||
//***********************************************
|
||||
int NumberOfProjections = 10; // Define the number of Projections from zero to TotalAngleSpan
|
||||
// (last value "TotalAngleSpan" is excluded)
|
||||
int NumberOfSlices = 1; // Define the number of Slices
|
||||
int NumberOfPixels = 20; // Define the number of Pixels for square YZ Scan
|
||||
double TotalAngleSpan = 180; // scan angular range in degrees
|
||||
double ScanSize = 40 * 1.8; // unit um, scan size for cube of 40 um
|
||||
// double ScanSize = 42.48*1.8; // unit um, scan size for C.elegans
|
||||
// double ScanSize = 500; // unit um, scan size for GDP
|
||||
double ScanHeight = ScanSize; // Height of the scan, it depends on the need
|
||||
// double ScanHeight = 201.127; //Height of the scan for STIM-T simulatio of C. elegans, for 128
|
||||
// slices
|
||||
int NbParticles = 1000000;
|
||||
double energy = 1.5; // MeV
|
||||
char typeParticle[10] = "proton";
|
||||
|
||||
double PixelWidth = 1. * ScanSize / NumberOfPixels; // Width of each pixel
|
||||
double SliceHeight = 1. * ScanHeight / NumberOfSlices; // Height of each
|
||||
// slice
|
||||
double AngleStep =
|
||||
1. * TotalAngleSpan / NumberOfProjections; // angular increment (in degrees)
|
||||
// between two consecutive projections
|
||||
//
|
||||
// The beam position is at the center of each pixel
|
||||
// Starting position of the beam = StartScan + 0.5 x PixelWidth
|
||||
// The scan starts from the bottom left of the square
|
||||
//
|
||||
double StartScanXY = -0.5 * ScanSize;
|
||||
double StartScanZ = -0.5 * ScanHeight;
|
||||
// double StartScanZ = 0;
|
||||
|
||||
bool isInterrupted = false;
|
||||
int P_interrupt = 0; // the start of projection index to resume a simulation
|
||||
|
||||
//***********************************************
|
||||
//***(end)** Define scan parameters**************
|
||||
//***********************************************
|
||||
|
||||
//************************************
|
||||
//***(begin)** SCAN IMPLEMENTATION ***
|
||||
//************************************
|
||||
fprintf(pfile, "/tomography/run/scanParameters %d %d %d\n", NumberOfProjections, NumberOfSlices,
|
||||
NumberOfPixels);
|
||||
fprintf(pfile, "#\n");
|
||||
|
||||
if (isInterrupted) {
|
||||
fprintf(pfile, "/tomography/run/resumeSimulation true\n");
|
||||
fprintf(pfile, "/tomography/run/resumeProjectionIndex %d\n", P_interrupt);
|
||||
fprintf(pfile, "#\n");
|
||||
}
|
||||
fprintf(pfile, "/run/initialize\n");
|
||||
fprintf(pfile, "#\n");
|
||||
fprintf(pfile, "/run/printProgress 500000\n");
|
||||
fprintf(pfile, "#\n");
|
||||
fprintf(pfile, "# Source definition : energy, type\n");
|
||||
fprintf(pfile, "#\n");
|
||||
fprintf(pfile, "/gps/energy %.2f MeV\n", energy);
|
||||
fprintf(pfile, "/gps/particle %s\n", typeParticle);
|
||||
fprintf(pfile, "#\n");
|
||||
fprintf(pfile, "# SOURCE POSITION AND DIRECTION\n");
|
||||
fprintf(pfile, "#\n");
|
||||
for (int projectionIndex = 0; projectionIndex < NumberOfProjections;
|
||||
++projectionIndex) // projections
|
||||
{
|
||||
if (isInterrupted) {
|
||||
if (projectionIndex < P_interrupt) continue;
|
||||
}
|
||||
|
||||
for (int sliceIndex = 0; sliceIndex < NumberOfSlices; ++sliceIndex) // slices
|
||||
{
|
||||
// if(sliceIndex<15) continue;
|
||||
for (int pixelIndex = 0; pixelIndex < NumberOfPixels; ++pixelIndex) // pixels
|
||||
{
|
||||
double px = cos(projectionIndex * AngleStep * TMath::DegToRad()); // beam direction
|
||||
double py = sin(projectionIndex * AngleStep * TMath::DegToRad());
|
||||
double pz = 0.0;
|
||||
double x =
|
||||
StartScanXY * px - (StartScanXY + (pixelIndex + 0.5) * PixelWidth) * py; // beam position
|
||||
double y = StartScanXY * py + (StartScanXY + (pixelIndex + 0.5) * PixelWidth) * px;
|
||||
double z = StartScanZ + (sliceIndex + 0.5) * SliceHeight;
|
||||
// z = 18.07; //if z is fixed
|
||||
// z = z + 1.953125;
|
||||
// z = z + 3.90625;
|
||||
fprintf(pfile, "/gps/direction %f %f %f\n", px, py, pz);
|
||||
// fprintf(pfile, "/gps/pos/centre %.6f %.6f %.6f um\n",x, y, z );
|
||||
fprintf(pfile, "/gps/pos/centre %f %f %f um\n", x, y, z);
|
||||
fprintf(pfile, "/run/beamOn %d\n", NbParticles);
|
||||
fprintf(pfile, "#\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(pfile);
|
||||
|
||||
//************************************
|
||||
//***(end)** SCAN IMPLEMENTATION ***
|
||||
//************************************
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
# Example stim_pixe_tomography History
|
||||
|
||||
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-03-15 Z.Li (stim_pixe_tomography-V11-01-00)
|
||||
- Added first version of stim_pixe_tomography example
|
||||
@@ -0,0 +1,178 @@
|
||||
stim_pixe_tomography advanced example
|
||||
|
||||
The stim_pixe_tomography advanced example is developed to simulate three dimensional STIM or
|
||||
PIXE tomography experiments. The simulation results are written in a binary file and can be easily accessed using the
|
||||
provided scripts.
|
||||
|
||||
Publications:
|
||||
|
||||
[1] Li Z, Incerti S, Beasley D, Shen H, Wang S, Seznec H, et al. Accuracy of three-dimensional proton imaging of an
|
||||
inertial confinement fusion target assessed by Geant4 simulation. Nucl Instrum Methods Phys Res B. 2023;
|
||||
536:38-44. https://doi.org/10.1016/j.nimb.2022.12.026.
|
||||
|
||||
[2] Michelet C, Li Z, Jalenques H, Incerti S, Barberet P, Devs G, et al. A Geant4 simulation of X-ray emission
|
||||
for three-dimensional proton imaging of microscopic samples. Phys Med. 2022;94:85-93. https://doi.org/10.1016/j.ejmp.2021.12.002.
|
||||
|
||||
[3] Michelet C, Li Z, Yang W, Incerti S, Desbarats P, Giovannelli J-F, et al. A Geant4 simulation for
|
||||
three-dimensional proton imaging of microscopic samples. Phys Med. 2019;65:172-80. https://doi.org/10.1016/j.ejmp.2019.08.022.
|
||||
|
||||
Contact:
|
||||
|
||||
michelet@lp2ib.in2p3.fr (Claire Michelet)
|
||||
|
||||
zhuxin.li@outlook.com (Zhuxin Li)
|
||||
|
||||
|
||||
More information and a detailed UserGuide are available: http://geant4.in2p3.fr (Documentation section)
|
||||
|
||||
1 - GEOMETRY DEFINITION
|
||||
|
||||
Three phantoms are available, users can build up new phantoms or choose the following
|
||||
three phantoms by setting the "phantom_type":
|
||||
|
||||
1) A simple cube (see publication [2-3]), phantom_type = 1
|
||||
|
||||
The absorber is a box made of a given material.
|
||||
|
||||
2) Upper part of Caenorhabditis elegans (C.elegans) worm (see publication [2-3]) , phantom_type = 2
|
||||
|
||||
C.elegans phantom is composed of 6 ellipsoids. The size and shape of ellipsoids are based on the
|
||||
nanotoxicology studies carried-out at LP2I Bordeaux laboratory .
|
||||
|
||||
3) Inertial confinement fusion (ICF) target (see publication [1]), phantom_type = 3
|
||||
|
||||
ICF target is sphere shell, made of Ge-doped glow discharge polymer (GDP)
|
||||
|
||||
|
||||
2 - PHYSICS LIST
|
||||
|
||||
Physics lists are based on modular design. Several modules are instantiated:
|
||||
|
||||
1) Transportation
|
||||
2) EM physics
|
||||
3) Decay physics
|
||||
4) Hadron physics, optional
|
||||
|
||||
EM physics builders can be local or from G4 kernel physics_lists subdirectory.
|
||||
|
||||
- "emlivermore" default low-energy EM physics using Livermore data
|
||||
- "local" local physics builders, options are explicit in PhysListEmStandard
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
|
||||
Decay and StepMax processes are added to each list.
|
||||
|
||||
Optional components can be added:
|
||||
|
||||
- "elastic" elastic scattering of hadrons
|
||||
- "binary" QBBC configuration of hadron inelastic models
|
||||
- "binary_ion" Binary ion inelastic models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands.
|
||||
|
||||
|
||||
3 - HOW TO RUN
|
||||
|
||||
To run a PIXE tomography simulation in 'batch' mode using a pixe3d.mac file:
|
||||
|
||||
./stim_pixe_tomography -p pixe3d.mac
|
||||
|
||||
or if you want to specify the number of threads:
|
||||
|
||||
./stim_pixe_tomography -p pixe3d.mac N
|
||||
|
||||
N is the number of threads
|
||||
|
||||
An example of pixe3d.mac is provided.
|
||||
It is designed for the PIXE-T simulation of the cube phantom of 40 um.
|
||||
It is defined for 10 projections 1 slice 20 pixels. 1000000 protons are used for each beam.
|
||||
|
||||
|
||||
To run a STIM tomography simulation:
|
||||
|
||||
./stim_pixe_tomography -s pixe3d_stim.mac
|
||||
|
||||
or if you want to specify the number of threads:
|
||||
|
||||
./stim_pixe_tomography -s pixe3d_stim.mac N
|
||||
|
||||
N is the number of threads
|
||||
|
||||
An example of pixe3d_stim.mac (arbitrarily name, you may rename it pixe3d.mac if you wish) is provided.
|
||||
It is designed for the STIM-T simulation of the cube phantom of 40 um.
|
||||
It is defined for 10 projections 1 slice 20 pixels. 100 protons are used for each beam.
|
||||
|
||||
4 - VISUALISATION
|
||||
To visualize the phantoms, run:
|
||||
|
||||
./stim_pixe_tomography
|
||||
|
||||
5 - OUTPUT FILES
|
||||
|
||||
If a PIXE tomography simulation is made, two files are going to be generated:
|
||||
|
||||
1) GammaAtCreation.dat, which keeps the info of secondary photons at creation
|
||||
2) GammaAtExit.dat, which keeps the info of secondary photons at exit of the phantom
|
||||
|
||||
If a STIM tomography simulation is made, ProtonAtExit.dat is generated, in which the info of primary protons is kept
|
||||
|
||||
|
||||
6 - LIST OF MACROS AND SCRIPTS
|
||||
|
||||
Once you build the example, the following macros and script will be copied to your build directory:
|
||||
|
||||
pixe3d.mac: an example macro to run a PIXE-T simulation for cube of 40 um
|
||||
pixe3d_stim.mac: an example macro to run a STIM-T simulation for cube of 40 um
|
||||
pixe3d_initial.mac: it contains the information of physics processes
|
||||
init_vis.mac and vis.mac: for the visualization
|
||||
GPSPointLoop.C: it generates a macro file to run the simulation by reading pixe3d_initial.mac
|
||||
|
||||
In the Scripts folder, you will find other scripts for different uses.
|
||||
|
||||
To obtain the reconstruction data:
|
||||
|
||||
BinToStd_ProtonAtExit.C: it reads the STIM-T simulation results and generates the data file for STIM-T reconstruction using selection with particle momentum.
|
||||
BinToStd_GammaAtCreation.C: it reads the PIXE-T simulation results for X-rays at creation and generates the data file for PIXE-T reconstruction using selection with particle momentum.
|
||||
BinToStd_GammaAtExit.C: it reads the PIXE-T simulation results for X-rays at exit and generates the data file for PIXE-T reconstruction using selection with particle momentum.
|
||||
BinToStd_proton_position.C: it reads the STIM-T simulation results and generates the data file for STIM-T reconstruction using selection with particle position and momentum
|
||||
BinToStd_gamma_position.C: it reads the PIXE-T simulation results for X-rays and generates the data file for PIXE-T reconstruction using selection with particle position and momentum
|
||||
|
||||
To locate the interruption if an interruption of simulation occurs:
|
||||
|
||||
LocateInterruption_ProtonAtExit.C: in case of interruption, it locates the projection position of interruption for STIM-T simulation.
|
||||
LocateInterruption_GammaAtExit.C: in case of interruption, it locates the projection position of interruption for PIXE-T simulation.
|
||||
To obtain the reconstruction data in case of an interruption of simulation:***
|
||||
|
||||
Concatenate_BinToStd_ProtonAtExit.C: in case of one interruption, it reads STIM-T simulation results and generates the data file for STIM-T reconstruction.
|
||||
Concatenate_BinToStd_GammaAtCreation.C: in case of one interruption, it reads PIXE-T simulation results for X-rays at creation and generates the data file for PIXE-T reconstruction.
|
||||
Concatenate_BinToStd_GammaAtExit.C: in case of one interruption, it reads PIXE-T simulation results for X-rays at exit and generates the data file for PIXE-T reconstruction.
|
||||
To visualize the spectrum:
|
||||
|
||||
Spectrum_proton.C: it visualizes the spectrum of protons and plots a histogram by reading simulation result ProtonAtExit.dat.
|
||||
Spectrum_gamma.C: it visualizes the spectrum of X-rays and plots a histogram by reading simulation result GammaAtCreation.dat or GammaAtExit.dat.
|
||||
TomoSpectrum_HIST_proton.C: it visualizes the spectrum of protons and plots a histogram by reading StimEvent data. It also writes the spectrum data in a txt file.
|
||||
TomoSpectrum.C: it visualizes the spectrum of X-rays and plots a graph by reading PixeEvent data. It also writes the spectrum data in a txt file.
|
||||
TomoSpectrum_HIST.C: it visualizes the spectrum of X-rays and plots a histogram by reading PixeEvent data. It also writes the spectrum data in a txt file.
|
||||
Scripts for specific use:
|
||||
|
||||
Extract_Projection.C: it extracts 50 projections from a PixeEvent data file for tomographic reconstruction, which contains 100 projections. In fact, it extracts the projection 0, 2, 4, 6, 898 from projections 0-99. It eventually generates a new file with new index number of projections 0-49.
|
||||
Check_PixeEventFile.C: it checks if the index of projections of a PixeEvent data file for tomographic reconstruction is correct. For example, if the user extract 50 projections from a data file composed 100 projections, it is necessary to make sure in the new data file, the index of projection starts from 0 and ends at 49.
|
||||
Extract_Slice.C: it extracts a certain number of slice(s) from a PixeEvent data file for tomographic reconstruction. Users need to specify the first and the last slice to be extracted. Note that when writing a new data file, the index of slices will be initiated from 0.
|
||||
Concatenate_BinToStd_GammaAtCreation_fabricate.C: if users make a PIXE-T simulation on a symmetrical object with only one projection, this script can be used to fabricate the other 99 projection data for X-rays at creation with same energy.
|
||||
Concatenate_BinToStd_GammaAtExit_fabricate.C: if users make a PIXE-T simulation on a symmetrical object with only one projection, this script can be used to fabricate the other 99 projection data for X-rays at exit with same energy
|
||||
Scripts to generate voxelized phantoms:***
|
||||
|
||||
In order to compare the reconstructed tomographic images with original
|
||||
phantoms, it may be necessary to use a voxelized phantom.
|
||||
|
||||
generate_voxelized_sphere_phantom.py: it generates a voxelized phantom of an inertial confinement fusion target.
|
||||
generate_voxelized_worm_phantom.py: it generates a voxelized phantom of the upper part of C. elegans.
|
||||
More information can be found in the UserGuide.
|
||||
@@ -0,0 +1,179 @@
|
||||
# stim_pixe_tomography advanced example
|
||||
|
||||
The stim_pixe_tomography advanced example is developed to simulate three dimensional STIM or
|
||||
PIXE tomography experiments. The simulation results are written in a binary file and can be easily accessed using the
|
||||
provided scripts.
|
||||
|
||||
Publications:
|
||||
|
||||
[1] Li Z, Incerti S, Beasley D, Shen H, Wang S, Seznec H, et al. Accuracy of three-dimensional proton imaging of an
|
||||
inertial confinement fusion target assessed by Geant4 simulation. Nucl Instrum Methods Phys Res B. 2023;
|
||||
536:38-44. https://doi.org/10.1016/j.nimb.2022.12.026.
|
||||
|
||||
[2] Michelet C, Li Z, Jalenques H, Incerti S, Barberet P, Devs G, et al. A Geant4 simulation of X-ray emission
|
||||
for three-dimensional proton imaging of microscopic samples. Phys Med. 2022;94:85-93. https://doi.org/10.1016/j.ejmp.2021.12.002.
|
||||
|
||||
[3] Michelet C, Li Z, Yang W, Incerti S, Desbarats P, Giovannelli J-F, et al. A Geant4 simulation for
|
||||
three-dimensional proton imaging of microscopic samples. Phys Med. 2019;65:172-80. https://doi.org/10.1016/j.ejmp.2019.08.022.
|
||||
|
||||
Contact:
|
||||
|
||||
michelet@lp2ib.in2p3.fr (Claire Michelet)
|
||||
|
||||
zhuxin.li@outlook.com (Zhuxin Li)
|
||||
|
||||
|
||||
More information and a detailed UserGuide are available:
|
||||
http://geant4.in2p3.fr (Documentation section)
|
||||
|
||||
## 1 - GEOMETRY DEFINITION
|
||||
|
||||
Three phantoms are available, users can build up new phantoms or choose the following
|
||||
three phantoms by setting the "phantom_type":
|
||||
|
||||
1) A simple cube (see publication [2-3]), phantom_type = 1
|
||||
|
||||
The absorber is a box made of a given material.
|
||||
|
||||
2) Upper part of Caenorhabditis elegans (C.elegans) worm (see publication [2-3]) , phantom_type = 2
|
||||
|
||||
C.elegans phantom is composed of 6 ellipsoids. The size and shape of ellipsoids are based on the
|
||||
nanotoxicology studies carried-out at LP2I Bordeaux laboratory .
|
||||
|
||||
3) Inertial confinement fusion (ICF) target (see publication [1]), phantom_type = 3
|
||||
|
||||
ICF target is sphere shell, made of Ge-doped glow discharge polymer (GDP)
|
||||
|
||||
|
||||
##2 - PHYSICS LIST
|
||||
|
||||
Physics lists are based on modular design. Several modules are instantiated:
|
||||
|
||||
1) Transportation
|
||||
2) EM physics
|
||||
3) Decay physics
|
||||
4) Hadron physics, optional
|
||||
|
||||
EM physics builders can be local or from G4 kernel physics_lists subdirectory.
|
||||
|
||||
- "emlivermore" default low-energy EM physics using Livermore data
|
||||
- "local" local physics builders, options are explicit in PhysListEmStandard
|
||||
- "emstandard_opt0" recommended standard EM physics for LHC
|
||||
- "emstandard_opt1" best CPU performance standard physics for LHC
|
||||
- "emstandard_opt2" similar fast simulation
|
||||
- "emstandard_opt3" best standard EM options - analog to "local" above
|
||||
- "emstandard_opt4" best current advanced EM options standard + lowenergy
|
||||
- "emstandardWVI" standard EM physics and WentzelVI multiple scattering
|
||||
- "emstandardSS" standard EM physics and single scattering model
|
||||
- "emstandardGS" standard EM physics and Goudsmit-Saunderson multiple scatt.
|
||||
- "empenelope" low-energy EM physics implementing Penelope models
|
||||
- "emlowenergy" low-energy EM physics implementing experimental
|
||||
|
||||
Decay and StepMax processes are added to each list.
|
||||
|
||||
Optional components can be added:
|
||||
|
||||
- "elastic" elastic scattering of hadrons
|
||||
- "binary" QBBC configuration of hadron inelastic models
|
||||
- "binary_ion" Binary ion inelastic models
|
||||
|
||||
Physics lists and options can be (re)set with UI commands.
|
||||
|
||||
|
||||
##3 - HOW TO RUN
|
||||
|
||||
To run a PIXE tomography simulation in 'batch' mode using a pixe3d.mac file:
|
||||
|
||||
./stim_pixe_tomography -p pixe3d.mac
|
||||
|
||||
or if you want to specify the number of threads:
|
||||
|
||||
./stim_pixe_tomography -p pixe3d.mac N
|
||||
|
||||
N is the number of threads
|
||||
|
||||
An example of pixe3d.mac is provided.
|
||||
It is designed for the PIXE-T simulation of the cube phantom of 40 um.
|
||||
It is defined for 10 projections 1 slice 20 pixels. 1000000 protons are used for each beam.
|
||||
|
||||
|
||||
To run a STIM tomography simulation:
|
||||
|
||||
./stim_pixe_tomography -s pixe3d_stim.mac
|
||||
|
||||
or if you want to specify the number of threads:
|
||||
|
||||
./stim_pixe_tomography -s pixe3d_stim.mac N
|
||||
|
||||
N is the number of threads
|
||||
|
||||
An example of pixe3d_stim.mac (arbitrarily name, you may rename it pixe3d.mac if you wish) is provided.
|
||||
It is designed for the STIM-T simulation of the cube phantom of 40 um.
|
||||
It is defined for 10 projections 1 slice 20 pixels. 100 protons are used for each beam.
|
||||
|
||||
##4 - VISUALISATION
|
||||
To visualize the phantoms, run:
|
||||
|
||||
./stim_pixe_tomography
|
||||
|
||||
##5 - OUTPUT FILES
|
||||
|
||||
If a PIXE tomography simulation is made, two files are going to be generated:
|
||||
|
||||
1) GammaAtCreation.dat, which keeps the info of secondary photons at creation
|
||||
2) GammaAtExit.dat, which keeps the info of secondary photons at exit of the phantom
|
||||
|
||||
If a STIM tomography simulation is made, ProtonAtExit.dat is generated, in which the info of primary protons is kept
|
||||
|
||||
|
||||
##6 - LIST OF MACROS AND SCRIPTS
|
||||
|
||||
Once you build the example, the following macros and script will be copied to your build directory:
|
||||
|
||||
pixe3d.mac: an example macro to run a PIXE-T simulation for cube of 40 um
|
||||
pixe3d_stim.mac: an example macro to run a STIM-T simulation for cube of 40 um
|
||||
pixe3d_initial.mac: it contains the information of physics processes
|
||||
init_vis.mac and vis.mac: for the visualization
|
||||
GPSPointLoop.C: it generates a macro file to run the simulation by reading pixe3d_initial.mac
|
||||
|
||||
In the **Scripts** folder, you will find other scripts for different uses.
|
||||
|
||||
***To obtain the reconstruction data:***
|
||||
|
||||
BinToStd_ProtonAtExit.C: it reads the STIM-T simulation results and generates the data file for STIM-T reconstruction using selection with particle momentum.
|
||||
BinToStd_GammaAtCreation.C: it reads the PIXE-T simulation results for X-rays at creation and generates the data file for PIXE-T reconstruction using selection with particle momentum.
|
||||
BinToStd_GammaAtExit.C: it reads the PIXE-T simulation results for X-rays at exit and generates the data file for PIXE-T reconstruction using selection with particle momentum.
|
||||
BinToStd_proton_position.C: it reads the STIM-T simulation results and generates the data file for STIM-T reconstruction using selection with particle position and momentum
|
||||
BinToStd_gamma_position.C: it reads the PIXE-T simulation results for X-rays and generates the data file for PIXE-T reconstruction using selection with particle position and momentum
|
||||
|
||||
***To locate the interruption if an interruption of simulation occurs:***
|
||||
|
||||
LocateInterruption_ProtonAtExit.C: in case of interruption, it locates the projection position of interruption for STIM-T simulation.
|
||||
LocateInterruption_GammaAtExit.C: in case of interruption, it locates the projection position of interruption for PIXE-T simulation.
|
||||
***To obtain the reconstruction data in case of an interruption of simulation:***
|
||||
|
||||
Concatenate_BinToStd_ProtonAtExit.C: in case of one interruption, it reads STIM-T simulation results and generates the data file for STIM-T reconstruction.
|
||||
Concatenate_BinToStd_GammaAtCreation.C: in case of one interruption, it reads PIXE-T simulation results for X-rays at creation and generates the data file for PIXE-T reconstruction.
|
||||
Concatenate_BinToStd_GammaAtExit.C: in case of one interruption, it reads PIXE-T simulation results for X-rays at exit and generates the data file for PIXE-T reconstruction.
|
||||
***To visualize the spectrum:***
|
||||
|
||||
Spectrum_proton.C: it visualizes the spectrum of protons and plots a histogram by reading simulation result ProtonAtExit.dat.
|
||||
Spectrum_gamma.C: it visualizes the spectrum of X-rays and plots a histogram by reading simulation result GammaAtCreation.dat or GammaAtExit.dat.
|
||||
TomoSpectrum_HIST_proton.C: it visualizes the spectrum of protons and plots a histogram by reading StimEvent data. It also writes the spectrum data in a txt file.
|
||||
TomoSpectrum.C: it visualizes the spectrum of X-rays and plots a graph by reading PixeEvent data. It also writes the spectrum data in a txt file.
|
||||
TomoSpectrum_HIST.C: it visualizes the spectrum of X-rays and plots a histogram by reading PixeEvent data. It also writes the spectrum data in a txt file.
|
||||
***Scripts for specific use:***
|
||||
|
||||
Extract_Projection.C: it extracts 50 projections from a PixeEvent data file for tomographic reconstruction, which contains 100 projections. In fact, it extracts the projection 0, 2, 4, 6, 898 from projections 0-99. It eventually generates a new file with new index number of projections 0-49.
|
||||
Check_PixeEventFile.C: it checks if the index of projections of a PixeEvent data file for tomographic reconstruction is correct. For example, if the user extract 50 projections from a data file composed 100 projections, it is necessary to make sure in the new data file, the index of projection starts from 0 and ends at 49.
|
||||
Extract_Slice.C: it extracts a certain number of slice(s) from a PixeEvent data file for tomographic reconstruction. Users need to specify the first and the last slice to be extracted. Note that when writing a new data file, the index of slices will be initiated from 0.
|
||||
Concatenate_BinToStd_GammaAtCreation_fabricate.C: if users make a PIXE-T simulation on a symmetrical object with only one projection, this script can be used to fabricate the other 99 projection data for X-rays at creation with same energy.
|
||||
Concatenate_BinToStd_GammaAtExit_fabricate.C: if users make a PIXE-T simulation on a symmetrical object with only one projection, this script can be used to fabricate the other 99 projection data for X-rays at exit with same energy
|
||||
***Scripts to generate voxelized phantoms:***
|
||||
|
||||
In order to compare the reconstructed tomographic images with original
|
||||
phantoms, it may be necessary to use a voxelized phantom.
|
||||
|
||||
generate_voxelized_sphere_phantom.py: it generates a voxelized phantom of an inertial confinement fusion target.
|
||||
generate_voxelized_worm_phantom.py: it generates a voxelized phantom of the upper part of C. elegans.
|
||||
More information can be found in the UserGuide.
|
||||
@@ -0,0 +1,199 @@
|
||||
//******************************************************************************************
|
||||
// BinToStd_GammaAtCreation.C
|
||||
// Root command file
|
||||
// Type: root BinToStd_GammaAtCreation.C
|
||||
//
|
||||
// Read the output file GammaAtCreation.dat that is generated by Geant4
|
||||
// tomography simulation It read all the gamma at creation information, and
|
||||
// rewrite the events in a binary file PixeEvent_std_AtCreation.DAT
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//*******************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
|
||||
// double DegreeToRadian(double degree) { return (PI * degree / 180.); }
|
||||
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
void BinToStd_GammaAtCreation()
|
||||
{
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 20;
|
||||
double totalAngleSpan = 180.; // in degree
|
||||
|
||||
double angleOfDetector = 135.; // angle of detector relative to the incident
|
||||
// direction of the primary protons //
|
||||
double distanceObjectDetector = 22.; // 22 mm
|
||||
double radiusOfDetector = 5.; // 5 mm
|
||||
// double theta = atan(radiusOfDetector/distanceObjectDetector); //half apex
|
||||
// angle of the right circular cone in radian
|
||||
double theta = 70 * TMath::DegToRad(); // in radian
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
FILE* input = fopen("../build/GammaAtCreation.dat", "rb");
|
||||
FILE* out = fopen("../build/PixeEvent_std_AtCreation.DAT", "wb");
|
||||
|
||||
if (input == NULL) {
|
||||
printf("error for opening the input GammaAtCreation.dat file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
PixeEvent pixeEvent;
|
||||
Point centerOfDetector;
|
||||
Point gammaMomentum;
|
||||
long long count = 0;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
|
||||
// while(!feof(input)) //if not the end, read
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input)) {
|
||||
runID++;
|
||||
// if(runID==5) continue;
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
//(begin)*****************************************************************
|
||||
// the following codes are used only when in the simulation
|
||||
// the index of projection, slice and pixel is not
|
||||
// correctly configured
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
//(end)******************************************************************
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf(
|
||||
"---------RunID=%d:\nProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d,"
|
||||
"nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!nbParticle) continue;
|
||||
std::vector<ParticleInfo> gammaAtCreation(nbParticle);
|
||||
fread(&gammaAtCreation[0], sizeof(ParticleInfo), nbParticle, input);
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means
|
||||
// the angle between source direction and detector, which should be constant
|
||||
// when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// gamma selection: energy should be lower than 4095*10eV = 49.45 keV
|
||||
if (gammaAtCreation[i].energy_keV >= 40.95 || gammaAtCreation[i].energy_keV <= 0.9)
|
||||
continue; // gamma selection
|
||||
|
||||
gammaMomentum.m_x = gammaAtCreation[i].mx;
|
||||
gammaMomentum.m_y = gammaAtCreation[i].my;
|
||||
gammaMomentum.m_z = gammaAtCreation[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, gammaMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
pixeEvent.energy_10eV = floor(100 * gammaAtCreation[i].energy_keV + 0.5);
|
||||
pixeEvent.projectionIndex = runInfo.projectionIndex;
|
||||
pixeEvent.sliceIndex = runInfo.sliceIndex;
|
||||
pixeEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&pixeEvent, 7, 1, out);
|
||||
count++;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
// printf("momentum: (%f, %f, %f), energy: %f keV %d 10eV\n",
|
||||
// gammaAtCreation[i].mx, gammaAtCreation[i].my, gammaAtCreation[i].mz,
|
||||
// gammaAtCreation[i].energy_keV, pixeEvent.energy_10eV);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
}
|
||||
}
|
||||
}
|
||||
printf(
|
||||
"---------------Number of PixeEvent in total: "
|
||||
"%lld------------------------\n",
|
||||
count);
|
||||
fclose(input);
|
||||
fclose(out);
|
||||
|
||||
// Recheck the output file in case
|
||||
// FILE* input2 = fopen("PixeEvent_std_AtCreation.DAT","rb");
|
||||
// PixeEvent p;
|
||||
// while(fread(&p, 7, 1, input2))
|
||||
// {
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d,
|
||||
// Energy_10eV=%d\n", p.projectionIndex, p.sliceIndex, p.pixelIndex,
|
||||
// p.energy_10eV);
|
||||
|
||||
// }
|
||||
// fclose(input2);
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
//***********************************************************************************************************
|
||||
// BinToStd_GammaAtExit.C
|
||||
// Root command file
|
||||
// Type: root BinToStd_GammaAtExit.C
|
||||
//
|
||||
// Read the output file ProtonAtExit.dat that is generated by Geant4 tomography
|
||||
// simulation It read all the gamma at exit information, and rewrite the events
|
||||
// in a binary file PixeEvent_std_AtExit.DAT
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
void BinToStd_GammaAtExit()
|
||||
{
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 20;
|
||||
double totalAngleSpan = 180.; // in degree
|
||||
|
||||
double angleOfDetector = 135.; // angle of detector relative to the incident
|
||||
// direction of the primary protons //
|
||||
double distanceObjectDetector = 22.; // 22 mm
|
||||
double radiusOfDetector = 5.; // 5 mm
|
||||
// double theta = atan(radiusOfDetector/distanceObjectDetector); //half apex
|
||||
// angle of the right circular cone in radian
|
||||
double theta = 70 * TMath::DegToRad(); // in radian
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
FILE* input = fopen("../build/GammaAtExit.dat", "rb");
|
||||
FILE* out = fopen("../build/PixeEvent_std_AtExit.DAT", "wb");
|
||||
|
||||
if (input == NULL) {
|
||||
printf("error for opening the input GammaAtExit.dat file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
PixeEvent pixeEvent;
|
||||
Point centerOfDetector;
|
||||
Point gammaMomentum;
|
||||
long long count = 0;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
|
||||
// while(!feof(input)) //if not the end, read
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input)) {
|
||||
runID++;
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
// the following codes are used only when in the simulation
|
||||
// ************(begin) the index of projection, slice and pixel is not
|
||||
// correctly configured
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
//************************************************************************(end)
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf(
|
||||
"---------RunID=%d:\nProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d,"
|
||||
"nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!nbParticle) continue;
|
||||
std::vector<ParticleInfo> gammaAtExit(nbParticle);
|
||||
fread(&gammaAtExit[0], sizeof(ParticleInfo), nbParticle, input);
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means
|
||||
// the angle between source direction and detector, which should be constant
|
||||
// when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// gamma selection: energy should be lower than 4095*10eV = 49.45 keV
|
||||
if (gammaAtExit[i].energy_keV >= 40.95 || gammaAtExit[i].energy_keV <= 0.9) continue;
|
||||
|
||||
gammaMomentum.m_x = gammaAtExit[i].mx;
|
||||
gammaMomentum.m_y = gammaAtExit[i].my;
|
||||
gammaMomentum.m_z = gammaAtExit[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, gammaMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
pixeEvent.energy_10eV = floor(100 * gammaAtExit[i].energy_keV + 0.5);
|
||||
pixeEvent.projectionIndex = runInfo.projectionIndex;
|
||||
pixeEvent.sliceIndex = runInfo.sliceIndex;
|
||||
pixeEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&pixeEvent, 7, 1, out);
|
||||
count++;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
// printf("momentum: (%f, %f, %f), energy: %f keV %d 10eV\n",
|
||||
// gammaAtExit[i].mx, gammaAtExit[i].my, gammaAtExit[i].mz,
|
||||
// gammaAtExit[i].energy_keV, pixeEvent.energy_10eV);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
}
|
||||
}
|
||||
}
|
||||
printf(
|
||||
"\n---------------Number of PixeEvent in total: "
|
||||
"%lld------------------------\n",
|
||||
count);
|
||||
fclose(input);
|
||||
fclose(out);
|
||||
|
||||
// Recheck the output file in case
|
||||
// FILE* input2;
|
||||
// input2 = fopen("PixeEvent_std_AtExit.DAT","rb");
|
||||
// PixeEvent p;
|
||||
// while(fread(&p, 7, 1, input2))
|
||||
// {
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d,
|
||||
// Energy_10eV=%d\n", p.projectionIndex, p.sliceIndex, p.pixelIndex,
|
||||
// p.energy_10eV);
|
||||
|
||||
// }
|
||||
// fclose(input2);
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
//***********************************************************************************************************
|
||||
// BinToStd_ProtonAtExit.C
|
||||
// Root command file
|
||||
// Type: root BinToStd_ProtonAtExit.C
|
||||
//
|
||||
// Read the output file ProtonAtExit.dat that is generated by Geant4 tomography simulation
|
||||
// It reads proton at exit information, and rewrite the events in a binary file StimEvent_std.DAT
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct StimEvent
|
||||
{
|
||||
uint16_t energy_keV; // different from Pixe Event, it is in keV
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
void BinToStd_ProtonAtExit()
|
||||
{
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 20;
|
||||
double totalAngleSpan = 180.; // in degree
|
||||
|
||||
// angle of detector relative to the incident direction of the primary protons at first projection
|
||||
// for proton, it is fixed to 0 degree, namely opposite to the source
|
||||
double angleOfDetector = 0.;
|
||||
double distanceObjectDetector = 22.; // 22 mm
|
||||
double radiusOfDetector = 5.; // 5 mm
|
||||
// double theta = atan(radiusOfDetector/distanceObjectDetector); //half apex angle of the right
|
||||
// circular cone in radian
|
||||
double theta = 10.2 * TMath::DegToRad(); // in radian
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
FILE* input = fopen("../build/ProtonAtExit.dat", "rb");
|
||||
FILE* out = fopen("../build/StimEvent_std.DAT", "wb");
|
||||
|
||||
if (input == NULL) {
|
||||
printf("error for opening the input ProtonAtExit.dat file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
StimEvent stimEvent;
|
||||
Point centerOfDetector;
|
||||
Point protonMomentum;
|
||||
long long count = 0;
|
||||
int runID = -1;
|
||||
|
||||
// while(!feof(input)) //if not the end, read
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input)) {
|
||||
runID++;
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
//(begin)***************************************************************
|
||||
// the following codes are used only when in the simulation
|
||||
// the index of projection, slice and pixel is not
|
||||
// correctly configured
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
//(end)******************************************************************
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf("---------RunID=%d: ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!nbParticle) continue;
|
||||
std::vector<ParticleInfo> protonAtExit(nbParticle);
|
||||
fread(&protonAtExit[0], sizeof(ParticleInfo), nbParticle, input);
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means the angle between
|
||||
// source direction and detector, which should be constant when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// proton selection: energy should be lower than 4095 keV
|
||||
if (protonAtExit[i].energy_keV >= 4095) continue; // proton selection
|
||||
|
||||
protonMomentum.m_x = protonAtExit[i].mx;
|
||||
protonMomentum.m_y = protonAtExit[i].my;
|
||||
protonMomentum.m_z = protonAtExit[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, protonMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
stimEvent.energy_keV = floor(protonAtExit[i].energy_keV + 0.5);
|
||||
stimEvent.projectionIndex = runInfo.projectionIndex;
|
||||
stimEvent.sliceIndex = runInfo.sliceIndex;
|
||||
stimEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&stimEvent, 7, 1, out);
|
||||
count++;
|
||||
// printf("energy=%f keV\n",protonAtExit[i].energy_keV);
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("---------------Number of StimEvent in total: %lld------------------------\n", count);
|
||||
fclose(input);
|
||||
fclose(out);
|
||||
|
||||
// FILE* input2;
|
||||
// input2 = fopen("StimEvent_std.DAT","rb");
|
||||
// StimEvent p;
|
||||
// double eventId = -1;
|
||||
// while(fread(&p, 7, 1, input2))
|
||||
// {
|
||||
|
||||
// if(p.projectionIndex == 8 &&p.sliceIndex ==64 && p.pixelIndex==64)
|
||||
// {
|
||||
// eventId++;
|
||||
// printf("StimEvent_%.0f ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_keV=%d keV\n",
|
||||
// eventId, p.projectionIndex, p.sliceIndex, p.pixelIndex, p.energy_keV);
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
// fclose(input2);
|
||||
}
|
||||
@@ -0,0 +1,296 @@
|
||||
//***********************************************************************************************************
|
||||
// BinToStd_gamma_position.C
|
||||
// Root command file
|
||||
// Type: root BinToStd_gamma_position.C
|
||||
//
|
||||
// Read the X-ray output file that is generated by Geant4 tomography
|
||||
// simulation. It reads gamma information, either at creation, or at exit, and rewrite the events
|
||||
// in a binary file PixeEvent_std.DAT
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
bool IsEqual(double a, double b, double eps, double releps)
|
||||
{
|
||||
if (a == b) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (fabs(a - b) <= releps * fabs(b)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (fabs(a - b) < eps) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
double eps = 1e-20; // absolut difference
|
||||
double releps = 1e-10; // relative difference
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
};
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else {
|
||||
// printf(" acos: %f, radius: %f\n", r, theta);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsDetected_position(Point poi1, Point poi2, double r)
|
||||
{
|
||||
double a = sqrt((poi1.m_x - poi2.m_x) * (poi1.m_x - poi2.m_x)
|
||||
+ (poi1.m_y - poi2.m_y) * (poi1.m_y - poi2.m_y)
|
||||
+ (poi1.m_z - poi2.m_z) * (poi1.m_z - poi2.m_z));
|
||||
|
||||
// if(a <= r) return true;
|
||||
if (a > r)
|
||||
return false;
|
||||
|
||||
else {
|
||||
// printf(" distance of two points: %f, radius: %f\n", a, r);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void BinToStd_gamma_position()
|
||||
{
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 1;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 1;
|
||||
double totalAngleSpan = 180.; // in degree
|
||||
|
||||
double angleOfDetector = 135.; // angle of detector relative to the incident
|
||||
|
||||
double distanceObjectDetector = 22000.; // um
|
||||
|
||||
// double theta = atan(radiusOfDetector/distanceObjectDetector); //half apex
|
||||
// angle of the right circular cone in radian
|
||||
double theta = 14.726 * TMath::DegToRad(); // in radian
|
||||
double radiusOfDetector = distanceObjectDetector * tan(theta);
|
||||
bool usePosition = true;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
FILE* input = fopen("../build/GammaAtExit.dat", "rb");
|
||||
FILE* out = fopen("../build/PixeEvent_std_AtExit.DAT", "wb");
|
||||
|
||||
if (input == NULL) {
|
||||
printf("error for opening the input file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
PixeEvent pixeEvent;
|
||||
Point centerOfDetector;
|
||||
Point gammaMomentum;
|
||||
Point gammaPosition;
|
||||
Point intersectionPoint;
|
||||
long long count = 0;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
|
||||
// while(!feof(input)) //if not the end, read
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input)) {
|
||||
runID++;
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
//(begin)****************************************************************
|
||||
// the following codes are used only when in the simulation
|
||||
// the index of projection, slice and pixel is not
|
||||
// correctly configured
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
|
||||
//(end)******************************************************************
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf(
|
||||
"---------RunID=%d:\nProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d,"
|
||||
"nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!nbParticle) continue;
|
||||
std::vector<ParticleInfo> gammaAtExit(nbParticle);
|
||||
fread(&gammaAtExit[0], sizeof(ParticleInfo), nbParticle, input);
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means
|
||||
// the angle between source direction and detector, which should be constant
|
||||
// when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// gamma selection: energy should be lower than 4095*10eV = 49.45 keV
|
||||
if (gammaAtExit[i].energy_keV >= 40.95 || gammaAtExit[i].energy_keV <= 0.9) continue;
|
||||
|
||||
gammaMomentum.m_x = gammaAtExit[i].mx;
|
||||
gammaMomentum.m_y = gammaAtExit[i].my;
|
||||
gammaMomentum.m_z = gammaAtExit[i].mz;
|
||||
|
||||
if (!usePosition) {
|
||||
if (!IsDetected(centerOfDetector, gammaMomentum, theta)) continue;
|
||||
}
|
||||
else {
|
||||
double c =
|
||||
distanceObjectDetector * (gammaMomentum.m_x * cos(ra) + gammaMomentum.m_y * sin(ra));
|
||||
if (IsEqual(0, c, eps, releps)) continue; // parallel
|
||||
|
||||
gammaPosition.m_x = gammaAtExit[i].x;
|
||||
gammaPosition.m_y = gammaAtExit[i].y;
|
||||
gammaPosition.m_z = gammaAtExit[i].z;
|
||||
|
||||
double t = (distanceObjectDetector * distanceObjectDetector
|
||||
- gammaPosition.m_x * distanceObjectDetector * cos(ra)
|
||||
- gammaPosition.m_y * distanceObjectDetector * sin(ra))
|
||||
/ c;
|
||||
|
||||
intersectionPoint.m_x = gammaPosition.m_x + gammaMomentum.m_x * t;
|
||||
intersectionPoint.m_y = gammaPosition.m_y + gammaMomentum.m_y * t;
|
||||
intersectionPoint.m_z = gammaPosition.m_z + gammaMomentum.m_z * t;
|
||||
|
||||
if (!IsDetected_position(centerOfDetector, intersectionPoint, radiusOfDetector)) continue;
|
||||
|
||||
// printf(" t = %f, intersection point: (%f, %f, %f) centor of detector: (%f, %f, %f)
|
||||
// 111=%f, 222=%f \n", t, intersectionPoint.m_x,intersectionPoint.m_y,intersectionPoint.m_z,
|
||||
// centerOfDetector.m_x,centerOfDetector.m_y,centerOfDetector.m_z,
|
||||
// (distanceObjectDetector*distanceObjectDetector-gammaPosition.m_x*distanceObjectDetector*cos(ra)
|
||||
// -gammaPosition.m_y*distanceObjectDetector*sin(ra)), c);
|
||||
|
||||
// printf(" distanceObjectDetector = %f, gammaPosition.m_x=%f,
|
||||
// distanceObjectDetector*cos(ra)=%f, gammaPosition.m_y=%f,
|
||||
// distanceObjectDetector*sin(ra)=%f\n", distanceObjectDetector, gammaPosition.m_x,
|
||||
// distanceObjectDetector*cos(ra),
|
||||
// gammaPosition.m_y,
|
||||
// distanceObjectDetector*sin(ra));
|
||||
|
||||
double tt = (intersectionPoint.m_x - gammaPosition.m_x) * gammaMomentum.m_x
|
||||
+ (intersectionPoint.m_y - gammaPosition.m_y) * gammaMomentum.m_y
|
||||
+ (intersectionPoint.m_z - gammaPosition.m_z) * gammaMomentum.m_z;
|
||||
if (tt < 0) continue;
|
||||
}
|
||||
|
||||
pixeEvent.energy_10eV = floor(100 * gammaAtExit[i].energy_keV + 0.5);
|
||||
pixeEvent.projectionIndex = runInfo.projectionIndex;
|
||||
pixeEvent.sliceIndex = runInfo.sliceIndex;
|
||||
pixeEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&pixeEvent, 7, 1, out);
|
||||
count++;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!usePosition) {
|
||||
printf(
|
||||
"---------id = %d, RunID=%d ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, momentum: "
|
||||
"(%f, %f, %f), energy: %f keV\n",
|
||||
i, runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex,
|
||||
gammaAtExit[i].mx, gammaAtExit[i].my, gammaAtExit[i].mz, gammaAtExit[i].energy_keV);
|
||||
}
|
||||
else {
|
||||
// printf("---------id = %d, RunID=%d ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d,
|
||||
// momentum: (%f, %f, %f), energy: %f keV, position: (%f, %f, %f)\n", i, runID,
|
||||
// runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, gammaAtExit[i].mx,
|
||||
// gammaAtExit[i].my, gammaAtExit[i].mz, gammaAtExit[i].energy_keV, gammaAtExit[i].x,
|
||||
// gammaAtExit[i].y, gammaAtExit[i].z);
|
||||
|
||||
printf(
|
||||
"---------id = %d, RunID=%d ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, momentum: "
|
||||
"(%f, %f, %f), energy: %f keV\n",
|
||||
i, runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex,
|
||||
gammaAtExit[i].mx, gammaAtExit[i].my, gammaAtExit[i].mz, gammaAtExit[i].energy_keV);
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
}
|
||||
}
|
||||
printf(
|
||||
"\n---------------Number of PixeEvent in total: "
|
||||
"%lld------------------------\n",
|
||||
count);
|
||||
fclose(input);
|
||||
fclose(out);
|
||||
|
||||
// Recheck the output file in case
|
||||
// FILE* input2;
|
||||
// input2 = fopen("PixeEvent_std_AtExit.DAT","rb");
|
||||
// PixeEvent p;
|
||||
// while(fread(&p, 7, 1, input2))
|
||||
// {
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d,
|
||||
// Energy_10eV=%d\n", p.projectionIndex, p.sliceIndex, p.pixelIndex,
|
||||
// p.energy_10eV);
|
||||
|
||||
// }
|
||||
// fclose(input2);
|
||||
}
|
||||
@@ -0,0 +1,305 @@
|
||||
//***********************************************************************************************************
|
||||
// BinToStd_proton_position.C
|
||||
// Root command file
|
||||
// Type: root BinToStd_proton_position.C
|
||||
//
|
||||
// Read the X-ray output file that is generated by Geant4 tomography
|
||||
// simulation. It reads gamma information, either at creation, or at exit, and rewrite the events
|
||||
// in a binary file StimEvent_std.DAT
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
bool IsEqual(double a, double b, double eps, double releps)
|
||||
{
|
||||
if (a == b) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (fabs(a - b) <= releps * fabs(b)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (fabs(a - b) < eps) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
double eps = 1e-20; // absolut difference
|
||||
double releps = 1e-10; // relative difference
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct StimEvent
|
||||
{
|
||||
uint16_t energy_keV; // different from Pixe Event, it is in keV
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
};
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else {
|
||||
// printf(" acos: %f, radius: %f\n", r, theta);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsDetected_position(Point poi1, Point poi2, double r)
|
||||
{
|
||||
double a = sqrt((poi1.m_x - poi2.m_x) * (poi1.m_x - poi2.m_x)
|
||||
+ (poi1.m_y - poi2.m_y) * (poi1.m_y - poi2.m_y)
|
||||
+ (poi1.m_z - poi2.m_z) * (poi1.m_z - poi2.m_z));
|
||||
|
||||
// if(a <= r) return true;
|
||||
if (a > r)
|
||||
return false;
|
||||
|
||||
else {
|
||||
// printf(" distance of two points: %f, radius: %f\n", a, r);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void BinToStd_proton_position()
|
||||
{
|
||||
// printf("%f %f %f\n", acos(1), acos(-1), acos(0));
|
||||
// return;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 1;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 1;
|
||||
double totalAngleSpan = 180.; // in degree
|
||||
|
||||
double angleOfDetector = 0.; // angle of detector relative to the incident
|
||||
|
||||
double distanceObjectDetector = 22000.; // um
|
||||
|
||||
// double theta = atan(radiusOfDetector/distanceObjectDetector); //half apex
|
||||
// angle of the right circular cone in radian
|
||||
double theta = 10.2 * TMath::DegToRad(); // in radian
|
||||
double radiusOfDetector = distanceObjectDetector * tan(theta);
|
||||
bool usePosition = true;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
FILE* input = fopen("../build/ProtonAtExit.dat", "rb");
|
||||
FILE* out = fopen("../build/StimEvent_std", "wb");
|
||||
|
||||
if (input == NULL) {
|
||||
printf("error for opening the input file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
StimEvent stimEvent;
|
||||
Point centerOfDetector;
|
||||
Point protonMomentum;
|
||||
Point protonPosition;
|
||||
Point intersectionPoint;
|
||||
long long count = 0;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
|
||||
// while(!feof(input)) //if not the end, read
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input)) {
|
||||
runID++;
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
//(begin)****************************************************************
|
||||
// the following codes are used only when in the simulation
|
||||
// the index of projection, slice and pixel is not
|
||||
// correctly configured
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
|
||||
//(end)*******************************************************************
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf(
|
||||
"---------RunID=%d:\nProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d,"
|
||||
"nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!nbParticle) continue;
|
||||
std::vector<ParticleInfo> protonAtExit(nbParticle);
|
||||
fread(&protonAtExit[0], sizeof(ParticleInfo), nbParticle, input);
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means
|
||||
// the angle between source direction and detector, which should be constant
|
||||
// when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// proton selection: energy should be lower than 4095 keV
|
||||
if (protonAtExit[i].energy_keV >= 4095) continue;
|
||||
|
||||
protonMomentum.m_x = protonAtExit[i].mx;
|
||||
protonMomentum.m_y = protonAtExit[i].my;
|
||||
protonMomentum.m_z = protonAtExit[i].mz;
|
||||
|
||||
if (!usePosition) {
|
||||
if (!IsDetected(centerOfDetector, protonMomentum, theta)) continue;
|
||||
}
|
||||
else {
|
||||
double c =
|
||||
distanceObjectDetector * (protonMomentum.m_x * cos(ra) + protonMomentum.m_y * sin(ra));
|
||||
if (IsEqual(0, c, eps, releps)) continue; // parallel
|
||||
|
||||
protonPosition.m_x = protonAtExit[i].x;
|
||||
protonPosition.m_y = protonAtExit[i].y;
|
||||
protonPosition.m_z = protonAtExit[i].z;
|
||||
|
||||
double t = (distanceObjectDetector * distanceObjectDetector
|
||||
- protonPosition.m_x * distanceObjectDetector * cos(ra)
|
||||
- protonPosition.m_y * distanceObjectDetector * sin(ra))
|
||||
/ c;
|
||||
|
||||
intersectionPoint.m_x = protonPosition.m_x + protonMomentum.m_x * t;
|
||||
intersectionPoint.m_y = protonPosition.m_y + protonMomentum.m_y * t;
|
||||
intersectionPoint.m_z = protonPosition.m_z + protonMomentum.m_z * t;
|
||||
|
||||
if (!IsDetected_position(centerOfDetector, intersectionPoint, radiusOfDetector)) continue;
|
||||
|
||||
// printf(" t = %f, intersection point: (%f, %f, %f) centor of detector: (%f, %f, %f)
|
||||
// 111=%f, 222=%f \n", t, intersectionPoint.m_x,intersectionPoint.m_y,intersectionPoint.m_z,
|
||||
// centerOfDetector.m_x,centerOfDetector.m_y,centerOfDetector.m_z,
|
||||
// (distanceObjectDetector*distanceObjectDetector-protonPosition.m_x*distanceObjectDetector*cos(ra)
|
||||
// -protonPosition.m_y*distanceObjectDetector*sin(ra)), c);
|
||||
|
||||
// printf(" distanceObjectDetector = %f, protonPosition.m_x=%f,
|
||||
// distanceObjectDetector*cos(ra)=%f, protonPosition.m_y=%f,
|
||||
// distanceObjectDetector*sin(ra)=%f\n", distanceObjectDetector, protonPosition.m_x,
|
||||
// distanceObjectDetector*cos(ra),
|
||||
// protonPosition.m_y,
|
||||
// distanceObjectDetector*sin(ra));
|
||||
|
||||
double tt = (intersectionPoint.m_x - protonPosition.m_x) * protonMomentum.m_x
|
||||
+ (intersectionPoint.m_y - protonPosition.m_y) * protonMomentum.m_y
|
||||
+ (intersectionPoint.m_z - protonPosition.m_z) * protonMomentum.m_z;
|
||||
if (tt < 0) continue;
|
||||
}
|
||||
|
||||
stimEvent.energy_10eV = floor(100 * protonAtExit[i].energy_keV + 0.5);
|
||||
stimEvent.projectionIndex = runInfo.projectionIndex;
|
||||
stimEvent.sliceIndex = runInfo.sliceIndex;
|
||||
stimEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&stimEvent, 7, 1, out);
|
||||
count++;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information
|
||||
//(begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!usePosition) {
|
||||
printf(
|
||||
"---------id = %d, RunID=%d ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, momentum: "
|
||||
"(%f, %f, %f), energy: %f keV\n",
|
||||
i, runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex,
|
||||
protonAtExit[i].mx, protonAtExit[i].my, protonAtExit[i].mz, protonAtExit[i].energy_keV);
|
||||
}
|
||||
else {
|
||||
// printf("---------id = %d, RunID=%d ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d,
|
||||
// momentum: (%f, %f, %f), energy: %f keV, position: (%f, %f, %f)\n", i, runID,
|
||||
// runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, protonAtExit[i].mx,
|
||||
// protonAtExit[i].my, protonAtExit[i].mz, protonAtExit[i].energy_keV, protonAtExit[i].x,
|
||||
// protonAtExit[i].y, protonAtExit[i].z);
|
||||
|
||||
printf(
|
||||
"---------id = %d, RunID=%d ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, momentum: "
|
||||
"(%f, %f, %f), energy: %f keV\n",
|
||||
i, runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex,
|
||||
protonAtExit[i].mx, protonAtExit[i].my, protonAtExit[i].mz, protonAtExit[i].energy_keV);
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
}
|
||||
}
|
||||
printf(
|
||||
"\n---------------Number of StimEvent in total: "
|
||||
"%lld------------------------\n",
|
||||
count);
|
||||
fclose(input);
|
||||
fclose(out);
|
||||
|
||||
// FILE* input2;
|
||||
// input2 = fopen("StimEvent_std.DAT","rb");
|
||||
// StimEvent p;
|
||||
// double eventId = -1;
|
||||
// while(fread(&p, 7, 1, input2))
|
||||
// {
|
||||
|
||||
// if(p.projectionIndex == 8 &&p.sliceIndex ==64 && p.pixelIndex==64)
|
||||
// {
|
||||
// eventId++;
|
||||
// printf("StimEvent_%.0f ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_keV=%d keV\n",
|
||||
// eventId, p.projectionIndex, p.sliceIndex, p.pixelIndex, p.energy_keV);
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
// fclose(input2);
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
//***********************************************************************************************************
|
||||
// Check_PixeEventFile.C
|
||||
// Root command file
|
||||
// Use it by typing in the command line of Root terminal: root Check_PixeEventFile.C
|
||||
//
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
#define PI 3.14159265f
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
|
||||
double DegreeToRadian(double degree)
|
||||
{
|
||||
return (PI * degree / 180.);
|
||||
}
|
||||
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
void Check_PixeEventFile()
|
||||
{
|
||||
FILE* input2 =
|
||||
fopen("../build/PixeEvent_std_AtExit_Detector135_Aperture70_50Projections.DAT", "rb");
|
||||
PixeEvent ppp;
|
||||
int proj = -1;
|
||||
while (fread(&ppp, 7, 1, input2)) {
|
||||
if (ppp.projectionIndex != proj) {
|
||||
printf("__ProjectionIndex=%d\n", ppp.projectionIndex);
|
||||
proj = ppp.projectionIndex;
|
||||
}
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_10eV=%d\n",
|
||||
// ppp.projectionIndex, ppp.sliceIndex, ppp.pixelIndex, ppp.energy_10eV);
|
||||
}
|
||||
fclose(input2);
|
||||
}
|
||||
+279
@@ -0,0 +1,279 @@
|
||||
//***********************************************************************************************************
|
||||
// Concatenate_BinToStd_GammaAtCreation.C
|
||||
// Root command file
|
||||
// Type: root Concatenate_BinToStd_GammaAtCreation.C
|
||||
//
|
||||
// It is used in case of interruption
|
||||
// Read 2 output files GammaAtCreation_1.dat and GammaAtCreation_2.dat that are generated by Geant4
|
||||
// tomography simulation. It reads all the gamma at creation information, and rewrite the events in
|
||||
// a binary file PixeEvent_std_AtCreation.DAT
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
void Concatenate_BinToStd_GammaAtCreation()
|
||||
{
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 20;
|
||||
double totalAngleSpan = 180.; // in degree
|
||||
|
||||
double angleOfDetector =
|
||||
135.; // angle of detector relative to the incident direction of the primary protons //
|
||||
double distanceObjectDetector = 22.; // 22 mm
|
||||
double radiusOfDetector = 5.; // 5 mm
|
||||
// double theta = atan(radiusOfDetector/distanceObjectDetector); //half apex angle of the right
|
||||
// circular cone in radian
|
||||
double theta = 70 * TMath::DegToRad(); // in radian
|
||||
|
||||
int P_interrupt = 6; // Projection of interruption
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
// assuming there is one interruption
|
||||
FILE* input1 = fopen("../build/GammaAtCreation_1.dat", "rb");
|
||||
FILE* input2 = fopen("../build/GammaAtCreation_2.dat", "rb");
|
||||
FILE* out = fopen("../build/PixeEvent_std_AtCreation.DAT", "wb");
|
||||
|
||||
if (input1 == NULL) {
|
||||
printf("error for opening the input GammaAtCreation_1.dat file\n");
|
||||
return;
|
||||
}
|
||||
if (input2 == NULL) {
|
||||
printf("error for opening the input GammaAtCreation_2.dat file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
PixeEvent pixeEvent;
|
||||
Point centerOfDetector;
|
||||
Point gammaMomentum;
|
||||
long long count1 = 0;
|
||||
long long count2 = 0;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
|
||||
// ************************************************************(begin)
|
||||
// **********************READ FIRST FILE***********************
|
||||
// ************************************************************
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input1)) {
|
||||
runID++;
|
||||
|
||||
//(begin)***************************************************************
|
||||
// the following codes are used only when in the simulation
|
||||
// the index of projection, slice and pixel is not
|
||||
// correctly configured
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
//(end)******************************************************************
|
||||
|
||||
if (runInfo.projectionIndex == P_interrupt) {
|
||||
runID--;
|
||||
break;
|
||||
}
|
||||
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
std::vector<ParticleInfo> gammaAtCreation(nbParticle);
|
||||
fread(&gammaAtCreation[0], sizeof(ParticleInfo), nbParticle, input1);
|
||||
|
||||
// if(runInfo.sliceIndex!=1) continue;
|
||||
// if(runInfo.sliceIndex!=31&&runInfo.sliceIndex!=32) continue;
|
||||
// if(runInfo.sliceIndex!=31) continue;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf("-1--runId %d, ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means the angle between
|
||||
// source direction and detector, which should be constant when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// gamma selection: energy should be lower than 4095*10eV = 49.45 keV
|
||||
if (gammaAtCreation[i].energy_keV >= 40.95 || gammaAtCreation[i].energy_keV <= 0.9)
|
||||
continue; // gamma selection
|
||||
|
||||
gammaMomentum.m_x = gammaAtCreation[i].mx;
|
||||
gammaMomentum.m_y = gammaAtCreation[i].my;
|
||||
gammaMomentum.m_z = gammaAtCreation[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, gammaMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
pixeEvent.energy_10eV = floor(100 * gammaAtCreation[i].energy_keV + 0.5);
|
||||
pixeEvent.projectionIndex = runInfo.projectionIndex;
|
||||
pixeEvent.sliceIndex = runInfo.sliceIndex;
|
||||
pixeEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&pixeEvent, 7, 1, out);
|
||||
count1++;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("---------------Number of PixeEvent in the first file: %lld------------------------\n",
|
||||
count1);
|
||||
fclose(input1);
|
||||
|
||||
// ************************************************************
|
||||
// **********************READ FIRST FILE (end)*****************
|
||||
// ************************************************************
|
||||
|
||||
// ************************************************************
|
||||
// **********************READ SECOND FILE (begin)**************
|
||||
// ************************************************************
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input2)) {
|
||||
runID++;
|
||||
|
||||
//(begin)***************************************************************
|
||||
// the following codes are used only when in the simulation
|
||||
// the index of projection, slice and pixel is not
|
||||
// correctly configured
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
//(end)******************************************************************
|
||||
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf("-2--runId %d, ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!nbParticle) continue;
|
||||
std::vector<ParticleInfo> gammaAtCreation(nbParticle);
|
||||
fread(&gammaAtCreation[0], sizeof(ParticleInfo), nbParticle, input2);
|
||||
|
||||
// if(runInfo.sliceIndex!=1) continue;
|
||||
// if(runInfo.sliceIndex!=31) continue;
|
||||
// if(runInfo.sliceIndex!=31&&runInfo.sliceIndex!=32) continue;
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means the angle between
|
||||
// source direction and detector, which should be constant when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// gamma selection: energy should be lower than 4095*10eV = 49.45 keV
|
||||
if (gammaAtCreation[i].energy_keV >= 40.95 || gammaAtCreation[i].energy_keV <= 0.9)
|
||||
continue; // gamma selection
|
||||
|
||||
gammaMomentum.m_x = gammaAtCreation[i].mx;
|
||||
gammaMomentum.m_y = gammaAtCreation[i].my;
|
||||
gammaMomentum.m_z = gammaAtCreation[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, gammaMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
pixeEvent.energy_10eV = floor(100 * gammaAtCreation[i].energy_keV + 0.5);
|
||||
pixeEvent.projectionIndex = runInfo.projectionIndex;
|
||||
pixeEvent.sliceIndex = runInfo.sliceIndex;
|
||||
pixeEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&pixeEvent, 7, 1, out);
|
||||
count2++;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("---------------Number of PixeEvent in in the second file: %lld------------------------\n",
|
||||
count2);
|
||||
|
||||
// ************************************************************
|
||||
// **********************READ SECOND FILE (end)****************
|
||||
// ************************************************************
|
||||
|
||||
printf("---------------Number of PixeEvent in total: %lld------------------------\n",
|
||||
count1 + count2);
|
||||
fclose(input2);
|
||||
fclose(out);
|
||||
|
||||
// Recheck the output file in case
|
||||
// FILE* input2 = fopen("PixeEvent_std_AtCreation.DAT","rb");
|
||||
// PixeEvent p;
|
||||
// while(fread(&p, 7, 1, input2))
|
||||
// {
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_10eV=%d\n",
|
||||
// p.projectionIndex, p.sliceIndex, p.pixelIndex, p.energy_10eV);
|
||||
|
||||
// }
|
||||
// fclose(input2);
|
||||
}
|
||||
+226
@@ -0,0 +1,226 @@
|
||||
//***********************************************************************************************************
|
||||
// Concatenate_BinToStd_GammaAtCreation_fabricate.C
|
||||
// Root command file
|
||||
// Use it by typing in the command line of Root terminal: root
|
||||
// Concatenate_BinToStd_GammaAtCreation_fabricate.C
|
||||
//
|
||||
//
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
#define PI 3.14159265f
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
|
||||
double DegreeToRadian(double degree)
|
||||
{
|
||||
return (PI * degree / 180.);
|
||||
}
|
||||
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
void Concatenate_BinToStd_GammaAtCreation_fabricate()
|
||||
{
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 100;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 128;
|
||||
double totalAngleSpan = 180.; // in degree
|
||||
|
||||
double angleOfDetector =
|
||||
135.; // angle of detector relative to the incident direction of the primary protons //
|
||||
double distanceObjectDetector = 22.; // 22 mm
|
||||
double radiusOfDetector = 5.; // 5 mm
|
||||
// double theta = atan(radiusOfDetector/distanceObjectDetector); //half apex angle of the right
|
||||
// circular cone in radian double theta = 14.726*TMath::DegToRad(); // in radian
|
||||
double theta = 70 * TMath::DegToRad(); // in radian
|
||||
// double theta = 70*TMath::DegToRad(); // in radian
|
||||
// double theta = DegreeToRadian(70);
|
||||
|
||||
int P_interrupt = 1; // Projection of interruption
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
// assuming there is one interruption
|
||||
FILE* input1 = fopen("../RT7_GDP_1Projs_1Slice_128Pixels_2000000_4MeV/GammaAtCreation.dat", "rb");
|
||||
FILE* out =
|
||||
fopen("../RT7_GDP_1Projs_1Slice_128Pixels_2000000_4MeV/PixeEvent_std_AtCreation.DAT", "wb");
|
||||
// FILE* temp;
|
||||
// temp =fopen("temp.DAT","wb");
|
||||
|
||||
if (input1 == NULL) {
|
||||
printf("error for opening the input GammaAtCreation.dat file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
PixeEvent pixeEvent;
|
||||
Point centerOfDetector;
|
||||
Point gammaMomentum;
|
||||
long long count1 = 0;
|
||||
long long count2 = 0;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
std::vector<PixeEvent> eventVec;
|
||||
|
||||
// ************************************************************(begin)
|
||||
// **********************READ FIRST FILE***********************
|
||||
// ************************************************************
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input1)) {
|
||||
runID++;
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
if (runInfo.projectionIndex == P_interrupt) {
|
||||
runID--;
|
||||
break;
|
||||
}
|
||||
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
std::vector<ParticleInfo> gammaAtCreation(nbParticle);
|
||||
fread(&gammaAtCreation[0], sizeof(ParticleInfo), nbParticle, input1);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
// printf("-1--runId %d, ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle =
|
||||
// %d\n",runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means the angle between
|
||||
// source direction and detector, which should be constant when source is rotating
|
||||
double ra =
|
||||
DegreeToRadian(angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// gamma selection: energy should be lower than 4095*10eV = 49.45 keV
|
||||
if (gammaAtCreation[i].energy_keV >= 40.95 || gammaAtCreation[i].energy_keV <= 0.9)
|
||||
continue; // gamma selection
|
||||
|
||||
gammaMomentum.m_x = gammaAtCreation[i].mx;
|
||||
gammaMomentum.m_y = gammaAtCreation[i].my;
|
||||
gammaMomentum.m_z = gammaAtCreation[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, gammaMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
pixeEvent.energy_10eV = floor(100 * gammaAtCreation[i].energy_keV + 0.5);
|
||||
pixeEvent.projectionIndex = runInfo.projectionIndex;
|
||||
pixeEvent.sliceIndex = runInfo.sliceIndex;
|
||||
pixeEvent.pixelIndex = runInfo.pixelIndex;
|
||||
|
||||
eventVec.push_back(pixeEvent);
|
||||
// fwrite(&pixeEvent, 7, 1, temp);
|
||||
// fwrite(&pixeEvent, 7, 1, out);
|
||||
count1++;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("---------------Number of PixeEvent in the first file: %lld------------------------\n",
|
||||
count1);
|
||||
fclose(input1);
|
||||
// fclose(temp);
|
||||
|
||||
// ************************************************************(end)
|
||||
// **********************READ FIRST FILE***********************
|
||||
// ************************************************************
|
||||
|
||||
PixeEvent pp;
|
||||
PixeEvent p;
|
||||
|
||||
for (int i = 0; i < nbProjection; ++i) {
|
||||
int size = eventVec.size();
|
||||
for (int j = 0; j < size; ++j) {
|
||||
p = eventVec[j];
|
||||
pp.energy_10eV = p.energy_10eV;
|
||||
pp.projectionIndex = p.projectionIndex + i;
|
||||
pp.sliceIndex = p.sliceIndex; // index of slices should be reset, starting from 0
|
||||
pp.pixelIndex = p.pixelIndex;
|
||||
pp.pixelIndex = p.pixelIndex;
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_10eV=%d\n",
|
||||
// pp.projectionIndex, pp.sliceIndex, pp.pixelIndex, pp.energy_10eV);
|
||||
fwrite(&pp, 7, 1, out);
|
||||
}
|
||||
}
|
||||
|
||||
// fclose(temp);
|
||||
fclose(out);
|
||||
|
||||
// Recheck the output file in case
|
||||
FILE* input2 =
|
||||
fopen("../RT7_GDP_1Projs_1Slice_128Pixels_2000000_4MeV/PixeEvent_std_AtCreation.DAT", "rb");
|
||||
PixeEvent ppp;
|
||||
int proj = -1;
|
||||
while (fread(&ppp, 7, 1, input2)) {
|
||||
if (ppp.projectionIndex != proj) {
|
||||
printf("__ProjectionIndex=%d\n", ppp.projectionIndex);
|
||||
proj = ppp.projectionIndex;
|
||||
}
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_10eV=%d\n",
|
||||
// ppp.projectionIndex, ppp.sliceIndex, ppp.pixelIndex, ppp.energy_10eV);
|
||||
}
|
||||
fclose(input2);
|
||||
}
|
||||
@@ -0,0 +1,270 @@
|
||||
//***********************************************************************************************************
|
||||
// Concatenate_BinToStd_GammaAtExit.C
|
||||
// Root command file
|
||||
// Type: root Concatenate_BinToStd_GammaAtExit.C
|
||||
//
|
||||
// It is used in case of one interruption
|
||||
// Read 2 output files GammaAtExit_1.dat and GammaAtExit_2.dat that are generated by Geant4
|
||||
// tomography simulation It reads gamma at exit information, and rewrite the events in a binary file
|
||||
// PixeEvent_std_AtExit.DAT
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
void Concatenate_BinToStd_GammaAtExit()
|
||||
{
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 20;
|
||||
double totalAngleSpan = 180.; // in degree
|
||||
|
||||
double angleOfDetector =
|
||||
135.; // angle of detector relative to the incident direction of the primary protons //
|
||||
double distanceObjectDetector = 22.; // 22 mm
|
||||
double radiusOfDetector = 5.; // 5 mm
|
||||
// double theta = atan(radiusOfDetector/distanceObjectDetector); //half apex angle of the right
|
||||
// circular cone in radian
|
||||
double theta = 70 * TMath::DegToRad(); // in radian
|
||||
|
||||
int P_interrupt = 6; // Projection of interruption
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
// assuming there is one interruption
|
||||
FILE* input1 = fopen("../build/GammaAtExit_1.dat", "rb");
|
||||
FILE* input2 = fopen("../build/GammaAtExit_2.dat", "rb");
|
||||
FILE* out = fopen("../build/PixeEvent_std_AtExit.DAT", "wb");
|
||||
|
||||
if (input1 == NULL) {
|
||||
printf("error for opening the input GammaAtExit_1.dat file\n");
|
||||
return;
|
||||
}
|
||||
if (input2 == NULL) {
|
||||
printf("error for opening the input GammaAtExit_2.dat file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
PixeEvent pixeEvent;
|
||||
Point centerOfDetector;
|
||||
Point gammaMomentum;
|
||||
long long count1 = 0;
|
||||
long long count2 = 0;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
|
||||
// ************************************************************
|
||||
// **********************READ FIRST FILE (begin)***************
|
||||
// ************************************************************
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input1)) {
|
||||
runID++;
|
||||
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
|
||||
if (runInfo.projectionIndex == P_interrupt) {
|
||||
runID--;
|
||||
break;
|
||||
}
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf("-1--runId %d, ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!nbParticle) continue;
|
||||
|
||||
std::vector<ParticleInfo> gammaAtExit(nbParticle);
|
||||
fread(&gammaAtExit[0], sizeof(ParticleInfo), nbParticle, input1);
|
||||
|
||||
// if(runInfo.sliceIndex!=1) continue;
|
||||
// if(runInfo.sliceIndex!=31&&runInfo.sliceIndex!=32) continue;
|
||||
// if(runInfo.sliceIndex!=31) continue;
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means the angle between
|
||||
// source direction and detector, which should be constant when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// gamma selection: energy should be lower than 4095*10eV = 49.45 keV
|
||||
if (gammaAtExit[i].energy_keV >= 40.95 || gammaAtExit[i].energy_keV <= 0.9)
|
||||
continue; // gamma selection
|
||||
|
||||
gammaMomentum.m_x = gammaAtExit[i].mx;
|
||||
gammaMomentum.m_y = gammaAtExit[i].my;
|
||||
gammaMomentum.m_z = gammaAtExit[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, gammaMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
pixeEvent.energy_10eV = floor(100 * gammaAtExit[i].energy_keV + 0.5);
|
||||
pixeEvent.projectionIndex = runInfo.projectionIndex;
|
||||
pixeEvent.sliceIndex = runInfo.sliceIndex;
|
||||
pixeEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&pixeEvent, 7, 1, out);
|
||||
count1++;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("---------------Number of PixeEvent in the first file: %lld------------------------\n",
|
||||
count1);
|
||||
fclose(input1);
|
||||
|
||||
// ************************************************************
|
||||
// **********************READ FIRST FILE (end)*****************
|
||||
// ************************************************************
|
||||
|
||||
// ************************************************************
|
||||
// **********************READ SECOND FILE (begin)**************
|
||||
// ************************************************************
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input2)) {
|
||||
runID++;
|
||||
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf("-2--runId %d, ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!nbParticle) continue;
|
||||
std::vector<ParticleInfo> gammaAtExit(nbParticle);
|
||||
fread(&gammaAtExit[0], sizeof(ParticleInfo), nbParticle, input2);
|
||||
|
||||
// if(runInfo.sliceIndex!=1) continue;
|
||||
// if(runInfo.sliceIndex!=31&&runInfo.sliceIndex!=32) continue;
|
||||
// if(runInfo.sliceIndex!=31) continue;
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means the angle between
|
||||
// source direction and detector, which should be constant when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// gamma selection: energy should be lower than 4095*10eV = 49.45 keV
|
||||
if (gammaAtExit[i].energy_keV >= 40.95 || gammaAtExit[i].energy_keV <= 0.9)
|
||||
continue; // gamma selection
|
||||
|
||||
gammaMomentum.m_x = gammaAtExit[i].mx;
|
||||
gammaMomentum.m_y = gammaAtExit[i].my;
|
||||
gammaMomentum.m_z = gammaAtExit[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, gammaMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
pixeEvent.energy_10eV = floor(100 * gammaAtExit[i].energy_keV + 0.5);
|
||||
pixeEvent.projectionIndex = runInfo.projectionIndex;
|
||||
pixeEvent.sliceIndex = runInfo.sliceIndex;
|
||||
pixeEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&pixeEvent, 7, 1, out);
|
||||
count2++;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("---------------Number of PixeEvent in in the second file: %lld------------------------\n",
|
||||
count2);
|
||||
|
||||
// ************************************************************
|
||||
// **********************READ SECOND FILE (end)****************
|
||||
// ************************************************************
|
||||
|
||||
printf("---------------Number of PixeEvent in total: %lld------------------------\n",
|
||||
count1 + count2);
|
||||
fclose(input2);
|
||||
fclose(out);
|
||||
|
||||
// Recheck the output file in case
|
||||
// FILE* input2 = fopen("PixeEvent_std_AtExit.DAT","rb");
|
||||
// PixeEvent p;
|
||||
// while(fread(&p, 7, 1, input2))
|
||||
// {
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_10eV=%d\n",
|
||||
// p.projectionIndex, p.sliceIndex, p.pixelIndex, p.energy_10eV);
|
||||
|
||||
// }
|
||||
// fclose(input2);
|
||||
}
|
||||
+232
@@ -0,0 +1,232 @@
|
||||
//***********************************************************************************************************
|
||||
// Concatenate_BinToStd_GammaAtExit_fabricate.C
|
||||
// Root command file
|
||||
// Use it by typing in the command line of Root terminal: root
|
||||
// Concatenate_BinToStd_GammaAtExit_fabricate.C
|
||||
//
|
||||
//
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
#define PI 3.14159265f
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
|
||||
double DegreeToRadian(double degree)
|
||||
{
|
||||
return (PI * degree / 180.);
|
||||
}
|
||||
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
void Concatenate_BinToStd_GammaAtExit_fabricate()
|
||||
{
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 100;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 128;
|
||||
double totalAngleSpan = 180.; // in degree
|
||||
|
||||
double angleOfDetector =
|
||||
135.; // angle of detector relative to the incident direction of the primary protons //
|
||||
double distanceObjectDetector = 22.; // 22 mm
|
||||
double radiusOfDetector = 5.; // 5 mm
|
||||
// double theta = atan(radiusOfDetector/distanceObjectDetector); //half apex angle of the right
|
||||
// circular cone in radian double theta = 14.726*TMath::DegToRad(); // in radian
|
||||
double theta = 70 * TMath::DegToRad(); // in radian
|
||||
// double theta = 70*TMath::DegToRad(); // in radian
|
||||
// double theta = DegreeToRadian(70);
|
||||
|
||||
int P_interrupt = 1; // Projection of interruption
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
// assuming there is one interruption
|
||||
FILE* input1 = fopen("../RT7_GDP_1Projs_1Slice_128Pixels_2000000_4MeV/GammaAtExit.dat", "rb");
|
||||
FILE* out =
|
||||
fopen("../RT7_GDP_1Projs_1Slice_128Pixels_2000000_4MeV/PixeEvent_std_AtExit.DAT", "wb");
|
||||
// FILE* temp;
|
||||
// temp =fopen("temp.DAT","wb");
|
||||
|
||||
if (input1 == NULL) {
|
||||
printf("error for opening the input GammaAtExit.dat file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
PixeEvent pixeEvent;
|
||||
Point centerOfDetector;
|
||||
Point gammaMomentum;
|
||||
long long count1 = 0;
|
||||
long long count2 = 0;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
std::vector<PixeEvent> eventVec;
|
||||
|
||||
// ************************************************************(begin)
|
||||
// **********************READ FIRST FILE***********************
|
||||
// ************************************************************
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input1)) {
|
||||
runID++;
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
if (runInfo.projectionIndex == P_interrupt) {
|
||||
runID--;
|
||||
break;
|
||||
}
|
||||
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
std::vector<ParticleInfo> gammaAtExit(nbParticle);
|
||||
fread(&gammaAtExit[0], sizeof(ParticleInfo), nbParticle, input1);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf("-1--runId %d, ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means the angle between
|
||||
// source direction and detector, which should be constant when source is rotating
|
||||
double ra =
|
||||
DegreeToRadian(angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// gamma selection: energy should be lower than 4095*10eV = 49.45 keV
|
||||
if (gammaAtExit[i].energy_keV >= 40.95 || gammaAtExit[i].energy_keV <= 0.9)
|
||||
continue; // gamma selection
|
||||
|
||||
gammaMomentum.m_x = gammaAtExit[i].mx;
|
||||
gammaMomentum.m_y = gammaAtExit[i].my;
|
||||
gammaMomentum.m_z = gammaAtExit[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, gammaMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
pixeEvent.energy_10eV = floor(100 * gammaAtExit[i].energy_keV + 0.5);
|
||||
pixeEvent.projectionIndex = runInfo.projectionIndex;
|
||||
pixeEvent.sliceIndex = runInfo.sliceIndex;
|
||||
pixeEvent.pixelIndex = runInfo.pixelIndex;
|
||||
|
||||
eventVec.push_back(pixeEvent);
|
||||
count1++;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("---------------Number of PixeEvent in the first file: %lld------------------------\n",
|
||||
count1);
|
||||
fclose(input1);
|
||||
// fclose(temp);
|
||||
|
||||
// ************************************************************(end)
|
||||
// **********************READ FIRST FILE***********************
|
||||
// ************************************************************
|
||||
|
||||
// ************************************************************(begin)
|
||||
// **********************READ SECOND FILE**********************
|
||||
// ************************************************************
|
||||
// temp =fopen("temp.DAT","rb");
|
||||
|
||||
PixeEvent pp;
|
||||
PixeEvent p;
|
||||
|
||||
for (int i = 0; i < nbProjection; ++i) {
|
||||
int size = eventVec.size();
|
||||
for (int j = 0; j < size; ++j) {
|
||||
p = eventVec[j];
|
||||
pp.energy_10eV = p.energy_10eV;
|
||||
pp.projectionIndex = p.projectionIndex + i;
|
||||
pp.sliceIndex = p.sliceIndex; // index of slices should be reset, starting from 0
|
||||
pp.pixelIndex = p.pixelIndex;
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_10eV=%d\n",
|
||||
// pp.projectionIndex, pp.sliceIndex, pp.pixelIndex, pp.energy_10eV);
|
||||
fwrite(&pp, 7, 1, out);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************(end)
|
||||
// **********************READ SECOND FILE**********************
|
||||
// ************************************************************
|
||||
|
||||
// fclose(temp);
|
||||
fclose(out);
|
||||
|
||||
// Recheck the output file in case
|
||||
FILE* input2 =
|
||||
fopen("../RT7_GDP_1Projs_1Slice_128Pixels_2000000_4MeV/PixeEvent_std_AtExit.DAT", "rb");
|
||||
PixeEvent ppp;
|
||||
int proj = -1;
|
||||
while (fread(&ppp, 7, 1, input2)) {
|
||||
if (ppp.projectionIndex != proj) {
|
||||
printf("__ProjectionIndex=%d\n", ppp.projectionIndex);
|
||||
proj = ppp.projectionIndex;
|
||||
}
|
||||
// if(proj<20) printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_10eV=%d\n",
|
||||
// ppp.projectionIndex, ppp.sliceIndex, ppp.pixelIndex, ppp.energy_10eV);
|
||||
}
|
||||
fclose(input2);
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
//***********************************************************************************************************
|
||||
// Concatenate_BinToStd_ProtonAtExit.C
|
||||
// Root command file
|
||||
// Type: root Concatenate_BinToStd_ProtonAtExit.C
|
||||
//
|
||||
// It is used in case of interruption
|
||||
// Read 2 output files ProtonAtExit_1.dat and ProtonAtExit_2.dat that are generated by Geant4
|
||||
// tomography simulation It reads protons at exit information, and rewrite the events in a binary
|
||||
// file StimEvent_std.DAT
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct StimEvent
|
||||
{
|
||||
uint16_t energy_keV; // different from Pixe Event, it is in keV
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
|
||||
struct Point
|
||||
{
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_z;
|
||||
};
|
||||
bool IsDetected(Point poi1, Point poi2, double theta)
|
||||
{
|
||||
double a = (poi1.m_x * poi2.m_x + poi1.m_y * poi2.m_y + poi1.m_z * poi2.m_z)
|
||||
/ sqrt(poi1.m_x * poi1.m_x + poi1.m_y * poi1.m_y + poi1.m_z * poi1.m_z)
|
||||
/ sqrt(poi2.m_x * poi2.m_x + poi2.m_y * poi2.m_y + poi2.m_z * poi2.m_z);
|
||||
if (a > 1.0) a = 1;
|
||||
if (a < -1.0) a = -1;
|
||||
double r = acos(a);
|
||||
if (r > theta)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
void Recheck()
|
||||
{
|
||||
// Recheck the output file in case
|
||||
FILE* input3 = fopen("../build/StimEvent_std_Detector0_Aperture10.2.DAT", "rb");
|
||||
StimEvent p;
|
||||
double eventId = -1;
|
||||
while (fread(&p, 7, 1, input3)) {
|
||||
if (p.projectionIndex == 8 && p.sliceIndex == 64 && p.pixelIndex == 10) {
|
||||
eventId++;
|
||||
printf("StimEvent_%.0f ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_keV=%d keV\n",
|
||||
eventId, p.projectionIndex, p.sliceIndex, p.pixelIndex, p.energy_keV);
|
||||
}
|
||||
}
|
||||
fclose(input3);
|
||||
}
|
||||
void Concatenate_BinToStd_ProtonAtExit()
|
||||
{
|
||||
// Recheck();
|
||||
// return;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 128;
|
||||
const int nbPixel = 20;
|
||||
double totalAngleSpan = 180.; // in degree
|
||||
|
||||
// angle of detector relative to the incident direction of the primary protons at first projection
|
||||
// for proton, it is fixed to 0 degree, namely opposite to the source
|
||||
double angleOfDetector = 0.;
|
||||
double distanceObjectDetector = 22.; // 22 mm
|
||||
double radiusOfDetector = 5.; // 5 mm
|
||||
// double theta = atan(radiusOfDetector/distanceObjectDetector); //half apex angle of the right
|
||||
// circular cone in radian
|
||||
double theta = 10.2 * TMath::DegToRad(); // in radian
|
||||
|
||||
int P_interrupt = 2; // Projection of interruption
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
// assuming there is one interruption
|
||||
FILE* input1 = fopen("../build/ProtonAtExit_1.dat", "rb");
|
||||
FILE* input2 = fopen("../build/ProtonAtExit_2.dat", "rb");
|
||||
FILE* out = fopen("../build/StimEvent_std.DAT", "wb");
|
||||
|
||||
if (input1 == NULL) {
|
||||
printf("error for opening the input ProtonAtExit_1.dat file\n");
|
||||
return;
|
||||
}
|
||||
if (input2 == NULL) {
|
||||
printf("error for opening the input ProtonAtExit_2.dat file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
StimEvent stimEvent;
|
||||
Point centerOfDetector;
|
||||
Point protonMomentum;
|
||||
|
||||
long long count1 = 0;
|
||||
long long count2 = 0;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
|
||||
// ************************************************************(begin)
|
||||
// **********************READ FIRST FILE***********************
|
||||
// ************************************************************
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input1)) {
|
||||
runID++;
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
if (runInfo.projectionIndex == P_interrupt) {
|
||||
runID--;
|
||||
break;
|
||||
}
|
||||
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf("-1--runId %d, ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!nbParticle) continue;
|
||||
std::vector<ParticleInfo> protonAtExit(nbParticle);
|
||||
fread(&protonAtExit[0], sizeof(ParticleInfo), nbParticle, input1);
|
||||
|
||||
// if(runInfo.sliceIndex!=1) continue;
|
||||
// if(runInfo.sliceIndex!=31&&runInfo.sliceIndex!=32) continue;
|
||||
// if(runInfo.sliceIndex!=31) continue;
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means the angle between
|
||||
// source direction and detector, which should be constant when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// proton selection: energy should be lower than 4095 keV
|
||||
if (protonAtExit[i].energy_keV >= 4095) continue; // proton selection
|
||||
|
||||
protonMomentum.m_x = protonAtExit[i].mx;
|
||||
protonMomentum.m_y = protonAtExit[i].my;
|
||||
protonMomentum.m_z = protonAtExit[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, protonMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
stimEvent.energy_keV = floor(protonAtExit[i].energy_keV + 0.5);
|
||||
stimEvent.projectionIndex = runInfo.projectionIndex;
|
||||
stimEvent.sliceIndex = runInfo.sliceIndex;
|
||||
stimEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&stimEvent, 7, 1, out);
|
||||
count1++;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("---------------Number of StimEvent in the first file: %lld------------------------\n",
|
||||
count1);
|
||||
fclose(input1);
|
||||
|
||||
// ************************************************************
|
||||
// **********************READ FIRST FILE (end)*****************
|
||||
// ************************************************************
|
||||
|
||||
// ************************************************************
|
||||
// **********************READ SECOND FILE (begin)**************
|
||||
// ************************************************************
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input2)) {
|
||||
runID++;
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (begin)********************
|
||||
//***********************************************************************
|
||||
|
||||
printf("-2--runId %d, ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle = %d\n",
|
||||
runID, runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Print information (end)**********************
|
||||
//***********************************************************************
|
||||
|
||||
if (!nbParticle) continue;
|
||||
|
||||
std::vector<ParticleInfo> protonAtExit(nbParticle);
|
||||
fread(&protonAtExit[0], sizeof(ParticleInfo), nbParticle, input2);
|
||||
|
||||
// if(runInfo.sliceIndex!=1) continue;
|
||||
// if(runInfo.sliceIndex!=31) continue;
|
||||
// if(runInfo.sliceIndex!=31&&runInfo.sliceIndex!=32) continue;
|
||||
|
||||
// angleOfDetector+totalAngleSpan/nbProjection*runInfo.projectionIndex means the angle between
|
||||
// source direction and detector, which should be constant when source is rotating
|
||||
double ra = TMath::DegToRad()
|
||||
* (angleOfDetector + totalAngleSpan / nbProjection * runInfo.projectionIndex);
|
||||
centerOfDetector.m_x = distanceObjectDetector * cos(ra);
|
||||
centerOfDetector.m_y = distanceObjectDetector * sin(ra);
|
||||
centerOfDetector.m_z = 0;
|
||||
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// proton selection: energy should be lower than 4095 keV
|
||||
if (protonAtExit[i].energy_keV >= 4095) continue; // proton selection
|
||||
|
||||
protonMomentum.m_x = protonAtExit[i].mx;
|
||||
protonMomentum.m_y = protonAtExit[i].my;
|
||||
protonMomentum.m_z = protonAtExit[i].mz;
|
||||
|
||||
if (!IsDetected(centerOfDetector, protonMomentum, theta))
|
||||
continue;
|
||||
else {
|
||||
stimEvent.energy_keV = floor(protonAtExit[i].energy_keV + 0.5);
|
||||
stimEvent.projectionIndex = runInfo.projectionIndex;
|
||||
stimEvent.sliceIndex = runInfo.sliceIndex;
|
||||
stimEvent.pixelIndex = runInfo.pixelIndex;
|
||||
fwrite(&stimEvent, 7, 1, out);
|
||||
count2++;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("---------------Number of StimEvent in in the second file: %lld------------------------\n",
|
||||
count2);
|
||||
|
||||
// ************************************************************
|
||||
// **********************READ SECOND FILE (end)****************
|
||||
// ************************************************************
|
||||
|
||||
printf("---------------Number of StimEvent in total: %lld------------------------\n",
|
||||
count1 + count2);
|
||||
fclose(input2);
|
||||
fclose(out);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
//***********************************************************************************************************
|
||||
// Extract_Slice.C
|
||||
// Root command file
|
||||
// Use it by typing in the command line of Root terminal: root Extract_Slice.C
|
||||
//
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
#define PI 3.14159265f
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
|
||||
// to extract a certain slice or slices
|
||||
|
||||
void Extract_Projection()
|
||||
{
|
||||
// FILE *in =fopen("PixeEvent_std_AtCreation.DAT","rb");
|
||||
FILE* in = fopen("../build/PixeEvent_std_AtExit_Detector135_Aperture70.DAT", "rb");
|
||||
|
||||
// FILE* out = fopen("PixeEvent_std_AtCreation_50Projections.DAT","wb");
|
||||
FILE* out = fopen("../build/PixeEvent_std_AtExit_Detector135_Aperture70_50Projections.DAT", "wb");
|
||||
|
||||
if (in == NULL) {
|
||||
printf("error for opening the intput file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
PixeEvent p;
|
||||
PixeEvent pp;
|
||||
vector<int> valid_projections;
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
int p = 2 * i;
|
||||
valid_projections.push_back(p);
|
||||
}
|
||||
|
||||
while (fread(&p, 7, 1, in)) {
|
||||
int key = p.projectionIndex;
|
||||
|
||||
if (std::find(valid_projections.begin(), valid_projections.end(), key)
|
||||
!= valid_projections.end()) {
|
||||
pp.energy_10eV = p.energy_10eV;
|
||||
pp.projectionIndex = p.projectionIndex / 2;
|
||||
pp.sliceIndex = p.sliceIndex; // index of slices should be reset, starting from 0
|
||||
pp.pixelIndex = p.pixelIndex;
|
||||
pp.pixelIndex = p.pixelIndex;
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_10eV=%d\n",
|
||||
// pp.projectionIndex, pp.sliceIndex, pp.pixelIndex, pp.energy_10eV);
|
||||
fwrite(&pp, 7, 1, out);
|
||||
}
|
||||
}
|
||||
fclose(in);
|
||||
fclose(out);
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
//***********************************************************************************************************
|
||||
// Extract_Slice.C
|
||||
// Root command file
|
||||
// Use it by typing in the command line of Root terminal: root Extract_Slice.C
|
||||
//
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
#define PI 3.14159265f
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
|
||||
// to extract a certain slice or slices
|
||||
|
||||
void Extract_Slice()
|
||||
{
|
||||
int start_slice = 0; // start_slice: the first slice you would like to select
|
||||
int end_slice = 0; // end_slice: the last slice you would like to select
|
||||
|
||||
FILE* in = fopen("../build/PixeEvent_std_AtCreation.DAT", "rb");
|
||||
// FILE *in =fopen("PixeEvent_std_AtExit.DAT.DAT","rb");
|
||||
|
||||
FILE* out = fopen("../build/PixeEvent_std_AtCreation_slice.DAT", "wb");
|
||||
// FILE* out = fopen("PixeEvent_std_AtExit_slice.DAT","wb");
|
||||
|
||||
if (in == NULL) {
|
||||
printf("error for opening the intput file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
PixeEvent p;
|
||||
PixeEvent pp;
|
||||
|
||||
while (fread(&p, 7, 1, in)) {
|
||||
if (p.sliceIndex >= start_slice && p.sliceIndex <= end_slice) {
|
||||
pp.energy_10eV = p.energy_10eV;
|
||||
pp.projectionIndex = p.projectionIndex;
|
||||
pp.sliceIndex =
|
||||
p.sliceIndex - start_slice; // index of slices should be reset, starting from 0
|
||||
pp.pixelIndex = p.pixelIndex;
|
||||
pp.pixelIndex = p.pixelIndex;
|
||||
// printf("__ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, Energy_10eV=%d\n",
|
||||
// pp.projectionIndex, pp.sliceIndex, pp.pixelIndex, pp.energy_10eV);
|
||||
fwrite(&pp, 7, 1, out);
|
||||
}
|
||||
}
|
||||
fclose(in);
|
||||
fclose(out);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
//***********************************************************************************************************
|
||||
// LocateInterruption_GammaAtExit.C
|
||||
// Root command file
|
||||
// Type: root LocateInterruption_GammaAtExit.C
|
||||
//
|
||||
// It is used by reading GammaAtExit.dat file to locate at which projection the interruption happens
|
||||
//
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
|
||||
// struct ParticleInfo
|
||||
// {
|
||||
// float energy_keV;
|
||||
// float mx;
|
||||
// float my;
|
||||
// float mz;
|
||||
// float x;
|
||||
// float y;
|
||||
// float z;
|
||||
// };
|
||||
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
|
||||
void LocateInterruption_GammaAtExit()
|
||||
{
|
||||
FILE* input = fopen("../build/GammaAtExit_1.dat", "rb");
|
||||
if (input == NULL) {
|
||||
printf("error for opening the input file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
int projection = 0; // the projection when interruption occurs
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 20;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
int runID = -1;
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input)) {
|
||||
runID++;
|
||||
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
std::vector<ParticleInfo> gammaAtExit(nbParticle);
|
||||
fread(&gammaAtExit[0], sizeof(ParticleInfo), nbParticle, input);
|
||||
|
||||
printf("---------ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle = %d\n",
|
||||
runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
projection = runInfo.projectionIndex;
|
||||
}
|
||||
|
||||
printf("-----------------------It is interrupted at ProjectionIndex = %d--------------------\n",
|
||||
projection);
|
||||
fclose(input);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
//***********************************************************************************************************
|
||||
// LocateInterruption_ProtonAtExit.C
|
||||
// Root command file
|
||||
// Type: root LocateInterruption_ProtonAtExit.C
|
||||
//
|
||||
// It is used by reading ProtonAtExit.dat file to locate at which projection the interruption is
|
||||
//
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
|
||||
// struct ParticleInfo
|
||||
// {
|
||||
// float energy_keV;
|
||||
// float mx;
|
||||
// float my;
|
||||
// float mz;
|
||||
// float x;
|
||||
// float y;
|
||||
// float z;
|
||||
// };
|
||||
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
|
||||
void LocateInterruption_ProtonAtExit()
|
||||
{
|
||||
FILE* input = fopen("../build/ProtonAtExit_1.dat", "rb");
|
||||
if (input == NULL) {
|
||||
printf("error for opening the input file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RunInfo runInfo;
|
||||
int projection = 0; // the projection when interruption occurs
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 128;
|
||||
const int nbPixel = 20;
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Detection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
int runID = -1;
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input)) {
|
||||
runID++;
|
||||
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
std::vector<ParticleInfo> protonAtExit(nbParticle);
|
||||
fread(&protonAtExit[0], sizeof(ParticleInfo), nbParticle, input);
|
||||
|
||||
printf("---------ProjectionIndex=%d, SliceIndex=%d, PixelIndex=%d, nbParticle = %d\n",
|
||||
runInfo.projectionIndex, runInfo.sliceIndex, runInfo.pixelIndex, nbParticle);
|
||||
|
||||
projection = runInfo.projectionIndex;
|
||||
}
|
||||
|
||||
printf("-----------------------It is interrupted at ProjectionIndex = %d--------------------\n",
|
||||
projection);
|
||||
fclose(input);
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
//***********************************************************************************************************
|
||||
// Spectrum_gamma.C
|
||||
// Root command file
|
||||
// Type: root Spectrum_gamma.C
|
||||
//
|
||||
// It visualizes the spectrum of X-rays and plots a histogram by reading
|
||||
// simulation result GammaAtCreation.dat or GammaAtExit.dat
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
|
||||
// struct ParticleInfo
|
||||
//{
|
||||
// float energy_keV;
|
||||
// float mx;
|
||||
// float my;
|
||||
// float mz;
|
||||
// float x;
|
||||
// float y;
|
||||
// float z;
|
||||
//};
|
||||
|
||||
void Plot(vector<double>& energies, int bin, double eMin, double eMax)
|
||||
{
|
||||
auto mycanvas = new TCanvas("canvas", "canvas", 800, 50, 600, 600);
|
||||
gPad->SetLeftMargin(0.15);
|
||||
|
||||
// unit is in keV
|
||||
auto hist = new TH1D("hist (keV)", "Spectrum of photons", bin, eMin, eMax);
|
||||
|
||||
for (int i = 0; i < energies.size(); ++i) {
|
||||
hist->Fill(energies[i]);
|
||||
}
|
||||
|
||||
hist->Draw();
|
||||
hist->GetXaxis()->SetTitle("Energy (keV)");
|
||||
hist->GetYaxis()->SetTitle("Counts");
|
||||
hist->GetXaxis()->CenterTitle();
|
||||
hist->GetYaxis()->CenterTitle();
|
||||
|
||||
mycanvas->Print("spectrum_gamma.png");
|
||||
}
|
||||
|
||||
void Spectrum_gamma()
|
||||
{
|
||||
FILE* input = fopen("../build/GammaAtExit.dat", "rb");
|
||||
|
||||
if (input == NULL) {
|
||||
printf("error for opening the input file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Selection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 20;
|
||||
|
||||
int projection_index_begin = 0; // starter of the projection selected
|
||||
int projection_index_end = 0; // end of the projection selected
|
||||
|
||||
int slice_index_begin = 0; // starter of the slice selected
|
||||
int slice_index_end = 0; // end of the slice selected
|
||||
|
||||
//********************Parameters for spectrum***************************
|
||||
int bin = 100;
|
||||
double eMin = 0; // keV
|
||||
double eMax = 0; // keV
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Selection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
RunInfo runInfo;
|
||||
vector<double> energies;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
// while(!feof(input)) //if not the end, read
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input)) {
|
||||
runID++;
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
// ***********the following codes are used
|
||||
// if**************************************(begin)
|
||||
// ***********the index of projection, slice and pixel is not correctly
|
||||
// configured in the simulation
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
//************************************************************************(end)
|
||||
|
||||
if (!nbParticle) continue;
|
||||
std::vector<ParticleInfo> particles(nbParticle);
|
||||
fread(&particles[0], sizeof(ParticleInfo), nbParticle, input);
|
||||
|
||||
if (runInfo.projectionIndex >= projection_index_begin
|
||||
&& runInfo.projectionIndex <= projection_index_end)
|
||||
{
|
||||
if (runInfo.sliceIndex >= slice_index_begin && runInfo.sliceIndex <= slice_index_end) {
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
// printf("--%d, %.9e\n", i, particles[i].energy_keV);
|
||||
|
||||
energies.push_back(particles[i].energy_keV);
|
||||
if (particles[i].energy_keV > eMax) eMax = particles[i].energy_keV;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
fclose(input);
|
||||
Plot(energies, bin, eMin, eMax + 10);
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
//***********************************************************************************************************
|
||||
// Spectrum_proton.C
|
||||
// Root command file
|
||||
// Type: root Spectrum_proton.C
|
||||
//
|
||||
// It visualizes the spectrum of protons and plots a histogram by reading
|
||||
// simulation result ProtonAtExit.dat
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
// Define a structure to read and write each event in the required binary format
|
||||
struct RunInfo
|
||||
{
|
||||
// uint_16t
|
||||
uint8_t projectionIndex; // 1 byte
|
||||
uint16_t sliceIndex; //
|
||||
uint16_t pixelIndex;
|
||||
uint32_t nbParticle; // 4 bytes int
|
||||
};
|
||||
|
||||
struct ParticleInfo
|
||||
{
|
||||
float energy_keV;
|
||||
float mx;
|
||||
float my;
|
||||
float mz;
|
||||
};
|
||||
|
||||
void Plot(vector<double>& energies, int bin, double eMin, double eMax)
|
||||
{
|
||||
auto mycanvas = new TCanvas("canvas", "canvas", 800, 50, 600, 600);
|
||||
gPad->SetLeftMargin(0.15);
|
||||
|
||||
// unit is in keV
|
||||
auto hist = new TH1D("hist (keV)", "Spectrum of protons", bin, eMin, eMax);
|
||||
|
||||
for (int i = 0; i < energies.size(); ++i) {
|
||||
hist->Fill(energies[i]);
|
||||
}
|
||||
|
||||
hist->Draw();
|
||||
hist->GetXaxis()->SetTitle("Energy (keV)");
|
||||
hist->GetYaxis()->SetTitle("Counts");
|
||||
hist->GetXaxis()->CenterTitle();
|
||||
hist->GetYaxis()->CenterTitle();
|
||||
|
||||
mycanvas->Print("spectrum_proton.png");
|
||||
}
|
||||
|
||||
void Spectrum_proton()
|
||||
{
|
||||
FILE* input = fopen("../build/ProtonAtExit.dat", "rb");
|
||||
if (input == NULL) {
|
||||
printf("error for opening the input file\n");
|
||||
return;
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Selection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 128;
|
||||
const int nbPixel = 20;
|
||||
|
||||
int projection_index_begin = 0; // starter of the projection selected
|
||||
int projection_index_end = 0; // end of the projection selected
|
||||
|
||||
int slice_index_begin = 64; // starter of the slice selected
|
||||
int slice_index_end = 64; // end of the slice selected
|
||||
|
||||
//********************Parameters for spectrum***************************
|
||||
int bin = 100;
|
||||
double eMin = 0; // keV
|
||||
double eMax = 0; // keV
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Selection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
RunInfo runInfo;
|
||||
vector<double> energies;
|
||||
int runID = -1; // index of simulations, namely runID, starting from 0
|
||||
// while(!feof(input)) //if not the end, read
|
||||
while (fread(&runInfo, sizeof(RunInfo), 1, input)) {
|
||||
runID++;
|
||||
int nbParticle = runInfo.nbParticle;
|
||||
|
||||
// ***********the following codes are used
|
||||
// if**************************************(begin)
|
||||
// ***********the index of projection, slice and pixel is not correctly
|
||||
// configured in the simulation
|
||||
runInfo.projectionIndex = runID / (nbSlice * nbPixel);
|
||||
int remain = runID % (nbSlice * nbPixel);
|
||||
runInfo.sliceIndex = remain / nbPixel;
|
||||
runInfo.pixelIndex = remain % nbPixel;
|
||||
//******************************************************************************************(end)
|
||||
|
||||
if (!nbParticle) continue;
|
||||
std::vector<ParticleInfo> proton(nbParticle);
|
||||
fread(&proton[0], sizeof(ParticleInfo), nbParticle, input);
|
||||
|
||||
if (runInfo.projectionIndex >= projection_index_begin
|
||||
&& runInfo.projectionIndex <= projection_index_end)
|
||||
{
|
||||
if (runInfo.sliceIndex >= slice_index_begin && runInfo.sliceIndex <= slice_index_end) {
|
||||
for (int i = 0; i < nbParticle; ++i) {
|
||||
energies.push_back(proton[i].energy_keV);
|
||||
if (proton[i].energy_keV > eMax) eMax = proton[i].energy_keV;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
fclose(input);
|
||||
Plot(energies, bin, eMin, eMax + 10);
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
//***********************************************************************************************************
|
||||
// TomoSpectrum.C
|
||||
// Root command file
|
||||
// Type: root TomoSpectrum.C
|
||||
//
|
||||
// It visualizes the spectrum of X-rays and plots a graph by reading PixeEvent data.
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
|
||||
void Plot(int nbChannels, vector<int>& X, vector<int>& Y)
|
||||
{
|
||||
gROOT->Reset();
|
||||
|
||||
auto mycanvas = new TCanvas("canvas", "canvas", 800, 50, 600, 600);
|
||||
mycanvas->ToggleEventStatus();
|
||||
|
||||
gPad->SetLeftMargin(0.15);
|
||||
|
||||
auto graph = new TGraph(nbChannels, X.data(), Y.data());
|
||||
graph->SetLineColor(8);
|
||||
|
||||
graph->Draw("AL");
|
||||
|
||||
graph->SetLineColor(8);
|
||||
graph->SetTitle("TOMO Energy Spectrum");
|
||||
graph->GetXaxis()->SetTitle("ADC channels");
|
||||
graph->GetYaxis()->SetTitle("Nb events");
|
||||
graph->GetXaxis()->CenterTitle();
|
||||
graph->GetYaxis()->CenterTitle();
|
||||
|
||||
mycanvas->Print("TomoSpectrum.png");
|
||||
}
|
||||
|
||||
void TomoSpectrum()
|
||||
{
|
||||
FILE* input = fopen("../build/PixeEvent_std_AtExit_Detector135_Aperture70.DAT", "rb");
|
||||
|
||||
if (input == NULL) {
|
||||
printf("----------error for opening the input file--------------\n");
|
||||
return;
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Selection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 20;
|
||||
|
||||
int projection_index_begin = 0; // starter of the projection selected
|
||||
int projection_index_end = 0; // end of the projection selected
|
||||
|
||||
int slice_index_begin = 0; // starter of the slice selected
|
||||
int slice_index_end = 0; // end of the slice selected
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Selection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
int nbChannels = 4096;
|
||||
vector<int> X(nbChannels); // save channels 1-4096, index X: 0-4095
|
||||
vector<int> Y(nbChannels); // save event counts for channel 1-4096, index Y: 0-4095
|
||||
PixeEvent p;
|
||||
|
||||
while (fread(&p, 7, 1, input)) {
|
||||
if (p.projectionIndex >= projection_index_begin && p.projectionIndex <= projection_index_end) {
|
||||
if (p.sliceIndex >= slice_index_begin && p.sliceIndex <= slice_index_end) {
|
||||
// printf("%d %d %d\n",p.projectionIndex, p.sliceIndex, p.energy_10eV);
|
||||
Y[p.energy_10eV - 1] = Y[p.energy_10eV - 1] + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(input);
|
||||
for (int i = 0; i < nbChannels; ++i) {
|
||||
X[i] = 1 + i;
|
||||
}
|
||||
|
||||
FILE* out = fopen("Spectrum.txt", "wb");
|
||||
for (int i = 0; i < nbChannels; ++i) {
|
||||
fprintf(out, "%d\t%d\n", X[i], Y[i]);
|
||||
}
|
||||
|
||||
fclose(out);
|
||||
Plot(nbChannels, X, Y);
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
//***********************************************************************************************************
|
||||
// TomoSpectrum_HIST.C
|
||||
// Root command file
|
||||
// Type: root TomoSpectrum_HIST.C
|
||||
//
|
||||
// It visualizes the spectrum of X-rays and plots a histogram by reading PixeEvent data
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
struct PixeEvent
|
||||
{
|
||||
uint16_t energy_10eV;
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
|
||||
void Plot(vector<double>& energies, int bin, double eMin, double eMax)
|
||||
{
|
||||
gROOT->Reset();
|
||||
|
||||
auto mycanvas = new TCanvas("canvas", "canvas", 800, 50, 600, 600);
|
||||
mycanvas->ToggleEventStatus();
|
||||
|
||||
gPad->SetLeftMargin(0.15);
|
||||
|
||||
auto hist = new TH1D("HIST", "Spectrum", bin, eMin, eMax);
|
||||
|
||||
for (int i = 0; i < energies.size(); ++i) {
|
||||
hist->Fill(energies[i]);
|
||||
}
|
||||
|
||||
hist->Draw();
|
||||
hist->SetTitle("TOMO Energy Spectrum");
|
||||
hist->GetXaxis()->SetTitle("ADC channels");
|
||||
hist->GetYaxis()->SetTitle("Nb events");
|
||||
|
||||
hist->GetXaxis()->CenterTitle();
|
||||
hist->GetYaxis()->CenterTitle();
|
||||
|
||||
// hist->GetYaxis()->SetTitleOffset(2);
|
||||
|
||||
mycanvas->Print("TomoSpectrum_hist.png");
|
||||
}
|
||||
|
||||
void TomoSpectrum_HIST()
|
||||
{
|
||||
FILE* input = fopen("../build/PixeEvent_std_AtExit_Detector135_Aperture70.DAT", "rb");
|
||||
|
||||
if (input == NULL) {
|
||||
printf("----------error for opening the input file--------------\n");
|
||||
return;
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Selection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 1;
|
||||
const int nbPixel = 20;
|
||||
|
||||
int projection_index_begin = 0; // starter of the projection selected
|
||||
int projection_index_end = 0; // end of the projection selected
|
||||
|
||||
int slice_index_begin = 0; // starter of the slice selected
|
||||
int slice_index_end = 0; // end of the slice selected
|
||||
|
||||
//********************Parameters for spectrum***************************
|
||||
int nbChannels = 4096;
|
||||
double eMin = 0; // initialization
|
||||
double eMax = 0; //
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Selection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
vector<double> energies;
|
||||
PixeEvent p;
|
||||
while (fread(&p, 7, 1, input)) {
|
||||
if (p.projectionIndex >= projection_index_begin && p.projectionIndex <= projection_index_end) {
|
||||
if (p.sliceIndex >= slice_index_begin && p.sliceIndex <= slice_index_end) {
|
||||
energies.push_back(p.energy_10eV);
|
||||
if (p.energy_10eV > eMax) eMax = p.energy_10eV;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(input);
|
||||
|
||||
long int size = energies.size();
|
||||
vector<int> X(nbChannels); // save channels 1-4096
|
||||
vector<int> Y(nbChannels);
|
||||
for (long int i = 0; i < size; ++i) {
|
||||
int energy = energies[i];
|
||||
Y[energy - 1] = Y[energy - 1] + 1;
|
||||
}
|
||||
for (int i = 0; i < nbChannels; ++i) {
|
||||
X[i] = 1 + i;
|
||||
}
|
||||
|
||||
FILE* out = fopen("Spectrum_hist.txt", "wb");
|
||||
|
||||
for (int i = 0; i < nbChannels; ++i) {
|
||||
fprintf(out, "%d\t%d\n", X[i], Y[i]);
|
||||
}
|
||||
|
||||
fclose(out);
|
||||
|
||||
Plot(energies, nbChannels, 0, nbChannels);
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
//***********************************************************************************************************
|
||||
// TomoSpectrum_HIST_proton.C
|
||||
// Root command file
|
||||
// Type: root TomoSpectrum_HIST_proton.C
|
||||
//
|
||||
// It visualizes the spectrum of protons and plots a histogram by reading StimEvent data
|
||||
//
|
||||
// More information is available in UserGuide
|
||||
// Created by Z.LI LP2i Bordeaux 2022
|
||||
//***********************************************************************************************************
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vector>
|
||||
// using namespace std;
|
||||
|
||||
struct StimEvent
|
||||
{
|
||||
uint16_t energy_keV; // different from Pixe Event, it is in keV
|
||||
uint16_t pixelIndex;
|
||||
uint16_t sliceIndex;
|
||||
uint8_t projectionIndex;
|
||||
};
|
||||
|
||||
void Plot(vector<double>& energies, int bin, double eMin, double eMax)
|
||||
{
|
||||
gROOT->Reset();
|
||||
|
||||
auto mycanvas = new TCanvas("canvas", "canvas", 800, 50, 600, 600);
|
||||
mycanvas->ToggleEventStatus();
|
||||
|
||||
gPad->SetLeftMargin(0.15);
|
||||
|
||||
auto hist = new TH1D("HIST", "Spectrum", bin, eMin, eMax);
|
||||
|
||||
for (int i = 0; i < energies.size(); ++i) {
|
||||
hist->Fill(energies[i]);
|
||||
}
|
||||
|
||||
hist->Draw();
|
||||
hist->SetTitle("TOMO Energy Spectrum");
|
||||
hist->GetXaxis()->SetTitle("ADC channels");
|
||||
hist->GetYaxis()->SetTitle("Nb events");
|
||||
|
||||
hist->GetXaxis()->CenterTitle();
|
||||
hist->GetYaxis()->CenterTitle();
|
||||
|
||||
// hist->GetYaxis()->SetTitleOffset(2);
|
||||
|
||||
mycanvas->Print("TomoSpectrum_hist_proton.png");
|
||||
}
|
||||
|
||||
void TomoSpectrum_HIST_proton()
|
||||
{
|
||||
FILE* input = fopen("../build/StimEvent_std_Detector0_Aperture10.2.DAT", "rb");
|
||||
|
||||
if (input == NULL) {
|
||||
printf("----------error for opening the input file--------------\n");
|
||||
return;
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Selection parameters (begin)*****************
|
||||
//***********************************************************************
|
||||
const int nbProjection = 10;
|
||||
const int nbSlice = 128;
|
||||
const int nbPixel = 20;
|
||||
|
||||
int projection_index_begin = 0; // starter of the projection selected
|
||||
int projection_index_end = 0; // end of the projection selected
|
||||
|
||||
int slice_index_begin = 64; // starter of the slice selected
|
||||
int slice_index_end = 64; // end of the slice selected
|
||||
|
||||
//********************Parameters for spectrum***************************
|
||||
int nbChannels = 4096;
|
||||
double eMin = 0; // initialization
|
||||
double eMax = 0; //
|
||||
|
||||
//***********************************************************************
|
||||
//**************************Selection parameters (end)*******************
|
||||
//***********************************************************************
|
||||
|
||||
vector<double> energies;
|
||||
StimEvent s;
|
||||
while (fread(&s, 7, 1, input)) {
|
||||
if (s.projectionIndex >= projection_index_begin && s.projectionIndex <= projection_index_end) {
|
||||
if (s.sliceIndex >= slice_index_begin && s.sliceIndex <= slice_index_end) {
|
||||
energies.push_back(s.energy_keV);
|
||||
if (s.energy_keV > eMax) eMax = s.energy_keV;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(input);
|
||||
|
||||
if (eMax > 4096) printf("---error in data----\n");
|
||||
long int size = energies.size();
|
||||
vector<int> X(nbChannels); // save channels 1-4096
|
||||
vector<int> Y(nbChannels);
|
||||
|
||||
for (long int i = 0; i < size; ++i) {
|
||||
int energy = energies[i];
|
||||
Y[energy - 1] = Y[energy - 1] + 1;
|
||||
}
|
||||
for (int i = 0; i < nbChannels; ++i) {
|
||||
X[i] = 1 + i;
|
||||
}
|
||||
|
||||
FILE* out = fopen("Spectrum_hist_proton.txt", "wb");
|
||||
|
||||
for (int i = 0; i < nbChannels; ++i) {
|
||||
fprintf(out, "%d\t%d\n", X[i], Y[i]);
|
||||
}
|
||||
|
||||
fclose(out);
|
||||
|
||||
Plot(energies, nbChannels, 0, nbChannels);
|
||||
}
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
import sys
|
||||
import struct
|
||||
import math
|
||||
import numpy as np
|
||||
|
||||
# lists for super resolution (vol_work) and regular resolution (vol_result)
|
||||
vol_work = []
|
||||
vol_result = []
|
||||
|
||||
############################################################################
|
||||
# size image 128x128 -> 500 microm -> resol x,y : 3.90625 microm #
|
||||
# nb slices 128 -> 500 microm -> resol z : 3.90625 microm #
|
||||
############################################################################
|
||||
|
||||
sizex = 128
|
||||
sizey = 128
|
||||
sizez = 128
|
||||
resolx = 3.90625
|
||||
resoly = 3.90625
|
||||
resolz = 3.90625
|
||||
superres = 8 # factor of super resolution
|
||||
|
||||
# sphere 1 (radius) - outer sphere
|
||||
r1 = 196
|
||||
|
||||
# sphere 2 (radius) - inner sphere
|
||||
r2 = 171
|
||||
|
||||
# density values for sphere 1 and sphere 2
|
||||
type = 2 # type for constructing a STIM or PIXE phantom
|
||||
# type = 1, STIM phantom, density value for STIM in 0.01 g/cm3
|
||||
# type =2, PIXE phantom, density value for PIXE in 0.000001 g/cm3, namely microgram/cm3
|
||||
value1 = 0
|
||||
value2 = 0
|
||||
|
||||
if type == 1:
|
||||
value1 = 108
|
||||
value2 = 0
|
||||
elif type == 2:
|
||||
value1 = 54000
|
||||
value2 = 0
|
||||
|
||||
# center of two spheres
|
||||
x0 = 0.0
|
||||
y0 = 0.0
|
||||
z0 = -1.953125
|
||||
|
||||
# size in super resolution by voxel
|
||||
super_sizex = sizex * superres
|
||||
super_sizey = sizey * superres
|
||||
super_sizez = sizez * superres
|
||||
center_shift = sizex / 2 # translation of half scan
|
||||
|
||||
|
||||
def make_sphere_center(r, x, y, z, value):
|
||||
rsample = (r / resolx) * superres # radius in super resolution by voxel
|
||||
xsample = (x / resolx) * superres
|
||||
ysample = (y / resoly) * superres
|
||||
zsample = (z / resolz) * superres
|
||||
center_shift_sample = center_shift * superres # translation of the center for x (i) and y (j) axis
|
||||
|
||||
print(rsample, xsample, ysample, zsample)
|
||||
number = 0
|
||||
|
||||
for k in range(0, super_sizez):
|
||||
for j in range(0, super_sizey):
|
||||
for i in range(0, super_sizex):
|
||||
ii = i + 0.5
|
||||
jj = j + 0.5
|
||||
kk = k + 0.5
|
||||
res = pow((ii - xsample - center_shift_sample), 2) / (rsample * rsample) + \
|
||||
pow((jj - ysample - center_shift_sample), 2) / (rsample * rsample) + \
|
||||
pow((kk - zsample - center_shift_sample), 2) / (rsample * rsample) # z-axis correction done
|
||||
# if the point (ii, jj, kk) is in the sphere, we attribute the voxel (i,j, k) value
|
||||
if (res <= 1.0):
|
||||
vol_work[i + j * super_sizex + k * super_sizex * super_sizey] = value
|
||||
number += 1
|
||||
|
||||
print(number)
|
||||
|
||||
|
||||
# initialisation for two tables vol_result (128*128*128), vol_work (128*superres)*(128*superres)*(128*superres)
|
||||
def initialize():
|
||||
for k in range(0, sizez):
|
||||
for j in range(0, sizey):
|
||||
for i in range(0, sizex):
|
||||
vol_result.append(0.0)
|
||||
for k in range(0, super_sizez):
|
||||
for j in range(0, super_sizey):
|
||||
for i in range(0, super_sizex):
|
||||
vol_work.append(0.0)
|
||||
|
||||
|
||||
# Calculate the vol_result based on vol_work
|
||||
def undersample():
|
||||
x = 0
|
||||
y = 0
|
||||
z = 0
|
||||
for k in range(0, super_sizez, superres):
|
||||
for j in range(0, super_sizey, superres):
|
||||
for i in range(0, super_sizex, superres):
|
||||
# print ("***",i,j,k)
|
||||
total = 0
|
||||
for kk in range(0, superres):
|
||||
for jj in range(0, superres):
|
||||
for ii in range(0, superres):
|
||||
total = total + vol_work[
|
||||
i + ii + (j + jj) * super_sizex + (k + kk) * (super_sizex * super_sizey)]
|
||||
vol_result[x + y * sizex + z * (sizex * sizey)] = total / (superres * superres * superres)
|
||||
# print ("###",vol_result[x+y*sizex+z*(sizex*sizey)])
|
||||
x += 1
|
||||
y += 1
|
||||
x = 0
|
||||
z += 1
|
||||
y = 0
|
||||
|
||||
|
||||
# save the total volume of super resolution
|
||||
def save_whole_work(file):
|
||||
fd = open(file, "wb")
|
||||
for i in range(0, len(vol_work)):
|
||||
fd.write(struct.pack("f", vol_work[i]))
|
||||
fd.close()
|
||||
|
||||
|
||||
# save one slice in super resolution vol_work
|
||||
# 0<=slice<super_sizez (128*8=1024)
|
||||
def save_workslice(file, slice):
|
||||
fd = open(file, "wb")
|
||||
for j in range(0, super_sizey):
|
||||
for i in range(0, super_sizex):
|
||||
fd.write(struct.pack("f", vol_work[i + j * super_sizex + slice * super_sizex * super_sizey]))
|
||||
fd.close()
|
||||
|
||||
|
||||
# save the total result volume
|
||||
def save_whole_result(file):
|
||||
fd = open(file, "wb")
|
||||
for i in range(0, len(vol_result)):
|
||||
fd.write(struct.pack("f", vol_result[i]))
|
||||
fd.close()
|
||||
|
||||
|
||||
# save one slie in regular resolution vol_result
|
||||
# 0<=slice<128
|
||||
def save_slice(file, slice):
|
||||
fd = open(file, "wb")
|
||||
for j in range(0, sizey):
|
||||
for i in range(0, sizex):
|
||||
fd.write(struct.pack("f", vol_result[i + j * sizex + slice * sizex * sizey]))
|
||||
|
||||
fd.close()
|
||||
|
||||
|
||||
print("------intialisation------")
|
||||
initialize()
|
||||
print("------end intialisation------")
|
||||
|
||||
print("------begin sphere 1------")
|
||||
make_sphere_center(r1, x0, y0, z0, value1)
|
||||
print("------end sphere 1------")
|
||||
|
||||
print("------begin sphere 2------")
|
||||
make_sphere_center(r2, x0, y0, z0, value2)
|
||||
print("------end sphere 2------")
|
||||
|
||||
print("------begin undersample------")
|
||||
undersample()
|
||||
print("------end undersample------")
|
||||
|
||||
print("The length of vol_work: ", len(vol_work))
|
||||
print("The length of vol_result: ", len(vol_result))
|
||||
|
||||
# print ("------begin save slice 63 ------")
|
||||
# save_slice("./slice_63.dat",63)
|
||||
# print ("------end save slice 63 ------")
|
||||
|
||||
save_whole_result("./vol_result.dat")
|
||||
save_whole_work("./vol_work.dat")
|
||||
print("------end save work------")
|
||||
+265
@@ -0,0 +1,265 @@
|
||||
import sys
|
||||
import struct
|
||||
import math
|
||||
|
||||
# tables for super resolution (vol_work) and regular resolution (vol_result)
|
||||
vol_work = []
|
||||
vol_result = []
|
||||
|
||||
############################################################################
|
||||
# size image 128x128 -> 76.464 microm -> resol x,y : 0,597375 microm #
|
||||
# nb slices 128 -> 201,217 microm -> resol z : 1,57200781 microm #
|
||||
# slice of interest : 11 -> 18,07 microm #
|
||||
############################################################################
|
||||
|
||||
sizex = 128
|
||||
sizey = 128
|
||||
sizez = 128
|
||||
double_sizez = 256 # for computation only
|
||||
resolx = 0.597375
|
||||
resoly = 0.597375
|
||||
resolz = 1.57200781
|
||||
superres = 8
|
||||
|
||||
slice = 11
|
||||
|
||||
# ellipsoide 1 (semi-axes, center, rotation z, value) - skin
|
||||
a1 = 20.61
|
||||
b1 = 21.42
|
||||
c1 = 187.82
|
||||
x1 = 0.0
|
||||
y1 = 0.0
|
||||
z1 = 0.0
|
||||
rz1 = 0.0
|
||||
value1 = 49.73
|
||||
|
||||
# ellipsoide 2 (semi-axes, center, rotation z, value) - body
|
||||
a2 = 18.61
|
||||
b2 = 19.01
|
||||
c2 = 186.64
|
||||
x2 = -0.39
|
||||
y2 = 0.0
|
||||
z2 = 0.0
|
||||
rz2 = 0.0
|
||||
value2 = 40.85
|
||||
|
||||
# ellipsoide 3 (semi-axes, center, rotation z, value) - core 1
|
||||
a3 = 1.95
|
||||
b3 = 3.23
|
||||
c3 = 4.32
|
||||
x3 = 1.97
|
||||
y3 = -7.09
|
||||
z3 = 18.07
|
||||
rz3 = 0.0
|
||||
value3 = 66.26
|
||||
|
||||
# ellipsoide 4 (semi-axes, center, rotation z, value) - core 2
|
||||
a4 = 2.08
|
||||
b4 = 2.46
|
||||
c4 = 4.32
|
||||
x4 = 8.27
|
||||
y4 = -3.15
|
||||
z4 = 18.07
|
||||
rz4 = 0.0
|
||||
value4 = 60.23
|
||||
|
||||
# ellipsoide 5 (semi-axes, center, rotation z, value) - intestine
|
||||
a5 = 3.67
|
||||
b5 = 16.48
|
||||
c5 = 28.68
|
||||
x5 = 1.25
|
||||
y5 = 0.61
|
||||
z5 = 0
|
||||
rz5 = -58.99
|
||||
value5 = 54.06
|
||||
|
||||
# ellipsoide 6 ((emi-axes, center, rotation z, value) - region titane
|
||||
a6 = 1.62
|
||||
b6 = 1.95
|
||||
c6 = 1.62
|
||||
x6 = 6.25
|
||||
y6 = 3.61
|
||||
z6 = 18.07
|
||||
rz6 = 0.0
|
||||
value6 = 75.14
|
||||
|
||||
# size in super resolution by voxel
|
||||
super_sizex = sizex * superres
|
||||
super_sizey = sizey * superres
|
||||
super_sizez = double_sizez * superres # we will save only half of the z
|
||||
center_shift = sizex / 2 # for x and y axis
|
||||
center_shift_z = double_sizez / 2
|
||||
|
||||
|
||||
def make_ellipse_center(a, b, c, x, y, z, rz, value):
|
||||
asample = (a / resolx) * superres
|
||||
bsample = (b / resoly) * superres
|
||||
csample = (c / resolz) * superres
|
||||
# if (rz != 0.0):
|
||||
rzsample = math.radians(rz) # angle in radians
|
||||
xsample = (x / resolx) * superres
|
||||
ysample = (y / resoly) * superres
|
||||
zsample = (z / resolz) * superres
|
||||
center_shift_sample = center_shift * superres # translation of center for x and y axis
|
||||
center_shift_z_sample = center_shift_z * superres # translation of center for z axis
|
||||
|
||||
print(asample, bsample, csample, xsample, ysample, zsample)
|
||||
number = 0 ## debug
|
||||
|
||||
# a loop in axes of voxels
|
||||
for k in range(0, super_sizez):
|
||||
for j in range(0, super_sizey):
|
||||
for i in range(0, super_sizex):
|
||||
ii = i + 0.5
|
||||
jj = j + 0.5
|
||||
kk = k + 0.5
|
||||
res = pow(((ii - xsample - center_shift_sample) * math.cos(rzsample) + (
|
||||
jj - ysample - center_shift_sample) * math.sin(rzsample)), 2) / (asample * asample) + \
|
||||
pow(((ii - xsample - center_shift_sample) * math.sin(rzsample) - (
|
||||
jj - ysample - center_shift_sample) * math.cos(rzsample)), 2) / (bsample * bsample) + \
|
||||
((kk - zsample - center_shift_z_sample) * (kk - zsample - center_shift_z_sample)) / (
|
||||
csample * csample) # z-axis correction done
|
||||
# print(res)
|
||||
# if the voxel belongs to the ellipsoide, set the value
|
||||
if (res <= 1.0):
|
||||
vol_work[i + j * super_sizex + k * super_sizex * super_sizey] = value
|
||||
number += 1
|
||||
|
||||
print(number)
|
||||
|
||||
|
||||
# initialisation
|
||||
def initialize():
|
||||
for k in range(0, double_sizez):
|
||||
for j in range(0, sizey):
|
||||
for i in range(0, sizex):
|
||||
vol_result.append(0.0)
|
||||
for k in range(0, super_sizez):
|
||||
for j in range(0, super_sizey):
|
||||
for i in range(0, super_sizex):
|
||||
vol_work.append(0.0)
|
||||
|
||||
|
||||
# Calculate the vol_result based on vol_work
|
||||
def undersample():
|
||||
x = 0
|
||||
y = 0
|
||||
z = 0
|
||||
for k in range(0, super_sizez, superres):
|
||||
for j in range(0, super_sizey, superres):
|
||||
for i in range(0, super_sizex, superres):
|
||||
# on se place sur v1 et on recupere les valeurs de densite des 8 voxels du voisinage qui vont correspondre a 1 voxel de l'image finale
|
||||
# v1 = vol_work[i+j*super_sizex+k*(super_sizex*super_sizey)]
|
||||
# v2 = vol_work[i+j*super_sizex+k*(super_sizex*super_sizey) + 1]
|
||||
# v3 = vol_work[i+j*super_sizex+k*(super_sizex*super_sizey) + super_sizex]
|
||||
# v4 = vol_work[i+j*super_sizex+k*(super_sizex*super_sizey) + super_sizex + 1]
|
||||
# v5 = vol_work[i+j*super_sizex+k*(super_sizex*super_sizey) + super_sizex*super_sizey]
|
||||
# v6 = vol_work[i+j*super_sizex+k*(super_sizex*super_sizey) + 1 + super_sizex*super_sizey]
|
||||
# v7 = vol_work[i+j*super_sizex+k*(super_sizex*super_sizey) + super_sizex + super_sizex*super_sizey]
|
||||
# v8 = vol_work[i+j*super_sizex+k*(super_sizex*super_sizey) + super_sizex + 1 + super_sizex*super_sizey]
|
||||
# vol_result[x+y*sizex+z*(sizex*sizey)] = (v1+v2+v3+v4+v5+v6+v7+v8)/8.0
|
||||
# print ("***",i,j,k)
|
||||
total = 0
|
||||
for kk in range(0, superres):
|
||||
for jj in range(0, superres):
|
||||
for ii in range(0, superres):
|
||||
total = total + vol_work[
|
||||
i + ii + (j + jj) * super_sizex + (k + kk) * (super_sizex * super_sizey)]
|
||||
vol_result[x + y * sizex + z * (sizex * sizey)] = total / (superres * superres * superres)
|
||||
# print ("###",vol_result[x+y*sizex+z*(sizex*sizey)])
|
||||
x += 1
|
||||
y += 1
|
||||
x = 0
|
||||
z += 1
|
||||
y = 0
|
||||
|
||||
|
||||
# Save the total volume (including the negative parts of the ellipsoids)
|
||||
def save_whole_work(file):
|
||||
fd = open(file, "wb")
|
||||
for i in range(0, len(vol_work)):
|
||||
fd.write(struct.pack("f", vol_work[i]))
|
||||
|
||||
|
||||
# Save half the volume (including only the positive parts of the ellipsoids)
|
||||
def save_half_work(file):
|
||||
fd = open(file, "wb")
|
||||
for i in range(int(len(vol_work) / 2), len(vol_work)):
|
||||
fd.write(struct.pack("f", vol_work[i]))
|
||||
|
||||
|
||||
# save one slice in super resolution vol_work
|
||||
# 0<=slice<super_sizez
|
||||
def save_workslice(file, slice):
|
||||
fd = open(file, "wb")
|
||||
for j in range(0, super_sizey):
|
||||
for i in range(0, super_sizex):
|
||||
fd.write(struct.pack("f", vol_work[i + j * super_sizex + slice * super_sizex * super_sizey]))
|
||||
|
||||
|
||||
# Save the total result volume (including the negative parts of the ellipsoids)
|
||||
def save_whole_result(file):
|
||||
fd = open(file, "wb")
|
||||
for i in range(0, len(vol_result)):
|
||||
fd.write(struct.pack("f", vol_result[i]))
|
||||
|
||||
|
||||
# Save half of the result volume (including only the positive parts of the ellipsoids)
|
||||
def save_half_result(file):
|
||||
fd = open(file, "wb")
|
||||
for i in range(int(len(vol_result) / 2), len(vol_result)):
|
||||
fd.write(struct.pack("f", vol_result[i]))
|
||||
|
||||
|
||||
# save one slie in regular resolution vol_result
|
||||
# 0<=slice<128
|
||||
def save_slice(file, slice):
|
||||
fd = open(file, "wb")
|
||||
for j in range(0, sizey):
|
||||
for i in range(0, sizex):
|
||||
fd.write(struct.pack("f", vol_result[i + j * sizex + slice * sizex * sizey]))
|
||||
|
||||
|
||||
print("------intialisation------")
|
||||
initialize()
|
||||
print("------end intialisation------")
|
||||
|
||||
print("------begin ellipse 1------------")
|
||||
make_ellipse_center(a1, b1, c1, x1, y1, z1, rz1, value1)
|
||||
print("------end ellipse 1--------------")
|
||||
|
||||
print("------begin ellipse 2------------")
|
||||
make_ellipse_center(a2, b2, c2, x2, y2, z2, rz2, value2)
|
||||
print("------end ellipse 2--------------")
|
||||
|
||||
print("------begin ellipse 3------------")
|
||||
make_ellipse_center(a3, b3, c3, x3, y3, z3, rz3, value3)
|
||||
print("------end ellipse 3--------------")
|
||||
|
||||
print("------begin ellipse 4------------")
|
||||
make_ellipse_center(a4, b4, c4, x4, y4, z4, rz4, value4)
|
||||
print("------end ellipse 4--------------")
|
||||
|
||||
print("------begin ellipse 5------------")
|
||||
make_ellipse_center(a5, b5, c5, x5, y5, z5, rz5, value5)
|
||||
print("------end ellipse 5--------------")
|
||||
|
||||
print("------begin ellipse 6------------")
|
||||
make_ellipse_center(a6, b6, c6, x6, y6, z6, rz6, value6)
|
||||
print("------end ellipse 6--------------")
|
||||
|
||||
print("------begin undersample------")
|
||||
undersample()
|
||||
print("------end undersample------")
|
||||
|
||||
print("The length of vol_work: ", len(vol_work))
|
||||
print("The length of vol_result: ", len(vol_result))
|
||||
|
||||
# print ("------begin save slice 139 ------")
|
||||
save_slice("./slice_139.dat", 139)
|
||||
# print ("------end save slice 139 ------")
|
||||
|
||||
|
||||
save_half_result("./vol_result.dat")
|
||||
# save_whole_work("./vol_work.dat")
|
||||
print("------end save work------")
|
||||
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef ActionInitialization_h
|
||||
#define ActionInitialization_h 1
|
||||
|
||||
#include <pwdefs.hh>
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
/// Action initialization class.
|
||||
///
|
||||
|
||||
class ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
ActionInitialization(G4bool isP);
|
||||
~ActionInitialization() override;
|
||||
|
||||
void BuildForMaster() const override;
|
||||
void Build() const override;
|
||||
|
||||
private:
|
||||
G4bool isPIXE;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,143 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef DetectorConstruction_h
|
||||
#define DetectorConstruction_h 1
|
||||
|
||||
#include "G4Cache.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Box;
|
||||
class G4Ellipsoid;
|
||||
class G4Sphere;
|
||||
class G4VPhysicalVolume;
|
||||
class G4Material;
|
||||
class DetectorMessenger;
|
||||
class G4GlobalMagFieldMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
DetectorConstruction();
|
||||
~DetectorConstruction() override;
|
||||
|
||||
void SetAbsorberMaterial(const G4String&);
|
||||
void SetAbsorberThickness(G4double);
|
||||
void SetAbsorberSizeYZ(G4double);
|
||||
|
||||
void SetAbsorberXpos(G4double);
|
||||
|
||||
void SetWorldMaterial(const G4String&);
|
||||
void SetWorldSizeX(G4double);
|
||||
void SetWorldSizeYZ(G4double);
|
||||
void SetPhantomType(G4int value);
|
||||
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
void ConstructSDandField() override;
|
||||
|
||||
void PrintGeomParameters();
|
||||
|
||||
private:
|
||||
void DefineMaterials();
|
||||
void ComputeGeomParameters();
|
||||
void ChangeGeometry();
|
||||
void Construct_Phantom1();
|
||||
void Construct_Phantom2();
|
||||
void Construct_Phantom3();
|
||||
|
||||
G4int phantom_type;
|
||||
|
||||
G4Material* fAbsorberMaterial;
|
||||
G4double fAbsorberThickness;
|
||||
G4double fAbsorberSizeYZ;
|
||||
|
||||
G4double fXposAbs;
|
||||
G4double fXstartAbs, fXendAbs;
|
||||
|
||||
G4Material* fWorldMaterial;
|
||||
G4double fWorldSizeX;
|
||||
G4double fWorldSizeYZ;
|
||||
|
||||
G4Box* fSolidWorld;
|
||||
G4LogicalVolume* fLogicWorld;
|
||||
G4VPhysicalVolume* fPhysiWorld;
|
||||
|
||||
G4Box* fSolidAbsorber;
|
||||
G4LogicalVolume* fLogicAbsorber;
|
||||
G4VPhysicalVolume* fPhysiAbsorber;
|
||||
|
||||
G4Material* material1;
|
||||
G4Material* material2;
|
||||
G4Material* material3;
|
||||
G4Material* material4;
|
||||
G4Material* material5;
|
||||
G4Material* material6;
|
||||
G4Material* material_GDP;
|
||||
|
||||
G4Ellipsoid* ellipse1;
|
||||
G4LogicalVolume* logicEllipse1;
|
||||
G4VPhysicalVolume* physiEllipse1;
|
||||
|
||||
G4Ellipsoid* ellipse2;
|
||||
G4LogicalVolume* logicEllipse2;
|
||||
G4VPhysicalVolume* physiEllipse2;
|
||||
|
||||
G4Ellipsoid* ellipse3;
|
||||
G4LogicalVolume* logicEllipse3;
|
||||
G4VPhysicalVolume* physiEllipse3;
|
||||
|
||||
G4Ellipsoid* ellipse4;
|
||||
G4LogicalVolume* logicEllipse4;
|
||||
G4VPhysicalVolume* physiEllipse4;
|
||||
|
||||
G4Ellipsoid* ellipse5;
|
||||
G4LogicalVolume* logicEllipse5;
|
||||
G4VPhysicalVolume* physiEllipse5;
|
||||
|
||||
G4Ellipsoid* ellipse6;
|
||||
G4LogicalVolume* logicEllipse6;
|
||||
G4VPhysicalVolume* physiEllipse6;
|
||||
|
||||
// Ge-doped glow discharge polymer (GDP)
|
||||
G4Sphere* solid_GDP;
|
||||
G4LogicalVolume* logic_GDP;
|
||||
G4VPhysicalVolume* physi_GDP;
|
||||
|
||||
DetectorMessenger* fDetectorMessenger;
|
||||
G4Cache<G4GlobalMagFieldMessenger*> fFieldMessenger;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef DetectorMessenger_h
|
||||
#define DetectorMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class DetectorConstruction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class DetectorMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
DetectorMessenger(DetectorConstruction*);
|
||||
~DetectorMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
DetectorConstruction* fDetector;
|
||||
|
||||
G4UIdirectory* fTomoDir;
|
||||
G4UIdirectory* fDetDir;
|
||||
|
||||
G4UIcmdWithAString* fAbsMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsThickCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsSizYZCmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* fAbsXposCmd;
|
||||
|
||||
G4UIcmdWithAString* fWorldMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldXCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldYZCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* fPhantomType;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef PhysListEmStandard_h
|
||||
#define PhysListEmStandard_h 1
|
||||
|
||||
#include "G4VPhysicsConstructor.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class PhysListEmStandard : public G4VPhysicsConstructor
|
||||
{
|
||||
public:
|
||||
PhysListEmStandard(const G4String& name = "local");
|
||||
~PhysListEmStandard() override;
|
||||
|
||||
public:
|
||||
// This method is dummy for physics
|
||||
void ConstructParticle() override{};
|
||||
|
||||
// This method will be invoked in the Construct() method.
|
||||
// each physics process will be instantiated and
|
||||
// registered to the process manager of each particle type
|
||||
void ConstructProcess() override;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user