Import Geant4 11.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2024-12-06 11:11:40 +01:00
parent e58e650b32
commit 32390e802b
1984 changed files with 98713 additions and 83996 deletions
+5 -4
View File
@@ -133,10 +133,11 @@ List of features and fixes included in this Beta release since 11.2.p02:
o Minor cleanup in QSS classes.
+ management:
o Added new capability to run voxel optimisation in threads in MT mode.
Parallelises only over volumes. The user must currently call
G4GeometryManager::RequestParallelOptimisation(optimise, verbose) to
use it. Set 'verbose=true' to obtain statistics on the volumes with
biggest contribution to memory size and CPU time for voxelisation.
Parallelises only over volumes. The user can call the method
RequestParallelOptimisation(optimise, verbose) from G4GeometryManager
to turn it on/off. Set 'verbose=true' to obtain statistics on the
volumes with biggest contribution to memory size and CPU time for
voxelisation.
New method BuildOptimisationsParallel() can be called by
G4WorkerRunManager to initialise. New method ReportVoxelInfo() to
write out for verification. Checked with simple and complex/large
File diff suppressed because it is too large Load Diff
+55
View File
@@ -6,6 +6,61 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2024-11-25 Ben Morgan (cmake-V11-02-30)
- Bump RadioactiveDecay dataset version to 6.1.2
- Fixes Issue #237
## 2024-11-19 Ben Morgan (cmake-V11-02-29)
- Bump RadioactiveDecay dataset version to 6.1.1
## 2024-11-08 Ben Morgan (cmake-V11-02-28)
- Bump dataset versions:
- PhotonEvaporation 6.1
- RadioactiveDecay 6.1
- Fixes Issue 234
## 2024-10-30 Ben Morgan (cmake-V11-02-27)
- Ensure sanitizer flags are forwarded to the linker when using Xcode, and all
linker flags are forwarded to builds of tests done by geant4_add_test.
- Fixes Issue #227
## 2024-10-02 Ben Morgan (cmake-V11-02-26)
- Bump URRPT dataset version to 1.1
- Fixes Issue #228
## 2024-09-25 Ben Morgan (cmake-V11-02-25)
- Default GEANT4_INSTALL_PACKAGE_CACHE to OFF
- This file is highly unstable on macOS and SPack installs, and causes more problems
for most users than it solves.
## 2024-09-24 Ben Morgan (cmake-V11-02-24)
- Support running example build-and-run tests in Xcode
- Part of Issue #227
## 2024-09-23 Gunter Folger (cmake-V11-02-23)
- Bump dataset version:
- RadioactiveDecay 6.0.1
- Fixes Issue #226
## 2024-09-19 Ben Morgan (cmake-V11-02-22)
- Bump dataset versions:
- G4ENSDFSTATE 3.0
- PhotonEvaporation 6.0
- RadioactiveDecay 6.0
- Fixes Issue #224
## 2024-08-28 Ben Morgan (cmake-V11-02-21)
- Bump G4EMLOW dataset version to 8.6.1
## 2024-08-27 Ben Morgan (cmake-V11-02-20)
- Add new G4CHANNELING dataset to support channeling physics processes/models.
## 2024-06-24 Ben Morgan (cmake-V11-02-19)
- Simplify CMake/CTest functions and settings
- Move geant4_add_test function to dedicated module, retiring "UseGeant4_internal"
file
- Reduce oversetting of Geant4_DIR variable for use by tests
## 2024-06-07 Ben Morgan (cmake-V11-02-18)
- Add optional install of new URRPT data model
- Fixes Issue #217
+8 -1
View File
@@ -271,7 +271,14 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|.*Clang")
# Add flags - longer term, make compile/link options
# frame pointer flag to get more meaningful stack traces
# May need others for better/reliable output
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=${GEANT4_BUILD_SANITIZER}")
set(__geant4_sanitizer_flags "-fno-omit-frame-pointer -fsanitize=${GEANT4_BUILD_SANITIZER}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${__geant4_sanitizer_flags}")
# Xcode does not forward CXX_FLAGS to the linker, and sanitizer link flags need propagating to final
# link steps
if(CMAKE_GENERATOR MATCHES Xcode)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${__geant4_sanitizer_flags}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${__geant4_sanitizer_flags}")
endif()
geant4_add_feature(GEANT4_BUILD_SANITIZER "Compiling/linking with sanitizer '${GEANT4_BUILD_SANITIZER}'")
endif()
+9 -9
View File
@@ -14,10 +14,15 @@ if(GEANT4_ENABLE_TESTING)
# - Core CTest
enable_testing()
include(CTest)
include(G4TestAPI)
# - Geant4_DIR is needed to locate GeantConfig.cmake file required
# by tests and examples
set(Geant4_DIR ${PROJECT_BINARY_DIR} CACHE PATH "Current build directory")
# for tests and examples that are built as direct subprojects
# (as opposed to "build-and-test" type situations)
set(Geant4_DIR ${PROJECT_BINARY_DIR})
# - Base URL for test reference files
set(GEANT4_TEST_REFERENCES_URL "http://cern.ch/geant4-data/stt/references/")
# - Add datasets to testing environment
geant4_get_datasetnames(_dslist)
@@ -27,18 +32,13 @@ if(GEANT4_ENABLE_TESTING)
list(APPEND GEANT4_TEST_ENVIRONMENT ${_dsenvvar}=${_dspath})
endforeach()
# - Add base URL for test reference files
set(GEANT4_TEST_REFERENCES_URL "http://cern.ch/geant4-data/stt/references/" CACHE
STRING "base URL for test reference files")
mark_as_advanced(GEANT4_TEST_REFERENCES_URL)
# - Add TOOLS_FONT_PATH if freetype enabled
# - Add TOOLS_FONT_PATH to testing environment if required
if(GEANT4_USE_FREETYPE)
list(APPEND GEANT4_TEST_ENVIRONMENT TOOLS_FONT_PATH=${PROJECT_SOURCE_DIR}/source/externals/g4tools/fonts)
endif()
# - Configure 'G4RunManagerFactory::CreateRunManager(G4RunManagerType::Default)'
# to use TBB
# to use TBB if required
if(GEANT4_BUILD_MULTITHREADED AND GEANT4_USE_TBB)
list(APPEND GEANT4_TEST_ENVIRONMENT G4RUN_MANAGER_TYPE=TBB)
endif()
+3 -8
View File
@@ -206,12 +206,6 @@ configure_file(
COPYONLY
)
configure_file(
${PROJECT_SOURCE_DIR}/cmake/Templates/UseGeant4_internal.cmake
${PROJECT_BINARY_DIR}/UseGeant4_internal.cmake
COPYONLY
)
#-----------------------------------------------------------------------
# - Generate Install Tree Configuration Files
#-----------------------------------------------------------------------
@@ -272,8 +266,9 @@ install(FILES
COMPONENT Development
)
# Install the package settings file if required (always for now)
option(GEANT4_INSTALL_PACKAGE_CACHE "Install file recording build-time locations of required packages" ON)
# Install the package settings file if required
# Default to OFF because it's a hand-holding solution that hinders more than helps.
option(GEANT4_INSTALL_PACKAGE_CACHE "Install file recording build-time locations of required packages" OFF)
mark_as_advanced(GEANT4_INSTALL_PACKAGE_CACHE)
if(GEANT4_INSTALL_PACKAGE_CACHE)
install(FILES ${PROJECT_BINARY_DIR}/Geant4PackageCache.cmake
+20 -10
View File
@@ -18,31 +18,31 @@ geant4_add_dataset(
# - Low energy electromagnetics
geant4_add_dataset(
NAME G4EMLOW
VERSION 8.6
VERSION 8.6.1
FILENAME G4EMLOW
EXTENSION tar.gz
ENVVAR G4LEDATA
MD5SUM 080576674061a0649629649879655bb9
MD5SUM 9db67a37acc3eae9b0ffdace41a23b74
)
# - Photon evaporation
geant4_add_dataset(
NAME PhotonEvaporation
VERSION 5.7
VERSION 6.1
FILENAME G4PhotonEvaporation
EXTENSION tar.gz
ENVVAR G4LEVELGAMMADATA
MD5SUM 81ff27deb23af4aa225423e6b3a06b39
MD5SUM 92d68b937cdad0fd49892a66878863de
)
# - Radioisotopes
geant4_add_dataset(
NAME RadioactiveDecay
VERSION 5.6
VERSION 6.1.2
FILENAME G4RadioactiveDecay
EXTENSION tar.gz
ENVVAR G4RADIOACTIVEDATA
MD5SUM acc1dbeb87b6b708b2874ced729a3a8f
MD5SUM 20d494f73d4bddabd7fab5c06a58895c
)
# - Particle XS - replaces Neutron XS
@@ -109,11 +109,21 @@ geant4_add_dataset(
# - ENSDFSTATE
geant4_add_dataset(
NAME G4ENSDFSTATE
VERSION 2.3
VERSION 3.0
FILENAME G4ENSDFSTATE
EXTENSION tar.gz
ENVVAR G4ENSDFSTATEDATA
MD5SUM 6f18fce8f217e7aaeaa3711be9b2c7bf
MD5SUM c500728534ce3e9fb2fefa0112eb3a74
)
# - Channeling
geant4_add_dataset(
NAME G4CHANNELING
VERSION 1.0
FILENAME G4CHANNELING
EXTENSION tar.gz
ENVVAR G4CHANNELINGDATA
MD5SUM b2f692ec7109418c6354ea1ecbc62da7
)
# - TENDL
@@ -153,10 +163,10 @@ mark_as_advanced(GEANT4_INSTALL_DATASETS_URRPT)
if(GEANT4_INSTALL_DATASETS_URRPT)
geant4_add_dataset(
NAME G4URRPT
VERSION 1.0
VERSION 1.1
FILENAME G4URRPT
EXTENSION tar.gz
ENVVAR G4URRPTDATA
MD5SUM acc94698e4199455b4fac33c3384ccb4
MD5SUM ec9a2acb0745c8bfb6365ca3434bd3b8
)
endif()
@@ -1,10 +1,3 @@
# - Internal Use file for Geant4
# This file is designed for inclusion by the UseGeant4.cmake file, but
# only in the build tree. It contains functions and macros that are only
# intended to help in building the Geant4 tests.
#
# IT SHOULD NOT BE INSTALLED!
#-----------------------------------------------------------------------
# Special internal functions for building tests.
#-----------------------------------------------------------------------
@@ -23,11 +16,6 @@
# [LABELS label1 label2 ...])
#
function(geant4_add_test test)
if(NOT CMAKE_PROJECT_NAME STREQUAL Geant4)
message(WARNING "geant4_add_test is only for internal Geant4 usage, test '${test}' is disabled")
return()
endif()
cmake_parse_arguments(ARG
"DEBUG"
"TIMEOUT;BUILD;OUTPUT;ERROR;SOURCE_DIR;BINARY_DIR;PROJECT;PASSREGEX;FAILREGEX;WORKING_DIRECTORY"
@@ -38,19 +26,31 @@ function(geant4_add_test test)
set(_cfg $<CONFIGURATION>/)
endif()
# ARG_BUILD is treated as "zero or one"
# zero arg: build everything
# one arg: just that target
if(ARG_BUILD OR "BUILD" IN_LIST ARG_KEYWORDS_MISSING_VALUES)
set(_is_build_test TRUE)
endif()
# COMMAND AND BUILD: split test
# - In this case, we have to create a -build and a -run test with the latter depending on the former
# NOT COMMAND AND BUILD: pure build
# COMMAND AND NOT BUILD: pure test
if(ARG_COMMAND AND ARG_BUILD)
if(ARG_COMMAND AND _is_build_test)
set(_is_split_test TRUE)
endif()
# Supplying a PROJECT argument is now a deprecation warning and will be removed
if(ARG_PROJECT)
message(WARNING "Test '${test}' uses the deprecated 'PROJECT' argument to 'geant4_add_test'. This argument is obsolete")
endif()
#- Handle COMMAND argument
list(LENGTH ARG_COMMAND _len)
if(_len LESS 1)
if(NOT ARG_BUILD)
message(FATAL_ERROR "GEANT4_ADD_TEST: command is mandatory (without build)")
if(NOT _is_build_test)
message(FATAL_ERROR "geant4_add_test: COMMAND argument is mandatory when BUILD argument is not supplied")
endif()
else()
list(GET ARG_COMMAND 0 _prg)
@@ -125,20 +125,13 @@ function(geant4_add_test test)
set(_command ${_command} -P ${_driver})
#- Now we can actually add the test
if(ARG_BUILD)
if(_is_build_test)
if(NOT ARG_SOURCE_DIR)
set(ARG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
endif()
if(NOT ARG_BINARY_DIR)
set(ARG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
endif()
if(NOT ARG_PROJECT)
if(NOT PROJECT_NAME STREQUAL "Geant4")
set(ARG_PROJECT ${PROJECT_NAME})
else()
set(ARG_PROJECT ${ARG_BUILD})
endif()
endif()
set(__build_test_name "${test}")
set(__run_test_name "")
@@ -148,6 +141,10 @@ function(geant4_add_test test)
set(__run_test_name "${test}")
endif()
if(ARG_BUILD)
set(__build_argument --build-target ${ARG_BUILD})
endif()
# Build part of the test
# Again, note that we scope Geant4_DIR to Geant4_BINARY_DIR so we don't accidentally pickup
# local or higher scopes
@@ -155,8 +152,7 @@ function(geant4_add_test test)
--build-and-test ${ARG_SOURCE_DIR} ${ARG_BINARY_DIR}
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-target ${ARG_BUILD}
--build-project ${ARG_PROJECT}
${__build_argument}
--build-config $<CONFIGURATION>
--build-noclean
--build-options
@@ -175,9 +171,11 @@ function(geant4_add_test test)
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
-DCMAKE_CXX_FLAGS_FULLRELWITHDEBINFO=${CMAKE_CXX_FLAGS_FULLRELWITHDEBINFO}
-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
-DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS}
-DCMAKE_DISABLE_FIND_PACKAGE_ROOT=$<BOOL:${CMAKE_DISABLE_FIND_PACKAGE_ROOT}>
)
set_property(TEST ${__build_test_name} PROPERTY ENVIRONMENT Geant4_DIR=${Geant4_BINARY_DIR})
# Build part of the test should have additional regex, and *must* have same labels
if(ARG_FAILREGEX)
+1 -7
View File
@@ -1,12 +1,6 @@
# - Use file for Geant4
#
# Optional inclusion of internal Use file. This file can contain
# variables, functions and macros for strict internal use in Geant4,
# such as building and running validation tests.
#
include(${CMAKE_CURRENT_LIST_DIR}/UseGeant4_internal.cmake OPTIONAL)
# Add Module directory so that examples can use internal "FindXXX"
# modules. Appended to minimize any conflict with consumer project
# settings
# DEPRECATED: Only needed by certain examples
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/Modules)
+43
View File
@@ -6,6 +6,49 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2024-12-06 Gabriele Cosmo (examples-V11-03-00)
- Updated reference outputs according to reference tag geant4-11-03-ref-00.
- Included tags: doxygen-V11-02-01, dsbandrepair-V11-02-03, ch3-V11-02-00,
molecularDNA-V11-02-13, eFLASH_radiotherapy-V11-02-02,
exp_microdosimetry-V11-02-00, channelingExamples-V11-02-03,
hadrontherapy-V11-02-03, chem3-V11-02-02, FlukaCern-V11-02-01,
exampleRE03-V11-02-01, exampleRE07-V11-02-01.
## 2024-10-31 Gabriele Cosmo (examples-V11-02-09)
- Updated reference outputs according to reference tag geant4-11-02-ref-09.
- Included tags: exadvanced-V11-02-01, addna-V11-02-00, dsbandrepair-V11-02-02,
cellularPhantom-V11-02-01, molecularDNA-V11-02-10,
xraytel-V11-02-00, testem1-V11-02-01, testem3-V11-02-02,
testem11-V11-02-01, channelingExamples-V11-02-01,
fieldex01-V11-02-02, fieldex02-V11-02-02, fieldex03-V11-02-03,
fieldex04-V11-02-01, exdna-V11-02-02, chem4-V11-02-01,
chem6-V11-02-02, dnadamage2-V11-02-00, dnaphysics-V11-02-04,
microdosimetry-V11-02-02, microprox-V11-02-01, mfp-V11-02-02,
microyz-V11-02-02, range-V11-02-01, scavenger-V11-02-00,
slowing-V11-02-01, spower-V11-02-02, svalue-V11-02-01,
wvalue-V11-02-01, UHDR-V11-02-04, exgflasha-V11-02-02,
expar04-V11-02-03, exampleRE05-V11-02-01,
exam-ext-vis-standalone-V11-02-01.
## 2024-09-27 Gabriele Cosmo (examples-V11-02-08)
- Updated reference outputs according to reference tag geant4-11-02-ref-08.
- Included tags: eRosita-V11-02-00, exbasic-V11-02-04, AnaEx03-V11-02-00,
HepMCEx01-V11-02-01, fieldex01-V11-02-01, fieldex02-V11-02-01,
fieldex03-V11-02-02, fieldex04-V11-02-00, fieldex05-V11-02-00,
fieldex06-V11-02-00, chem1-V11-02-00, chem2-V11-02-00,
chem3-V11-02-01, chem4-V11-02-00, exam-ext-vis-UVA-V11-02-00,
microyz-V11-02-01, molecularDNA-V11-02-05, chem5-V11-02-00,
exampleRE05-V11-02-00, exam-ext-vis-vtk-V11-02-01.
## 2024-08-30 Gabriele Cosmo (examples-V11-02-07)
- Updated reference outputs according to reference tag geant4-11-02-ref-07.
- Included tags: eFLASH_radiotherapy-V11-02-01, hadrontherapy-V11-02-02,
fastAerosol-V11-02-00,STCyclotron-V11-02-00, exbasic-V11-02-02,
exampleB1-V11-02-00, exampleB3-V11-02-00, GB06-V11-02-00,
analysisExample-V11-02-00, exam-ext-vis-vtk-V11-02-00,
molecularDNA-V11-02-02, radiobiology-V11-02-00,
expol01-V11-02-00.
## 2024-06-28 Gabriele Cosmo (examples-V11-02-06)
- Updated reference outputs according to reference tag geant4-11-02-ref-06.
- Included tags: doxygen-V11-02-00, exadvanced-V11-02-00, dsbandrepair-V11-02-00,
+2 -1
View File
@@ -50,4 +50,5 @@ add_subdirectory(STCyclotron)
add_subdirectory(HGCal_testbeam)
add_subdirectory(ICRP110_HumanPhantoms)
add_subdirectory(ICRP145_HumanPhantoms)
add_subdirectory(dsbandrepair)
add_subdirectory(dna/dsbandrepair)
add_subdirectory(dna/moleculardna)
+8 -5
View File
@@ -38,7 +38,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -92,10 +92,13 @@ Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100 TeV
Positron annihilation at rest model SimplePositronium
Enable 3 gamma annihilation on fly 0
Lowest triplet kinetic energy 1 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
@@ -266,7 +269,7 @@ ionIoni: for GenericIon XStype:3 SubType=2
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 2 MeV
Bragg : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
msc: for alpha SubType= 10
@@ -748,7 +751,7 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
=======================================================================
====== Geant4 Native Pre-compound Model Parameters ========
=======================================================================
Type of pre-compound inverse x-section 3
Type of pre-compound inverse x-section 1
Pre-compound model active 1
Pre-compound excitation low energy 100 keV
Pre-compound excitation high energy 30 MeV
@@ -773,9 +776,9 @@ Use discrete excitation energy of the residual 0
Time limit for long lived isomeres 1 ns
Isomer production flag 1
Internal e- conversion flag 1
Store e- internal conversion data 0
Store e- internal conversion data 1
Correlated gamma emission flag 0
Max 2J for sampling of angular correlations 10
=======================================================================
writing Event: 0
TimeTotal> 5.799 2.970
TimeTotal> 16.787 2.800
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-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -1650,10 +1650,13 @@ Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100 TeV
Positron annihilation at rest model SimplePositronium
Enable 3 gamma annihilation on fly 0
Lowest triplet kinetic energy 1 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
@@ -1824,7 +1827,7 @@ ionIoni: for GenericIon XStype:3 SubType=2
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 2 MeV
Bragg : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
msc: for alpha SubType= 10
@@ -2306,7 +2309,7 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
=======================================================================
====== Geant4 Native Pre-compound Model Parameters ========
=======================================================================
Type of pre-compound inverse x-section 3
Type of pre-compound inverse x-section 1
Pre-compound model active 1
Pre-compound excitation low energy 100 keV
Pre-compound excitation high energy 30 MeV
@@ -2331,7 +2334,7 @@ Use discrete excitation energy of the residual 0
Time limit for long lived isomeres 1 ns
Isomer production flag 1
Internal e- conversion flag 1
Store e- internal conversion data 0
Store e- internal conversion data 1
Correlated gamma emission flag 0
Max 2J for sampling of angular correlations 10
=======================================================================
+4
View File
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2024-10-16 Hoang Tran (exadvanced-V11-02-01)
- Created a new dna category in advanced example
- Moved moleculardna example from extended dna example to advanced dna example.
## 2024-06-10 Gabriele Cosmo (exadvanced-V11-02-00)
- Updated GDML files to use short URL for schema validation.
- Initial overall History file for extended examples, used for global changes
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -34,7 +34,6 @@ Registered graphics systems are:
RayTracer (RayTracer)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
@@ -188,10 +187,13 @@ Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100 TeV
Positron annihilation at rest model AllisonPositronium
Enable 3 gamma annihilation on fly 1
Lowest triplet kinetic energy 1 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
@@ -344,7 +346,7 @@ ePairProd: for e+ XStype:1 SubType=4
annihil: for e+ XStype:2 SubType=5 AtRestModel:Allison BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplus2ggOKVI : Emin= 0 eV Emax= 100 TeV
eplusTo2or3gamma : Emin= 0 eV Emax= 100 TeV
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 0
@@ -613,7 +615,7 @@ CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
PHP check 1
CHECK HP NAMES 0
Enable DEBUG 0
Use probability tables from njoy
Use probability tables from
=======================================================
@@@ G4ParticleHPInelastic instantiated for particle neutron/n data directory is /cvmfs/geant4.cern.ch/share/data/G4NDL4.7.1/Inelastic
@@ -932,7 +934,7 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
=======================================================================
====== Geant4 Native Pre-compound Model Parameters ========
=======================================================================
Type of pre-compound inverse x-section 3
Type of pre-compound inverse x-section 1
Pre-compound model active 1
Pre-compound excitation low energy 100 keV
Pre-compound excitation high energy 30 MeV
@@ -961,8 +963,6 @@ Store e- internal conversion data 1
Correlated gamma emission flag 0
Max 2J for sampling of angular correlations 10
=======================================================================
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
/score/dumpQuantityToFile PhantomMesh energyDeposit PhantomMesh_Edep.txt
ICRP110UserScorer-defined DumpQuantityToFile() method is invoked.
Phantom Sex: male
@@ -1007,7 +1007,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.42965e-09 J
Total absorbed dose over all phantom organs is 3.74061e-09 Gy
Total energy deposited over all Organs within the Phantom is 1.3753e-09 J
Total absorbed dose over all phantom organs is 2.99616e-09 Gy
Graphics systems deleted.
Visualization Manager deleting...
@@ -2,30 +2,25 @@
--------------------------------
OrganID Edep (J) Dose (Gy)
--------------------------------
4 | 3.51939e-14 1.23879e-12
5 | 1.21784e-15 3.96304e-14
26 | 3.6424e-10 6.47135e-10
27 | 2.62636e-10 5.82264e-10
39 | 4.251e-12 5.5846e-11
40 | 3.0184e-12 4.08445e-11
47 | 1.11215e-20 1.08059e-19
48 | 1.05917e-13 1.44007e-12
61 | 4.9721e-10 3.42903e-10
100 | 2.08984e-20 9.24708e-18
106 | 6.01727e-11 4.94106e-11
116 | 1.43929e-10 1.3727e-10
120 | 2.67271e-11 6.29021e-10
121 | 2.06688e-11 4.8644e-10
122 | 4.48086e-11 1.53802e-10
133 | 1.29434e-15 3.06136e-14
134 | 1.84491e-12 6.12926e-10
4 | 4.38393e-13 1.54309e-11
26 | 3.35782e-10 5.96575e-10
27 | 2.81717e-10 6.24568e-10
39 | 6.86597e-16 9.01993e-15
40 | 4.42992e-14 5.99448e-13
47 | 2.22272e-12 2.15966e-11
48 | 1.76483e-12 2.3995e-11
61 | 4.50637e-10 3.10784e-10
106 | 7.49143e-11 6.15156e-11
116 | 1.42299e-10 1.35715e-10
120 | 2.26191e-11 5.32339e-10
121 | 2.27474e-11 5.35359e-10
122 | 4.0111e-11 1.37678e-10
----------------------------------------------------------------------------
-------------------------------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
5 Oral mucosa, tongue 29 1.050
26 Cranium, cortical 2 1.920
27 Cranium, spongiosa 8 1.157
39 Mandible, cortical 2 1.920
@@ -33,17 +28,14 @@ ID Organ Name Material ID Density (g/cm^3)
47 Cervical spine, cortical 2 1.920
48 Cervical spine, spongiosa 17 1.050
61 Brain 32 1.050
100 Lymphatic nodes, extrathoracic airways 47 1.030
106 Muscle, head 29 1.050
116 Residual tissue, head 49 0.950
120 Salivary glands, left 45 1.030
121 Salivary glands, right 45 1.030
122 Skin, head 27 1.090
133 Tongue (inner part) 29 1.050
134 Tonsils 45 1.030
Total Edep over all organs = 1.42965e-09 J
Total dose absorbed over all organs = 3.74061e-09 Gy
Total Edep over all organs = 1.3753e-09 J
Total dose absorbed over all organs = 2.99616e-09 Gy
----------------------------------------------------------------------------
----------------ORGAN ENERGY DEPOSITIONS AND ABSORBED DOSE------------------
@@ -52,12 +44,12 @@ Total dose absorbed over all organs = 3.74061e-09 Gy
----------------------------------------------------------------------------
OrganID Edep (J) Dose (Gy)
-------------------------------
0 | 1.87826e-11 0
0 | 1.54735e-10 0
1 | 0 0
2 | 0 0
3 | 0 0
4 | 3.51939e-14 1.23879e-12
5 | 1.21784e-15 3.96304e-14
4 | 4.38393e-13 1.54309e-11
5 | 0 0
6 | 0 0
7 | 0 0
8 | 0 0
@@ -78,8 +70,8 @@ OrganID Edep (J) Dose (Gy)
23 | 0 0
24 | 0 0
25 | 0 0
26 | 3.6424e-10 6.47135e-10
27 | 2.62636e-10 5.82264e-10
26 | 3.35782e-10 5.96575e-10
27 | 2.81717e-10 6.24568e-10
28 | 0 0
29 | 0 0
30 | 0 0
@@ -91,16 +83,16 @@ OrganID Edep (J) Dose (Gy)
36 | 0 0
37 | 0 0
38 | 0 0
39 | 4.251e-12 5.5846e-11
40 | 3.0184e-12 4.08445e-11
39 | 6.86597e-16 9.01993e-15
40 | 4.42992e-14 5.99448e-13
41 | 0 0
42 | 0 0
43 | 0 0
44 | 0 0
45 | 0 0
46 | 0 0
47 | 1.11215e-20 1.08059e-19
48 | 1.05917e-13 1.44007e-12
47 | 2.22272e-12 2.15966e-11
48 | 1.76483e-12 2.3995e-11
49 | 0 0
50 | 0 0
51 | 0 0
@@ -113,7 +105,7 @@ OrganID Edep (J) Dose (Gy)
58 | 0 0
59 | 0 0
60 | 0 0
61 | 4.9721e-10 3.42903e-10
61 | 4.50637e-10 3.10784e-10
62 | 0 0
63 | 0 0
64 | 0 0
@@ -152,13 +144,13 @@ OrganID Edep (J) Dose (Gy)
97 | 0 0
98 | 0 0
99 | 0 0
100 | 2.08984e-20 9.24708e-18
100 | 0 0
101 | 0 0
102 | 0 0
103 | 0 0
104 | 0 0
105 | 0 0
106 | 6.01727e-11 4.94106e-11
106 | 7.49143e-11 6.15156e-11
107 | 0 0
108 | 0 0
109 | 0 0
@@ -168,13 +160,13 @@ OrganID Edep (J) Dose (Gy)
113 | 0 0
114 | 0 0
115 | 0 0
116 | 1.43929e-10 1.3727e-10
116 | 1.42299e-10 1.35715e-10
117 | 0 0
118 | 0 0
119 | 0 0
120 | 2.67271e-11 6.29021e-10
121 | 2.06688e-11 4.8644e-10
122 | 4.48086e-11 1.53802e-10
120 | 2.26191e-11 5.32339e-10
121 | 2.27474e-11 5.35359e-10
122 | 4.0111e-11 1.37678e-10
123 | 0 0
124 | 0 0
125 | 0 0
@@ -185,14 +177,14 @@ OrganID Edep (J) Dose (Gy)
130 | 0 0
131 | 0 0
132 | 0 0
133 | 1.29434e-15 3.06136e-14
134 | 1.84491e-12 6.12926e-10
133 | 0 0
134 | 0 0
135 | 0 0
136 | 0 0
137 | 0 0
138 | 0 0
139 | 0 0
140 | 2.70402e-14 1.35201e-10
140 | 2.94656e-14 1.47328e-10
141 | 0 0
Total energy depositied over all organs = 1.42965e-09 J
Total absorbed dose over all organs = 3.74061e-09 Gy
Total energy depositied over all organs = 1.3753e-09 J
Total absorbed dose over all organs = 2.99616e-09 Gy
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -237,7 +237,6 @@ Registered graphics systems are:
RayTracer (RayTracer)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
@@ -324,10 +323,13 @@ Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100.00000 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100.00000 TeV
Positron annihilation at rest model AllisonPositronium
Enable 3 gamma annihilation on fly 1
Lowest triplet kinetic energy 1.00000 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
@@ -480,7 +482,7 @@ ePairProd: for e+ XStype:1 SubType=4
annihil: for e+ XStype:2 SubType=5 AtRestModel:Allison BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplus2ggOKVI : Emin=0.000000 eV Emax=100.000000 TeV
eplusTo2or3gamma : Emin=0.000000 eV Emax=100.000000 TeV
CoulombScat: for e+ XStype:1 SubType=1 BuildTable=1
Lambda table from 100.000000 MeV to 100.000000 TeV, 20 bins/decade, spline: 0
@@ -749,7 +751,7 @@ CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
PHP check 1
CHECK HP NAMES 0
Enable DEBUG 0
Use probability tables from njoy
Use probability tables from
=======================================================
@@@ G4ParticleHPInelastic instantiated for particle neutron/n data directory is /cvmfs/geant4.cern.ch/share/data/G4NDL4.7.1/Inelastic
@@ -1068,7 +1070,7 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
=======================================================================
====== Geant4 Native Pre-compound Model Parameters ========
=======================================================================
Type of pre-compound inverse x-section 3
Type of pre-compound inverse x-section 1
Pre-compound model active 1
Pre-compound excitation low energy 100.00000 keV
Pre-compound excitation high energy 30.00000 MeV
@@ -1097,8 +1099,6 @@ Store e- internal conversion data 1
Correlated gamma emission flag 0
Max 2J for sampling of angular correlations 10
=======================================================================
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
--> Event 0 starts.
--> Event 100000 starts.
--> Event 200000 starts.
@@ -1114,193 +1114,193 @@ See commands in /vis/modeling/trajectories/ for other options.
Run #0 / Number of event processed : 1000000
=====================================================================
organ ID| Organ Mass (g) Dose (Gy/source) Relative Error
100| 8.683 2.422e-17 0.556
200| 8.683 2.773e-17 0.472
300| 0.022 3.663e-17 0.720
301| 0.090 6.460e-17 0.731
302| 0.028 6.385e-17 0.721
303| 11.291 5.794e-17 0.377
400| 0.141 1.120e-16 0.618
401| 0.390 8.655e-17 0.620
402| 0.098 5.745e-17 0.513
403| 0.049 8.356e-17 0.520
404| 0.098 7.863e-17 0.600
405| 28.808 4.134e-17 0.260
500| 0.086 7.946e-17 0.913
501| 0.024 3.193e-17 1.000
600| 0.023 0.000e+00 1.000
700| 10.364 1.738e-17 0.722
100| 8.683 4.240e-17 0.487
200| 8.683 5.539e-18 0.704
300| 0.022 0.000e+00 1.000
301| 0.090 0.000e+00 1.000
302| 0.028 0.000e+00 1.000
303| 11.291 5.241e-17 0.361
400| 0.141 2.948e-17 0.632
401| 0.390 3.898e-17 0.661
402| 0.098 2.628e-17 0.741
403| 0.049 2.780e-17 0.782
404| 0.098 5.697e-17 0.772
405| 28.808 3.438e-17 0.269
500| 0.086 0.000e+00 1.000
501| 0.024 0.000e+00 1.000
600| 0.023 8.912e-17 0.786
700| 10.364 9.615e-18 0.774
800| 0.025 0.000e+00 1.000
801| 0.031 0.000e+00 1.000
802| 0.052 0.000e+00 1.000
803| 0.130 3.583e-17 1.000
803| 0.130 0.000e+00 1.000
804| 0.026 0.000e+00 1.000
805| 0.052 0.000e+00 1.000
806| 0.052 0.000e+00 1.000
807| 0.053 0.000e+00 1.000
808| 2.777 2.932e-17 0.893
900| 1.504 3.167e-17 0.604
910| 6.944 3.027e-17 0.615
1000| 193.197 2.314e-17 0.126
1010| 444.035 3.551e-17 0.071
1100| 32.463 2.814e-17 0.292
1110| 167.269 3.172e-17 0.122
1200| 108.832 2.025e-17 0.161
1210| 389.741 2.711e-17 0.087
1300| 159.196 2.206e-17 0.136
1400| 145.689 2.787e-17 0.152
1500| 34.244 1.711e-17 0.364
1600| 106.720 2.604e-17 0.163
1700| 50.890 2.497e-17 0.222
1800| 37.397 2.496e-17 0.302
1900| 273.409 2.544e-17 0.107
2000| 154.981 2.305e-17 0.154
2100| 22.996 2.672e-17 0.334
2200| 181.529 3.190e-17 0.114
2300| 118.927 3.657e-17 0.138
2400| 48.252 3.008e-17 0.230
2500| 45.057 2.871e-17 0.251
2600| 568.469 1.728e-17 0.090
2700| 382.073 1.990e-17 0.101
2800| 253.548 3.144e-17 0.096
2900| 413.232 3.135e-17 0.080
3000| 26.045 3.804e-17 0.274
3100| 307.761 2.980e-17 0.090
3200| 373.652 2.812e-17 0.092
3300| 82.179 2.709e-17 0.192
3400| 536.651 2.485e-17 0.078
3500| 621.408 2.509e-17 0.074
3600| 79.815 2.805e-17 0.188
3700| 234.882 2.043e-17 0.122
3800| 432.615 1.912e-17 0.103
3900| 76.877 2.337e-17 0.200
4000| 56.287 2.823e-17 0.212
4100| 402.595 3.221e-17 0.072
4200| 619.672 3.197e-17 0.065
4300| 368.797 2.683e-17 0.080
4400| 457.351 2.382e-17 0.082
4500| 223.333 1.405e-17 0.137
4600| 156.670 1.827e-17 0.161
4700| 103.943 2.565e-17 0.161
4800| 78.915 3.092e-17 0.183
4900| 289.440 1.488e-17 0.124
5000| 345.222 1.915e-17 0.109
5100| 188.047 2.511e-17 0.118
5200| 291.584 2.382e-17 0.103
5300| 110.320 2.147e-17 0.168
5400| 192.224 2.880e-17 0.121
5500| 9.991 2.377e-17 0.415
5600| 61.420 4.888e-17 0.159
5700| 56.331 3.414e-17 0.201
5800| 82.063 1.867e-17 0.213
6100| 1517.390 1.500e-17 0.066
6200| 7.769 5.054e-17 0.515
6300| 5.180 2.671e-17 0.837
6400| 7.769 2.622e-17 0.551
6500| 5.180 4.736e-17 0.696
6600| 0.039 3.995e-16 1.000
6601| 0.189 2.218e-16 1.000
6700| 1.113 6.825e-18 0.965
6701| 0.308 2.024e-16 1.000
6702| 6.122 5.393e-18 0.718
808| 2.777 8.212e-18 0.792
900| 1.504 0.000e+00 1.000
910| 6.944 5.052e-18 0.733
1000| 193.197 2.944e-17 0.114
1010| 444.035 3.343e-17 0.072
1100| 32.463 2.325e-17 0.320
1110| 167.269 2.792e-17 0.131
1200| 108.832 2.982e-17 0.156
1210| 389.741 2.462e-17 0.090
1300| 159.196 2.676e-17 0.140
1400| 145.689 2.981e-17 0.141
1500| 34.244 3.955e-17 0.245
1600| 106.720 3.229e-17 0.153
1700| 50.890 3.007e-17 0.218
1800| 37.397 2.285e-17 0.308
1900| 273.409 3.296e-17 0.096
2000| 154.981 3.259e-17 0.128
2100| 22.996 5.044e-17 0.292
2200| 181.529 2.974e-17 0.123
2300| 118.927 3.104e-17 0.148
2400| 48.252 3.587e-17 0.212
2500| 45.057 2.751e-17 0.229
2600| 568.469 1.351e-17 0.099
2700| 382.073 1.800e-17 0.113
2800| 253.548 2.999e-17 0.103
2900| 413.232 2.968e-17 0.082
3000| 26.045 3.625e-17 0.305
3100| 307.761 3.063e-17 0.091
3200| 373.652 2.999e-17 0.089
3300| 82.179 3.282e-17 0.176
3400| 536.651 2.577e-17 0.076
3500| 621.408 2.688e-17 0.073
3600| 79.815 2.992e-17 0.182
3700| 234.882 2.045e-17 0.131
3800| 432.615 1.984e-17 0.100
3900| 76.877 2.371e-17 0.204
4000| 56.287 1.905e-17 0.267
4100| 402.595 3.094e-17 0.074
4200| 619.672 3.249e-17 0.063
4300| 368.797 1.863e-17 0.085
4400| 457.351 2.139e-17 0.088
4500| 223.333 1.821e-17 0.125
4600| 156.670 1.967e-17 0.159
4700| 103.943 1.895e-17 0.177
4800| 78.915 2.624e-17 0.204
4900| 289.440 1.554e-17 0.113
5000| 345.222 2.017e-17 0.102
5100| 188.047 2.375e-17 0.124
5200| 291.584 2.630e-17 0.101
5300| 110.320 2.339e-17 0.151
5400| 192.224 2.621e-17 0.123
5500| 9.991 3.959e-17 0.343
5600| 61.420 3.807e-17 0.183
5700| 56.331 3.602e-17 0.196
5800| 82.063 2.358e-17 0.181
6100| 1517.390 1.477e-17 0.066
6200| 7.769 3.690e-17 0.504
6300| 5.180 5.758e-17 0.559
6400| 7.769 6.376e-17 0.459
6500| 5.180 2.058e-17 0.688
6600| 0.039 0.000e+00 1.000
6601| 0.189 0.000e+00 1.000
6700| 1.113 5.809e-17 1.000
6701| 0.308 0.000e+00 1.000
6702| 6.122 4.283e-17 0.591
6800| 0.039 0.000e+00 1.000
6801| 0.189 0.000e+00 1.000
6900| 1.113 0.000e+00 1.000
6900| 1.113 6.459e-17 0.772
6901| 0.308 0.000e+00 1.000
6902| 6.122 0.000e+00 1.000
7000| 10.364 3.594e-17 0.351
7100| 58.000 2.586e-17 0.213
7200| 1.784 2.939e-17 0.534
7201| 1.193 2.954e-17 0.585
7202| 6.008 2.521e-17 0.370
7203| 185.286 2.810e-17 0.119
7300| 250.000 3.064e-17 0.103
7400| 14.547 4.045e-17 0.190
7401| 2.264 3.277e-17 0.277
7402| 5.692 3.109e-17 0.208
7403| 840.096 3.461e-17 0.052
7500| 53.337 3.749e-17 0.149
7501| 296.663 3.493e-17 0.086
7600| 3.071 5.940e-17 0.435
7601| 0.223 4.283e-17 0.464
7602| 116.634 4.003e-17 0.134
7700| 55.000 4.338e-17 0.174
7800| 3.993 1.945e-17 0.496
7801| 0.289 1.970e-17 0.562
7802| 75.671 3.276e-17 0.177
7900| 95.000 3.089e-17 0.165
8000| 2.824 5.872e-17 0.384
8001| 0.205 3.904e-17 0.505
8002| 76.924 4.475e-17 0.155
8100| 40.000 5.249e-17 0.200
8200| 2.779 5.606e-17 0.508
8201| 0.203 6.527e-17 0.630
8202| 116.946 3.027e-17 0.145
8300| 35.000 4.024e-17 0.246
8400| 4.451 3.333e-17 0.394
8401| 0.324 2.707e-17 0.417
8402| 48.524 3.396e-17 0.216
8500| 75.000 3.793e-17 0.176
8600| 39.976 1.818e-17 0.309
8700| 385.839 2.972e-17 0.084
8800| 510.000 2.743e-17 0.079
8900| 162.338 2.554e-17 0.136
9000| 38.359 1.752e-17 0.336
9100| 7.652 2.196e-17 0.728
9200| 166.542 2.393e-17 0.130
9300| 39.362 2.402e-17 0.282
9400| 7.892 3.755e-17 0.568
9500| 2360.000 2.561e-17 0.040
9700| 545.877 2.553e-17 0.077
9900| 652.861 2.339e-17 0.074
10000| 15.949 2.699e-17 0.413
10100| 15.949 1.041e-17 0.466
10200| 5.510 1.660e-17 0.570
10300| 130.204 3.505e-17 0.125
10400| 11.019 3.075e-17 0.432
10500| 11.019 2.954e-17 0.547
10600| 1200.828 2.391e-17 0.056
10700| 14844.730 2.650e-17 0.016
10800| 2843.507 3.053e-17 0.032
10900| 10887.729 2.760e-17 0.018
11000| 1.919 1.286e-17 0.596
11001| 0.103 1.388e-17 0.904
11002| 49.783 1.936e-17 0.266
11003| 22.870 2.149e-17 0.371
11300| 173.631 3.290e-17 0.119
11400| 0.622 1.852e-17 0.974
11500| 17.618 4.374e-17 0.326
11600| 975.622 2.174e-17 0.063
11700| 11176.900 2.975e-17 0.016
11800| 1549.842 2.890e-17 0.043
11900| 4510.134 2.681e-17 0.027
12000| 44.045 1.480e-17 0.356
12100| 44.045 2.606e-17 0.292
12200| 259.230 1.439e-17 0.136
12201| 8.470 1.681e-17 0.305
12300| 1271.006 2.172e-17 0.049
12301| 38.418 1.171e-17 0.156
12400| 575.709 2.669e-17 0.067
12401| 18.843 1.954e-17 0.155
12500| 1259.982 2.518e-17 0.049
12501| 37.790 1.591e-17 0.149
12600| 37.952 1.460e-17 0.323
12700| 228.400 1.503e-17 0.146
12800| 50.727 2.016e-17 0.309
12801| 0.043 0.000e+00 1.000
12900| 18.617 2.163e-17 0.406
13000| 18.617 4.617e-17 0.326
13100| 25.909 1.265e-17 0.388
13200| 23.351 4.138e-17 0.299
13300| 20.993 1.222e-17 0.493
13301| 54.552 2.871e-17 0.226
13400| 3.109 2.423e-17 0.806
13500| 8.809 4.004e-17 0.450
13600| 7.773 6.183e-17 0.461
13700| 49.781 5.724e-17 0.172
13701| 1.318 4.167e-17 0.476
13800| 200.000 3.619e-17 0.106
14000| 0.140 3.904e-17 0.591
6902| 6.122 3.014e-17 0.555
7000| 10.364 2.634e-17 0.377
7100| 58.000 3.245e-17 0.211
7200| 1.784 4.854e-17 0.423
7201| 1.193 3.482e-17 0.329
7202| 6.008 3.263e-17 0.313
7203| 185.286 3.641e-17 0.109
7300| 250.000 3.120e-17 0.102
7400| 14.547 3.062e-17 0.225
7401| 2.264 3.725e-17 0.257
7402| 5.692 3.531e-17 0.229
7403| 840.096 3.449e-17 0.052
7500| 53.337 3.657e-17 0.144
7501| 296.663 3.660e-17 0.082
7600| 3.071 4.957e-18 1.000
7601| 0.223 4.611e-18 1.000
7602| 116.634 2.711e-17 0.158
7700| 55.000 3.043e-17 0.216
7800| 3.993 2.107e-17 0.546
7801| 0.289 1.109e-17 0.513
7802| 75.671 2.953e-17 0.180
7900| 95.000 3.380e-17 0.157
8000| 2.824 1.259e-17 0.556
8001| 0.205 1.417e-17 0.679
8002| 76.924 3.222e-17 0.167
8100| 40.000 4.300e-17 0.222
8200| 2.779 4.069e-17 0.559
8201| 0.203 4.342e-17 0.653
8202| 116.946 3.931e-17 0.129
8300| 35.000 2.635e-17 0.291
8400| 4.451 2.109e-17 0.529
8401| 0.324 2.993e-17 0.677
8402| 48.524 4.097e-17 0.191
8500| 75.000 4.285e-17 0.161
8600| 39.976 3.327e-17 0.233
8700| 385.839 2.747e-17 0.088
8800| 510.000 2.351e-17 0.084
8900| 162.338 2.166e-17 0.154
9000| 38.359 3.398e-17 0.247
9100| 7.652 3.048e-17 0.499
9200| 166.542 2.312e-17 0.132
9300| 39.362 1.807e-17 0.292
9400| 7.892 2.579e-17 0.652
9500| 2360.000 2.780e-17 0.038
9700| 545.877 2.450e-17 0.078
9900| 652.861 2.872e-17 0.066
10000| 15.949 1.800e-17 0.528
10100| 15.949 9.181e-18 0.413
10200| 5.510 6.634e-17 0.493
10300| 130.204 3.902e-17 0.123
10400| 11.019 4.496e-17 0.435
10500| 11.019 3.310e-17 0.463
10600| 1200.828 2.150e-17 0.059
10700| 14844.730 2.689e-17 0.015
10800| 2843.507 3.005e-17 0.032
10900| 10887.729 2.824e-17 0.018
11000| 1.919 2.190e-17 0.461
11001| 0.103 8.685e-18 0.615
11002| 49.783 2.967e-17 0.234
11003| 22.870 1.990e-17 0.383
11300| 173.631 3.738e-17 0.112
11400| 0.622 1.928e-17 1.000
11500| 17.618 3.675e-17 0.320
11600| 975.622 2.198e-17 0.063
11700| 11176.900 2.934e-17 0.017
11800| 1549.842 3.191e-17 0.041
11900| 4510.134 2.785e-17 0.026
12000| 44.045 2.755e-17 0.265
12100| 44.045 1.929e-17 0.300
12200| 259.230 1.705e-17 0.126
12201| 8.470 1.146e-17 0.312
12300| 1271.006 2.166e-17 0.049
12301| 38.418 1.925e-17 0.163
12400| 575.709 2.520e-17 0.070
12401| 18.843 2.245e-17 0.191
12500| 1259.982 2.337e-17 0.049
12501| 37.790 1.449e-17 0.155
12600| 37.952 1.906e-17 0.315
12700| 228.400 1.369e-17 0.161
12800| 50.727 2.408e-17 0.259
12801| 0.043 4.337e-17 0.784
12900| 18.617 3.190e-17 0.382
13000| 18.617 2.434e-17 0.370
13100| 25.909 2.885e-17 0.360
13200| 23.351 3.294e-17 0.331
13300| 20.993 1.072e-17 0.594
13301| 54.552 2.224e-17 0.271
13400| 3.109 0.000e+00 1.000
13500| 8.809 4.102e-17 0.469
13600| 7.773 5.416e-17 0.409
13700| 49.781 3.712e-17 0.187
13701| 1.318 3.656e-17 0.381
13800| 200.000 4.324e-17 0.099
14000| 0.140 1.798e-17 0.536
=====================================================================
Graphics systems deleted.
+3
View File
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2024-08-12 I. Hrivnacova (STCyclotron-V11-02-00)
- Removed unused include of G4AccumulableManager.hh from STCyclotronRunAction.cc
## 2023-12-04 S. Guatelli (STCyclotron-V11-01-02)
- Corrected the PrimaryGeneratorAction to solve problem #2538.
- Warning in vacuum_density corrected.
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -134,6 +134,7 @@ Index : 6 used in the geometry : Yes
==================================================================
Start closing geometry.
--------------------------------------------------------------------------------
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 1 kByte
@@ -148,6 +149,8 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Percent Memory Heads Nodes Pointers Total CPU Volume
------- -------- ------ ------ -------- ---------- ----------
100.00 1k 5 13 86 0.00 World
--------------------------------------------------------------------------------
### Run 0 starts.
... set ntuple merging row mode : row-wise - done
... create file : SolidTargetCyclotron.root - done
@@ -156,14 +159,14 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Run terminated.
Run Summary
Number of events processed : 10
User=20.980000s Real=22.158684s Sys=0.000000s
User=20.670000s Real=21.343105s Sys=0.010000s
... write file : SolidTargetCyclotron.root - done
... close file : SolidTargetCyclotron.root - done
G4 kernel has come to Quit state.
Deleting G4Run (id:0)
UserDetectorConstruction deleted 0x17fd590
UserPhysicsList deleted 0x1804ab0
UserActionInitialization deleted 0x198d500
UserDetectorConstruction deleted 0x13e1c90
UserPhysicsList deleted 0x13e91f0
UserActionInitialization deleted 0x156fb60
UserWorkerInitialization deleted 0
UserWorkerThreadInitialization deleted 0
UserRunAction deleted.
@@ -38,7 +38,6 @@
#include "G4UserRunAction.hh"
#include "G4Run.hh"
#include "G4RunManager.hh"
#include "G4AccumulableManager.hh"
#include "G4LogicalVolumeStore.hh"
#include "G4LogicalVolume.hh"
#include "G4UnitsTable.hh"
+18 -15
View File
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -159,7 +159,6 @@ Registered graphics systems are:
RayTracer (RayTracer)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
@@ -293,10 +292,13 @@ Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100 TeV
Positron annihilation at rest model SimplePositronium
Enable 3 gamma annihilation on fly 0
Lowest triplet kinetic energy 1 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
@@ -467,7 +469,7 @@ ionIoni: for GenericIon XStype:3 SubType=2
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 2 MeV
Bragg : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
msc: for alpha SubType= 10
@@ -753,6 +755,7 @@ Index : 3 used in the geometry : Yes
==================================================================
Start closing geometry.
--------------------------------------------------------------------------------
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 1 kByte
@@ -769,14 +772,14 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
------- -------- ------ ------ -------- ---------- ----------
52.31 0k 1 13 26 0.00 LensMotherLV
47.69 0k 3 9 22 0.00 World
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
--------------------------------------------------------------------------------
### Run 0 starts.
ooo Run 0 starts (global).
--------- Ranlux engine status ---------
Initial seed = 1719414333
float_seed_table[] = 0.175047 0.486924 0.938101 0.260933 0.0250564 0.610063 0.19077 0.647262 0.688288 0.304093 0.131578 0.0703431 0.779271 0.826493 0.344645 0.826125 0.567265 0.697638 0.468342 0.317728 0.735822 0.239019 0.246665 0.261269
Initial seed = 1733190394
float_seed_table[] = 0.360882 0.447177 0.444575 0.252963 0.260974 0.65486 0.72269 0.814901 0.520089 0.905083 0.124839 0.405592 0.544422 0.665476 0.540874 0.674277 0.70344 0.544798 0.58117 0.107627 0.702365 0.587153 0.375013 0.819679
i_lag = 23, j_lag = 9
carry = 0, count24 = 0
luxury = 3 nskip = 199
@@ -787,15 +790,15 @@ mu- Mono Plane
Run terminated.
Run Summary
Number of events processed : 100
User=1.270000s Real=1.348591s Sys=0.000000s
User=1.580000s Real=1.601909s Sys=0.000000s
### Run 0 (global) ended.
Graphics systems deleted.
Visualization Manager deleting...
G4 kernel has come to Quit state.
Deleting G4Run (id:0)
UserDetectorConstruction deleted 0x1ab5900
UserPhysicsList deleted 0x1af7488
UserActionInitialization deleted 0x1c8b820
UserDetectorConstruction deleted 0x2174bc0
UserPhysicsList deleted 0x21b5d68
UserActionInitialization deleted 0x234abd0
UserWorkerInitialization deleted 0
UserWorkerThreadInitialization deleted 0
UserRunAction deleted.
@@ -810,18 +813,18 @@ G4RNGHelper object is deleted.
================== Deleting memory pools ===================
Pool ID '20G4NavigationLevelRep', size : 0.0135 MB
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
Pool ID '17G4DynamicParticle', size : 0.024 MB
Pool ID '17G4DynamicParticle', size : 0.0231 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 '16G4HitsCollection', size : 0.000961 MB
Pool ID '7G4Track', size : 0.0471 MB
Pool ID '7G4Track', size : 0.0461 MB
Pool ID '18G4TouchableHistory', size : 0.000961 MB
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
Pool ID '15UltraOpticalHit', size : 0.000961 MB
Pool ID '15UltraOpticalHit', size : 0.00385 MB
Number of memory pools allocated: 12 of which, static: 0
Dynamic pools deleted: 12 / Total memory freed: 0.093 MB
Dynamic pools deleted: 12 / Total memory freed: 0.094 MB
============================================================
G4Allocator objects are deleted.
UImanager deleted.
+78 -75
View File
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -62,7 +62,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
ElmMassFraction: 30.00 % ElmAbundance 27.29 %
Material: Galactic density: 0.000 mg/cm3 RadL: 204310098.490 pc Nucl.Int.Length: 113427284.261 pc
Material: Galactic density: 0.000 mg/cm3 RadL: 204310098.490 pc Nucl.Int.Length: 3240.779 pc
Imean: 19.200 eV temperature: 2.73 K pressure: 0.00 atm
---> Element: H (H) Z = 1.0 N = 1 A = 1.008 g/mole
@@ -158,6 +158,7 @@ Index : 2 used in the geometry : Yes
==================================================================
Start closing geometry.
--------------------------------------------------------------------------------
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 32 kByte
@@ -176,6 +177,8 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
94.74 30k 1 490 980 0.00 layer
3.16 1k 1 17 20 0.00 module
2.10 0k 1 10 18 0.00 calorimeter
--------------------------------------------------------------------------------
### Run 0 starts.
------- MixMaxRng engine status -------
@@ -196,7 +199,7 @@ N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008
Run terminated.
Run Summary
Number of events processed : 10000
User=3.410000s Real=3.858164s Sys=0.000000s
User=3.730000s Real=3.881180s Sys=0.000000s
-------------------------------------------------------------
---> The calorimeter is 9 Modules
@@ -244,88 +247,88 @@ Run Summary
layer 23: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 24: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 25: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 26: 508.63 eV +- 50.86 keV (1e+04 %) 35.94 eV +- 3.594 keV (1e+04 %)
layer 27: 1.31 keV +- 131 keV (1e+04 %) 144.69 eV +- 14.47 keV (1e+04 %)
layer 28: 1.8422 keV +- 184.2 keV (1e+04 %) 142.6 eV +- 14.26 keV (1e+04 %)
layer 29: 925.67 eV +- 92.56 keV (1e+04 %) 85.879 eV +- 8.587 keV (1e+04 %)
layer 30: 1.3123 keV +- 131.2 keV (1e+04 %) 133.51 eV +- 13.35 keV (1e+04 %)
layer 31: 1.0592 keV +- 105.9 keV (1e+04 %) 100.2 eV +- 10.02 keV (1e+04 %)
layer 32: 2.3302 keV +- 233 keV (1e+04 %) 142.69 eV +- 14.27 keV (1e+04 %)
layer 33: 1.2736 keV +- 127.4 keV (1e+04 %) 129.42 eV +- 12.94 keV (1e+04 %)
layer 34: 1.0782 keV +- 107.8 keV (1e+04 %) 96.262 eV +- 9.626 keV (1e+04 %)
layer 35: 1.0338 keV +- 103.4 keV (1e+04 %) 116.97 eV +- 11.7 keV (1e+04 %)
layer 36: 1.2998 keV +- 130 keV (1e+04 %) 112.37 eV +- 11.24 keV (1e+04 %)
layer 37: 1.1875 keV +- 118.7 keV (1e+04 %) 101.5 eV +- 10.15 keV (1e+04 %)
layer 38: 1.5113 keV +- 151.1 keV (1e+04 %) 139.21 eV +- 13.92 keV (1e+04 %)
layer 39: 1.0974 keV +- 109.7 keV (1e+04 %) 142.31 eV +- 14.23 keV (1e+04 %)
layer 40: 1.7981 keV +- 179.8 keV (1e+04 %) 442.45 eV +- 44.24 keV (1e+04 %)
layer 41: 1.4551 keV +- 145.5 keV (1e+04 %) 148.19 eV +- 14.82 keV (1e+04 %)
layer 42: 957.65 eV +- 95.76 keV (1e+04 %) 98.025 eV +- 9.802 keV (1e+04 %)
layer 43: 2.7765 keV +- 277.6 keV (1e+04 %) 180.58 eV +- 18.06 keV (1e+04 %)
layer 44: 1.1171 keV +- 111.7 keV (1e+04 %) 134.28 eV +- 13.43 keV (1e+04 %)
layer 45: 1.1967 keV +- 119.7 keV (1e+04 %) 124.76 eV +- 12.48 keV (1e+04 %)
layer 46: 1.5229 MeV +- 2.102 MeV (1.4e+02 %) 158.51 keV +- 674.3 keV (4.3e+02 %)
layer 47: 1.531 MeV +- 2.159 MeV (1.4e+02 %) 162.39 keV +- 607.8 keV (3.7e+02 %)
layer 48: 1.5069 MeV +- 2.122 MeV (1.4e+02 %) 152.99 keV +- 485.3 keV (3.2e+02 %)
layer 49: 1.536 MeV +- 2.493 MeV (1.6e+02 %) 164.61 keV +- 1.06 MeV (6.4e+02 %)
layer 50: 1.534 MeV +- 2.296 MeV (1.5e+02 %) 149.72 keV +- 382.2 keV (2.6e+02 %)
layer 51: 1.5168 MeV +- 2.205 MeV (1.5e+02 %) 161.28 keV +- 798.9 keV (5e+02 %)
layer 52: 1.5447 MeV +- 2.739 MeV (1.8e+02 %) 153.93 keV +- 512.6 keV (3.3e+02 %)
layer 53: 1.5299 MeV +- 2.208 MeV (1.4e+02 %) 156.99 keV +- 870.4 keV (5.5e+02 %)
layer 54: 1.5543 MeV +- 2.774 MeV (1.8e+02 %) 170.06 keV +- 1.052 MeV (6.2e+02 %)
layer 55: 1.524 MeV +- 2.248 MeV (1.5e+02 %) 154.05 keV +- 529.4 keV (3.4e+02 %)
layer 56: 1.5268 MeV +- 2.287 MeV (1.5e+02 %) 160.3 keV +- 664.2 keV (4.1e+02 %)
layer 57: 1.5705 MeV +- 2.734 MeV (1.7e+02 %) 165.28 keV +- 987.5 keV (6e+02 %)
layer 58: 1.528 MeV +- 1.964 MeV (1.3e+02 %) 161.04 keV +- 672.7 keV (4.2e+02 %)
layer 59: 1.5566 MeV +- 2.486 MeV (1.6e+02 %) 147.28 keV +- 596 keV (4e+02 %)
layer 60: 1.513 MeV +- 1.961 MeV (1.3e+02 %) 164.8 keV +- 648.3 keV (3.9e+02 %)
layer 61: 1.5603 MeV +- 2.518 MeV (1.6e+02 %) 154.57 keV +- 598.9 keV (3.9e+02 %)
layer 62: 1.5205 MeV +- 2.233 MeV (1.5e+02 %) 167.15 keV +- 964.4 keV (5.8e+02 %)
layer 63: 1.5357 MeV +- 2.436 MeV (1.6e+02 %) 173.03 keV +- 1.215 MeV (7e+02 %)
layer 64: 1.5742 MeV +- 3.039 MeV (1.9e+02 %) 178.74 keV +- 1.32 MeV (7.4e+02 %)
layer 65: 1.5519 MeV +- 2.653 MeV (1.7e+02 %) 174.16 keV +- 1.228 MeV (7e+02 %)
layer 66: 1.56 MeV +- 2.659 MeV (1.7e+02 %) 163.99 keV +- 1.137 MeV (6.9e+02 %)
layer 67: 1.5188 MeV +- 2.228 MeV (1.5e+02 %) 147.7 keV +- 374.9 keV (2.5e+02 %)
layer 68: 1.549 MeV +- 2.5 MeV (1.6e+02 %) 161.53 keV +- 657.9 keV (4.1e+02 %)
layer 69: 1.5201 MeV +- 2.105 MeV (1.4e+02 %) 156.26 keV +- 531.1 keV (3.4e+02 %)
layer 70: 1.501 MeV +- 1.837 MeV (1.2e+02 %) 148.24 keV +- 428.2 keV (2.9e+02 %)
layer 71: 1.5485 MeV +- 2.506 MeV (1.6e+02 %) 171.55 keV +- 907.9 keV (5.3e+02 %)
layer 72: 1.5056 MeV +- 1.89 MeV (1.3e+02 %) 151.96 keV +- 541.4 keV (3.6e+02 %)
layer 73: 1.497 MeV +- 2.156 MeV (1.4e+02 %) 164.75 keV +- 614.7 keV (3.7e+02 %)
layer 74: 1.5133 MeV +- 2.323 MeV (1.5e+02 %) 145.6 keV +- 366.2 keV (2.5e+02 %)
layer 75: 1.4913 MeV +- 1.858 MeV (1.2e+02 %) 158.64 keV +- 931.1 keV (5.9e+02 %)
layer 76: 1.5365 MeV +- 2.538 MeV (1.7e+02 %) 166.63 keV +- 965.8 keV (5.8e+02 %)
layer 77: 1.497 MeV +- 1.9 MeV (1.3e+02 %) 156.94 keV +- 542.8 keV (3.5e+02 %)
layer 78: 1.5094 MeV +- 1.83 MeV (1.2e+02 %) 154.57 keV +- 498.4 keV (3.2e+02 %)
layer 79: 1.5017 MeV +- 1.946 MeV (1.3e+02 %) 150.5 keV +- 394.5 keV (2.6e+02 %)
layer 80: 1.5375 MeV +- 2.608 MeV (1.7e+02 %) 176.78 keV +- 1.253 MeV (7.1e+02 %)
layer 81: 1.5291 MeV +- 2.232 MeV (1.5e+02 %) 163.1 keV +- 902.6 keV (5.5e+02 %)
layer 82: 1.5689 MeV +- 2.598 MeV (1.7e+02 %) 167.73 keV +- 775.1 keV (4.6e+02 %)
layer 83: 1.5173 MeV +- 1.97 MeV (1.3e+02 %) 153.69 keV +- 465.9 keV (3e+02 %)
layer 84: 1.534 MeV +- 2.631 MeV (1.7e+02 %) 182.14 keV +- 1.397 MeV (7.7e+02 %)
layer 85: 1.5483 MeV +- 2.342 MeV (1.5e+02 %) 163.01 keV +- 979.9 keV (6e+02 %)
layer 86: 1.5539 MeV +- 2.648 MeV (1.7e+02 %) 161.28 keV +- 909.6 keV (5.6e+02 %)
layer 87: 1.5292 MeV +- 2.179 MeV (1.4e+02 %) 158.59 keV +- 718.2 keV (4.5e+02 %)
layer 88: 1.5179 MeV +- 2.176 MeV (1.4e+02 %) 159.39 keV +- 672.3 keV (4.2e+02 %)
layer 89: 1.5531 MeV +- 2.359 MeV (1.5e+02 %) 159.26 keV +- 632.7 keV (4e+02 %)
layer 90: 1.5266 MeV +- 2.207 MeV (1.4e+02 %) 154.59 keV +- 613.6 keV (4e+02 %)
layer 26: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 27: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 28: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 29: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 30: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 31: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 32: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 33: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 34: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 35: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 36: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 37: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 38: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 39: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 40: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 41: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 42: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 43: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 44: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 45: 0 eV +- 0 eV ( 0 %) 0 eV +- 0 eV ( 0 %)
layer 46: 1.5607 MeV +- 2.472 MeV (1.6e+02 %) 165.73 keV +- 823 keV (5e+02 %)
layer 47: 1.5149 MeV +- 2.345 MeV (1.5e+02 %) 157.61 keV +- 555.1 keV (3.5e+02 %)
layer 48: 1.5042 MeV +- 1.965 MeV (1.3e+02 %) 153.46 keV +- 541 keV (3.5e+02 %)
layer 49: 1.5059 MeV +- 2.354 MeV (1.6e+02 %) 166.68 keV +- 1.135 MeV (6.8e+02 %)
layer 50: 1.5183 MeV +- 2.086 MeV (1.4e+02 %) 146.43 keV +- 284.7 keV (1.9e+02 %)
layer 51: 1.5189 MeV +- 2.084 MeV (1.4e+02 %) 159.53 keV +- 667.6 keV (4.2e+02 %)
layer 52: 1.5509 MeV +- 2.444 MeV (1.6e+02 %) 155.41 keV +- 505.6 keV (3.3e+02 %)
layer 53: 1.525 MeV +- 2.489 MeV (1.6e+02 %) 161.62 keV +- 879.5 keV (5.4e+02 %)
layer 54: 1.542 MeV +- 2.578 MeV (1.7e+02 %) 159.19 keV +- 869.5 keV (5.5e+02 %)
layer 55: 1.5212 MeV +- 1.984 MeV (1.3e+02 %) 160.13 keV +- 654.2 keV (4.1e+02 %)
layer 56: 1.5497 MeV +- 2.641 MeV (1.7e+02 %) 145.41 keV +- 278.1 keV (1.9e+02 %)
layer 57: 1.534 MeV +- 2.455 MeV (1.6e+02 %) 153.75 keV +- 809.4 keV (5.3e+02 %)
layer 58: 1.5322 MeV +- 2.131 MeV (1.4e+02 %) 153.31 keV +- 381.9 keV (2.5e+02 %)
layer 59: 1.5659 MeV +- 2.526 MeV (1.6e+02 %) 158.6 keV +- 799.9 keV (5e+02 %)
layer 60: 1.5495 MeV +- 2.364 MeV (1.5e+02 %) 181.37 keV +- 1.24 MeV (6.8e+02 %)
layer 61: 1.5495 MeV +- 2.406 MeV (1.6e+02 %) 159.3 keV +- 782.7 keV (4.9e+02 %)
layer 62: 1.5202 MeV +- 2.12 MeV (1.4e+02 %) 164.87 keV +- 778.9 keV (4.7e+02 %)
layer 63: 1.5281 MeV +- 2.348 MeV (1.5e+02 %) 162.37 keV +- 989.7 keV (6.1e+02 %)
layer 64: 1.5409 MeV +- 2.654 MeV (1.7e+02 %) 161.67 keV +- 1.03 MeV (6.4e+02 %)
layer 65: 1.5579 MeV +- 2.516 MeV (1.6e+02 %) 166.62 keV +- 996.2 keV (6e+02 %)
layer 66: 1.5266 MeV +- 2.271 MeV (1.5e+02 %) 164.68 keV +- 843.2 keV (5.1e+02 %)
layer 67: 1.5247 MeV +- 2.226 MeV (1.5e+02 %) 164.36 keV +- 921.5 keV (5.6e+02 %)
layer 68: 1.5444 MeV +- 2.422 MeV (1.6e+02 %) 159.25 keV +- 620.5 keV (3.9e+02 %)
layer 69: 1.503 MeV +- 2.083 MeV (1.4e+02 %) 157.76 keV +- 627.7 keV (4e+02 %)
layer 70: 1.4979 MeV +- 1.909 MeV (1.3e+02 %) 153.03 keV +- 538.3 keV (3.5e+02 %)
layer 71: 1.539 MeV +- 2.554 MeV (1.7e+02 %) 158.11 keV +- 620 keV (3.9e+02 %)
layer 72: 1.4969 MeV +- 1.906 MeV (1.3e+02 %) 159.99 keV +- 961.5 keV (6e+02 %)
layer 73: 1.505 MeV +- 2.043 MeV (1.4e+02 %) 163 keV +- 555 keV (3.4e+02 %)
layer 74: 1.5414 MeV +- 2.733 MeV (1.8e+02 %) 150.12 keV +- 507.7 keV (3.4e+02 %)
layer 75: 1.5154 MeV +- 2.088 MeV (1.4e+02 %) 160.28 keV +- 949.4 keV (5.9e+02 %)
layer 76: 1.5002 MeV +- 2.198 MeV (1.5e+02 %) 154.06 keV +- 551.5 keV (3.6e+02 %)
layer 77: 1.5242 MeV +- 2.418 MeV (1.6e+02 %) 156.59 keV +- 917.4 keV (5.9e+02 %)
layer 78: 1.5159 MeV +- 2.024 MeV (1.3e+02 %) 164.78 keV +- 675.1 keV (4.1e+02 %)
layer 79: 1.5036 MeV +- 2.019 MeV (1.3e+02 %) 152 keV +- 515.5 keV (3.4e+02 %)
layer 80: 1.5409 MeV +- 2.55 MeV (1.7e+02 %) 171.23 keV +- 1.182 MeV (6.9e+02 %)
layer 81: 1.5393 MeV +- 2.26 MeV (1.5e+02 %) 164.33 keV +- 988.4 keV (6e+02 %)
layer 82: 1.4987 MeV +- 1.999 MeV (1.3e+02 %) 162.13 keV +- 655.4 keV (4e+02 %)
layer 83: 1.5346 MeV +- 2.228 MeV (1.5e+02 %) 146.59 keV +- 393.8 keV (2.7e+02 %)
layer 84: 1.5039 MeV +- 2.212 MeV (1.5e+02 %) 172.99 keV +- 1.095 MeV (6.3e+02 %)
layer 85: 1.5544 MeV +- 2.449 MeV (1.6e+02 %) 170.27 keV +- 1.048 MeV (6.2e+02 %)
layer 86: 1.5328 MeV +- 2.564 MeV (1.7e+02 %) 161.58 keV +- 932.9 keV (5.8e+02 %)
layer 87: 1.5565 MeV +- 2.51 MeV (1.6e+02 %) 159.32 keV +- 717.6 keV (4.5e+02 %)
layer 88: 1.5206 MeV +- 2.124 MeV (1.4e+02 %) 160.63 keV +- 676.3 keV (4.2e+02 %)
layer 89: 1.5371 MeV +- 2.278 MeV (1.5e+02 %) 161.27 keV +- 577.2 keV (3.6e+02 %)
layer 90: 1.5134 MeV +- 2.027 MeV (1.3e+02 %) 151.89 keV +- 421.6 keV (2.8e+02 %)
total calor : 75.155 MeV +- 16.27 MeV ( 22 %) 7.2321 MeV +- 5.373 MeV ( 74 %)
total calor : 75.038 MeV +- 16.1 MeV ( 21 %) 7.1933 MeV +- 5.221 MeV ( 73 %)
------------------------------------------------------------
Leakage : 924.85 MeV +- 16.27 MeV
Eleak/Ebeam =92.5 % ( forward =92.5 % backward = 0 % lateral =0.00684 %)
Leakage : 924.96 MeV +- 16.1 MeV
Eleak/Ebeam =92.5 % ( forward =92.5 % backward = 0 % lateral =0.00683 %)
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={1107671594470450757, 1240607435943435738, 2231204702643210350, 1189532161300035035, 1187160762106429718, 1279654564220372732, 394375735238574519, 1139581727873146704, 815563237799698575, 92100093776053926, 1421621212261671388, 1627816993775078338, 519999874798195897, 1532430024833830675, 1709850670266766569, 2049291853933162862, 367882786885510648} counter= 8sumtot= 1459601358416072823
N=17 V[N]={2125414173700100552, 2142585805957254368, 76522162894449253, 1784158078511305541, 1604927075428355476, 1591418228791441455, 1319796215467225750, 510330441101115716, 292041348516976082, 1319273073710620057, 804550070673300322, 163284425230320842, 565490385491944821, 16112232889381638, 1636818388774373843, 1527274433194452312, 886262238668689935} counter= 11sumtot= 2225357714505450306
---------------------------------------
G4 kernel has come to Quit state.
Deleting G4Run (id:0)
UserDetectorConstruction deleted 0x1178b40
UserPhysicsList deleted 0x11ad150
UserActionInitialization deleted 0x1333bf0
UserDetectorConstruction deleted 0xf51240
UserPhysicsList deleted 0xf84e30
UserActionInitialization deleted 0x110b8c0
UserWorkerInitialization deleted 0
UserWorkerThreadInitialization deleted 0
UserRunAction deleted.
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -34,7 +34,6 @@ Registered graphics systems are:
RayTracer (RayTracer)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
@@ -281,10 +280,13 @@ Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100 TeV
Positron annihilation at rest model AllisonPositronium
Enable 3 gamma annihilation on fly 0
Lowest triplet kinetic energy 1 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
@@ -800,20 +802,11 @@ Index : 3 used in the geometry : Yes
==================================================================
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
### Run 0 start.
Using
number of events = 5000
... write file : primary.root - done
... close file : primary.root - done
There are histograms that can be viewed with visualization:
1 h1 histograms(s)
List them with "/analysis/list".
View them immediately with "/vis/plot" or "/vis/reviewPlots".
But...there are no entries. To make your histograms available for
plotting in this UI session, use CloseFile(false) in your
EndOfRunAction and Reset() in your BeginOfRunAction.
/score/dumpQuantityToFile boxMesh_4 eDep EnergyDeposition_Flexi.out
... create file : brachytherapy.root - done
... open analysis file : brachytherapy.root - done
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -121,10 +121,13 @@ Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100 TeV
Positron annihilation at rest model SimplePositronium
Enable 3 gamma annihilation on fly 0
Lowest triplet kinetic energy 1 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
@@ -295,7 +298,7 @@ ionIoni: for GenericIon XStype:3 SubType=2
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 2 MeV
Bragg : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
msc: for alpha SubType= 10
@@ -774,11 +777,10 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
Model: FTFP: 3 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
### G4LevelReader: broken transition 0 from level 24 to 24 for isotope Z= 89 A= 219 - use ground level
=======================================================================
====== Geant4 Native Pre-compound Model Parameters ========
=======================================================================
Type of pre-compound inverse x-section 3
Type of pre-compound inverse x-section 1
Pre-compound model active 1
Pre-compound excitation low energy 100 keV
Pre-compound excitation high energy 30 MeV
@@ -803,7 +805,7 @@ Use discrete excitation energy of the residual 0
Time limit for long lived isomeres 1 ns
Isomer production flag 1
Internal e- conversion flag 1
Store e- internal conversion data 0
Store e- internal conversion data 1
Correlated gamma emission flag 0
Max 2J for sampling of angular correlations 10
=======================================================================
@@ -868,6 +870,7 @@ Index : 5 used in the geometry : Yes
==================================================================
Start closing geometry.
--------------------------------------------------------------------------------
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 15 kByte
@@ -888,6 +891,8 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
20.31 3k 6 44 83 0.00 HadronCalorimeterBox0 14.44 2k 5 30 60 0.00 HadronCalorimeterBox1 4.81 0k 1 12 14 0.00 CrystalMatrixLayer
3.70 0k 2 7 13 0.00 HadronCalorimeterScntLayer2 2.08 0k 1 4 8 0.00 HadronCalorimeter
1.98 0k 1 4 6 0.00 HadronCalorimeterScntLayer0 1.67 0k 1 3 6 0.00 HadronCalorimeterScntLayer1 1.57 0k 1 3 4 0.00 HcalTB96
--------------------------------------------------------------------------------
### Run 0 starts.
### Run 0 start.
... set ntuple merging row mode : row-wise - done
@@ -952,15 +957,15 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Run terminated.
Run Summary
Number of events processed : 20
User=16.250000s Real=16.897608s Sys=0.010000s
User=15.240000s Real=16.118912s Sys=0.010000s
### Run 0 end.
... write file : ccal.root - done
... close file : ccal.root - done
G4 kernel has come to Quit state.
Deleting G4Run (id:0)
UserDetectorConstruction deleted 0x25b6a80
UserPhysicsList deleted 0x25b7c40
UserActionInitialization deleted 0x2773b60
UserDetectorConstruction deleted 0xec6160
UserPhysicsList deleted 0xec7320
UserActionInitialization deleted 0x1082a20
UserWorkerInitialization deleted 0
UserWorkerThreadInitialization deleted 0
UserRunAction deleted.
@@ -971,24 +976,24 @@ G4SDManager deleted.
EventManager deleted.
Units table cleared.
TransportationManager deleted.
Total navigation history collections cleaned: 46
Total navigation history collections cleaned: 52
G4RNGHelper object is deleted.
================== Deleting memory pools ===================
Pool ID '20G4NavigationLevelRep', size : 0.0683 MB
Pool ID '20G4NavigationLevelRep', size : 0.0759 MB
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
Pool ID '17G4DynamicParticle', size : 0.0731 MB
Pool ID '17G4DynamicParticle', size : 0.0798 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 '16G4HitsCollection', size : 0.000961 MB
Pool ID '7G4Track', size : 0.145 MB
Pool ID '18G4TouchableHistory', size : 0.00577 MB
Pool ID '7G4Track', size : 0.159 MB
Pool ID '18G4TouchableHistory', size : 0.00673 MB
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
Pool ID '17G4ReactionProduct', size : 0.0183 MB
Pool ID '10G4Fragment', size : 0.00673 MB
Pool ID '17G4ReactionProduct', size : 0.0144 MB
Pool ID '10G4Fragment', size : 0.00577 MB
Number of memory pools allocated: 13 of which, static: 0
Dynamic pools deleted: 13 / Total memory freed: 0.32 MB
Dynamic pools deleted: 13 / Total memory freed: 0.35 MB
============================================================
G4Allocator objects are deleted.
UImanager deleted.
+19
View File
@@ -0,0 +1,19 @@
///\file "dna/.README.txt"
///\brief Advanced examples dna README page
/*! \page Examples_dna Category "dna"
This directory contains a set of advanced Geant4-DNA examples.
\section dna_s0 DNA damage
- \link Examplemoleculardna moleculardna \endlink Damage simulation on DNA geometries.
- \link ExampleDsbandrepair dsbandrepair \endlink Damage simulation on DNA geometries.
See the README page inside each example for more detail.
*/
+10
View File
@@ -0,0 +1,10 @@
#---Adding all dna examples subdirectories explicitly
cmake_minimum_required(VERSION 3.16...3.27)
project(advanced-dna-example)
add_subdirectory(moleculardna)
add_subdirectory(dsbandrepair)
add_subdirectory(cellularPhantom)
+10
View File
@@ -0,0 +1,10 @@
# Example dna 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!
## 2024-10-15 Hoang Tran (addna-V11-02-00)
- added in advanced a dna category
+16
View File
@@ -0,0 +1,16 @@
=========================================================
Geant4 - dna examples
=========================================================
README file
----------------------
This directory contains a set of Geant4-DNA advanced examples.
- DNA damage simulation using DNA-scale geometries:
- moleculardna
- dsbandrepair
- Cellular phantom:
- cellularPhantom
See the README page inside each example for more detail.
@@ -0,0 +1,127 @@
///\file "medical/dna/cellularPhantom/.README.txt"
///\brief Example cellularPhantom README page
/*! \page ExamplecellularPhantom Example cellularPhantom
\authors P. Barberet, S. Incerti, N. H. Tran, L. Morelli
LP2i, IN2P3 / CNRS / Bordeaux University, 33175 Gradignan, France
E-mail: barberet@lp2ib.in2p3.fr or incerti@lp2ib.in2p3.fr
If you use this code, please cite the following publication:
Monte-Carlo dosimetry on a realistic cell monolayer geometry exposed to alpha-particle,
P. Barberet, F. Vianna, M. Karamitros, T. Brun, N. Gordillo, P. Moretto, S. Incerti, H. Seznec,
Phys. Med. Biol. 57 (2012) 2189-2207
https://doi.org/10.1088/0031-9155/57/8/2189
\section cellularPhantom_s1 INTRODUCTION.
The cellularPhantom example shows how to simulate the irradiation of a 3D voxel
phantom containing biological cells, created from a confocal microscopy 24-bit RGB image.
The original image was created thanks to:
- H. De Oliveira, T. Désigaux, N. Dusserre, ART BioPrint, France
- F. Paris, C. Niaudet, Inserm, France
These developments were carried out as part of the "Flash'Atlantic" project
(2023-2024) funded by CNRS-MITI, France, and Inserm, France.
Two phantom files phantom.dat (low resolution) and phantomHR.dat (high resolution)
are provided in the phantoms directory.
They were created using the ImageJ phantom.ijm macro located in the ImageJ directory.
See the phantoms/Documentation.pdf file for more information
The low resolution file is used for visualization in the macro vis.mac.
It contains the following lines:
54300 20230 17320 16750
=> total number of voxels, number of red, green and blue voxels
734.0507 734.0507 90.6372 microns
=> whole X, Y and Z size of the phantom, with unit
2.8674 2.8674 2.0142 microns
=> size of a single voxel, with unit
And the list of individual voxels, with the format: X, Y and Z positions, type
(type is 1 for R, 2 for G, 3 for B):
232.2582 31.5412 0.0000 2
235.1256 31.5412 0.0000 2
...
The low resolution and high resolution files can be used by the run.mac macro.
\section cellularPhantom_s2 GEOMETRY SET-UP
The geometry is a 1-mm side cube ("World") made of air, with a thickness of 100 um,
containing a liquid water medium ("Medium") of side 900 um and thickness 95 um,
containing itself the phantom ("Phantom").
The World and Medium dimensions can be changed by UI command.
\section cellularPhantom_s3 SET-UP
Make sure $G4LEDATA points to the low energy electromagnetic data files.
\section cellularPhantom_s4 HOW TO RUN THE EXAMPLE
In interactive mode, run:
\verbatim
./cellularPhantom
this will show the phantom in 3D (requires memory).
\endverbatim
In batch, the macro run.mac can be used:
\verbatim
./cellularPhantom run.mac
\endverbatim
In this macro, the user can select:
- the number of threads (MT mode)
- the phantom file name
- the World and Medium dimensions
- the Medium material
- the phantom voxel density
- the position (shift in X or Y or Z) of the phantom in the Medium
- the production cuts outside and inside in the phantom
- the incident particles (using GPS)
\section cellularPhantom_s5 PHYSICS
The PhysicsList class uses Geant4 option4 electromagnetic physics.
It also contains other physics lists including Geant4-DNA option2,
which is commented by default.
\section cellularPhantom_s6 SIMULATION OUTPUT AND RESULT ANALYSIS
The output results consists in a phantom.root file, containing three ntuples,
corresponding to the 3 types of voxels (red, green and blue) of the original image.
The ROOT macro plot.C can be run to extract and display:
- the cellular phantom
- the absorbed energy distribution in the 3 types of voxels
- the absorbed energy 2D map for the 3 types of voxels
- the absorbed dose 2D map for the 3 types of voxels
Simply do, after the simulation:
\verbatim
root plot.C
\endverbatim
In addition, the following quantities are displayed:
- total number of voxels in phantom
- total number of RED voxels in phantom
- total number of GREEN voxels in phantom
- total number of BLUE voxels in phantom
- total absorbed energy in RED voxels (MeV)
- total absorbed energy in GREEN voxels (MeV)
- total absorbed energy in BLUE voxels (MeV)
- total absorbed dose in RED voxels (Gy)
- total absorbed dose in GREEN voxels (Gy)
- total absorbed dose in BLUE voxels (Gy)
Results are stored in the results.root file.
*/
@@ -0,0 +1,116 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.16...3.21)
project(cellularPhantom)
#----------------------------------------------------------------------------
# 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})
#----------------------------------------------------------------------------
# Dowload geometry data file
set(GEOMETRY_NEEDS_DOWNLOAD TRUE)
set(GEOMETRY_NEEDS_UNPACK_DELETE TRUE)
set(GEOMETRY_FILE_NAME "phantoms.tar.gz")
set(GEOMETRY_FOlDER_NAME "phantoms")
set(GEOMETRY_LOCAL_FILENAME "${PROJECT_BINARY_DIR}/${GEOMETRY_FILE_NAME}")
set(GEOMETRY_DATASETS_URL
"https://cern.ch/geant4-data/datasets/examples/advanced/dna/cellularPhantom/0/${GEOMETRY_FILE_NAME}")
set(HASH_MD5 "b663329eaa7d93396689506a798a4577")
if (EXISTS "${GEOMETRY_FOlDER_NAME}")
set(GEOMETRY_NEEDS_DOWNLOAD FALSE)
endif ()
if (GEOMETRY_NEEDS_DOWNLOAD)
message(STATUS "phantoms-data: attempting download: ${GEOMETRY_DATASETS_URL} ...")
file(DOWNLOAD "${GEOMETRY_DATASETS_URL}" "${GEOMETRY_LOCAL_FILENAME}"
INACTIVITY_TIMEOUT 500
TIMEOUT 500
STATUS DownloadStatus
)
list(GET DownloadStatus 0 DownloadReturnStatus)
if (DownloadReturnStatus)
message(FATAL_ERROR "phantoms-data: download FAILED: ${DownloadReturnStatus},
This example needs internet for the phantoms data file,
even configuring done and complied.
Please, check your connection.
")
else ()
message(STATUS "phantoms-data: download OK")
endif ()
endif ()
if (EXISTS "${GEOMETRY_FOlDER_NAME}")
set(GEOMETRY_NEEDS_UNPACK_DELETE FALSE)
endif ()
if (GEOMETRY_NEEDS_UNPACK_DELETE)
message(STATUS "Going to unpack: phantoms.tar.gz")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xfz "${GEOMETRY_LOCAL_FILENAME}"
OUTPUT_QUIET
RESULT_VARIABLE __phantoms_untar_result
)
if (__phantoms_untar_result)
message(FATAL_ERROR "phantoms-data: failed to untar file : ${GEOMETRY_LOCAL_FILENAME}")
else ()
message(STATUS "phantoms-data: untarred in '${PROJECT_BINARY_DIR}/phantoms' OK")
endif ()
message(STATUS "Going to delete: ${GEOMETRY_LOCAL_FILENAME}")
execute_process(
COMMAND rm "${GEOMETRY_LOCAL_FILENAME}"
)
endif ()
#----------------------------------------------------------------------------
# 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(cellularPhantom cellularPhantom.cc ${sources} ${headers})
target_link_libraries(cellularPhantom ${Geant4_LIBRARIES})
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
# build cellule. This is so that we can run the executable directly because it
# relies on these scripts being in the current working directory.
#
set(cellule_SCRIPTS
vis.mac run.mac plot.C
)
foreach(_script ${cellule_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 cellularPhantom DESTINATION bin)
@@ -0,0 +1,7 @@
# Example cellularPhantom History
## 2024-10-28 S. Incerti (cellularPhantom-V11-02-01)
- Updated README
## 2024-10-21 S. Incerti, H. Tran, Ph. Barberet (cellularPhantom-V11-02-00)
- Created
@@ -0,0 +1,219 @@
// Created by
// - Ph. Barberet, J. Bordes
// Bordeaux U., France
// E-mail: barberet@lp2ib.in2p3.fr
// - L. Morelli
// Politecnico di Milano, Italy
// Show progress
showProgress(0);
// The phantom file will be saved in the directory chosen by the user
dir = getDirectory("Choose the output directory");
// Get voxel size and image dimensions
getVoxelSize(voxelWidth, voxelHeight, depth, unit);
getDimensions(imgWidth, imgHeight, channels, slices, frames);
// User settings dialog
title = "Phantom settings";
threshold1 = 0;
threshold2 = 0;
threshold3 = 0;
Dialog.createNonBlocking(title);
Dialog.addString("Output file name (.dat):", "phantom");
Dialog.addNumber("Threshold red [0:255]:", 30);
Dialog.addNumber("Threshold green [0:255]:", 30);
Dialog.addNumber("Threshold blue [0:255]:", 30);
numberSlices = 0;
items = newArray("RGB", "RBG", "BRG", "BGR", "GRB", "GBR"); //Definition of color priority order (1st color priority, 2nd color priority, 3rd color priority)
Dialog.addChoice("Priority", items);
Dialog.show();
// Read dialog parameters
filename = Dialog.getString();
threshold1 = Dialog.getNumber();
threshold2 = Dialog.getNumber();
threshold3 = Dialog.getNumber();
priority = Dialog.getChoice();
// Print output directory
print(dir);
// Generate file path
path2file = dir + filename + ".dat";
for (num = 0; File.exists(path2file); num++) {
newfilename = filename + "_" + num;
path2file = dir + newfilename + ".dat";
}
// Open temporary file for writing
tempF = File.open(dir + "_temp.dat");
// Display file parameters
W = getWidth(); // Image width in voxels
H = getHeight(); // Image height in voxels
print("Voxel size : ", voxelWidth, " ", voxelHeight, " ", depth, " ", unit);
print("Number of slices : ", slices);
print("Definition : ", W, "*", H);
print("Thresholds : ", threshold1, threshold2, threshold3);
// Display number of voxels
showStatus("Voxels count");
// Initialize voxel counters
numberVoxels1 = 0;
numberVoxels2 = 0;
numberVoxels3 = 0;
// Initialize a string to store lines of data
linesToWrite = "";
linesArray = newArray("");
// Loop through the image to write voxel coordinates and material in the phantom file
for(k=0; k< nSlices; k++)
{
showProgress(k/(nSlices));
setSlice(k+1);
for(j=0; j<H; j++)
{
for(i=0; i< W; i++)
{
v=getPixel(i,j);
red = (v>>16)&0xff; //Extracting red color data - bits 23-16
green = (v>>8)&0xff; //Extracting green color data - bits 15-8
blue = v&0xff; //Extracting blue color data - bits 7-0
//voxel coordinates (real units)
x=i*voxelWidth;
y=j*voxelWidth;
z=k*depth;
material = 0;
if (priority=="RGB") //Red has priority over blue, which has priority over green, if 2 or 3 of these colors are greater than their threshold.
{
if (red>=threshold1) {
numberVoxels1 +=1;
material = 1;}
else if (green>=threshold2) {
numberVoxels2 +=1;
material = 2;}
else if (blue>=threshold3) {
numberVoxels3 +=1;
material = 3;}
}
else if (priority=="RBG")
{
if (red>=threshold1) {
numberVoxels1 +=1;
material = 1;}
else if (blue>=threshold3) {
numberVoxels3 +=1;
material = 3}
else if (green>=threshold2) {
numberVoxels2 +=1;
material = 2;}
}
else if (priority=="BRG")
{
if (blue>=threshold3) {
numberVoxels3 +=1;
material = 3;}
else if (red>=threshold1) {
numberVoxels1 +=1;
material = 1;}
else if (green>=threshold2) {
numberVoxels2 +=1;
material = 2;}
}
else if (priority=="BGR")
{
if (blue>=threshold3) {
numberVoxels3 +=1;
material = 3;}
else if (green>=threshold2) {
numberVoxels2 +=1;
material = 2;}
else if (red>=threshold1) {
numberVoxels1 +=1;
material = 1;}
}
else if (priority=="GBR")
{
if (green>=threshold2) {
numberVoxels2 +=1;
material = 2;}
else if (blue>=threshold3) {
numberVoxels3 +=1;
material = 3;}
else if (red>=threshold1) {
numberVoxels1 +=1;
material = 1;}
}
else if (priority=="GRB")
{
if (green>=threshold2) {
numberVoxels2 +=1;
material = 2;}
else if (red>=threshold1) {
numberVoxels1 +=1;
material = 1;}
else if (blue>=threshold3) {
numberVoxels3 +=1;
material = 3;}
}
// Append the line to the list of lines to write
if (material != 0){
print(tempF, d2s(x,4) + " \t" + d2s(y,4) + " \t" + d2s(z,4) + " \t" + material + "\n");
}
}
}
}
numberVoxels=numberVoxels1+numberVoxels2+numberVoxels3;
// Close temporary file
File.close(tempF);
// Open main file for writing
F = File.open(path2file);
// Write header in main file
print(F, numberVoxels + "\t" + numberVoxels1 + "\t" + numberVoxels2 + "\t" + numberVoxels3 + "\n");
print(F, imgWidth * voxelWidth + "\t" + imgHeight * voxelWidth + "\t" + slices * depth + "\t" + unit + "\n");
print(F, voxelWidth + "\t" + voxelWidth + "\t" + depth + "\t" + unit + "\n");
// Read data from temporary file and write to main file
data = File.openAsString(dir + "_temp.dat");
print(F, data);
// Close main file
File.close(F);
// Delete temporary file
File.delete(dir + "_temp.dat");
// Show completion messages
showProgress(1)
if (num > 0) {
showMessage("WARNING: '" + filename + ".dat' file already exists.\nNew file: '" + newfilename + ".dat'");
}
showStatus("Completed");
showMessage("Completed");
@@ -0,0 +1,122 @@
================================
Geant4 - cellularPhantom example
================================
README file
----------------------
Authors and contributors:
P. Barberet, S. Incerti, N. H. Tran, L. Morelli
LP2i, IN2P3 / CNRS / Bordeaux University, 33175 Gradignan, France
E-mail: barberet@lp2ib.in2p3.fr or incerti@lp2ib.in2p3.fr
If you use this code, please cite the following publication:
Monte-Carlo dosimetry on a realistic cell monolayer geometry exposed to alpha-particle,
P. Barberet, F. Vianna, M. Karamitros, T. Brun, N. Gordillo, P. Moretto, S. Incerti, H. Seznec,
Phys. Med. Biol. 57 (2012) 2189-2207
https://doi.org/10.1088/0031-9155/57/8/2189
---->0. INTRODUCTION
The cellularPhantom example shows how to simulate the irradiation of a 3D voxel
phantom containing biological cells, created from a confocal microscopy 24-bit RGB image.
The original image was created thanks to:
- H. De Oliveira, T. Désigaux, N. Dusserre, ART BioPrint, France
- F. Paris, C. Niaudet, Inserm, France
These developments were carried out as part of the "Flash'Atlantic" project
(2023-2024) funded by CNRS-MITI, France, and Inserm, France.
Two phantom files phantom.dat (low resolution) and phantomHR.dat (high resolution)
are provided in the phantoms directory.
They were created using the ImageJ phantom.ijm macro located in the ImageJ directory.
See the phantoms/Documentation.pdf file for more information
The low resolution file is used for visualization in the macro vis.mac.
It contains the following lines:
54300 20230 17320 16750
=> total number of voxels, number of red, green and blue voxels
734.0507 734.0507 90.6372 microns
=> whole X, Y and Z size of the phantom, with unit
2.8674 2.8674 2.0142 microns
=> size of a single voxel, with unit
And the list of individual voxels, with the format: X, Y and Z positions, type
(type is 1 for R, 2 for G, 3 for B):
232.2582 31.5412 0.0000 2
235.1256 31.5412 0.0000 2
...
The low resolution and high resolution files can be used by the run.mac macro.
---->1. GEOMETRY SET-UP
The geometry is a 1-mm side cube ("World") made of air, with a thickness of 100 um,
containing a liquid water medium ("Medium") of side 900 um and thickness 95 um,
containing itself the phantom ("Phantom").
The World and Medium dimensions can be changed by UI command.
---->2. SET-UP
Make sure $G4LEDATA points to the low energy electromagnetic data files.
---->3. HOW TO RUN THE EXAMPLE
In interactive mode, run:
./cellularPhantom
this will show the phantom in 3D (requires memory).
In batch, the macro run.mac can be used:
./cellularPhantom run.mac
In this macro, the user can select:
- the number of threads (MT mode)
- the phantom file name
- the World and Medium dimensions
- the Medium material
- the phantom voxel density
- the position (shift in X or Y or Z) of the phantom in the Medium
- the production cuts outside and inside in the phantom
- the incident particles (using GPS)
---->4. PHYSICS
The PhysicsList class uses Geant4 option4 electromagnetic physics.
It also contains other physics lists including Geant4-DNA option2,
which is commented by default.
---->5. SIMULATION OUTPUT AND RESULT ANALYSIS
The output results consists in a phantom.root file, containing three ntuples,
corresponding to the 3 types of voxels (red, green and blue) of the original image.
The ROOT macro plot.C can be run to extract and display:
- the cellular phantom
- the absorbed energy distribution in the 3 types of voxels
- the absorbed energy 2D map for the 3 types of voxels
- the absorbed dose 2D map for the 3 types of voxels
Simply do, after the simulation:
root plot.C
In addition, the following quantities are displayed:
- total number of voxels in phantom
- total number of RED voxels in phantom
- total number of GREEN voxels in phantom
- total number of BLUE voxels in phantom
- total absorbed energy in RED voxels (MeV)
- total absorbed energy in GREEN voxels (MeV)
- total absorbed energy in BLUE voxels (MeV)
- total absorbed dose in RED voxels (Gy)
- total absorbed dose in GREEN voxels (Gy)
- total absorbed dose in BLUE voxels (Gy)
Results are stored in the results.root file.
@@ -0,0 +1,98 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#include "G4RunManagerFactory.hh"
#include "G4UIExecutive.hh"
#include "G4VisExecutive.hh"
#include "G4UImanager.hh"
#include "ActionInitialization.hh"
#include "DetectorConstruction.hh"
#include "PhysicsList.hh"
int main(int argc,char** argv) {
// Detect interactive mode (if no arguments) and define UI session
G4UIExecutive* ui = nullptr;
if ( argc == 1 ) { ui = new G4UIExecutive(argc, argv); }
// (Optionally) Choose the Random engine
//G4Random::setTheEngine(new CLHEP::RanecuEngine);
//G4Random::setTheSeed(1408);
// Construct the default run manager
auto* runManager = G4RunManagerFactory::CreateRunManager();
// Set mandatory user initialization classes
DetectorConstruction* detector = new DetectorConstruction;
runManager->SetUserInitialization(detector);
runManager->SetUserInitialization(new PhysicsList);
// User action initialization
runManager->SetUserInitialization(new ActionInitialization());
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
// Get the pointer to the User Interface manager
G4UImanager* UImanager = G4UImanager::GetUIpointer();
// 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 vis.mac");
ui->SessionStart();
delete ui;
}
// Job termination
delete visManager;
delete runManager;
return 0;
}
@@ -0,0 +1,754 @@
Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Forcing G4RunManager type...
############################################
!!! WARNING - FPE detection is activated !!!
############################################
################################
!!! G4Backtrace is activated !!!
################################
**************************************************************
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
: NIM A 835 (2016), 186-225
WWW : http://geant4.org/
**************************************************************
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Registered graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
OpenGLImmediateXm (OGLIXm, OGLIQt_FALLBACK)
OpenGLStoredXm (OGLSXm, OGLSQt_FALLBACK)
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK, OGLIXm_FALLBACK)
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
RayTracerX (RayTracerX)
Qt3D (Qt3D)
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
TOOLSSG_X11_ZB (TSG_X11_ZB, TSGX11ZB)
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)
You may choose a graphics system (driver) with a parameter of
the command "/vis/open" or "/vis/sceneHandler/create",
or you may omit the driver parameter and choose at run time:
- by argument in the construction of G4VisExecutive
- by environment variable "G4VIS_DEFAULT_DRIVER"
- by entry in "~/.g4session"
- by build flags.
- Note: This feature is not allowed in batch mode.
For further information see "examples/basic/B1/exampleB1.cc"
and "vis.mac".
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByAttribute
drawByCharge
drawByOriginVolume
drawByParticleID
drawByEncounteredVolume
Registered models:
None
Registered filter factories:
attributeFilter
chargeFilter
originVolumeFilter
particleFilter
encounteredVolumeFilter
Registered filters:
None
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
"/vis/list" to see available colours.
*** /run/numberOfThreads command is issued in sequential mode.
Command is ignored.
#########################################################################
Loading cell phantom from file: phantoms/phantom.dat
#########################################################################
#########################################################################
Phantom placement and density
#########################################################################
==========> Phantom origin - X (um) = -367.025
==========> Phantom origin - Y (um) = -367.025
==========> Phantom origin - Z (um) = -45.3186
==========> Red density (g/cm3) = 1
==========> Green density (g/cm3) = 1
==========> Blue density (g/cm3) = 1
#########################################################################
#########################################################################
Phantom information
#########################################################################
==========> The phantom contains 54300 voxels
==========> Voxel size X (um) = 2.8674
==========> Voxel size Y (um) = 2.8674
==========> Voxel size Z (um) = 2.0142
==========> Number of red voxels = 20230
==========> Number of green voxels = 17320
==========> Number of blue voxels = 16750
==========> Tolal mass of red voxels (kg) = 3.35023e-10
==========> Tolal mass of green voxels (kg) = 2.86832e-10
==========> Tolal mass of blue voxels (kg) = 2.77392e-10
#########################################################################
========= Table of registered couples ============================
==================================================================
=======================================================================
====== Electromagnetic Physics Parameters ========
=======================================================================
LPM effect enabled 1
Enable creation and use of sampling tables 0
Apply cuts on all EM processes 0
Use combined TransportationWithMsc Disabled
Use general process 1
Enable linear polarisation for gamma 0
Enable photoeffect sampling below K-shell 1
Enable sampling of quantum entanglement 0
X-section factor for integral approach 0.8
Min kinetic energy for tables 100 eV
Max kinetic energy for tables 100 TeV
Number of bins per decade of a table 20
Verbose level 1
Verbose level for worker thread 0
Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100 TeV
Positron annihilation at rest model AllisonPositronium
Enable 3 gamma annihilation on fly 1
Lowest triplet kinetic energy 1 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
=======================================================================
Step function for e+- (0.2, 0.01 mm)
Step function for muons/hadrons (0.1, 0.05 mm)
Step function for light ions (0.1, 0.02 mm)
Step function for general ions (0.1, 0.001 mm)
Lowest e+e- kinetic energy 100 eV
Lowest muon/hadron kinetic energy 1 keV
Use ICRU90 data 1
Fluctuations of dE/dx are enabled 1
Type of fluctuation model for leptons and hadrons Urban
Use built-in Birks satuaration 0
Build CSDA range enabled 0
Use cut as a final range enabled 0
Enable angular generator interface 1
Max kinetic energy for CSDA tables 1 GeV
Max kinetic energy for NIEL computation 1 MeV
Linear loss limit 0.01
Read data from file for e+e- pair production by mu 0
=======================================================================
====== Multiple Scattering Parameters ========
=======================================================================
Type of msc step limit algorithm for e+- 2
Type of msc step limit algorithm for muons/hadrons 0
Msc lateral displacement for e+- enabled 1
Msc lateral displacement for muons and hadrons 1
Urban msc model lateral displacement alg96 1
Range factor for msc step limit for e+- 0.08
Range factor for msc step limit for muons/hadrons 0.2
Geometry factor for msc step limitation of e+- 2.5
Safety factor for msc step limit for e+- 0.6
Skin parameter for msc step limitation of e+- 3
Lambda limit for msc step limit for e+- 1 mm
Use Mott correction for e- scattering 1
Factor used for dynamic computation of angular
limit between single and multiple scattering 1
Fixed angular limit between single
and multiple scattering 3.1416 rad
Upper energy limit for e+- multiple scattering 100 MeV
Type of electron single scattering model 0
Type of nuclear form-factor 1
Screening factor 1
=======================================================================
====== Atomic Deexcitation Parameters ========
=======================================================================
Fluorescence enabled 1
Directory in G4LEDATA for fluorescence data files fluor
Auger electron cascade enabled 0
PIXE atomic de-excitation enabled 0
De-excitation module ignores cuts 0
Type of PIXE cross section for hadrons Empirical
Type of PIXE cross section for e+- Livermore
=======================================================================
### === Deexcitation model UAtomDeexcitation is activated for 2 regions:
DefaultRegionForTheWorld 1 0 0
phantomRegion 1 0 0
### === Ignore cuts flag: 0
phot: for gamma SubType=12 BuildTable=0
LambdaPrime table from 200 keV to 100 TeV in 174 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermorePhElectric : Emin= 0 eV Emax= 100 TeV SauterGavrila Fluo
compt: for gamma SubType=13 BuildTable=1
Lambda table from 100 eV to 1 MeV, 20 bins/decade, spline: 1
LambdaPrime table from 1 MeV to 100 TeV in 160 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LowEPComptonModel : Emin= 0 eV Emax= 20 MeV Fluo
KleinNishina : Emin= 20 MeV Emax= 100 TeV Fluo
conv: for gamma SubType=14 BuildTable=1
Lambda table from 1.022 MeV to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
BetheHeitler5D : Emin= 0 eV Emax= 100 TeV ModifiedTsai
Rayl: for gamma SubType=11 BuildTable=1
Lambda table from 100 eV to 150 keV, 20 bins/decade, spline: 0
LambdaPrime table from 150 keV to 100 TeV in 176 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermoreRayleigh : Emin= 0 eV Emax= 100 TeV CullenGenerator
msc: for e- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
GoudsmitSaunderson : Emin= 0 eV Emax= 100 MeV Nbins=120 100 eV - 100 MeV
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Nbins=120 100 MeV - 100 TeV
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
eIoni: for e- XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.2, 0.01 mm), integ: 3, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
PenIoni : Emin= 0 eV Emax= 100 keV
MollerBhabha : Emin= 100 keV Emax= 100 TeV deltaVI
eBrem: for e- XStype:4 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV AngularGen2BS
eBremLPM : Emin= 1 GeV Emax= 100 TeV AngularGen2BS
ePairProd: for e- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 0
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
ePairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
msc: for e+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
GoudsmitSaunderson : Emin= 0 eV Emax= 100 MeV Nbins=120 100 eV - 100 MeV
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Nbins=120 100 MeV - 100 TeV
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
eIoni: for e+ XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.2, 0.01 mm), integ: 3, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
PenIoni : Emin= 0 eV Emax= 100 keV
MollerBhabha : Emin= 100 keV Emax= 100 TeV deltaVI
eBrem: for e+ XStype:4 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV AngularGen2BS
eBremLPM : Emin= 1 GeV Emax= 100 TeV AngularGen2BS
ePairProd: for e+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 0
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
ePairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
annihil: for e+ XStype:2 SubType=5 AtRestModel:Allison BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplusTo2or3gamma : Emin= 0 eV Emax= 100 TeV
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
msc: for proton SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for proton XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 3, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 2 MeV deltaVI
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
hBrems: for proton XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd: for proton XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
nuclearStopping: for proton SubType=8 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for GenericIon SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
ionIoni: for GenericIon XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.001 mm), integ: 3, fluct: 1, linLossLim= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
LindhardSorensen : Emin= 0 eV Emax= 100 TeV deltaVI
nuclearStopping: for GenericIon SubType=8 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for alpha SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
ionIoni: for alpha XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.02 mm), integ: 3, fluct: 1, linLossLim= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax=7.9452 MeV deltaVI
BetheBloch : Emin=7.9452 MeV Emax= 100 TeV deltaVI
nuclearStopping: for alpha SubType=8 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for anti_proton SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for anti_proton XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 3, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 2 MeV deltaVI
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
hBrems: for anti_proton XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd: for anti_proton XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for kaon+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for kaon+ XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 3, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax=1.05231 MeV deltaVI
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
hBrems: for kaon+ XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd: for kaon+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for kaon- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for kaon- XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 3, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax=1.05231 MeV deltaVI
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
hBrems: for kaon- XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd: for kaon- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
CoulombScat: for kaon- XStype:1 SubType=1 BuildTable=1
Used Lambda table of kaon+
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for mu+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
muIoni: for mu+ XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 3, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 200 keV deltaVI
MuBetheBloch : Emin= 200 keV Emax= 100 TeV deltaVI
muBrems: for mu+ XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
muPairProd: for mu+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 21x1001 from 0.85 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for mu- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
muIoni: for mu- XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 3, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 200 keV deltaVI
MuBetheBloch : Emin= 200 keV Emax= 100 TeV deltaVI
muBrems: for mu- XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
muPairProd: for mu- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 21x1001 from 0.85 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
CoulombScat: for mu- XStype:1 SubType=1 BuildTable=1
Used Lambda table of mu+
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for pi+ SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for pi+ XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 3, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax=297.505 keV deltaVI
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
hBrems: for pi+ XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd: for pi+ XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
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
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for pi- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
hIoni: for pi- XStype:3 SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
StepFunction=(0.1, 0.05 mm), integ: 3, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax=297.505 keV deltaVI
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
hBrems: for pi- XStype:1 SubType=3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV ModifiedMephi
hPairProd: for pi- XStype:1 SubType=4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
Used Lambda table of pi+
ThetaMin(p) < Theta(degree) < 180, pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
========= Table of registered couples ============================
Index : 0 used in the geometry : Yes
Material : G4_AIR
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes
Material : G4_WATER
Range cuts : gamma 1 nm e- 1 nm e+ 1 nm proton 1 nm
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 meV
Region(s) which use this couple :
phantomRegion
==================================================================
### Run 0 starts.
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4RootNtupleFileManager::SetNtupleMergingMode
Merging ntuples is not applicable in sequential application.
Setting was ignored.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
--> Event 0 starts.
--> Event 100 starts.
--> Event 200 starts.
--> Event 300 starts.
--> Event 400 starts.
--> Event 500 starts.
--> Event 600 starts.
--> Event 700 starts.
--> Event 800 starts.
--> Event 900 starts.
--> Event 1000 starts.
--> Event 1100 starts.
--> Event 1200 starts.
--> Event 1300 starts.
--> Event 1400 starts.
--> Event 1500 starts.
--> Event 1600 starts.
--> Event 1700 starts.
--> Event 1800 starts.
--> Event 1900 starts.
--> Event 2000 starts.
--> Event 2100 starts.
--> Event 2200 starts.
--> Event 2300 starts.
--> Event 2400 starts.
--> Event 2500 starts.
--> Event 2600 starts.
--> Event 2700 starts.
--> Event 2800 starts.
--> Event 2900 starts.
--> Event 3000 starts.
--> Event 3100 starts.
--> Event 3200 starts.
--> Event 3300 starts.
--> Event 3400 starts.
--> Event 3500 starts.
--> Event 3600 starts.
--> Event 3700 starts.
--> Event 3800 starts.
--> Event 3900 starts.
--> Event 4000 starts.
--> Event 4100 starts.
--> Event 4200 starts.
--> Event 4300 starts.
--> Event 4400 starts.
--> Event 4500 starts.
--> Event 4600 starts.
--> Event 4700 starts.
--> Event 4800 starts.
--> Event 4900 starts.
--> Event 5000 starts.
--> Event 5100 starts.
--> Event 5200 starts.
--> Event 5300 starts.
--> Event 5400 starts.
--> Event 5500 starts.
--> Event 5600 starts.
--> Event 5700 starts.
--> Event 5800 starts.
--> Event 5900 starts.
--> Event 6000 starts.
--> Event 6100 starts.
--> Event 6200 starts.
--> Event 6300 starts.
--> Event 6400 starts.
--> Event 6500 starts.
--> Event 6600 starts.
--> Event 6700 starts.
--> Event 6800 starts.
--> Event 6900 starts.
--> Event 7000 starts.
--> Event 7100 starts.
--> Event 7200 starts.
--> Event 7300 starts.
--> Event 7400 starts.
--> Event 7500 starts.
--> Event 7600 starts.
--> Event 7700 starts.
--> Event 7800 starts.
--> Event 7900 starts.
--> Event 8000 starts.
--> Event 8100 starts.
--> Event 8200 starts.
--> Event 8300 starts.
--> Event 8400 starts.
--> Event 8500 starts.
--> Event 8600 starts.
--> Event 8700 starts.
--> Event 8800 starts.
--> Event 8900 starts.
--> Event 9000 starts.
--> Event 9100 starts.
--> Event 9200 starts.
--> Event 9300 starts.
--> Event 9400 starts.
--> Event 9500 starts.
--> Event 9600 starts.
--> Event 9700 starts.
--> Event 9800 starts.
--> Event 9900 starts.
Run terminated.
Run Summary
Number of events processed : 10000
User=29.190000s Real=30.611031s Sys=0.000000s
Graphics systems deleted.
Visualization Manager deleting...
================== Deleting memory pools ===================
Number of memory pools allocated: 9 of which, static: 0
Dynamic pools deleted: 9 / Total memory freed: 0.19 MB
============================================================
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#ifndef ActionInitialization_h
#define ActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class DetectorConstruction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class ActionInitialization : public G4VUserActionInitialization
{
public:
ActionInitialization();
~ActionInitialization() override = default;
void BuildForMaster() const override;
void Build() const override;
};
#endif
@@ -0,0 +1,145 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#ifndef CellParameterisation_H
#define CellParameterisation_H 1
#include "G4VPVParameterisation.hh"
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
#include "G4VisAttributes.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class CellParameterisation : public G4VPVParameterisation
{
public:
explicit CellParameterisation
(G4String fileName,
G4Material *RedMat, G4Material *GreenMat, G4Material *BlueMat,
G4double shiftX, G4double shiftY, G4double shiftZ);
~CellParameterisation() override;
void ComputeTransformation
(const G4int copyNo, G4VPhysicalVolume *physVol) const override;
G4Material *ComputeMaterial (const G4int copyNo,
G4VPhysicalVolume *physVol,
const G4VTouchable *) override;
inline auto GetPhantomTotalPixels() const { return fPhantomTotalPixels; }
inline auto GetRedTotalPixels() const { return fRedTotalPixels; }
inline auto GetGreenTotalPixels() const { return fGreenTotalPixels; }
inline auto GetBlueTotalPixels() const { return fBlueTotalPixels; }
inline auto GetPixelSizeX() const { return fDimCellBoxX; }
inline auto GetPixelSizeY() const { return fDimCellBoxY; }
inline auto GetPixelSizeZ() const { return fDimCellBoxZ; }
inline auto GetRedMass() const { return fRedMass; }
inline auto GetGreenMass() const { return fGreenMass; }
inline auto GetBlueMass() const { return fBlueMass; }
inline auto GetVoxelThreeVector(G4int i) const { return fMapCell[i]; }
inline auto GetVoxelThreeVectorPixel(G4int i) const { return fMapCellPxl[i]; }
inline auto GetVoxelThreeVectorOriginal(G4int i) const { return fMapCellOriginal[i]; }
inline auto GetMaterial(G4int i) const { return fMaterial[i]; }
// Singleton
static CellParameterisation *Instance()
{
return gInstance;
}
private:
void Initialize(const G4String&);
static CellParameterisation *gInstance;
G4double fDimCellBoxX = 0;
G4double fDimCellBoxY = 0;
G4double fDimCellBoxZ = 0;
G4double fSizeRealX = 0;
G4double fSizeRealY = 0;
G4double fSizeRealZ = 0;
G4Material *fRedMaterial = nullptr;
G4Material *fGreenMaterial = nullptr;
G4Material *fBlueMaterial = nullptr;
G4double fShiftX = 0.;
G4double fShiftY = 0.;
G4double fShiftZ = 0.;
G4VisAttributes *fRedAttributes = nullptr;
G4VisAttributes *fGreenAttributes = nullptr;
G4VisAttributes *fBlueAttributes = nullptr;
G4ThreeVector *fMapCell = nullptr; // VOXEL COORDINATES
G4ThreeVector *fMapCellPxl = nullptr;// VOXEL COORDINATES IN PIXEL, NO SHIFT
G4ThreeVector *fMapCellOriginal = nullptr; // VOXEL COORDINATES (original space)
G4int *fMaterial = nullptr; // MATERIAL
G4int fPhantomTotalPixels = 0;
G4int fRedTotalPixels = 0;
G4int fGreenTotalPixels = 0;
G4int fBlueTotalPixels = 0;
G4double fRedMass = 0.;
G4double fGreenMass = 0.;
G4double fBlueMass = 0.;
char fRealUnit;
G4double fOffsetX = 0.;
G4double fOffsetY = 0.;
G4double fOffsetZ = 0.;
};
#endif
@@ -0,0 +1,133 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
#include "CellParameterisation.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4Box.hh"
#include "G4Region.hh"
#include "G4PVPlacement.hh"
#include "G4PVParameterised.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class DetectorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class DetectorConstruction : public G4VUserDetectorConstruction {
public:
DetectorConstruction();
~DetectorConstruction() override = default;
G4VPhysicalVolume *Construct() override;
inline auto *GetLogicalMedium() const { return fLogicMedium; };
void SetTargetMaterial(const G4String&);
void SetRedDensity(const G4double&);
void SetGreenDensity(const G4double&);
void SetBlueDensity(const G4double&);
void SetShiftX(const G4double&);
void SetShiftY(const G4double&);
void SetShiftZ(const G4double&);
void SetMediumSizeXY(const G4double&);
void SetMediumSizeZ(const G4double&);
void SetWorldSizeXY(const G4double&);
void SetWorldSizeZ(const G4double&);
void SetPhantomFileName(const G4String&);
private:
void DefineMaterials();
G4VPhysicalVolume *ConstructLine();
G4double fDensityRed = 1.0;
G4double fDensityGreen = 1.0;
G4double fDensityBlue = 1.0;
G4double fShiftX = 0.*um;
G4double fShiftY = 0.*um;
G4double fShiftZ = 0.*um;
G4double fWorldSizeXY = 0.;
G4double fWorldSizeZ = 0.;
G4double fMediumSizeXY = 0.;
G4double fMediumSizeZ = 0.;
G4Material *fDefaultMaterial = nullptr;
G4Material *fMediumMaterial = nullptr;
G4Material *fRedMaterial = nullptr;
G4Material *fGreenMaterial = nullptr;
G4Material *fBlueMaterial = nullptr;
G4Material *fPhantomMaterial = nullptr;
G4VPhysicalVolume *fPhysiWorld = nullptr;
G4LogicalVolume *fLogicWorld = nullptr;
G4Box *fSolidWorld = nullptr;
G4VPhysicalVolume *fPhysiMedium = nullptr;
G4LogicalVolume *fLogicMedium = nullptr;
G4Box *fSolidMedium = nullptr;
G4VPhysicalVolume *fPhysiPhantom = nullptr;
G4LogicalVolume *fLogicPhantom = nullptr;
G4Box *fSolidPhantom = nullptr;
CellParameterisation *fPhantomParam = nullptr;
DetectorMessenger* fDetectorMessenger = nullptr;
G4String fPhantomFileName = "";
G4Region* fPhantomRegion = nullptr;
};
#endif
@@ -0,0 +1,89 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#ifndef DetectorMessenger_h
#define DetectorMessenger_h 1
#include "G4UImessenger.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class DetectorConstruction;
class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class DetectorMessenger: public G4UImessenger
{
public:
explicit DetectorMessenger(DetectorConstruction*);
~DetectorMessenger() override;
void SetNewValue(G4UIcommand*, G4String) override;
private:
DetectorConstruction* fDetector = nullptr;
G4UIdirectory* fPhantomDir = nullptr;
G4UIdirectory* fWorldDir = nullptr;
G4UIcmdWithAString* fNameCmd = nullptr;
G4UIcmdWithAString* fMatCmd = nullptr;
G4UIcmdWithADoubleAndUnit* fDenRedCmd = nullptr;
G4UIcmdWithADoubleAndUnit* fDenGreenCmd = nullptr;
G4UIcmdWithADoubleAndUnit* fDenBlueCmd = nullptr;
G4UIcmdWithADoubleAndUnit* fShiftXCmd = nullptr;
G4UIcmdWithADoubleAndUnit* fShiftYCmd = nullptr;
G4UIcmdWithADoubleAndUnit* fShiftZCmd = nullptr;
G4UIcmdWithADoubleAndUnit* fMediumSizeXYCmd = nullptr;
G4UIcmdWithADoubleAndUnit* fMediumSizeZCmd = nullptr;
G4UIcmdWithADoubleAndUnit* fWorldSizeXYCmd = nullptr;
G4UIcmdWithADoubleAndUnit* fWorldSizeZCmd = nullptr;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#ifndef EventAction_h
#define EventAction_h 1
#include "G4UserEventAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class RunAction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class EventAction : public G4UserEventAction
{
public:
explicit EventAction();
~EventAction() override;
void BeginOfEventAction(const G4Event*) override;
void EndOfEventAction(const G4Event*) override;
};
#endif
@@ -0,0 +1,61 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#ifndef PhysicsList_h
#define PhysicsList_h 1
#include "G4VModularPhysicsList.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PhysicsList: public G4VModularPhysicsList
{
public:
explicit PhysicsList();
~PhysicsList() override;
void SetCuts() override;
private:
};
#endif
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
#include "CellParameterisation.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class G4GeneralParticleSource;
//....oooOO0OOooo........oooOO0OOooo.......eant4 units.oooOO0OOooo........oooOO0OOooo....
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
explicit PrimaryGeneratorAction();
~PrimaryGeneratorAction() override;
void GeneratePrimaries(G4Event*) override;
private:
G4GeneralParticleSource* fGPS = nullptr;
};
#endif
@@ -0,0 +1,72 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#ifndef RunAction_h
#define RunAction_h 1
#include "DetectorConstruction.hh"
#include "G4UserRunAction.hh"
#include "G4AnalysisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class RunAction : public G4UserRunAction
{
public:
explicit RunAction();
~RunAction() override;
void BeginOfRunAction(const G4Run*) override;
void EndOfRunAction(const G4Run*) override;
void AddDoseBox(G4int i, G4double x) {fVoxelEnergy[i] +=x;}
G4double GetDoseBox(G4int i) {return fVoxelEnergy[i];}
private:
const CellParameterisation * fMyPhantomParam = nullptr;
G4double * fVoxelEnergy = nullptr;
G4int fNbVoxels = 0;
};
#endif
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#ifndef SteppingAction_h
#define SteppingAction_h 1
#include "RunAction.hh"
#include "G4UserSteppingAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class SteppingAction : public G4UserSteppingAction
{
public:
explicit SteppingAction(RunAction*);
~SteppingAction() override = default;
void UserSteppingAction(const G4Step*) override;
private:
RunAction* fRunAction = nullptr;
const CellParameterisation * fMyPhantomParam = nullptr;
};
#endif
@@ -0,0 +1,514 @@
// -------------------------------------------------------------------
// -------------------------------------------------------------------
//
// *********************************************************************
// To execute this macro under ROOT,
// 1 - launch ROOT (usually type 'root' at your machine's prompt)
// 2 - type '.X plot.C' at the ROOT session prompt
// Written by S. Incerti, 10/09/2024
// *********************************************************************
{
gROOT->Reset();
gROOT->SetStyle("Plain");
gStyle->SetOptStat(0000);
gStyle->SetPalette(1);
auto c1 = new TCanvas ("c1","",20,20,1200,900);
c1->Divide(4,3);
//------------------------------
// Original phantom file view
//------------------------------
FILE * fp = fopen("phantoms/phantom.dat","r");
Double_t X, Y, Z, mat, tmp;
char unit[100];
Double_t voxelSizeX, voxelSizeY, voxelSizeZ;
Long_t numberVoxTot, numberVoxRed, numberVoxGreen, numberVoxBlue;
TNtuple *ntuplePhantom = new TNtuple("PHANTOM","ntuple","X:Y:Z:mat");
Long_t nlines=0;
Long_t ncols=0;
while (1)
{
if ( nlines == 0 ) ncols = fscanf(fp,"%ld %ld %ld %ld",&numberVoxTot,&numberVoxRed,&numberVoxGreen,&numberVoxBlue);
if ( nlines == 1 ) ncols = fscanf(fp,"%lf %lf %lf %s",&tmp,&tmp,&tmp,unit);
if ( nlines == 2 ) ncols = fscanf(fp,"%lf %lf %lf %s",&voxelSizeX,&voxelSizeY,&voxelSizeZ, unit);
if ( nlines >= 3 ) ncols = fscanf(fp,"%lf %lf %lf %lf", &X, &Y, &Z, &mat);
//cout << X << " " << Y << " " << Z << " " << mat << endl;
if (ncols < 0) break;
ntuplePhantom->Fill(X,Y,Z,mat);
nlines++;
}
fclose(fp);
c1->cd(1);
ntuplePhantom->SetMarkerColor(1);
ntuplePhantom->Draw("Y:X");
// RED
ntuplePhantom->SetMarkerColor(2);
ntuplePhantom->Draw("Y:X","mat==1","same");
// GREEN
ntuplePhantom->SetMarkerColor(3);
ntuplePhantom->Draw("Y:X","mat==2","same");
// BLUE
ntuplePhantom->SetMarkerColor(4);
ntuplePhantom->Draw("Y:X","mat==3","same");
//
TH2F *htemp = (TH2F*)gPad->GetPrimitive("htemp");
htemp->GetXaxis()->SetTitle("X (microns)");
htemp->GetYaxis()->SetTitle("Y (mirons)");
htemp->GetXaxis()->SetLabelSize(0.025);
htemp->GetYaxis()->SetLabelSize(0.025);
htemp->GetXaxis()->SetTitleSize(0.035);
htemp->GetYaxis()->SetTitleSize(0.035);
htemp->GetXaxis()->SetTitleOffset(1.4);
htemp->GetYaxis()->SetTitleOffset(1.4);
htemp->SetTitle("RGB phantom YX view");
c1->cd(5);
ntuplePhantom->SetMarkerColor(1);
ntuplePhantom->Draw("Y:Z");
// RED
ntuplePhantom->SetMarkerColor(2);
ntuplePhantom->Draw("Y:Z","mat==1","same");
// GREEN
ntuplePhantom->SetMarkerColor(3);
ntuplePhantom->Draw("Y:Z","mat==2","same");
// BLUE
ntuplePhantom->SetMarkerColor(4);
ntuplePhantom->Draw("Y:Z","mat==3","same");
//
TH2F *htempBis = (TH2F*)gPad->GetPrimitive("htemp");
htempBis->GetXaxis()->SetTitle("Z (microns)");
htempBis->GetYaxis()->SetTitle("Y (mirons)");
htempBis->GetXaxis()->SetLabelSize(0.025);
htempBis->GetYaxis()->SetLabelSize(0.025);
htempBis->GetXaxis()->SetTitleSize(0.035);
htempBis->GetYaxis()->SetTitleSize(0.035);
htempBis->GetXaxis()->SetTitleOffset(1.4);
htempBis->GetYaxis()->SetTitleOffset(1.4);
htempBis->SetTitle("RGB phantom YZ view");
c1->cd(9);
ntuplePhantom->SetMarkerColor(1);
ntuplePhantom->Draw("X:Z");
// RED
ntuplePhantom->SetMarkerColor(2);
ntuplePhantom->Draw("X:Z","mat==1","same");
// GREEN
ntuplePhantom->SetMarkerColor(3);
ntuplePhantom->Draw("X:Z","mat==2","same");
// BLUE
ntuplePhantom->SetMarkerColor(4);
ntuplePhantom->Draw("X:Z","mat==3","same");
//
TH2F *htempTer = (TH2F*)gPad->GetPrimitive("htemp");
htempTer->GetXaxis()->SetTitle("Z (microns)");
htempTer->GetYaxis()->SetTitle("X (mirons)");
htempTer->GetXaxis()->SetLabelSize(0.025);
htempTer->GetYaxis()->SetLabelSize(0.025);
htempTer->GetXaxis()->SetTitleSize(0.035);
htempTer->GetYaxis()->SetTitleSize(0.035);
htempTer->GetXaxis()->SetTitleOffset(1.4);
htempTer->GetYaxis()->SetTitleOffset(1.4);
htempTer->SetTitle("RGB phantom XZ view");
//------------------
// Read ROOT file
//------------------
// IF no merging active in simulation
//system ("rm -rf phantom.root");
//system ("hadd -O phantom.root phantom_t*.root");
TFile *f = new TFile ("phantom.root");
TNtuple* ntuple1;
TNtuple* ntuple2;
TNtuple* ntuple3;
ntuple1 = (TNtuple*)f->Get("ntuple1");
ntuple2 = (TNtuple*)f->Get("ntuple2");
ntuple3 = (TNtuple*)f->Get("ntuple3");
//----------------------
// Sum of ntuples
//----------------------
Double_t * tabVoxelXRed = new Double_t [numberVoxTot];
Double_t * tabVoxelXGreen = new Double_t [numberVoxTot];
Double_t * tabVoxelXBlue = new Double_t [numberVoxTot];
Double_t * tabVoxelYRed = new Double_t [numberVoxTot];
Double_t * tabVoxelYGreen = new Double_t [numberVoxTot];
Double_t * tabVoxelYBlue = new Double_t [numberVoxTot];
Double_t * tabVoxelZRed = new Double_t [numberVoxTot];
Double_t * tabVoxelZGreen = new Double_t [numberVoxTot];
Double_t * tabVoxelZBlue = new Double_t [numberVoxTot];
Double_t * tabVoxelEnergyRed = new Double_t [numberVoxTot];
Double_t * tabVoxelEnergyGreen = new Double_t [numberVoxTot];
Double_t * tabVoxelEnergyBlue = new Double_t [numberVoxTot];
Double_t * tabVoxelDoseRed = new Double_t [numberVoxTot];
Double_t * tabVoxelDoseGreen = new Double_t [numberVoxTot];
Double_t * tabVoxelDoseBlue = new Double_t [numberVoxTot];
// Initialisation of the arrays
for (Int_t i = 0; i < numberVoxRed; i++)
{
tabVoxelXRed[i] = 0;
tabVoxelYRed[i] = 0;
tabVoxelZRed[i] = 0;
tabVoxelEnergyRed[i] = 0;
tabVoxelDoseRed[i] = 0;
}
for (Int_t i = 0; i < numberVoxGreen; i++)
{
tabVoxelXGreen[i] = 0;
tabVoxelYGreen[i] = 0;
tabVoxelZGreen[i] = 0;
tabVoxelEnergyGreen[i] = 0;
tabVoxelDoseGreen[i] = 0;
}
for (Int_t i = 0; i < numberVoxBlue; i++)
{
tabVoxelXBlue[i] = 0;
tabVoxelYBlue[i] = 0;
tabVoxelZBlue[i] = 0;
tabVoxelEnergyBlue[i] = 0;
tabVoxelDoseBlue[i] = 0;
}
Double_t x, y, z, energy, dose;
Int_t voxelID;
Double_t nrjRed=0.;
Double_t nrjGreen=0.;
Double_t nrjBlue=0.;
Double_t doseRed=0.;
Double_t doseGreen=0.;
Double_t doseBlue=0.;
//
ntuple1->SetBranchAddress("x",&x);
ntuple1->SetBranchAddress("y",&y);
ntuple1->SetBranchAddress("z",&z);
ntuple1->SetBranchAddress("energy",&energy);
ntuple1->SetBranchAddress("dose",&dose);
ntuple1->SetBranchAddress("voxelID",&voxelID);
// RED
Long_t nentriesRed = (Long_t)ntuple1->GetEntries();
for (Long_t i=0;i<nentriesRed;i++)
{
x=0;
y=0;
z=0;
energy=0;
dose=0;
voxelID=0;
ntuple1->GetEntry(i);
if (energy > 0)
{
nrjRed=nrjRed+energy;
doseRed=doseRed+dose;
tabVoxelXRed[voxelID] = x;
tabVoxelYRed[voxelID] = y;
tabVoxelZRed[voxelID] = z;
tabVoxelEnergyRed[voxelID] = tabVoxelEnergyRed[voxelID] + energy;
tabVoxelDoseRed[voxelID] = tabVoxelDoseRed[voxelID] + dose;
}
}
ntuple2->SetBranchAddress("x",&x);
ntuple2->SetBranchAddress("y",&y);
ntuple2->SetBranchAddress("z",&z);
ntuple2->SetBranchAddress("energy",&energy);
ntuple2->SetBranchAddress("dose",&dose);
ntuple2->SetBranchAddress("voxelID",&voxelID);
// GREEN
Long_t nentriesGreen = (Long_t)ntuple2->GetEntries();
for (Long_t i=0;i<nentriesGreen;i++)
{
x=0;
y=0;
z=0;
energy=0;
dose=0;
voxelID=0;
ntuple2->GetEntry(i);
if (energy > 0)
{
nrjGreen=nrjGreen+energy;
doseGreen=doseGreen+dose;
tabVoxelXGreen[voxelID] = x;
tabVoxelYGreen[voxelID] = y;
tabVoxelZGreen[voxelID] = z;
tabVoxelEnergyGreen[voxelID] = tabVoxelEnergyGreen[voxelID] + energy;
tabVoxelDoseGreen[voxelID] = tabVoxelDoseGreen[voxelID] + dose;
}
}
// BLUE
ntuple3->SetBranchAddress("x",&x);
ntuple3->SetBranchAddress("y",&y);
ntuple3->SetBranchAddress("z",&z);
ntuple3->SetBranchAddress("energy",&energy);
ntuple3->SetBranchAddress("dose",&dose);
ntuple3->SetBranchAddress("voxelID",&voxelID);
Long_t nentriesBlue = (Long_t)ntuple3->GetEntries();
for (Long_t i=0;i<nentriesBlue;i++)
{
x=0;
y=0;
z=0;
energy=0;
dose=0;
voxelID=0;
ntuple3->GetEntry(i);
if (energy > 0)
{
nrjBlue=nrjBlue+energy;
doseBlue=doseBlue+dose;
tabVoxelXBlue[voxelID] = x;
tabVoxelYBlue[voxelID] = y;
tabVoxelZBlue[voxelID] = z;
tabVoxelEnergyBlue[voxelID] = tabVoxelEnergyBlue[voxelID] + energy;
tabVoxelDoseBlue[voxelID] = tabVoxelDoseBlue[voxelID] + dose;
}
}
// To liberate memory
f->Close();
TFile *f2 = new TFile ("results.root","RECREATE");
//
TNtuple *ntupleRED = new TNtuple ("RED","RED","x:y:z:energy:dose");
TNtuple *ntupleGREEN = new TNtuple ("GREEN","GREEN","x:y:z:energy:dose");
TNtuple *ntupleBLUE = new TNtuple ("BLUE","BLUE","x:y:z:energy:dose");
// Global sums
for (Int_t i = 0; i < numberVoxTot; i++)
{
ntupleRED->Fill(tabVoxelXRed[i],tabVoxelYRed[i],tabVoxelZRed[i],tabVoxelEnergyRed[i],tabVoxelDoseRed[i]);
}
for (Int_t i = 0; i < numberVoxTot; i++)
{
ntupleGREEN->Fill(tabVoxelXGreen[i],tabVoxelYGreen[i],tabVoxelZGreen[i],tabVoxelEnergyGreen[i],tabVoxelDoseGreen[i]);
}
for (Int_t i = 0; i < numberVoxTot; i++)
{
ntupleBLUE->Fill(tabVoxelXBlue[i],tabVoxelYBlue[i],tabVoxelZBlue[i],tabVoxelEnergyBlue[i],tabVoxelDoseBlue[i]);
}
//---------------------------------
// Absorbed energy distributions
//---------------------------------
c1->cd(2);
gPad->SetLogy();
ntupleRED->Draw("energy","energy>0");
TH1F *htemp2 = (TH1F*)gPad->GetPrimitive("htemp");
htemp2->GetXaxis()->SetTitle("Energy (keV)");
htemp2->GetXaxis()->SetLabelSize(0.025);
htemp2->GetXaxis()->SetTitleSize(0.035);
htemp2->GetXaxis()->SetTitleOffset(1.4);
htemp2->SetTitle("RED voxel energy");
htemp2->SetFillStyle(1001);
htemp2->SetFillColor(2);
c1->cd(6);
gPad->SetLogy();
ntupleGREEN->Draw("energy","energy>0");
TH1F *htemp3 = (TH1F*)gPad->GetPrimitive("htemp");
htemp3->GetXaxis()->SetTitle("Energy (keV)");
htemp3->GetXaxis()->SetLabelSize(0.025);
htemp3->GetXaxis()->SetTitleSize(0.035);
htemp3->GetXaxis()->SetTitleOffset(1.4);
htemp3->SetTitle("GREEN voxel energy");
htemp3->SetFillStyle(1001);
htemp3->SetFillColor(3);
c1->cd(10);
gPad->SetLogy();
ntupleBLUE->Draw("energy","energy>0");
TH1F *htemp4 = (TH1F*)gPad->GetPrimitive("htemp");
htemp4->GetXaxis()->SetTitle("Energy (keV)");
htemp4->GetXaxis()->SetLabelSize(0.025);
htemp4->GetXaxis()->SetTitleSize(0.035);
htemp4->GetXaxis()->SetTitleOffset(1.4);
htemp4->SetTitle("BLUE voxel energy");
htemp4->SetFillStyle(1001);
htemp4->SetFillColor(4);
//------------------------------
// Map of energy distribution
//------------------------------
c1->cd(3);
TH2F *histNrjRed = new TH2F("histNrjRed","histNrjRed",100,0,800,100,0,800);
ntupleRED->Draw("y:x>>histNrjRed","energy","contz");
gPad->SetLogz();
histNrjRed->Draw("contz");
histNrjRed->GetXaxis()->SetTitle("X (microns)");
histNrjRed->GetYaxis()->SetTitle("Y (mirons)");
histNrjRed->GetZaxis()->SetTitle("Energy (keV)");
histNrjRed->GetXaxis()->SetLabelSize(0.025);
histNrjRed->GetYaxis()->SetLabelSize(0.025);
histNrjRed->GetZaxis()->SetLabelSize(0.025);
histNrjRed->GetXaxis()->SetTitleSize(0.035);
histNrjRed->GetYaxis()->SetTitleSize(0.035);
histNrjRed->GetZaxis()->SetTitleSize(0.035);
histNrjRed->GetXaxis()->SetTitleOffset(1.4);
histNrjRed->GetYaxis()->SetTitleOffset(1.4);
histNrjRed->GetZaxis()->SetTitleOffset(.6);
histNrjRed->SetTitle("Energy map for RED voxels");
c1->cd(7);
TH2F *histNrjGreen = new TH2F("histNrjGreen","histNrjGreen",100,0,800,100,0,800);
ntupleGREEN->Draw("y:x>>histNrjGreen","energy","contz");
gPad->SetLogz();
histNrjGreen->Draw("contz");
histNrjGreen->GetXaxis()->SetTitle("X (microns)");
histNrjGreen->GetYaxis()->SetTitle("Y (mirons)");
histNrjGreen->GetZaxis()->SetTitle("Energy (keV)");
histNrjGreen->GetXaxis()->SetLabelSize(0.025);
histNrjGreen->GetYaxis()->SetLabelSize(0.025);
histNrjGreen->GetZaxis()->SetLabelSize(0.025);
histNrjGreen->GetXaxis()->SetTitleSize(0.035);
histNrjGreen->GetYaxis()->SetTitleSize(0.035);
histNrjGreen->GetZaxis()->SetTitleSize(0.035);
histNrjGreen->GetXaxis()->SetTitleOffset(1.4);
histNrjGreen->GetYaxis()->SetTitleOffset(1.4);
histNrjGreen->GetZaxis()->SetTitleOffset(.6);
histNrjGreen->SetTitle("Energy map for GREEN voxels");
c1->cd(11);
TH2F *histNrjBlue = new TH2F("histNrjBlue","histNrjBlue",100,0,800,100,0,800);
ntupleBLUE->Draw("y:x>>histNrjBlue","energy","contz");
gPad->SetLogz();
histNrjBlue->Draw("contz");
histNrjBlue->GetXaxis()->SetTitle("X (microns)");
histNrjBlue->GetYaxis()->SetTitle("Y (mirons)");
histNrjBlue->GetZaxis()->SetTitle("Energy (keV)");
histNrjBlue->GetXaxis()->SetLabelSize(0.025);
histNrjBlue->GetYaxis()->SetLabelSize(0.025);
histNrjBlue->GetZaxis()->SetLabelSize(0.025);
histNrjBlue->GetXaxis()->SetTitleSize(0.035);
histNrjBlue->GetYaxis()->SetTitleSize(0.035);
histNrjBlue->GetZaxis()->SetTitleSize(0.035);
histNrjBlue->GetXaxis()->SetTitleOffset(1.4);
histNrjBlue->GetYaxis()->SetTitleOffset(1.4);
histNrjBlue->GetZaxis()->SetTitleOffset(.6);
histNrjBlue->SetTitle("Energy map for BLUE voxels");
//----------------------------
// Map of dose distribution
//----------------------------
c1->cd(4);
TH2F *histDoseRed = new TH2F("histDoseRed","histDoseRed",100,0,800,100,0,800);
// WARNING : dose scaling to mGy
ntupleRED->Draw("y:x>>histDoseRed","dose/1000","contz");
//gPad->SetLogz();
histDoseRed->Draw("contz");
histDoseRed->GetXaxis()->SetTitle("X (microns)");
histDoseRed->GetYaxis()->SetTitle("Y (mirons)");
histDoseRed->GetZaxis()->SetTitle("Dose (mGy)");
histDoseRed->GetXaxis()->SetLabelSize(0.025);
histDoseRed->GetYaxis()->SetLabelSize(0.025);
histDoseRed->GetZaxis()->SetLabelSize(0.025);
histDoseRed->GetXaxis()->SetTitleSize(0.035);
histDoseRed->GetYaxis()->SetTitleSize(0.035);
histDoseRed->GetZaxis()->SetTitleSize(0.035);
histDoseRed->GetXaxis()->SetTitleOffset(1.4);
histDoseRed->GetYaxis()->SetTitleOffset(1.4);
histDoseRed->GetZaxis()->SetTitleOffset(.6);
histDoseRed->SetTitle("Dose map for RED voxels");
c1->cd(8);
TH2F *histDoseGreen = new TH2F("histDoseGreen","histDoseGreen",100,0,800,100,0,800);
// WARNING : dose scaling to mGy
ntupleGREEN->Draw("y:x>>histDoseGreen","dose/1000","contz");
//gPad->SetLogz();
histDoseGreen->Draw("contz");
histDoseGreen->GetXaxis()->SetTitle("X (microns)");
histDoseGreen->GetYaxis()->SetTitle("Y (mirons)");
histDoseGreen->GetZaxis()->SetTitle("Dose (mGy)");
histDoseGreen->GetXaxis()->SetLabelSize(0.025);
histDoseGreen->GetYaxis()->SetLabelSize(0.025);
histDoseGreen->GetZaxis()->SetLabelSize(0.025);
histDoseGreen->GetXaxis()->SetTitleSize(0.035);
histDoseGreen->GetYaxis()->SetTitleSize(0.035);
histDoseGreen->GetZaxis()->SetTitleSize(0.035);
histDoseGreen->GetXaxis()->SetTitleOffset(1.4);
histDoseGreen->GetYaxis()->SetTitleOffset(1.4);
histDoseGreen->GetZaxis()->SetTitleOffset(.6);
histDoseGreen->SetTitle("Dose map for GREEN voxels");
c1->cd(12);
TH2F *histDoseBlue = new TH2F("histDoseBlue","histDoseBlue",100,0,800,100,0,800);
// WARNING : dose scaling to mGy
ntupleBLUE->Draw("y:x>>histDoseBlue","dose/1000","contz");
//gPad->SetLogz();
histDoseBlue->Draw("contz");
histDoseBlue->GetXaxis()->SetTitle("X (microns)");
histDoseBlue->GetYaxis()->SetTitle("Y (mirons)");
histDoseBlue->GetZaxis()->SetTitle("Dose (mGy)");
histDoseBlue->GetXaxis()->SetLabelSize(0.025);
histDoseBlue->GetYaxis()->SetLabelSize(0.025);
histDoseBlue->GetZaxis()->SetLabelSize(0.025);
histDoseBlue->GetXaxis()->SetTitleSize(0.035);
histDoseBlue->GetYaxis()->SetTitleSize(0.035);
histDoseBlue->GetZaxis()->SetTitleSize(0.035);
histDoseBlue->GetXaxis()->SetTitleOffset(1.4);
histDoseBlue->GetYaxis()->SetTitleOffset(1.4);
histDoseBlue->GetZaxis()->SetTitleOffset(.6);
histDoseBlue->SetTitle("Dose map for BLUE voxels");
//----------------------------
// SUMMARY
//----------------------------
cout << endl;
cout << "- Summary --------------------------------------------------" << endl;
cout << endl;
cout << " Total number of voxels in phantom = " << numberVoxTot << endl;
cout << " Total number of RED voxels in phantom = " << numberVoxRed << endl;
cout << " Total number of GREEN voxels in phantom = " << numberVoxGreen << endl;
cout << " Total number of BLUE voxels in phantom = " << numberVoxBlue << endl;
cout << endl;
cout << " Total absorbed energy in RED voxels (MeV) = " << nrjRed/1E3 << endl;
cout << " Total absorbed energy in GREEN voxels (MeV) = " << nrjGreen/1E3 << endl;
cout << " Total absorbed energy in BLUE voxels (MeV) = " << nrjBlue/1E3 << endl;
cout << endl;
cout << " Total absorbed dose in RED voxels (Gy) = " << doseRed << endl;
cout << " Total absorbed dose in GREEN voxels (Gy) = " << doseGreen << endl;
cout << " Total absorbed dose in BLUE voxels (Gy) = " << doseBlue << endl;
cout << endl;
cout << "------------------------------------------------------------" << endl;
// End
f2->Write();
}
@@ -0,0 +1,72 @@
# *********************************************************************
# MANDATORY SETTINGS
# (before kernel initialization)
#
# MT
/run/numberOfThreads 4
#
# Phantom file name
#/phantom/fileName phantoms/phantomHR.dat
/phantom/fileName phantoms/phantom.dat
#
# World volume size
/world/sizeXY 1 mm
/world/sizeZ 100 um
#
# Cellular medium size
/phantom/mediumSizeXY 900 um
/phantom/mediumSizeZ 95 um
#
# *********************************************************************
# OPTIONAL SETTINGS
# (before kernel initialization)
#
# Change cellular medium material
#/phantom/mediumMat G4_AIR
#
# Change phantom densities
#/phantom/redDen 2.0 g/cm3 # red volume density
#/phantom/greenDen 1.0 g/cm3 # green volume density
#/phantom/blueDen 3.0 g/cm3 # blue volume density
#
# Phantom shift
#/phantom/shiftX 100 um
#/phantom/shiftY 50 um
#/phantom/shiftZ 1.4 um
#
/run/verbose 1
/event/verbose 0
/tracking/verbose 0
#
# *********************************************************************
# RUN
#
/run/initialize
#
# Set cuts OUTSIDE the phantom region
/run/setCut 1 mm
#
# Set cut for the phantom region
/run/setCutForRegion phantomRegion 1 nm
#
# Print a summary of particles/regions/cuts
/run/dumpCouples
#
/gps/particle proton
/gps/energy 3. MeV
#
# Square plane source
/gps/pos/type Plane
/gps/pos/shape Square
/gps/direction 0 0 1
/gps/pos/rot1 1 0 0
/gps/pos/rot2 0 1 0
/gps/pos/centre 0. 0. -50 um
/gps/pos/halfx 350 um
/gps/pos/halfy 350 um
#/gps/pos/halfx 0 um
#/gps/pos/halfy 0 um
#
/run/printProgress 100
#
/run/beamOn 10000
@@ -23,46 +23,51 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
/// \file PhysActionInitialization.hh
/// \brief Definition of the PhysActionInitialization class
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#include "PhysActionInitialization.hh"
#include "PhysPrimaryGeneratorAction.hh"
#include "PhysEventAction.hh"
#include "PhysRunAction.hh"
#include "PhysSteppingAction.hh"
#include "PhysChemIO.hh"
#include "G4DNAChemistryManager.hh"
#include "G4Threading.hh"
#include <memory>
#include "ActionInitialization.hh"
#include "PrimaryGeneratorAction.hh"
#include "EventAction.hh"
#include "SteppingAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysActionInitialization::BuildForMaster() const
ActionInitialization::ActionInitialization()
:G4VUserActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ActionInitialization::BuildForMaster() const
{
SetUserAction(new PhysRunAction());
// Needed for merging of analysis ROOT files
SetUserAction(new RunAction());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysActionInitialization::Build() const
void ActionInitialization::Build() const
{
PhysPrimaryGeneratorAction* primGenAction = new PhysPrimaryGeneratorAction();
SetUserAction(primGenAction);
SetUserAction(new PrimaryGeneratorAction());
PhysEventAction* eventAction = new PhysEventAction;
SetUserAction(eventAction);
auto runAction= new RunAction();
SetUserAction(runAction);
SetUserAction(new PhysRunAction);
SetUserAction(new EventAction());
PhysSteppingAction* steppingAction = new PhysSteppingAction(eventAction);
SetUserAction(steppingAction);
//pass- PhysChemIO to G4DNAChemistryManager
std::unique_ptr<G4VPhysChemIO> fPhysChemIO = std::make_unique<PhysChemIO>(steppingAction);
G4DNAChemistryManager::Instance()->SetPhysChemIO(std::move(fPhysChemIO));
SetUserAction(new SteppingAction(runAction));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,229 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#include "CellParameterisation.hh"
#include "G4Material.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
CellParameterisation *CellParameterisation::gInstance = nullptr;
CellParameterisation::CellParameterisation
(G4String fileName,
G4Material *RedMat, G4Material *GreenMat, G4Material *BlueMat,
G4double shiftX, G4double shiftY, G4double shiftZ
)
:fRedMaterial(RedMat), fGreenMaterial(GreenMat), fBlueMaterial(BlueMat),
fShiftX(shiftX), fShiftY(shiftY), fShiftZ(shiftZ)
{
Initialize(fileName);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void CellParameterisation::Initialize(const G4String &fileName)
{
G4int ncols, l, mat;
G4int pixelX, pixelY, pixelZ;
G4double x, y, z, den1, den2, den3;
ncols = 0;
l = 0;
// Read phantom
FILE *fMap;
fMap = fopen(fileName, "r");
fRedMass = 0;
fGreenMass = 0;
fBlueMass = 0;
ncols = fscanf(fMap, "%d %d %d %d", &fPhantomTotalPixels, &fRedTotalPixels, &fGreenTotalPixels,
&fBlueTotalPixels);
ncols = fscanf(fMap, "%lf %lf %lf %s", &fSizeRealX, &fSizeRealY, &fSizeRealZ, &fRealUnit);
ncols = fscanf(fMap, "%lf %lf %lf %s", &fDimCellBoxX, &fDimCellBoxY, &fDimCellBoxZ, &fRealUnit);
fMapCell = new G4ThreeVector[fPhantomTotalPixels]; //geant4 coordinates space
fMapCellPxl = new G4ThreeVector[fPhantomTotalPixels]; //voxel space
fMapCellOriginal = new G4ThreeVector[fPhantomTotalPixels]; //original coordinates space
fMaterial = new G4int[fPhantomTotalPixels];
fDimCellBoxX = fDimCellBoxX * um;
fDimCellBoxY = fDimCellBoxY * um;
fDimCellBoxZ = fDimCellBoxZ * um;
den1 = fRedMaterial->GetDensity();
den2 = fGreenMaterial->GetDensity();
den3 = fBlueMaterial->GetDensity();
fOffsetX = -fSizeRealX / 2 *um;
fOffsetY = -fSizeRealY / 2 *um;
fOffsetZ = -fSizeRealZ / 2 *um;
G4cout << G4endl;
G4cout << " #########################################################################" << G4endl;
G4cout << " Phantom placement and density " << G4endl;
G4cout << " #########################################################################" << G4endl;
G4cout << G4endl;
G4cout << " ==========> Phantom origin - X (um) = " << (fOffsetX + fShiftX)/um << G4endl;
G4cout << " ==========> Phantom origin - Y (um) = " << (fOffsetY + fShiftY)/um << G4endl;
G4cout << " ==========> Phantom origin - Z (um) = " << (fOffsetZ + fShiftZ)/um << G4endl;
G4cout << G4endl;
G4cout << " ==========> Red density (g/cm3) = " << den1/(g/cm3) << G4endl;
G4cout << " ==========> Green density (g/cm3) = " << den2/(g/cm3) << G4endl;
G4cout << " ==========> Blue density (g/cm3) = " << den3/(g/cm3) << G4endl;
G4cout << G4endl;
G4cout << " #########################################################################" << G4endl;
G4cout << G4endl;
while (1)
{
ncols = fscanf(fMap, "%lf %lf %lf %d", &x, &y, &z, &mat);
if (ncols < 0) break;
G4ThreeVector v( x*um + fOffsetX + fShiftX, // phantom shift
-(y*um + fOffsetY + fShiftY),
z*um + fOffsetZ + fShiftZ );
// Pixel coordinates
pixelX = (x*um)/fDimCellBoxX;
pixelY = (y*um)/fDimCellBoxY;
pixelZ = (z*um)/fDimCellBoxZ;
G4ThreeVector w(pixelX, pixelY, pixelZ);
G4ThreeVector v_original(x*um, y*um, z*um);
fMapCell[l] = v;
fMapCellPxl[l] = w;
fMapCellOriginal[l] = v_original;
fMaterial[l] = mat;
if (mat == 1){
fRedMass += den1 * fDimCellBoxX * fDimCellBoxY * fDimCellBoxZ;
}
else if (mat == 2){
fGreenMass += den2 * fDimCellBoxX * fDimCellBoxY * fDimCellBoxZ;
}
else if (mat == 3){
fBlueMass += den3 * fDimCellBoxX * fDimCellBoxY * fDimCellBoxZ;
}
l++;
}
fclose(fMap);
fRedAttributes = new G4VisAttributes;
fRedAttributes->SetColour(G4Colour(1, 0, 0));
fRedAttributes->SetForceSolid(false);
fGreenAttributes = new G4VisAttributes;
fGreenAttributes->SetColour(G4Colour(0, 1, 0));
fGreenAttributes->SetForceSolid(false);
fBlueAttributes = new G4VisAttributes;
fBlueAttributes->SetColour(G4Colour(0, 0, 1));
fBlueAttributes->SetForceSolid(false);
gInstance = this;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
CellParameterisation::~CellParameterisation()
{
delete[] fMapCell;
delete[] fMapCellPxl;
delete[] fMaterial;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void CellParameterisation::ComputeTransformation
(const G4int copyNo, G4VPhysicalVolume *physVol) const
{
if(fMapCell == nullptr)
{
G4ExceptionDescription ex;
ex<< "fMapCell == nullptr ";
G4Exception("CellParameterisation::ComputeTransformation",
"CellParameterisation001",
FatalException,
ex);
}
else
{
G4ThreeVector
origin(fMapCell[copyNo].x(), fMapCell[copyNo].y(), fMapCell[copyNo].z());
physVol->SetTranslation(origin);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Material *
CellParameterisation::ComputeMaterial(const G4int copyNo,
G4VPhysicalVolume *physVol,
const G4VTouchable *)
{
if (fMaterial[copyNo] == 3) // fMaterial 3 is blue
{
physVol->SetName("physicalMat3");
physVol->GetLogicalVolume()->SetVisAttributes(fBlueAttributes);
return fBlueMaterial;
}
else if (fMaterial[copyNo] == 2) // fMaterial 2 is green
{
physVol->SetName("physicalMat2");
physVol->GetLogicalVolume()->SetVisAttributes(fGreenAttributes);
return fGreenMaterial;
}
else if (fMaterial[copyNo] == 1) // fMaterial 1 is red
{
physVol->SetName("physicalMat1");
physVol->GetLogicalVolume()->SetVisAttributes(fRedAttributes);
return fRedMaterial;
}
return physVol->GetLogicalVolume()->GetMaterial();
}
@@ -0,0 +1,367 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#include "DetectorConstruction.hh"
#include "DetectorMessenger.hh"
#include "G4PhysicalConstants.hh"
#include "G4NistManager.hh"
#include "G4ProductionCuts.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorConstruction::DetectorConstruction()
:G4VUserDetectorConstruction()
{
fDetectorMessenger = new DetectorMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VPhysicalVolume *DetectorConstruction::Construct()
{
DefineMaterials();
return ConstructLine();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void DetectorConstruction::DefineMaterials()
{
G4String name, symbol;
// Water and air are defined from NIST material database
G4NistManager *man = G4NistManager::Instance();
G4Material *H2O = man->FindOrBuildMaterial("G4_WATER");
G4Material *Air = man->FindOrBuildMaterial("G4_AIR");
fDefaultMaterial = Air;
fPhantomMaterial = H2O; // material is not relevant
// it will be changed by the ComputeMaterial
// method of the CellParameterisation
// Default materials
if (fMediumMaterial == nullptr) {fMediumMaterial = H2O;}
if (fRedMaterial == nullptr) {fRedMaterial = H2O;}
if (fGreenMaterial == nullptr) {fGreenMaterial = H2O;}
if (fBlueMaterial == nullptr) {fBlueMaterial = H2O;}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4VPhysicalVolume *DetectorConstruction::ConstructLine() {
//*************
// World volume
//*************
fSolidWorld = new G4Box("World", //its name
fWorldSizeXY / 2, fWorldSizeXY / 2, fWorldSizeZ / 2); //its size
fLogicWorld = new G4LogicalVolume(fSolidWorld, //its solid
fDefaultMaterial, //its material
"World"); //its name
fPhysiWorld = new G4PVPlacement(nullptr, //no rotation
G4ThreeVector(), //at (0,0,0)
"World", //its name
fLogicWorld, //its logical volume
nullptr, //its mother volume
false, //no boolean operation
0); //copy number
//********************
// Cell culture medium
//********************
fSolidMedium = new G4Box("Medium", fMediumSizeXY / 2, fMediumSizeXY / 2, fMediumSizeZ / 2);
fLogicMedium = new G4LogicalVolume(fSolidMedium, fMediumMaterial, "Medium");
fPhysiMedium = new G4PVPlacement(nullptr,
G4ThreeVector(0, 0, 0),
"Medium",
fLogicMedium,
fPhysiWorld,
false,
0);
// ************
// Cell phantom
// ************
// The cell phantom is placed in the middle of the parent volume (fLogicMedium here)
fPhantomParam = new CellParameterisation
(fPhantomFileName, fRedMaterial, fGreenMaterial, fBlueMaterial, fShiftX, fShiftY, fShiftZ);
fSolidPhantom = new G4Box("Phantom",
fPhantomParam->GetPixelSizeX() / 2,
fPhantomParam->GetPixelSizeY() / 2,
fPhantomParam->GetPixelSizeZ() / 2);
fLogicPhantom = new G4LogicalVolume(fSolidPhantom,
fPhantomMaterial, // material is not relevant,
// it will be changed by the
// ComputeMaterial method
// of the CellParameterisation
"Phantom",
nullptr,
nullptr,
nullptr);
fPhysiPhantom = new G4PVParameterised(
"Phantom", // name
fLogicPhantom, // logical volume
fLogicMedium, // mother logical volume
kUndefined, // kUndefined: three-dimensional optimization
fPhantomParam->GetPhantomTotalPixels(), // number of voxels
fPhantomParam, // the parametrisation
false);
G4cout << " #########################################################################" << G4endl;
G4cout << " Phantom information " << G4endl;
G4cout << " #########################################################################" << G4endl;
G4cout << G4endl;
G4cout << " ==========> The phantom contains " << fPhantomParam->GetPhantomTotalPixels()
<< " voxels " << G4endl;
G4cout << " ==========> Voxel size X (um) = " << fPhantomParam->GetPixelSizeX()/um << G4endl;
G4cout << " ==========> Voxel size Y (um) = " << fPhantomParam->GetPixelSizeY()/um << G4endl;
G4cout << " ==========> Voxel size Z (um) = " << fPhantomParam->GetPixelSizeZ()/um << G4endl;
G4cout << G4endl;
G4cout << " ==========> Number of red voxels = "
<< fPhantomParam->GetRedTotalPixels() << G4endl;
G4cout << " ==========> Number of green voxels = "
<< fPhantomParam->GetGreenTotalPixels() << G4endl;
G4cout << " ==========> Number of blue voxels = "
<< fPhantomParam->GetBlueTotalPixels() << G4endl;
G4cout << G4endl;
G4cout << " ==========> Tolal mass of red voxels (kg) = "
<< fPhantomParam->GetRedMass() / kg << G4endl;
G4cout << " ==========> Tolal mass of green voxels (kg) = "
<< fPhantomParam->GetGreenMass() / kg << G4endl;
G4cout << " ==========> Tolal mass of blue voxels (kg) = "
<< fPhantomParam->GetBlueMass() / kg << G4endl;
G4cout << G4endl;
G4cout << " #########################################################################" << G4endl;
G4cout << G4endl;
// USER LIMITS ON STEP LENGTH
// fLogicWorld->SetUserLimits(new G4UserLimits(100 * mm));
// fLogicPhantom->SetUserLimits(new G4UserLimits(0.5 * micrometer));
// fLogicMedium->SetUserLimits(new G4UserLimits(1 * micrometer));
// Create a phantom G4Region and add logical volume
fPhantomRegion = new G4Region("phantomRegion");
G4ProductionCuts* cuts = new G4ProductionCuts();
G4double defCut = 1*nanometer;
cuts->SetProductionCut(defCut,"gamma");
cuts->SetProductionCut(defCut,"e-");
cuts->SetProductionCut(defCut,"e+");
cuts->SetProductionCut(defCut,"proton");
fPhantomRegion->SetProductionCuts(cuts);
fPhantomRegion->AddRootLogicalVolume(fLogicMedium);
return fPhysiWorld;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetTargetMaterial(const G4String& mat)
{
if (G4Material* material = G4NistManager::Instance()->FindOrBuildMaterial(mat))
{
if (material && mat != "G4_WATER")
{
fMediumMaterial = material;
G4cout << " #########################################################################"
<< G4endl;
G4cout << " Cell culture medium material "
<< G4endl;
G4cout << fMediumMaterial << G4endl;
G4cout << " #########################################################################"
<< G4endl;
G4cout << G4endl;
}
}
else
{
G4cout << G4endl;
G4cout << "WARNING: material \"" << mat << "\" doesn't exist in NIST elements/materials"
<< G4endl;
G4cout << " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]"
<< G4endl;
G4cout << G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetRedDensity(const G4double& value)
{
fDensityRed = value;
if (fDensityRed != 1.0)
{
G4NistManager *man = G4NistManager::Instance();
G4Material * H2O_red = man->BuildMaterialWithNewDensity("G4_WATER_red","G4_WATER",
fDensityRed);
fRedMaterial = H2O_red;
}
else
{
G4NistManager *man = G4NistManager::Instance();
fRedMaterial = man->FindOrBuildMaterial("G4_WATER");
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetGreenDensity(const G4double& value)
{
fDensityGreen = value;
if (fDensityGreen != 1.0)
{
G4NistManager *man = G4NistManager::Instance();
G4Material * H2O_green = man->BuildMaterialWithNewDensity("G4_WATER_green","G4_WATER",
fDensityGreen);
fGreenMaterial = H2O_green;
}
else
{
G4NistManager *man = G4NistManager::Instance();
fGreenMaterial = man->FindOrBuildMaterial("G4_WATER");
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetBlueDensity(const G4double& value)
{
fDensityBlue = value;
if (fDensityBlue != 1.0)
{
G4NistManager *man = G4NistManager::Instance();
G4Material * H2O_blue = man->BuildMaterialWithNewDensity("G4_WATER_blue","G4_WATER",
fDensityBlue);
fBlueMaterial = H2O_blue;
}
else
{
G4NistManager *man = G4NistManager::Instance();
fBlueMaterial = man->FindOrBuildMaterial("G4_WATER");
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetShiftX(const G4double& value)
{
fShiftX = value;
G4cout << "... setting phantom shift: X = " << fShiftX/um << " um" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetShiftY(const G4double& value)
{
fShiftY = value;
G4cout << "... setting phantom shift: Y = " << fShiftY/um << " um" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetShiftZ(const G4double& value)
{
fShiftZ = value;
G4cout << "... setting phantom shift: Y = " << fShiftZ/um << " um" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetMediumSizeXY(const G4double& value)
{
fMediumSizeXY = value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetMediumSizeZ(const G4double& value)
{
fMediumSizeZ = value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetWorldSizeXY(const G4double& value)
{
fWorldSizeXY = value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetWorldSizeZ(const G4double& value)
{
fWorldSizeZ = value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetPhantomFileName(const G4String& phantomName)
{
fPhantomFileName = phantomName;
G4cout << " #########################################################################"
<< G4endl;
G4cout << " Loading cell phantom from file: "
<< fPhantomFileName << G4endl;
G4cout << " #########################################################################"
<< G4endl;
G4cout << G4endl;
}
@@ -0,0 +1,197 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#include "DetectorMessenger.hh"
#include "DetectorConstruction.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorMessenger::DetectorMessenger(DetectorConstruction * det)
:G4UImessenger(), fDetector(det)
{
fPhantomDir = new G4UIdirectory("/phantom/");
fPhantomDir->SetGuidance(" Cell phantom settings");
fNameCmd = new G4UIcmdWithAString("/phantom/fileName",this);
fNameCmd->SetGuidance("Select phantom file name");
fNameCmd->SetParameterName("fileName",true);
fNameCmd->SetDefaultValue("phantom.dat");
fNameCmd->AvailableForStates(G4State_PreInit);
fMatCmd = new G4UIcmdWithAString("/phantom/mediumMat",this);
fMatCmd->SetGuidance("Select material for the phantom medium");
fMatCmd->SetParameterName("mediumMat",true);
fMatCmd->AvailableForStates(G4State_PreInit);
fDenRedCmd = new G4UIcmdWithADoubleAndUnit("/phantom/redDen",this);
fDenRedCmd->SetGuidance("Select density for the red volume");
fDenRedCmd->SetParameterName("redDen",true);
fDenRedCmd->SetDefaultValue(1.);
fDenRedCmd->SetDefaultUnit("g/cm3");
fDenRedCmd->AvailableForStates(G4State_PreInit);
fDenGreenCmd = new G4UIcmdWithADoubleAndUnit("/phantom/greenDen",this);
fDenGreenCmd->SetGuidance("Select density for the green volume");
fDenGreenCmd->SetParameterName("greenDen",true);
fDenGreenCmd->SetDefaultValue(1.);
fDenGreenCmd->SetDefaultUnit("g/cm3");
fDenGreenCmd->AvailableForStates(G4State_PreInit);
fDenBlueCmd = new G4UIcmdWithADoubleAndUnit("/phantom/blueDen",this);
fDenBlueCmd->SetGuidance("Select density for the blue volume");
fDenBlueCmd->SetParameterName("blueDen",true);
fDenBlueCmd->SetDefaultValue(1.);
fDenBlueCmd->SetDefaultUnit("g/cm3");
fDenBlueCmd->AvailableForStates(G4State_PreInit);
fShiftXCmd = new G4UIcmdWithADoubleAndUnit("/phantom/shiftX",this);
fShiftXCmd->SetGuidance("Set phantom X shift");
fShiftXCmd->SetParameterName("shiftX",true);
fShiftXCmd->SetDefaultValue(0.);
fShiftXCmd->SetDefaultUnit("um");
fShiftXCmd->AvailableForStates(G4State_PreInit);
fShiftYCmd = new G4UIcmdWithADoubleAndUnit("/phantom/shiftY",this);
fShiftYCmd->SetGuidance("Set phantom Y shift");
fShiftYCmd->SetParameterName("shiftY",true);
fShiftYCmd->SetDefaultValue(0.);
fShiftYCmd->SetDefaultUnit("um");
fShiftYCmd->AvailableForStates(G4State_PreInit);
fShiftZCmd = new G4UIcmdWithADoubleAndUnit("/phantom/shiftZ",this);
fShiftZCmd->SetGuidance("Set phantom Z shift");
fShiftZCmd->SetParameterName("shiftZ",true);
fShiftZCmd->SetDefaultValue(0.);
fShiftZCmd->SetDefaultUnit("um");
fShiftZCmd->AvailableForStates(G4State_PreInit);
fMediumSizeXYCmd = new G4UIcmdWithADoubleAndUnit("/phantom/mediumSizeXY",this);
fMediumSizeXYCmd->SetGuidance("Set cellular medium size XY");
fMediumSizeXYCmd->SetParameterName("mediumSizeXY",false);
fMediumSizeXYCmd->SetDefaultUnit("um");
fMediumSizeXYCmd->AvailableForStates(G4State_PreInit);
fMediumSizeZCmd = new G4UIcmdWithADoubleAndUnit("/phantom/mediumSizeZ",this);
fMediumSizeZCmd->SetGuidance("Set cellular medium size Z");
fMediumSizeZCmd->SetParameterName("mediumSizeZ",false);
fMediumSizeZCmd->SetDefaultUnit("um");
fMediumSizeZCmd->AvailableForStates(G4State_PreInit);
fWorldDir = new G4UIdirectory("/world/");
fWorldDir->SetGuidance(" World volume settings");
fWorldSizeXYCmd = new G4UIcmdWithADoubleAndUnit("/world/sizeXY",this);
fWorldSizeXYCmd->SetGuidance("Set world size XY");
fWorldSizeXYCmd->SetParameterName("sizeXY",false);
fWorldSizeXYCmd->SetDefaultUnit("um");
fWorldSizeXYCmd->AvailableForStates(G4State_PreInit);
fWorldSizeZCmd = new G4UIcmdWithADoubleAndUnit("/world/sizeZ",this);
fWorldSizeZCmd->SetGuidance("Set world size Z");
fWorldSizeZCmd->SetParameterName("sizeZ",false);
fWorldSizeZCmd->SetDefaultUnit("um");
fWorldSizeZCmd->AvailableForStates(G4State_PreInit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorMessenger::~DetectorMessenger()
{
delete fWorldDir;
delete fPhantomDir;
delete fNameCmd;
delete fMatCmd;
delete fDenRedCmd;
delete fDenGreenCmd;
delete fDenBlueCmd;
delete fShiftXCmd;
delete fShiftYCmd;
delete fShiftZCmd;
delete fMediumSizeXYCmd;
delete fMediumSizeZCmd;
delete fWorldSizeXYCmd;
delete fWorldSizeZCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
{
if( command == fMatCmd ) {
fDetector->SetTargetMaterial(newValue);
}
else if(command == fDenRedCmd) {
fDetector->SetRedDensity(fDenRedCmd->GetNewDoubleValue(newValue));
}
else if(command == fDenGreenCmd) {
fDetector->SetGreenDensity(fDenGreenCmd->GetNewDoubleValue(newValue));
}
else if(command == fDenBlueCmd) {
fDetector->SetBlueDensity(fDenBlueCmd->GetNewDoubleValue(newValue));
}
else if (command == fShiftXCmd) {
fDetector->SetShiftX(fShiftXCmd->GetNewDoubleValue(newValue));
}
else if (command == fShiftYCmd) {
fDetector->SetShiftY(fShiftYCmd->GetNewDoubleValue(newValue));
}
else if (command == fShiftZCmd) {
fDetector->SetShiftZ(fShiftZCmd->GetNewDoubleValue(newValue));
}
else if (command == fMediumSizeXYCmd) {
fDetector->SetMediumSizeXY(fMediumSizeXYCmd->GetNewDoubleValue(newValue));
}
else if (command == fMediumSizeZCmd) {
fDetector->SetMediumSizeZ(fMediumSizeZCmd->GetNewDoubleValue(newValue));
}
else if (command == fWorldSizeXYCmd) {
fDetector->SetWorldSizeXY(fWorldSizeXYCmd->GetNewDoubleValue(newValue));
}
else if (command == fWorldSizeZCmd) {
fDetector->SetWorldSizeZ(fWorldSizeZCmd->GetNewDoubleValue(newValue));
}
else if(command == fNameCmd) {
fDetector->SetPhantomFileName(newValue);
}
}
@@ -23,43 +23,42 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
/// \file ChemPrimaryGeneratorAction.cc
/// \brief Implementation of the ChemPrimaryGeneratorAction class
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#include "ChemPrimaryGeneratorAction.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleGun.hh"
#include "EventAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Event.hh"
ChemPrimaryGeneratorAction::ChemPrimaryGeneratorAction() :
G4VUserPrimaryGeneratorAction(),
fpParticleGun(new G4ParticleGun(1))
{
G4ParticleDefinition* particle =
G4ParticleTable::GetParticleTable()->FindParticle("geantino");
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
// default gun parameters
fpParticleGun->SetParticleDefinition(particle);
fpParticleGun->SetParticleEnergy(100*keV);
fpParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
fpParticleGun->SetParticlePosition(G4ThreeVector(0.,0.,0.));
}
EventAction::EventAction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
ChemPrimaryGeneratorAction::~ChemPrimaryGeneratorAction()
{
delete fpParticleGun;
}
EventAction::~EventAction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void ChemPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
fpParticleGun->GeneratePrimaryVertex(anEvent);
}
void EventAction::BeginOfEventAction(const G4Event *)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void EventAction::EndOfEventAction(const G4Event *)
{}
@@ -23,64 +23,58 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
/// \file ChemActionInitialization.cc
/// \brief Implementation of the ChemActionInitialization class
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#include "PhysicsList.hh"
#include "ChemActionInitialization.hh"
#include "ChemNtupleManager.hh"
#include "ChemRunAction.hh"
#include "G4Timer.hh"
#include "G4UnitsTable.hh"
#include "ChemStackingAction.hh"
#include "ChemPrimaryGeneratorAction.hh"
// chemistry
#include "G4Scheduler.hh"
#include "G4DNAChemistryManager.hh"
#include "ChemITSteppingAction.hh"
#include "ChemTimeStepAction.hh"
#include "G4SystemOfUnits.hh"
#include "G4EmStandardPhysics_option4.hh"
#include "G4EmDNAPhysics_option2.hh"
#include "G4DecayPhysics.hh"
#include "G4RadioactiveDecayPhysics.hh"
#include "G4PhysicsConstructorRegistry.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ChemActionInitialization::ChemActionInitialization(ChemNtupleManager* nMana, ChemPhysicsList *phys)
:fpNtuple(nMana), fPhysList(phys)
G4VPhysicsConstructor* GetPhysicsConstructor(const G4String& name)
{
return G4PhysicsConstructorRegistry::Instance()->GetPhysicsConstructor(name);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ChemActionInitialization::BuildForMaster() const
PhysicsList::PhysicsList():G4VModularPhysicsList()
{
;
defaultCutValue = 1. * nm;
SetVerboseLevel(0);
RegisterPhysics(new G4EmStandardPhysics_option4());
//RegisterPhysics(new G4EmDNAPhysics_option2());
//RegisterPhysics(new G4DecayPhysics());
//RegisterPhysics(new G4RadioactiveDecayPhysics());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ChemActionInitialization::Build() const
{
SetUserAction(new ChemRunAction(fpNtuple));
SetUserAction(new ChemPrimaryGeneratorAction());
SetUserAction(new ChemStackingAction());
G4bool chemistryFlag = G4DNAChemistryManager::Instance()->IsActivated();
if(chemistryFlag)
{
G4Scheduler::Instance()->SetVerbose(0);
G4Scheduler::Instance()->SetMaxZeroTimeAllowed(10000);
ChemTimeStepAction* timeStepAction = new ChemTimeStepAction(fpNtuple,fPhysList->GetTimeStepModel());
G4Scheduler::Instance()->SetUserAction(timeStepAction);
}
}
PhysicsList::~PhysicsList()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCuts()
{
SetCutsWithDefault();
}
@@ -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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#include "PrimaryGeneratorAction.hh"
#include <G4GeneralParticleSource.hh>
#include "G4ParticleTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorAction::PrimaryGeneratorAction()
:G4VUserPrimaryGeneratorAction()
{
fGPS = new G4GeneralParticleSource();
G4ParticleDefinition* particle = G4ParticleTable::GetParticleTable()->FindParticle("proton");
fGPS->SetParticleDefinition(particle);
fGPS->GetCurrentSource()->GetEneDist()->SetMonoEnergy(6 * MeV);
fGPS->GetCurrentSource()->GetAngDist()->SetParticleMomentumDirection(G4ThreeVector(0., 0., 1.));
fGPS->GetCurrentSource()->GetPosDist()->SetCentreCoords(G4ThreeVector(0., 0., -1. * mm));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorAction::~PrimaryGeneratorAction()
{
delete fGPS;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
fGPS->GeneratePrimaryVertex(anEvent);
}
@@ -0,0 +1,200 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#include "RunAction.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
RunAction::RunAction()
:G4UserRunAction()
{
auto man = G4AnalysisManager::Instance();
man->SetDefaultFileType("root");
man->SetNtupleMerging(true);
man->SetFirstNtupleId(1);
// Create 1st ntuple (id = 1)
man->CreateNtuple("ntuple1", "RED");
man->CreateNtupleDColumn("x");
man->CreateNtupleDColumn("y");
man->CreateNtupleDColumn("z");
man->CreateNtupleDColumn("energy");
man->CreateNtupleDColumn("dose");
man->CreateNtupleIColumn("voxelID");
man->FinishNtuple();
// Create 2nd ntuple (id = 2)
man->CreateNtuple("ntuple2", "GREEN");
man->CreateNtupleDColumn("x");
man->CreateNtupleDColumn("y");
man->CreateNtupleDColumn("z");
man->CreateNtupleDColumn("energy");
man->CreateNtupleDColumn("dose");
man->CreateNtupleIColumn("voxelID");
man->FinishNtuple();
// Create 3rd ntuple (id = 3)
man->CreateNtuple("ntuple3", "BLUE");
man->CreateNtupleDColumn("x");
man->CreateNtupleDColumn("y");
man->CreateNtupleDColumn("z");
man->CreateNtupleDColumn("energy");
man->CreateNtupleDColumn("dose");
man->CreateNtupleIColumn("voxelID");
man->FinishNtuple();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
RunAction::~RunAction()
{
delete[] fVoxelEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void RunAction::BeginOfRunAction(const G4Run *)
{
// Analysis manager
auto man = G4AnalysisManager::Instance();
man->OpenFile("phantom");
// Access phantom singleton
fMyPhantomParam = CellParameterisation::Instance();
fNbVoxels = fMyPhantomParam->GetPhantomTotalPixels();
// Allocates the array receiving the energy per voxel
fVoxelEnergy = new G4double[fNbVoxels];
// Initialisation of the energy array
for (G4int i = 0; i < fNbVoxels; i++) fVoxelEnergy[i] = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void RunAction::EndOfRunAction(const G4Run * /*aRun*/)
{
auto man = G4AnalysisManager::Instance();
G4double X, Y, Z;
// Total mass of voxel
G4double redMassTot=0.;
G4double greenMassTot=0.;
G4double blueMassTot=0.;
redMassTot = fMyPhantomParam->GetRedMass();
greenMassTot = fMyPhantomParam->GetGreenMass();
blueMassTot = fMyPhantomParam->GetBlueMass();
// (Optional) Numbers of voxel
//G4double redVox=0;
//G4double greenVox=0;
//G4double blueVox=0;
//redVox = fMyPhantomParam->GetRedTotalPixels();
//greenVox = fMyPhantomParam->GetGreenTotalPixels();
//blueVox = fMyPhantomParam->GetBlueTotalPixels();
// (Optional) Single voxel mass
//G4double redMass=0.;
//G4double greenMass=0.;
//G4double blueMass=0.;
//redMass = redMassTot/redVox;
//greenMass = greenMassTot/greenVox;
//blueMass = blueMassTot/blueVox;
// Save x, y, z and energy for every voxel having absorbed an energy above 0.
// Energy is in keV
// Dose is in Gy
for (G4int i = 0; i < fMyPhantomParam->GetPhantomTotalPixels(); i++)
{
if (fVoxelEnergy[i] > 0.)
{
X = (fMyPhantomParam->GetVoxelThreeVectorOriginal(i).x()) / um;
Y = (fMyPhantomParam->GetVoxelThreeVectorOriginal(i).y()) / um;
Z = (fMyPhantomParam->GetVoxelThreeVectorOriginal(i).z()) / um;
if (fMyPhantomParam->GetMaterial(i) == 1)
{
man->FillNtupleDColumn(1,0,X);
man->FillNtupleDColumn(1,1,Y);
man->FillNtupleDColumn(1,2,Z);
man->FillNtupleDColumn(1,3,fVoxelEnergy[i]/keV);
man->FillNtupleDColumn(1,4,((fVoxelEnergy[i]/joule)/(redMassTot/kg)));
man->FillNtupleIColumn(1,5,i);
man->AddNtupleRow(1);
}
else if (fMyPhantomParam->GetMaterial(i) == 2)
{
man->FillNtupleDColumn(2,0,X);
man->FillNtupleDColumn(2,1,Y);
man->FillNtupleDColumn(2,2,Z);
man->FillNtupleDColumn(2,3,fVoxelEnergy[i]/keV);
man->FillNtupleDColumn(2,4,((fVoxelEnergy[i]/joule)/(greenMassTot/kg)));
man->FillNtupleIColumn(2,5,i);
man->AddNtupleRow(2);
}
else if (fMyPhantomParam->GetMaterial(i) == 3)
{
man->FillNtupleDColumn(3,0,X);
man->FillNtupleDColumn(3,1,Y);
man->FillNtupleDColumn(3,2,Z);
man->FillNtupleDColumn(3,3,fVoxelEnergy[i]/keV);
man->FillNtupleDColumn(3,4,((fVoxelEnergy[i]/joule)/(blueMassTot/kg)));
man->FillNtupleIColumn(3,5,i);
man->AddNtupleRow(3);
}
}
}
// Save histograms
man->Write();
man->CloseFile();
// Complete clean-up
man->Clear();
}
@@ -0,0 +1,84 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// --------------------------------------------------------------------------------
// MONTE CARLO SIMULATION OF REALISTIC GEOMETRY FROM MICROSCOPES IMAGES
//
// Authors and contributors:
// P. Barberet, S. Incerti, N. H. Tran, L. Morelli
//
// University of Bordeaux, CNRS, LP2i, UMR5797, Gradignan, France
//
// If you use this code, please cite the following publication:
// P. Barberet et al.,
// "Monte-Carlo dosimetry on a realistic cell monolayer
// geometry exposed to alpha particles."
// Ph. Barberet et al 2012 Phys. Med. Biol. 57 2189
// doi: 110.1088/0031-9155/57/8/2189
// --------------------------------------------------------------------------------
#include "SteppingAction.hh"
#include "G4SteppingManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
SteppingAction::SteppingAction(RunAction* runAction)
:G4UserSteppingAction(), fRunAction(runAction)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void SteppingAction::UserSteppingAction(const G4Step* aStep)
{
// ********************************************************************************
// Avoid string comparison to extract material (1, 2 or 3) whic causes issues in MT
// ********************************************************************************
fMyPhantomParam = CellParameterisation::Instance();
const G4StepPoint* preStep = aStep->GetPreStepPoint();
G4int preReplicaNumber = preStep->GetTouchableHandle()->GetReplicaNumber();
G4int voxelMaterial = fMyPhantomParam->GetMaterial(preReplicaNumber);
// The absorbed energy is added to the "voxel energy" array in RunAction
// Added protection to make sure Replica Number has been identified
if (aStep->GetTotalEnergyDeposit()>0. && preReplicaNumber>0)
{
if (voxelMaterial == 1)
{
fRunAction->AddDoseBox(preReplicaNumber, aStep->GetTotalEnergyDeposit());
}
else if (voxelMaterial == 2)
{
fRunAction->AddDoseBox(preReplicaNumber, aStep->GetTotalEnergyDeposit());
}
else if (voxelMaterial == 3)
{
fRunAction->AddDoseBox(preReplicaNumber, aStep->GetTotalEnergyDeposit());
}
}
}
@@ -0,0 +1,145 @@
# *********************************************************************
# MANDATORY SETTINGS
# (before kernel initialization)
#
# MT
/run/numberOfThreads 10
#
# Phantom file name
/phantom/fileName phantoms/phantom.dat
#
# World volume size
/world/sizeXY 1 mm
/world/sizeZ 100 um
#
# Cellular medium size
/phantom/mediumSizeXY 900 um
/phantom/mediumSizeZ 95 um
#
# *********************************************************************
# OPTIONAL SETTINGS
# (before kernel initialization)
#
# Change cellular medium material
#/phantom/mediumMat G4_AIR
#
# Change phantom densities
#/phantom/redDen 2.0 g/cm3 # red volume density
#/phantom/greenDen 1.0 g/cm3 # green volume density
#/phantom/blueDen 3.0 g/cm3 # blue volume density
#
# Phantom shift
#/phantom/shiftX 100 um
#/phantom/shiftY 50 um
#/phantom/shiftZ 1.4 um
#
/run/verbose 1
/event/verbose 0
/tracking/verbose 0
#
# *********************************************************************
# RUN
#
/run/initialize
#
# Set cuts OUTSIDE the phantom region
/run/setCut 1 mm
#
# Set cut for the phantom region
/run/setCutForRegion phantomRegion 1 nm
#
# Print a summary of particles/regions/cuts
/run/dumpCouples
#
/gps/particle proton
/gps/energy 3.5 MeV
#
# Square plane source
/gps/pos/type Plane
/gps/pos/shape Square
/gps/direction 0 0 1
/gps/pos/rot1 1 0 0
/gps/pos/rot2 0 1 0
/gps/pos/centre 0. 0. -50 um
/gps/pos/halfx 350 um
/gps/pos/halfy 350 um
#/gps/pos/halfx 0 um
#/gps/pos/halfy 0 um
#
# *********************************************************************
# VISUALIZATION SETTINGS
#
# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
#
# Use this open statement to create a .prim file suitable for
# viewing in DAWN:
#/vis/open DAWNFILE
#
# Use this open statement to create a .heprep file suitable for
# viewing in HepRApp:
#/vis/open HepRepFile
#
# Use this open statement to create a .wrl file suitable for
# viewing in a VRML viewer:
#/vis/open VRML2FILE
#
# Disable auto refresh and quieten vis messages whilst scene and
# trajectories are established:
/vis/viewer/set/autoRefresh false
/vis/verbose errors
#
# Draw geometry:
/vis/drawVolume
#
# Specify style (surface or wireframe):
/vis/viewer/set/style wireframe
#
# Theta and phi camera angle:
/vis/viewer/set/viewpointThetaPhi 30 45
#
# Specify zoom value:
/vis/viewer/zoom 1
#
# Specify viewpoint:
#/vis/viewer/set/viewpointVector 400 0 105.79
#
# Specify target point (so a viewpoint rotation keeps it in view)
#/vis/viewer/set/targetPoint -1461.42 0.0 -386.51 mm
#
# Draw coordinate axes:
#/vis/scene/add/axes 0 0 0 1 m
#
# Draw smooth trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
/vis/scene/add/trajectories smooth
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
#
# Draw hits at end of event:
/vis/scene/add/hits
#
# To draw only gammas:
#/vis/filtering/trajectories/create/particleFilter
#/vis/filtering/trajectories/particleFilter-0/add gamma
#
# To invert the above, drawing all particles except gammas,
# keep the above two lines but also add:
#/vis/filtering/trajectories/particleFilter-0/invert true
#
# Many other options are available with /vis/modeling and /vis/filtering.
# For example, to select colour by particle ID:
#/vis/modeling/trajectories/create/drawByParticleID
#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
#
# To superimpose all of the events from a given run:
/vis/scene/endOfEventAction accumulate
#
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
/vis/verbose warnings
#
# For file-based drivers, use this to create an empty detector view:
#/vis/viewer/flush
@@ -9,9 +9,13 @@
L. T. Anh, Y. Perrot, C. Villagrasa, S. Meylan, H. N. Tran
(\*) contact: yann.perrot@irsn.fr or carmen.villagrasa@irsn.fr
contact: yann.perrot@irsn.fr or le.tuan.anh@vinatom.gov.vn
\section dsbandrepair_s1 Introduction
\section dsbandrepair_s1 REFERENCE
Please cite:
Anh et al., Physica Medica 124 (2024) 103422, https://doi.org/10.1016/j.ejmp.2024.103422
\section dsbandrepair_s2 Introduction
“dsbandrepair” is a Geant4-DNA simulation chain for evaluating the early radiation-induced DNA damage.
The first development of the simulation chain was carried out by Meylan et al. in 2017 (Sci. Rep. 2017 7:11923)
@@ -24,10 +28,17 @@ The geometric models are constructed from 10 voxels to form a continuous chromat
Physical stage and chemical stage allow the calculation of direct and indirect Strand Breaks in the whole nucleus.
Furthermore, the Two Lesion Kinetic model (Radiat. Res. 2001 156:365-378) and the Local Effect Model IV (Radiat. Res. 2013 180:524-538) were also included to allow users calculate the survival fraction and un-rejoined DSBs.
The Belov's model (J. Theo. Biol. 2015 366:115-130) for double-strand breaks repair is provided but has not been compared to experimental data.
Furthermore, repair models were added in the analysis part:
\section dsbandrepair_s2 How to build and run
- The Two Lesion Kinetic model developed by Stewart (Radiat. Res. 2001 156:365-378) provides a method to link DSBs (subdivided into simple and complex DSBs) with cell death. It suggests that DSB repair depends on the severity of the lesion. It includes non-saturable first and second order repair processes. DNA fragments associated with DSBs can interact with each other in paors and form lethal or non-lethal chromosomal aberrations.
- The Local Effect Model IV from Tommasino et al (Radiat. Res. 2013 180:524-538) was included to calculate the fraction of un-rejoined DSBs.
It is based on the spatial distribution of DSBs by looking at the number of DSBs present in 2 Mbp chromatin loops.
DSBs in the loops are consideres as "isolated DSB" or "cluster of DSBs". the fraction of unrepaired DSBs is calculated by a two-phase exponential decay.
- The Belov's model (J. Theo. Biol. 2015 366:115-130) for double-strand breaks repair is provided but has not been compared to experimental data.
\section dsbandrepair_s3 How to build and run
To build dsbandrepair, in the terminal, use:
\verbatim
@@ -51,7 +62,7 @@ Note that: dsbandrepair was designed in a modular way that offers users to run p
where chem.in is a macrofile. User can change it to his/her own macrofile.
\section dsbandrepair_s3 Running with mpi library
\section dsbandrepair_s4 Running with mpi library
To improve the simulation in term of computational time, user can run dsbandrepair with mpi library.
@@ -77,7 +88,7 @@ Or ro run chemical stage:
- shell$ mpiexec -np $nranks ./dsbandrepair chem.in chem
\endverbatim
\section dsbandrepair_s4 Analyzing results
\section dsbandrepair_s5 Analyzing results
To run "analysis" module, in the "build" directory, build this module with the commands:
\verbatim
- shell$ mkdir analysis
@@ -98,14 +109,14 @@ or
where the macro file allows user to interact with the code.
Example: ./analysis/runAna analysis.in
\section dsbandrepair_s5 Outputs
\section dsbandrepair_s6 Outputs
By default, the output of "Analysis" module will be written in 4 different text files:
- SB results: this text file contains all SB results, such as total SB, direct and indirect SBs, SSB and DSB.
- SDD format: All damages are written in SDD format (Radiat. Res. 2019 191:11). File name starts with "SDD_"
- TLK result: File name starts with "TLK_". This file contains results from TLK model.
- LEM-IV result: File name starts with "LEMIV_". This file contains results from LEMIV model.
\section dsbandrepair_s6 Maro files
\section dsbandrepair_s7 Maro files
Some macro files are provided along with this code, user can change them based on their own needs.
- macro files for physical stage:
@@ -120,5 +131,5 @@ Some macro files are provided along with this code, user can change them based o
An alternative example for DNA damage calculation can be found in examples/extended/medical/dna/moleculardna
\section dsbandrepair_s7 Acknowledgments
\section dsbandrepair_s8 Acknowledgments
The transition from the initial simulation chain of Meylan et al. to a version adapted for a Geant4 example benefited from funds from the BioRad3 project financed by the ESA (grant DAR 4000132935/21/NL/CRS)
@@ -13,7 +13,7 @@ if (DOWNLOAD_GEOMETRY)
include(ExternalProject)
ExternalProject_Add(dnafabric_geometries
SOURCE_DIR ${PROJECT_BINARY_DIR}/dnafabric_geometries
URL https://cern.ch/geant4-data/datasets/examples/advanced/dsbandrepair/0/dnafabric_geometries.tar.xz
URL https://cern.ch/geant4-data/datasets/examples/advanced/dna/dsbandrepair/0/dnafabric_geometries.tar.xz
URL_HASH SHA256=7e77ec0dd4291599768a4c95b95f2456a1477b32f8141c97ddb78f982d828649
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
@@ -4,6 +4,16 @@ See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
## 2024-11-13 Le Tuan Anh (dsbandrepair-V11-02-03)
- Merge classes have the same functionality in PhysStage and ChemStage
## 2024-10-15 H. Tran (dsbandrepair-V11-02-02)
- Moved from to dna folder
## 2024-10-03 H. Tran (dsbandrepair-V11-02-01)
- Modified the molecule names of OH, HO2, O in MoleculeDefinition.
Each molecule configuration has a molecule definition.
## 2024-05-24 H. Tran (dsbandrepair-V11-02-00)
- used the EmParameter to control chemistry time step model
@@ -11,7 +11,12 @@
# AUTHORS
L. T. Anh, Y. Perrot, C. Villagrasa, S. Meylan, H. N. Tran
(\*) contact: yann.perrot@irsn.fr or carmen.villagrasa@irsn.fr
contact: yann.perrot@irsn.fr or le.tuan.anh@vinatom.gov.vn
# REFERENCE
Please cite:
Anh et al., Physica Medica 124 (2024) 103422, https://doi.org/10.1016/j.ejmp.2024.103422
# Introduction
@@ -26,8 +31,15 @@ The geometric models are constructed from 10 voxels to form a continuous chromat
Physical stage and chemical stage allow the calculation of direct and indirect Strand Breaks in the whole nucleus.
Furthermore, the Two Lesion Kinetic model (Radiat. Res. 2001 156:365-378) and the Local Effect Model IV (Radiat. Res. 2013 180:524-538) were also included to allow users calculate the survival fraction and un-rejoined DSBs.
The Belov's model (J. Theo. Biol. 2015 366:115-130) for double-strand breaks repair is provided but has not been compared to experimental data.
Furthermore, repair models were added in the analysis part:
- The Two Lesion Kinetic model developed by Stewart (Radiat. Res. 2001 156:365-378) provides a method to link DSBs (subdivided into simple and complex DSBs) with cell death. It suggests that DSB repair depends on the severity of the lesion. It includes non-saturable first and second order repair processes. DNA fragments associated with DSBs can interact with each other in paors and form lethal or non-lethal chromosomal aberrations.
- The Local Effect Model IV from Tommasino et al (Radiat. Res. 2013 180:524-538) was included to calculate the fraction of un-rejoined DSBs.
It is based on the spatial distribution of DSBs by looking at the number of DSBs present in 2 Mbp chromatin loops.
DSBs in the loops are consideres as "isolated DSB" or "cluster of DSBs". the fraction of unrepaired DSBs is calculated by a two-phase exponential decay.
- The Belov's model (J. Theo. Biol. 2015 366:115-130) for double-strand breaks repair is provided but has not been compared to experimental data.
# How to build and run
@@ -28,6 +28,7 @@
/// \brief Implementation of the ScanDamage class
#include "ScanDamage.hh"
#include "ParametersParser.hh"
#include "TSystemDirectory.h"
#include "TFile.h"
@@ -274,7 +275,9 @@ void ScanDamage::ScanDamageFromPhys()
void ScanDamage::ScanDamageFromChem()
{
std::cout<<"===== Start Scanning Damages From Chem =====\n";
fs::path currentP{"chem_output"};
std::string fChemOutFolderName = ParametersParser::Instance()->GetChemOutFolderName();
if (fChemOutFolderName == "") fChemOutFolderName = "chem_output";
fs::path currentP{fChemOutFolderName};
fs::file_status s = fs::file_status{};
auto isExist = fs::status_known(s) ? fs::exists(s) : fs::exists(currentP);
if (isExist) {
@@ -286,14 +289,14 @@ void ScanDamage::ScanDamageFromChem()
}
}
if (!isFoundRootFiles) {
std::cout<<"=====>> No root files found in folder \"chem_ouput\"!!! Skip Scanning Damages From Chem =====\n";
std::cout<<"=====>> No root files found in folder \""<<fChemOutFolderName<<"\"!!! Skip Scanning Damages From Chem =====\n";
fSkipScanningIndirectDamage = true;
}
if (fchemTables.size() > 0) {
SortChemTableWithSelection();
}
} else {
std::cout<<"=====>> Cannot find folder \"chem_ouput\"!!! Skip Scanning Damages From Chem =====\n";
std::cout<<"=====>> Cannot find folder \""<<fChemOutFolderName<<"\"!!! Skip Scanning Damages From Chem =====\n";
fSkipScanningIndirectDamage = true;
}
@@ -350,13 +353,13 @@ void ScanDamage::AnaChemRootFile(fs::directory_entry entry)
if( (int) chemTree->GetEntries() >0)
{
double strand;
double copyNumber;
int strand;
int copyNumber;
double xp;
double yp;
double zp;
double time;
double base;
int base;
chemTree->SetBranchAddress("strand", &strand);
chemTree->SetBranchAddress("copyNumber", &copyNumber);
chemTree->SetBranchAddress("xp", &xp);
@@ -405,17 +408,17 @@ void ScanDamage::AnaPhysRootTree1(TFile* f)
if( tPhys->GetEntries() > 0)
{
double flagParticle;
double flagParentID;
double flagProcess;
int flagParticle;
int flagParentID;
int flagProcess;
double x;
double y;
double z;
double edep;
double eventNumber;
double volumeName;
double copyNumber;
double lastMetVoxelCopyNum;
int eventNumber;
int volumeName;
int copyNumber;
int lastMetVoxelCopyNum;
tPhys->SetBranchAddress("flagParticle", &flagParticle);
tPhys->SetBranchAddress("flagParentID", &flagParentID);
@@ -528,7 +531,7 @@ void ScanDamage::AnaPhysRootTree2(TFile* f)
if( int(tPhys2->GetEntries() ) > 0)
{
double edep;
double eventNumber;
int eventNumber;
tPhys2->SetBranchAddress("edep", &edep);
tPhys2->SetBranchAddress("eventNumber", &eventNumber);
@@ -72,10 +72,12 @@ public:
std::string GetCellNucleusName() {return fCellNucleusName;};
int GetUnitTypeOfNormalization() {return fUnitOfNormalization;}
bool WannaSkipScanningIndirectDamage() {return fSkipScanningIndirectDamage;}
std::string GetChemOutFolderName() {return fChemOutFolderName;}
private:
explicit ParametersParser();
static ParametersParser* fInstance;
std::string fOutputName{"Output.dat"};
std::string fChemOutFolderName{""};
std::string fSDDfileName{""};
std::string fCellNucleusName{"Undefined"};
std::string fThresholdE{""};
@@ -40,10 +40,11 @@ int main(int argc,char** argv)
<<"\n"
<<"--------------------------> Start running <--------------------------"<<std::endl;
ParametersParser *parParser = ParametersParser::Instance();
std::string macrofile="analysis.in";
if (argc > 1) {
std::string macrofile = argv[1];
parParser->LoadParameters(macrofile);
macrofile = argv[1];
}
parParser->LoadParameters(macrofile);
AnalysisHandler aAna;
if (parParser->GetBpForDSB() > 0) aAna.SetBpForDSB(parParser->GetBpForDSB());
@@ -164,6 +164,16 @@ int LEMIVModel::GetDSBPerLoop(std::vector<Damage> vecDamage,unsigned int startLo
void LEMIVModel::CalculateRepair(double pTMax, double pDeltaT)
{
if (pTMax <= 0.) {
std::cout<<"LEMIVModel::CalculateRepair() wrong value for timeMax !!!\n"
<<"Plese check the input macro file!!!"<<std::endl;
exit(0);
}
if (pDeltaT <= 0.) {
std::cout<<"LEMIVModel::CalculateRepair() wrong value for deltaTime !!!\n"
<<"Plese check the input macro file!!!"<<std::endl;
exit(0);
}
fUCurve.clear();
for(double time=0.;time<=pTMax;time+=pDeltaT)
@@ -62,7 +62,9 @@ void ParametersParser::LoadParameters(const std::string &fileName)
std::ifstream file;
file.open(fileName.c_str());
if (!file.is_open()) {
std::cout<<"ParametersParser::LoadParameters Error in openning file!!!"<<std::endl;
std::cout<<"ParametersParser::LoadParameters Error in openning file!!!\n"
<<"Plese check the input macro file!!!"<<std::endl;
exit(0);
} else {
std::string line;
while(std::getline(file, line))
@@ -99,6 +101,7 @@ void ParametersParser::LoadParameters(const std::string &fileName)
if (flag == "/ana/BELOV/used") useBELOV = tvalue;
if (flag == "/ana/ouputName") fOutputName = tvalue;
if (flag == "/ana/folderForChemOut") fChemOutFolderName = tvalue;
if (flag == "/ana/cellNucleusName") fCellNucleusName = tvalue;
if (flag == "/ana/loadDamagesFromSDD") {
fSDDfileName = tvalue;
@@ -44,14 +44,11 @@
#include "G4VisExecutive.hh"
#include "G4Filesystem.hh"
#include "PhysActionInitialization.hh"
#include "ActionInitialization.hh"
#include "DetectorConstruction.hh"
#include "PhysicsList.hh"
#include "InformationKeeper.hh"
#include "ChemActionInitialization.hh"
#include "ChemPhysicsList.hh"
#include "ChemNtupleManager.hh"
#include "Analysis.hh"
#ifdef USE_MPI
#include "G4MPImanager.hh"
@@ -62,7 +59,6 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void CheckingSomeFilesAndFolders();
G4String ExtractChemListNameFromMacroFile(G4String);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -87,13 +83,21 @@ int main(int argc,char** argv)
#ifdef USE_MPI
delete g4MPI;
#endif // USE_MPI
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
G4String stgstr = "";
G4String macrofileName = argv[1];
if (argc > 2) {
const G4String rmode = argv[2];
if (rmode == "phys") gRunMode = RunningMode::Phys;
if (rmode == "chem") gRunMode = RunningMode::Chem;
else if (rmode == "chem") gRunMode = RunningMode::Chem;
else {
G4cout<<"Undefined Running Mode = "<<rmode<<" ;dsbansrepair will quit now. See you!\n";
#ifdef USE_MPI
delete g4MPI;
#endif // USE_MPI
return EXIT_SUCCESS;
}
}
// Choose the Random engine
time_t timeStart;
@@ -101,48 +105,46 @@ int main(int argc,char** argv)
unsigned long seed = timeStart;
#ifdef USE_MPI
// Le Tuan Anh: add rankID to get different seeds for multi parallel processes
seed += 1987*g4MPI->GetRank();
seed += g4MPI->GetRank();
#endif // USE_MPI
G4cout<<"Initial Seed for random engine: "<<seed<<G4endl;
CLHEP::HepRandom::setTheEngine(new CLHEP::MTwistEngine);
CLHEP::HepRandom::setTheSeed(seed);
G4RunManager* runManager{nullptr};
auto analysis = Analysis::GetAnalysis();
if (gRunMode == RunningMode::Phys) {
#ifdef USE_MPI
if (g4MPI->GetRank() == 0 ){
CheckingSomeFilesAndFolders();
}
#else
CheckingSomeFilesAndFolders();
#endif // USE_MPI
G4Random::setTheSeed(seed);
auto* runManager = G4RunManagerFactory::CreateRunManager(G4RunManagerType::Default);
stgstr = "physical stage";
runManager = G4RunManagerFactory::CreateRunManager(G4RunManagerType::Default);
#ifdef G4MULTITHREADED
G4int threadNumber= 1;
runManager-> SetNumberOfThreads(threadNumber);
#endif // G4MULTITHREADED
#ifdef USE_MPI
stgstr += " in #rank"+std::to_string(g4MPI->GetRank());
if (g4MPI->IsMaster()) analysis->CheckAndCreateNewFolderInPhysStage();
#else
analysis->CheckAndCreateNewFolderInPhysStage();
#endif
} else if (gRunMode == RunningMode::Chem) {
stgstr = "chemical stage";
runManager = G4RunManagerFactory::CreateRunManager(G4RunManagerType::Serial);
G4DNAChemistryManager::Instance()->SetChemistryActivation(true);
G4Scheduler::Instance();
}
DetectorConstruction* detector = new DetectorConstruction(1.,0,false);
runManager->SetUserInitialization(detector);
PhysicsList* physList = new PhysicsList;
runManager->SetUserInitialization(physList);
ActionInitialization* actionIni = new ActionInitialization();
PhysActionInitialization* actionIni = new PhysActionInitialization();
if (gRunMode == RunningMode::Phys) {
runManager->SetUserInitialization(physList);
runManager->SetUserInitialization(actionIni);
#ifdef USE_MPI
// extra worker (for collecting ntuple data)
if ( g4MPI->IsExtraWorker() ) {
G4cout << "Set extra worker" << G4endl;
G4UserRunAction* runAction = const_cast<G4UserRunAction*>(runManager->GetUserRunAction());
g4MPI->SetExtraWorker(new G4MPIextraWorker(runAction));
}
session-> SessionStart();
if (g4MPI->GetRank() == 0 ){
InformationKeeper::Instance()->WritePhysGeo();
analysis->WritePhysGeo();
}
delete g4MPI;
#else
// Get the pointer to the User Interface manager
G4UImanager* UImanager = G4UImanager::GetUIpointer();
@@ -152,10 +154,26 @@ int main(int argc,char** argv)
G4String command = "/control/execute ";
UImanager->ApplyCommand(command+macrofileName);
}
InformationKeeper::Instance()->WritePhysGeo();
analysis->WritePhysGeo();
#endif // USE_MPI
delete runManager;
} else if (gRunMode == RunningMode::Chem) {
}
if (gRunMode == RunningMode::Chem) {
//get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
#ifdef USE_MPI
session->SessionStart();
stgstr += " in #rank"+std::to_string(g4MPI->GetRank());
if (g4MPI->IsMaster()) analysis->CheckAndCreateNewFolderInChemStage();
#else
G4String command = "/control/execute ";
UI->ApplyCommand(command+macrofileName);
analysis->CheckAndCreateNewFolderInChemStage();
#endif
//------------------------------------------
// Prepare input file
//------------------------------------------
std::string inputFileorFolder = "chem_input";
if (argc == 4) inputFileorFolder = argv[3];
G4fs::path p{inputFileorFolder};
@@ -194,7 +212,11 @@ int main(int argc,char** argv)
if (totalNumberofFilesVector.size() == 0) {
G4cout<<"===>> There is no files found in "<<inputFileorFolder
<<". You have to run Phys_geo first!!!"<<G4endl;
//return EXIT_SUCCESS;
#ifdef USE_MPI
delete g4MPI;
#endif // USE_MPI
delete runManager;
return EXIT_SUCCESS;
} else {
G4cout<<"===>> Total files found in "<<inputFileorFolder
<<" : "<<totalNumberofFilesVector.size()<<G4endl;
@@ -206,38 +228,17 @@ int main(int argc,char** argv)
} else outputFileName = inputFileorFolder;
}
else G4cout<<"===>>dsbandrepair: "<<p.string()<<" is Not Directory or file !!!"<<G4endl;
//------------------------------------------
// Initialization classes
//------------------------------------------
auto* runManager = G4RunManagerFactory::CreateRunManager(G4RunManagerType::Serial);
G4DNAChemistryManager::Instance()->SetChemistryActivation(true);
ChemNtupleManager ntupleManager;
DetectorConstruction* detector = new DetectorConstruction();
G4String firstFileForInit="";
if (numberOfFilesTobeProcessedVector.size()>0) {
firstFileForInit=numberOfFilesTobeProcessedVector.at(0);
detector->ParseGeoFileForChemMode(firstFileForInit); // read to build voxel
}
runManager->SetUserInitialization(detector);
G4String chemListName = ExtractChemListNameFromMacroFile(macrofileName);
ChemPhysicsList* physList;
if (chemListName != "") {
physList = new ChemPhysicsList(chemListName);
} else physList = new ChemPhysicsList();
//------------------------------------------
// Initialization classes
//------------------------------------------
runManager->SetUserInitialization(physList);
ChemActionInitialization* actionIni = new ChemActionInitialization(&ntupleManager,physList);
runManager->SetUserInitialization(actionIni);
//get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
G4String command = "/control/execute ";
UI->ApplyCommand(command+macrofileName);
runManager->Initialize();
if (numberOfFilesTobeProcessedVector.size()>0) {
size_t nprocessedfiles{0}, ncounts{1};
@@ -249,7 +250,7 @@ int main(int argc,char** argv)
if (aP.has_stem()) {
outputFileName = aP.stem().string();
} else outputFileName = fileInput;
ntupleManager.SetFileName(outputFileName);
analysis->SetFileName(outputFileName);
if (fileInput != firstFileForInit) detector->ParseGeoFileForChemMode(fileInput);
detector->InsertMoleculeInWorld();
UI->ApplyCommand("/run/beamOn 1");
@@ -268,67 +269,15 @@ int main(int argc,char** argv)
} else {
UI->ApplyCommand("/run/beamOn 1");
}
}
#ifdef USE_MPI
delete g4MPI;
#endif // USE_MPI
delete runManager;
} else {
G4cout<<"Undefined Running Mode; dsbansrepair will quit now. See you!\n";
}
G4cout <<"----------------------> Finish "<<stgstr<<"!!! Good bye :) <----------------------"<<G4endl;
return EXIT_SUCCESS;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void CheckingSomeFilesAndFolders()
{
const G4fs::path curPath{G4fs::current_path()};
// create output folder for containing Phys output
G4fs::file_status fst = G4fs::file_status{};
const G4fs::path outFolderPhysP{InformationKeeper::Instance()->GetPhysOutFolderName().c_str()};
auto isExist = G4fs::status_known(fst) ? G4fs::exists(fst) : G4fs::exists(outFolderPhysP);
if (! isExist) {
G4fs::create_directory(outFolderPhysP);
} else {
G4fs::remove_all(outFolderPhysP);//delete old folder
G4fs::create_directory(outFolderPhysP);
}
// create output folder for containing chem_input
const G4fs::path outFolderP{InformationKeeper::Instance()->GetChemInputFolderName().c_str()};
isExist = G4fs::status_known(fst) ? G4fs::exists(fst) : G4fs::exists(outFolderP);
if (! isExist) {
G4fs::create_directory(outFolderP);
} else {
G4fs::remove_all(outFolderP);//delete old folder
G4fs::create_directory(outFolderP);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4String ExtractChemListNameFromMacroFile(G4String fileName)
{
G4String out="";
std::ifstream file;
file.open(fileName.c_str());
if (!file.is_open()) {
G4String msg = "Error in openning file " + fileName;
G4Exception("G4String ExtractChemListNameFromMacroFile()", "", FatalException, msg);
} else {
G4String line;
while(std::getline(file, line))
{
std::istringstream iss(line);
G4String flag;
iss >> flag;
G4String tvalue;
iss >> tvalue;
if (flag == "/dsbandrepair/chem/chemList") out = tvalue;
}
}
file.close();
return out;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,4 +1,4 @@
Initial Seed for random engine: 1719414420
Initial Seed for random engine: 1733190484
Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Forcing G4RunManager type...
############################################
@@ -12,7 +12,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
**************************************************************
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -75,10 +75,13 @@ Bremsstrahlung energy threshold above which
primary e+- is added to the list of secondary 100 TeV
Bremsstrahlung energy threshold above which primary
muon/hadron is added to the list of secondary 100 TeV
Positron annihilation at rest model AllisonPositronium
Enable 3 gamma annihilation on fly 0
Lowest triplet kinetic energy 1 MeV
Enable sampling of gamma linear polarisation 0
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
Use Ricardo-Gerardo pair production model 0
Livermore data directory epics_2017
=======================================================================
====== Ionisation Parameters ========
@@ -522,3 +525,4 @@ hIoni: for pi- XStype:3 SubType=2
--> Event 0 starts.
... write file : phys_output/phys_output.root - done
... close file : phys_output/phys_output.root - done
----------------------> Finish physical stage!!! Good bye :) <----------------------
@@ -24,19 +24,19 @@
// ********************************************************************
//
//
/// \file PhysActionInitialization.hh
/// \brief Definition of the PhysActionInitialization class
/// \file ActionInitialization.hh
/// \brief Definition of the ActionInitialization class
#ifndef PHYSACTIONINITIALIZATION_HH
#define PHYSACTIONINITIALIZATION_HH
#ifndef ACTIONINITIALIZATION_HH
#define ACTIONINITIALIZATION_HH
#include "G4VUserActionInitialization.hh"
class PhysActionInitialization : public G4VUserActionInitialization
class ActionInitialization : public G4VUserActionInitialization
{
public:
PhysActionInitialization() = default;
~PhysActionInitialization() override = default;
ActionInitialization() = default;
~ActionInitialization() override = default;
void BuildForMaster() const override;
void Build() const override;
@@ -24,15 +24,18 @@
// ********************************************************************
//
//
/// \file PhysAnalysis.hh
/// \brief Definition of the PhysAnalysis class
/// \file Analysis.hh
/// \brief Definition of the Analysis class
/// \file Analysis.hh
/// \brief Definition of the Analysis class
#ifndef PHYSANALYSIS_h
#define PHYSANALYSIS_h 1
#ifndef ANALYSIS_h
#define ANALYSIS_h 1
#include "G4ThreeVector.hh"
#include <map>
#include "G4AnalysisManager.hh"
#include "G4GenericMessenger.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -44,18 +47,18 @@
struct InfoForChemGeo // store info for creating input files for chem stage
{
G4double fType{0.}; // water: 1; solvated electron=2
G4double fState{-99.}; // no state for solvated electron
G4double fElectronicLevel{-99.}; // no electronic level for solvated electron
G4int fType{0}; // water: 1; solvated electron=2
G4int fState{-99}; // no state for solvated electron
G4int fElectronicLevel{-99}; // no electronic level for solvated electron
G4double fX{0.}; // position of the incoming track
G4double fY{0.}; // position of the incoming track
G4double fZ{0.}; // position of the incoming track
G4double fParentTrackID{-1.};
G4double fEventNumber{-1.};
G4double fVolume{-1.};
G4double fVolumeCopyNumber{-1.};
G4double fMotherVolume{-1.};
G4double fMotherVolumeCopyNumber{-1.};
G4int fParentTrackID{-1};
G4int fEventNumber{-1};
G4int fVolume{-1};
G4int fVolumeCopyNumber{-1};
G4int fMotherVolume{-1};
G4int fMotherVolumeCopyNumber{-1};
G4double fRelX{-1.};
G4double fRelY{-1.};
G4double fRelZ{-1.};
@@ -65,47 +68,71 @@ struct InfoForChemGeo // store info for creating input files for chem stage
struct InfoInPhysStage // store info created in Physical stage
{
G4double fFlagParticle{-1.};
G4double fFlagParentID{-1.};
G4double fFlagProcess{-1.};
G4int fFlagParticle{-1};
G4int fFlagParentID{-1};
G4int fFlagProcess{-1};
G4double fX{-1.};
G4double fY{-1.};
G4double fZ{-1.};
G4double fEdep{-1.};
G4double fEventNumber{-1.};
G4double fVolumeName{-1.};
G4double fCopyNumber{-1.};
G4double fLastMetVoxelCopyNum{-1.};
G4int fEventNumber{-1};
G4int fVolumeName{-1};
G4int fCopyNumber{-1};
G4int fLastMetVoxelCopyNum{-1};
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PhysAnalysis
class Analysis
{
public:
~PhysAnalysis() = default;
static PhysAnalysis* GetAnalysis();
~Analysis() = default;
static Analysis* GetAnalysis();
void OpenFile(const G4String& fname);
void OpenFile(const G4String outFolder="");
void Save();
void Close(G4bool reset = true);
void SetFileName(const G4String& name) {fFileName = name;};
void Book();
G4AnalysisManager* GetAnalysisManager();
void ClearVector() ; // being called in Beginofeventaction
void AddInfoForChemGeo(InfoForChemGeo);
void AddInfoInPhysStage(InfoInPhysStage);
void UpdateChemInputDataAndFillNtuple(); // being called in Endofeventaction
void RecordCellDefFiliePath(const G4String &pth) {fCellDefFilePath = pth;};
void RecordVoxelDefFilesList(std::set<G4String> list) {fVoxelDefFilesList = list;};
void RecordChemInputFolderName(const G4String &pth) {fChemInputFolderName = pth;};
void WritePhysGeo();
G4String GetChemInputFolderName() {return fChemInputFolderName;}
G4String GetPhysOutFolderName() {return fPhysOutFolderName;}
G4String GetChemOutFolderName() {return fChemOutFolderName;}
void SetTotalNbBpPlacedInGeo(unsigned long long val) {fTotalNbBpPlacedInGeo = val;}
void SetTotalNbHistonePlacedInGeo(unsigned long long val) {fTotalNbHistonePlacedInGeo = val;}
void SetNucleusVolume(G4double vl) {fNucleusVolume = vl;};
void SetNucleusMassDensity(G4double md) {fNucleusMassDensity = md;};
void CheckAndCreateNewFolderInChemStage();
void CheckAndCreateNewFolderInPhysStage();
private:
PhysAnalysis() = default;
Analysis() {DefineCommands();};
G4String CreateChemInputFile(G4int eventNum,G4int volumeCopyNumber,const G4String &voxelName);
void UpdatingChemInputFile(InfoForChemGeo);
void UpdatingChemInputFile(InfoInPhysStage);
std::vector<InfoForChemGeo> fInfoForChemGeoVector;
std::vector<InfoInPhysStage> fInfoInPhysStageVector;
std::map<G4double, std::map<G4double, G4String> > fOutputFiles;
G4String fOutputFolder="";
DISALLOW_COPY_AND_ASSIGN(PhysAnalysis);
G4String fCellDefFilePath;
std::set<G4String> fVoxelDefFilesList;
G4String fChemInputFolderName{"chem_input"};
G4String fPhysOutFolderName{"phys_output"};
G4String fChemOutFolderName{"chem_output"};
unsigned long long fTotalNbBpPlacedInGeo{0};
unsigned long long fTotalNbHistonePlacedInGeo{0};
G4double fNucleusVolume{0.};
G4double fNucleusMassDensity{0.};
G4String fFileName="Output";// output
std::unique_ptr<G4GenericMessenger> fMessenger;
void DefineCommands();
DISALLOW_COPY_AND_ASSIGN(Analysis);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
/// \file PhysEventAction.hh
/// \brief Definition of the PhysEventAction class
/// \file EventAction.hh
/// \brief Definition of the EventAction class
#ifndef PHYSEVENTACTION_HH
#define PHYSEVENTACTION_HH
@@ -33,11 +33,11 @@
#include "G4UserEventAction.hh"
#include "globals.hh"
class PhysEventAction : public G4UserEventAction
class EventAction : public G4UserEventAction
{
public:
PhysEventAction() = default;
~PhysEventAction() override = default;
EventAction() = default;
~EventAction() override = default;
G4int GetEventNumber();
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
/// \file ChemITSteppingAction.hh
/// \brief Definition of the ChemITSteppingAction class
/// \file ITSteppingAction.hh
/// \brief Definition of the ITSteppingAction class
#ifndef ChemITSteppingAction_h
#define ChemITSteppingAction_h 1
@@ -33,11 +33,11 @@
#include "G4UserSteppingAction.hh"
#include "G4Step.hh"
class ChemITSteppingAction : public G4UserSteppingAction
class ITSteppingAction : public G4UserSteppingAction
{
public:
ChemITSteppingAction() = default;
~ChemITSteppingAction() override = default;
ITSteppingAction() = default;
~ITSteppingAction() override = default;
void UserSteppingAction(const G4Step*) override;
@@ -31,11 +31,11 @@
#define PhysChemIO_h 1
#include "G4VPhysChemIO.hh"
class PhysSteppingAction;
class SteppingAction;
class PhysChemIO : public G4VPhysChemIO
{
public:
PhysChemIO(PhysSteppingAction* steppingAction);
PhysChemIO(SteppingAction* steppingAction);
~PhysChemIO() override = default;
void CreateWaterMolecule(G4int /*electronicModif*/,
G4int /*electronicLevel*/,
@@ -50,7 +50,7 @@ public:
void WriteInto(const G4String&, std::ios_base::openmode) override {};
void CloseFile() override {};
private:
PhysSteppingAction* fSteppingAction;
SteppingAction* fSteppingAction;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,7 +35,9 @@
#include <memory>
#include "G4VPhysicsConstructor.hh"
#include "PhysicsMessenger.hh"
#include "G4GenericMessenger.hh"
#include "G4EmDNAChemistry_option2.hh"
#include "G4EmDNAChemistry_option3_Extended.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -49,10 +51,15 @@ public:
void ConstructProcess() override;
void RegisterPhysicsList(const G4String& name);
void RegisterChemListConstructor(const G4String& name);
void SetChemListName(const G4String& cname) {fChemListName = cname;}
private:
std::unique_ptr<G4VPhysicsConstructor> fDNAPhysicsList{nullptr};
std::unique_ptr<PhysicsMessenger> fPhysMsg{nullptr};
std::unique_ptr<G4VPhysicsConstructor> fEmDNAChemistryList{nullptr};
std::unique_ptr<G4GenericMessenger> fMessenger;
G4String fPhysDNAName{""};
G4String fChemListName{""};
void DefineCommands();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,11 +24,11 @@
// ********************************************************************
//
//
/// \file PhysPrimaryGeneratorAction.hh
/// \brief Definition of the PhysPrimaryGeneratorAction class
/// \file PrimaryGeneratorAction.hh
/// \brief Definition of the PrimaryGeneratorAction class
#ifndef PhysPrimaryGeneratorAction_h
#define PhysPrimaryGeneratorAction_h 1
#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4ParticleGun.hh"
@@ -42,12 +42,12 @@ class G4GeneralParticleSource;
class G4Event;
class DetectorConstruction;
class PhysPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
PhysPrimaryGeneratorAction();
~PhysPrimaryGeneratorAction() override;
PrimaryGeneratorAction();
~PrimaryGeneratorAction() override;
void GeneratePrimaries(G4Event*) override;
@@ -24,11 +24,11 @@
// ********************************************************************
//
//
/// \file PhysRunAction.hh
/// \brief Definition of the PhysRunAction class
/// \file RunAction.hh
/// \brief Definition of the RunAction class
#ifndef PhysRunAction_h
#define PhysRunAction_h 1
#ifndef RunAction_h
#define RunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
@@ -40,18 +40,17 @@
class G4Run;
class PhysRunAction : public G4UserRunAction
class RunAction : public G4UserRunAction
{
public:
PhysRunAction();
~PhysRunAction() override = default;
RunAction();
~RunAction() override = default;
void BeginOfRunAction(const G4Run*) override;
void EndOfRunAction(const G4Run*) override;
private:
void CreateNtuple();
void WriteNtuple();
};

Some files were not shown because too many files have changed in this diff Show More