From da4c8646413880b987953eabc2abc52c4d918d9c Mon Sep 17 00:00:00 2001 From: Thomas BAUDIER Date: Wed, 21 Feb 2024 17:28:01 +0100 Subject: [PATCH 1/7] Prepare for Gate 9.4 with Geant 11.2.1 --- .github/workflows/Dockerfile_gatebenchmarks | 14 +++++++------- .github/workflows/main.yml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Dockerfile_gatebenchmarks b/.github/workflows/Dockerfile_gatebenchmarks index 8491a02..013a7ce 100644 --- a/.github/workflows/Dockerfile_gatebenchmarks +++ b/.github/workflows/Dockerfile_gatebenchmarks @@ -54,7 +54,7 @@ RUN mkdir software/geant4 \ && source /etc/mybashrc \ && cd software/geant4 \ && mkdir src bin install data \ - && git clone --branch v11.1.0 https://github.com/Geant4/geant4.git src \ + && git clone --branch v11.2.1 https://github.com/Geant4/geant4.git src \ && cd bin \ && cmake ../src/ -DGEANT4_INSTALL_DATA=OFF \ -DGEANT4_INSTALL_DATADIR=/software/geant4/data \ @@ -76,8 +76,8 @@ RUN cd software/geant4 \ && mv G4* data RUN cd software/geant4 \ - && wget https://cern.ch/geant4-data/datasets/G4EMLOW.8.2.tar.gz \ - && tar xzvf G4EMLOW.8.2.tar.gz \ + && wget https://cern.ch/geant4-data/datasets/G4EMLOW.8.5.tar.gz \ + && tar xzvf G4EMLOW.8.5.tar.gz \ && rm -f G4*.tar.gz \ && mv G4* data @@ -102,11 +102,11 @@ RUN cd software/geant4 \ && mv G4* data RUN cd software/geant4 \ - && wget https://cern.ch/geant4-data/datasets/G4ABLA.3.1.tar.gz \ - && wget https://cern.ch/geant4-data/datasets/G4INCL.1.0.tar.gz \ + && wget https://cern.ch/geant4-data/datasets/G4ABLA.3.3.tar.gz \ + && wget https://cern.ch/geant4-data/datasets/G4INCL.1.2.tar.gz \ && wget https://cern.ch/geant4-data/datasets/G4ENSDFSTATE.2.3.tar.gz \ - && tar xzvf G4ABLA.3.1.tar.gz \ - && tar xzvf G4INCL.1.0.tar.gz \ + && tar xzvf G4ABLA.3.3.tar.gz \ + && tar xzvf G4INCL.1.2.tar.gz \ && tar xzvf G4ENSDFSTATE.2.3.tar.gz \ && rm -f G4*.tar.gz \ && mv G4* data diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f3e419c..df068ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -78,5 +78,5 @@ jobs: - name: Run the test in docker run: | ls $GITHUB_WORKSPACE - docker run --rm -e "TEST=${{ matrix.strategy_name }}" -v $GITHUB_WORKSPACE:/home tbaudier/gatebenchmarks:9.3 /home/.github/workflows/runTest.sh + docker run --rm -e "TEST=${{ matrix.strategy_name }}" -v $GITHUB_WORKSPACE:/home tbaudier/gatebenchmarks:9.4 /home/.github/workflows/runTest.sh From 681dc4f24a0b49f3197ecef118a2b2a8638638ff Mon Sep 17 00:00:00 2001 From: Thomas BAUDIER Date: Wed, 21 Feb 2024 17:35:58 +0100 Subject: [PATCH 2/7] Remove t7_garf because garf is useless with Gate9 --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df068ce..542f5cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,6 @@ jobs: t4_necr, t5_pet, t6_dpk, - t7_garf, t8_LETActor, t10_SpectroGamma, t11_EMField, From 6d94d1a9624c9ee64056a05a29d8dd821626b865 Mon Sep 17 00:00:00 2001 From: Thomas BAUDIER Date: Thu, 22 Feb 2024 08:38:49 +0100 Subject: [PATCH 3/7] For t13, compare the tolerance with abs value to avoid negative value Increase tolerance --- t13_phsp/runAnalysis.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t13_phsp/runAnalysis.py b/t13_phsp/runAnalysis.py index a1aecfe..174b87f 100755 --- a/t13_phsp/runAnalysis.py +++ b/t13_phsp/runAnalysis.py @@ -52,8 +52,8 @@ def compare_branch(t1, t2, key, tol): b2 = t2[key] m1 = np.mean(b1) m2 = np.mean(b2) - diff_m = (m1 - m2) / m1 * 100 - diff_s = (np.std(b1) - np.std(b2)) / np.std(b1) * 100 + diff_m = abs((m1 - m2) / m1 * 100) + diff_s = abs((np.std(b1) - np.std(b2)) / np.std(b1) * 100) r = True if diff_m > tol: r = False @@ -77,7 +77,7 @@ def analyse_one_folder(folder): # compare some branches keys = ['Ekine', 'X', 'Y', 'Z', 'dX', 'dY', 'dZ', 'Weight', 'Time'] - tols = [2, 15, 5, 5, 30, 30, 30, 2, 2] + tols = [2, 15, 15, 5, 30, 30, 30, 2, 8] r = True for k, t in zip(keys, tols): r = compare_branch(tree1, tree2, k, t) & r From e759c3ffc888c3acf3eee17a2d3bd0dadb2e3871 Mon Sep 17 00:00:00 2001 From: Thomas BAUDIER Date: Thu, 22 Feb 2024 08:39:48 +0100 Subject: [PATCH 4/7] With Geant4 11.2.0, the 137Cs ion has a problem, use 99Tcm --- t10_SpectroGamma/data/99Tc.txt | 5 +++++ t10_SpectroGamma/mac/main.mac | 2 +- t10_SpectroGamma/mac/source_99Tc.mac | 7 +++++++ t10_SpectroGamma/mac/spectrum_99Tc.mac | 9 +++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 t10_SpectroGamma/data/99Tc.txt create mode 100644 t10_SpectroGamma/mac/source_99Tc.mac create mode 100644 t10_SpectroGamma/mac/spectrum_99Tc.mac diff --git a/t10_SpectroGamma/data/99Tc.txt b/t10_SpectroGamma/data/99Tc.txt new file mode 100644 index 0000000..e6edb9e --- /dev/null +++ b/t10_SpectroGamma/data/99Tc.txt @@ -0,0 +1,5 @@ +1 0 +0.140511 88.5 +0.0183672 4.21 +0.018251 2.22 +0.020669 1.12 diff --git a/t10_SpectroGamma/mac/main.mac b/t10_SpectroGamma/mac/main.mac index 9d9ffd7..962bfca 100755 --- a/t10_SpectroGamma/mac/main.mac +++ b/t10_SpectroGamma/mac/main.mac @@ -53,7 +53,7 @@ # Source #============================================================================================== -/control/execute mac/{type}_137Cs.mac +/control/execute mac/{type}_99Tc.mac #============================================================================================== # Start simulation diff --git a/t10_SpectroGamma/mac/source_99Tc.mac b/t10_SpectroGamma/mac/source_99Tc.mac new file mode 100644 index 0000000..c72cd1f --- /dev/null +++ b/t10_SpectroGamma/mac/source_99Tc.mac @@ -0,0 +1,7 @@ +/gate/source/addSource tc99m +/gate/source/tc99m/gps/particle ion +/gate/source/tc99m/gps/ion 43 99 0 0 +/gate/source/tc99m/useDefaultHalfLife +/gate/source/tc99m/gps/type Point +/gate/source/tc99m/gps/angtype iso +/gate/source/tc99m/gps/centre 0. 0. 0. cm diff --git a/t10_SpectroGamma/mac/spectrum_99Tc.mac b/t10_SpectroGamma/mac/spectrum_99Tc.mac new file mode 100644 index 0000000..d113b4b --- /dev/null +++ b/t10_SpectroGamma/mac/spectrum_99Tc.mac @@ -0,0 +1,9 @@ +/gate/source/addSource 99Tc gps +/gate/source/99Tc/gps/particle gamma +/gate/source/99Tc/gps/energytype UserSpectrum +/gate/source/99Tc/gps/setSpectrumFile data/99Tc.txt +/gate/source/99Tc/setIntensity 100 +/gate/source/99Tc/gps/type Point +/gate/source/99Tc/gps/angtype iso +/gate/source/99Tc/gps/centre 0. 0. 0. cm + From 9376d5ad59da27c7fc5bee13322109efe9311db8 Mon Sep 17 00:00:00 2001 From: kochebina Date: Thu, 14 Mar 2024 14:03:23 +0100 Subject: [PATCH 5/7] To test t10 fix --- t10_SpectroGamma/mac/main.mac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t10_SpectroGamma/mac/main.mac b/t10_SpectroGamma/mac/main.mac index 9d9ffd7..1d8f745 100755 --- a/t10_SpectroGamma/mac/main.mac +++ b/t10_SpectroGamma/mac/main.mac @@ -42,7 +42,7 @@ # Initialization #============================================================================================== /gate/run/initialize - +/process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year #============================================================================================== # Visualization #============================================================================================== From 07c3cc333e8cdda9665272784c0ee3a649cd75f9 Mon Sep 17 00:00:00 2001 From: Thomas BAUDIER Date: Mon, 25 Mar 2024 18:06:10 +0100 Subject: [PATCH 6/7] Come back to 137Cs --- t10_SpectroGamma/mac/main.mac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t10_SpectroGamma/mac/main.mac b/t10_SpectroGamma/mac/main.mac index f0342bb..1d8f745 100755 --- a/t10_SpectroGamma/mac/main.mac +++ b/t10_SpectroGamma/mac/main.mac @@ -53,7 +53,7 @@ # Source #============================================================================================== -/control/execute mac/{type}_99Tc.mac +/control/execute mac/{type}_137Cs.mac #============================================================================================== # Start simulation From 4b93c1e21ee2e88ffcbecf634f0d7a9043bfc00c Mon Sep 17 00:00:00 2001 From: Thomas BAUDIER Date: Mon, 25 Mar 2024 20:41:02 +0100 Subject: [PATCH 7/7] be sure to compile new gate version --- .github/workflows/runTest.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/runTest.sh b/.github/workflows/runTest.sh index f87ee7f..bc14328 100755 --- a/.github/workflows/runTest.sh +++ b/.github/workflows/runTest.sh @@ -74,6 +74,9 @@ fi if [ ! -d /src ]; then git clone --branch ${COMMIT} https://github.com/OpenGATE/Gate.git /src fi +cd /src +git checkout geant4-11.2.1 +cd - cd bin cmake -DGATE_USE_TORCH=$GATE_USE_TORCH \ -DTorch_DIR=$TORCH_DIR \