Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for Gate 9.4 with Geant 11.2.1 #98

Merged
merged 8 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/Dockerfile_gatebenchmarks
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
t4_necr,
t5_pet,
t6_dpk,
t7_garf,
t8_LETActor,
t10_SpectroGamma,
t11_EMField,
Expand Down Expand Up @@ -78,5 +77,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

3 changes: 3 additions & 0 deletions .github/workflows/runTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
5 changes: 5 additions & 0 deletions t10_SpectroGamma/data/99Tc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1 0
0.140511 88.5
0.0183672 4.21
0.018251 2.22
0.020669 1.12
2 changes: 1 addition & 1 deletion t10_SpectroGamma/mac/main.mac
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# Initialization
#==============================================================================================
/gate/run/initialize

/process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year
#==============================================================================================
# Visualization
#==============================================================================================
Expand Down
7 changes: 7 additions & 0 deletions t10_SpectroGamma/mac/source_99Tc.mac
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions t10_SpectroGamma/mac/spectrum_99Tc.mac
Original file line number Diff line number Diff line change
@@ -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

6 changes: 3 additions & 3 deletions t13_phsp/runAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading