ATLHECTB

A Geant4 simulation of the ATLAS hadronic end-cap calorimeter beam tests.

View on GitHub

ATLHECTB

A Geant4 simulation of the ATLAS hadronic end-cap calorimeter beam tests.

example workflow example workflow GitHub commits since latest release (by date) for a branch

Trulli
Fig. - 10 GeV muon passing through the ATLAS HEC.



Vid. - Video example of how to use ATLHECTB in Geant Val.



Table of Contents
  1. Project description
  2. Authors and contacts
  3. Documentation and results
  4. Directory structure
  5. Geant Val integration
  6. Available datasets and analyses
  7. How to
  8. Geant4 and Github Actions
  9. Bugs report
  10. My quick Geant4 installation
  11. Selected ATLAS HEC references

Project description

The project targets a standalone Geant4 simulation of the ATLAS hadronic end-cap calorimeter beam tests to perform Geant4 regression testing, physics lists comparison and validation against test-beam data. It is also an example of how to use a Geant4 application with Geant Val and how to automatically test it using Github Actions.

Authors and contacts

Documentation and results

Selected articles

Selected presentations

⬆ back to top

Directory structure

.
β”œβ”€β”€ ATLHECTB.cc               # main()
β”œβ”€β”€ ATLHECTB_gui.mac          # GUI settings
β”œβ”€β”€ ATLHECTB_init_vis.mac     # Initialization and visualization settings
β”œβ”€β”€ ATLHECTB_run.mac          # macro card example
β”œβ”€β”€ CMakeLists.txt            # CMake instructions     
β”œβ”€β”€ GNUmakefile               # GNUmake instructions
β”œβ”€β”€ LICENSE                   # The LICENSE
β”œβ”€β”€ README.md                 # Markdown documentation
β”œβ”€β”€ _config.yml               # github pages settings
β”œβ”€β”€ analysis                  # ROOT macros for data analysis
β”œβ”€β”€ geantval_scripts          # Scripts for Geant Val usage
β”œβ”€β”€ images                    # Images for documentation
β”œβ”€β”€ include                   # Includers (.hh)
β”œβ”€β”€ runcards                  # Macro cards for production
β”œβ”€β”€ scripts                   # Scripts for lxplus and lxplus with HTCondor usage
β”œβ”€β”€ src                       # Sources (.cc)

Geant Val integration

Geant Val Website shields.io is the Geant4 testing and validation suite. It is a project hosted on gitlab.cern.ch Website shields.io used to facilitate the maintenance and validation of Geant4 applications, referred to as tests.
The following are instructions to use ATLHECTB within Geant Val, from batch submission to website deployment.

  1. On lxplus git clone ATLHECTB and the Geant Val/geant-config-generator
    git clone git@github.com:lopezzot/ATLHECTB.git
    git clone ssh://git@gitlab.cern.ch:7999/GeantValidation/geant-config-generator.git
    
  2. Copy the ATLHECTB geant val scripts into tests/geant4/; cd geant-config-generator
    cp -r ATLHECTB/geantval_scripts/ATLHECTB/ geant-config-generator/tests/geant4/
    cd geant-config-generator
    
  3. We will execute ATLHECTB via Geant Val using Geant4.10.7.p01, therefore we must make sure file 10.7.p01.sh exists into configs/geant/. In file 10.7.p01.sh we also export the path to the ATLHECTB 10.7.p01 executable file (for instruction on how to compile ATLHECTB see How to: Build, compile and execute on lxplus).
    Hence 10.7.p01.sh looks like this:
    #!/bin/bash
    VERSION="10.7.p01"
    PLATFORM="x86_64-centos7-gcc8-optdeb"
    # Geant4 libraries
    source /cvmfs/geant4.cern.ch/geant4/$VERSION/${PLATFORM}/bin/geant4.sh
    [ -e /cvmfs/geant4.cern.ch/geant4/$VERSION/setup_g4datasets.sh ] && source /cvmfs/geant4.cern.ch/geant4/$VERSION/setup_g4datasets.sh
    # Test path
    export PATH="/cvmfs/geant4.cern.ch/opt-geant-val/$VERSION/$PLATFORM/bin:/cvmfs/geant4.cern.ch/opt/$VERSION/$PLATFORM/bin:$PATH:/afs/cern.ch/work/l/lopezzot/path-to-executable/"
    # Compiler
    source /cvmfs/sft.cern.ch/lcg/contrib/gcc/8/x86_64-centos7/setup.sh
    
  4. Create macros and metadata for Geant Val execution
    python mc-config-generator.py submit -t ATLHECTB -d OUTPUT -v 10.7.p01 -q "testmatch" -r
    
    this command creates the Geant Val files for batch submission using HTCondor under the OUTPUT folder, using ATLHECTB, Geant4.10.7.p01 and the testmatch job flavour.
  5. To monitor the jobs use
    python mc-config-generator.py status -t ATLHECTB -d OUTPUT
    
    When the job execution ends, the root output files are stored in the corresponding job folder. Each job folder will look like this:
    ATLHECTB-env.log  ATLHECTB.json  ATLHECTB.mac  ATLHECTBout_Run0.root  ATLHECTB.sh  bsub.sh  config.sh  test_stderr.txt  test_stdout.txt
    
  6. Execute the analysis on the root files in the OUTPUT folder to create Geant Val JSON output files
    python mc-config-generator.py parse -t ATLHECTB -d OUTPUT 
    
    the analysis is coded in tests/geant4/ATLHECTB/parser.py. The OUTPUTJSON folder is created with the corresponding JSON files.
  7. The last part is to deploy the results on Geant Val. The ATLHECTB layout on the Geant Val website is defined in the ATLHECTB.xml file on gitlab.com/thegriglat/geant-val-layouts (additional info are in the tags.json file).
    Deploy JSON files on the Geant Val database
     find . -name '*.json' | while read i; do curl -H "Content-Type: application/json" -H "token: askauthor" --data @$i https://geant-val.cern.ch/upload; echo; done
    

List of results on Geant Val

The following are results deployed on Geant Val so far. A copy of the used config files is stored in geantval_scripts/configs/.

Geant-Val-Table

ATLHECTB Reproduce data Reproduce analysis Comments
v2.6.2
Dataset #2 tag 2.6.2_2
G4.11.2.p01 PL: FTFP_INCLXX
Added on 19/4/2024
python3 mc-config-generator.py submit -t ATLHECTB -d OUTPUTxxx -v xxx -q "testmatch" -r python3 mc-config-generator.py parse -t ATLHECTB -d OUTPUTxxx Results as in 2.6.2_1 but with FTFP_INCLXX PL only. Jobs launched again with no crash w.r.t. 2.6.2_1 (seg fault).
v2.6.2
Dataset #2 tag 2.6.2_1
G4.11.2.p01 PL: FTFP_BERT(+tune1,2,3), QGSP_BERT, FTFP_BERT_ATL
(Note: no FTFP_INCLXX due to a crash to be investigated)
Added on 15/4/2024
python3 mc-config-generator.py submit -t ATLHECTB -d OUTPUTxxx -v xxx -q "testmatch" -r python3 mc-config-generator.py parse -t ATLHECTB -d OUTPUTxxx First results produced on el9 lxplus machines.
v2.5
Dataset #2 tag 2.5_2
(G4.10.4.p03, G4.10.5.p01, G4.10.6.p03, G4.10.7.p01, G4.10.7.p03, G4.11.0.p04, G4.11.1.p01)
(PL: FTFP_BERT, QGSP_BERT, FTFP_BERT_ATL, FTFP_INCLXX)
(Note: no FTFP_INCLXX for 10.4.p03) (Note: for G4.11.1.p01 FTFP_BERT(+tunes1,2,3) have been included)
Added on 2/5/2023
python mc-config-generator.py submit -t ATLHECTB -d OUTPUTxxx -v xxx -q "testmatch" -r python mc-config-generator.py parse -t ATLHECTB -d OUTPUTxxx New results by v2.5, previous results on geant-val to be removed. Exp. data json files not recreated, kept the 2.4_2 ones. Results with 10.4.p03 obtained in single thread mode, see Bugs report.
v2.4
Dataset #2
tag 2.4_2 (Geant4.10.7.p03, Geant4.11.0.p03 ATLHECTB v2.4, FTFP_BERT, FTFP_BERT_ATL, QGSP_BERT, FTFP_BERT_INCLXX) (Geant4.11.1, ATLHECTB v2.4, FTFP_BERT(+tune1-2-3), FTFP_BERT_ATL, QGSP_BERT, FTFP_BERT_INCLXX)
Added on 4/2/2023 Removed on 2/5/2023 (exp. data not removed)
python mc-config-generator.py submit -t ATLHECTB -d OUTPUT -v 10.7.p03 (11.0.p03, 11.1) -q "testmatch" -r python mc-config-generator.py parse -t ATLHECTB -d OUTPUT Results for three Geant4 versions using v2.4 i.e. simulation with scintillators + new pi/e and longitudinal shape analysis. New exp. data uploaded (better error bars) reproducable with parser.py v2.4.
v2.1
Dataset #2
tag 2.1_2 (Geant4.10.05.p01, ATLHECTB v2.1, FTFP_BERT, FTFP_BERT_ATL, QGSP_BERT, FTFP_BERT_INCLXX) (Geant4.10.4, Geant4.10.4.p01, ATLHECTB v2.1, FTFP_BERT, FTFP_BERT_ATL, QGSP_BERT)
Added on 28/10/2021 Removed on 2/5/2023
python mc-config-generator.py submit -t ATLHECTB -d OUTPUT -v 10.5.p01 (10.4, 10.4.p01) -q "testmatch" -r python mc-config-generator.py parse -t ATLHECTB -d OUTPUT Results for three Geant4 versions, can be compared to tag 2.1_1, 2.0_1, and 2.0_2. Results for 10.4 and 10.4.p01 obtained in single thread mode, see Bugs report.
v2.1
Dataset #1
tag 2.1_1 (Geant4.10.06.p01 and Geant4.11.0.beta, ATLHECTB v2.1, FTFP_BERT, FTFP_BERT_ATL, QGSP_BERT, FTFP_BERT_INCLXX)
Added on 21/10/2021 Removed on 2/5/2023
python mc-config-generator.py submit -t ATLHECTB -d OUTPUT -v 10.6.p01 (11.0.beta) -q "testmatch" -r python mc-config-generator.py parse -t ATLHECTB -d OUTPUT Results for two Geant4 versions, can be compared to tag 2.0_1 and 2.0_2.
v2.0
Dataset #2
tag 2.0_2 (Geant4.10.07.p01, ATLHECTB v2.0, FTFP_BERT_ATL, QGSP_BERT, FTFP_BERT_INCLXX)
Added on 18/10/2021 Removed on 2/5/2023
python mc-config-generator.py submit -t ATLHECTB -d OUTPUT -v 10.7.p01 -q "testmatch" -r python mc-config-generator.py parse -t ATLHECTB -d OUTPUT Everything identical to 2.0_1 but changed physics lists in params.conf (change it yourself to reproduce data).
v2.0
Dataset #1
tag 2.0_1 (Geant4.10.07.p01, ATLHECTB v2.0, FTFP_BERT)
Added on 11/10/2021 Removed on 2/5/2023
python mc-config-generator.py submit -t ATLHECTB -d OUTPUT -v 10.7.p01 -q "testmatch" -r python mc-config-generator.py parse -t ATLHECTB -d OUTPUT First results on Geant Val, using Geant4.10.07.p01, ATLHECTB v2.0, FTFP_BERT. Analysis coded in parser.py. JSON files for test-beam data are created with parser.py (end of file).

Available datasets and analyses

We provide datasets and ROOT analyses, as well as instructions for their reproducibility. Ask authors for access to datasets. From v2.0 on results are deployed on Geant Val, refer to the List of results on Geant Val.

Results-Table

ATLHECTB Reproduce data Reproduce analysis Comments
v2.6.1
Dataset #2
tag 2.6.1_2
Created on 3/9/2023
Geant4.10.6.3 (modified)
ATLHECTB v2.6.1
./ATLHECTB -m runcards/ATLHECTBescan_beam4_run.mac -pl FTFP_BERT
Analysis reproducable with v2.6.1 generic-analysis root 'ATLHECTBanalysis.C("Data1/","2.6.1","10.6.3","FTFP_BERT modified")' Results to test the new FTF parameters to fix the fluctuations disprepancy with respect to ATLAS data. Excitation energy per wounded nucleon set to 50 MeV.
v2.6.1
Dataset #1
tag 2.6.1_1
Created on 17/8/2023
Geant4.10.6.3 (modified)
ATLHECTB v2.6.1
./ATLHECTB -m runcards/ATLHECTBescan_beam4_run.mac -pl FTFP_BERT
Analysis reproducable with v2.6.1 generic-analysis root 'ATLHECTBanalysis.C("Data1/","2.6.1","10.6.3","FTFP_BERT modified")' Results to test the new FTF parameters to fix the fluctuations disprepancy with respect to ATLAS data.
v2.6
Dataset #1
tag 2.6_1
Geant4.11.1.ref05
ATLHECTB v2.6
./ATLHECTB -m runcards/ATLHECTBescan_beam4_run.mac -pl FTFP_BERT or use it with the FLUKA.CERN interface
Analysis reproducable with analysis/v2.6 root 'ATLHECTBanalysis1_v2p6.C(true)' Results to compare G4-FTFP_BERT with the FTFP_BERT PL using the FLUKA.CERN interface as on Geant4-11.1.ref05. See how to use it.
v2.5
Dataset #1
tag 2.5_1
Geant4.10.7.p01
ATLHECTB v2.5
./ATLHECTB -m runcards/ATLHECTBescan_beam4_run.mac -pl FTFP_BERT
root -l
.x v2.5/ATLHECTBanalysis1_v2p5.C
Analysis reproducable with v2.5
results for e- and pi-, assuming Data1/ is alongside root macro, including all modification from v2.5. These results compared with success with ATLAS (Andrey's) ones.
v2.4
Dataset #1
tag 2.4_1
Geant4.10.7.p03
ATLHECTB v2.4
./ATLHECTB -m runcards/ATLHECTBescan_beam3_run.mac -pl FTFP_BERT
root -l
.x v2.4/ATLHECTBanalysis1_v2p4.C
Analysis reproducable with v2.4
results for e- and pi-, assuming Data1/ is alongside root macro, added scintillators in sim + new pi/e and shower length analysis
v1.7
Dataset #1
tag 1.7_1
Geant4.10.07.p01
ATLHECTB v1.7
./ATLHECTB -m runcards/ATLHECTBescan_beam3_run.mac -pl FTFP_BERT
root -l
.x v1.7/ATLHECTBanalysis1_v1p7.C
Analysis reproducable with v1.7
results for e- and pi-, assuming Data1/ is alongside root macro, new beam alignment and new em resolution study w.r.t. v1.6
v1.6
Dataset #1
tag 1.6_1
Geant4.10.07.p01
ATLHECTB v1.6
./ATLHECTB -m runcards/ATLHECTBescan_beam2_run.mac -pl FTFP_BERT
root -l
.x v1.6/ATLHECTBanalysis1_v1p6.C
Analysis reproducable with v1.6
results for e- and pi-, assuming Data1/ is alongside root macro, G4 added new timing scheme for layers' signals (see v1.6 description) w.r.t v1.5
v1.5
Dataset #1
tag 1.5_1
Geant4.10.07.p01
ATLHECTB v1.5
./ATLHECTB -m runcards/ATLHECTBescan_beam2_run.mac -pl FTFP_BERT
root -l
.x v1.5/ATLHECTBanalysis1_v1p5.C
Analysis reproducable with v1.5
results for e- and pi-, assuming Data1/ is alongside root macro, G4 HEC+Cryostat+World materials defined as ATLAS code w.r.t v1.3
v1.4
Dataset #1
tag 1.4_1
Geant4.10.07.p01
ATLHECTB v1.4
./ATLHECTB -m runcards/ATLHECTBescan_beam2_run.mac -pl FTFP_BERT
root -l
.x v1.4/ATLHECTBanalysis1_v1p4.C
Analysis reproducable with v1.5
results for e- and pi-, assuming Data1/ is alongside root macro, G4 HEC materials defined as ATLAS code w.r.t v1.3
v1.3
Dataset #1
tag 1.3_1
Geant4.10.07.p01
ATLHECTB v1.3
./ATLHECTB -m runcards/ATLHECTBescan_beam2_run.mac -pl FTFP_BERT
root -l
.x v1.3/ATLHECTBanalysis1_v1p3.C
Analysis reproducable with v1.5
results for e- and pi-, assuming Data1/ is alongside root macro, see v1.3 details for G4 changes w.r.t. v1.2
v1.2
Dataset #1
tag 1.2_1
Geant4.10.07.p01
ATLHECTB v1.2
./ATLHECTB -m runcards/ATLHECTBescan_beam1_run.mac -pl FTFP_BERT
root -l
.x ATLHECTBanalysis1_v1p2.C
Analysis reproducable with v1.2
results for e- and pi-, assuming Data1/ is alongside root macro, Dataset is identical to tag 1.0_1 but with different beam position
v1.0
Dataset #1
tag 1.0_1
Geant4.10.07.p01
ATLHECTB v1.0
./ATLHECTB -m runcards/ATLHECTBescan_run.mac -pl FTFP_BERT
root -l
.x ATLHECTBanalysis1_v1p1.C
Analysis reproducable with v1.1
results for e- and pi-, assuming Data1/ is alongside root macro, Dataset is identical to v1.0
v1.0
Dataset #1
tag 1.0_1
Geant4.10.07.p01
ATLHECTB v1.0
./ATLHECTB -m runcards/ATLHECTBescan_run.mac -pl FTFP_BERT
root -l
.x ATLHECTBanalysis1_v1p0.C
reproducable with v1.0
results for e-, assuming Data1/ is alongside root macro

How to

Build, compile and execute on Mac/Linux

  1. git clone the repo
    git clone https://github.com/lopezzot/ATLHECTB.git
    
  2. source Geant4 env
    source /relative_path_to/geant4.10.07_p01-install/bin/geant4.sh
    
  3. cmake build directory and make (using geant4.10.07_p01)
    mkdir ATLHECTB-build; cd ATLHECTB-build/
    cmake -DGeant4_DIR=/absolute_path_to/geant4.10.07_p01-install/lib/Geant4-10.7.1/ relative_path_to/ATLHECTB/
    make
    
  4. execute (example with ATLHECTB_run.mac macro card, 2 threads and FTFP_BERT physics list)
    ./ATLHECTB -m ATLHECTB_run.mac -t 2 -pl FTFP_BERT
    

Parser options

Custom CMake options

  1. (optional) It is possible to install the executable in bin under CMAKE_INSTALL_PREFIX
    cmake -DCMAKE_INSTALL_PREFIX=/absolute-path-to-installdir/ -DGeant4_DIR=/absolute_path_to/geant4.10.07_p01-install/lib/Geant4-10.7.1/ relative_path_to/ATLHECTB/
    make
    make install
    
    Likely, to execute from the install directory you have to first update the library env
    DYLD_LIBRARY_PATH="/absolute_path_to/geant4.10.07_p01-install/lib/:$DYLD_LIBRARY_PATH"
    cd install_dir
    ./ATLHECTB
    

Build, compile and execute on lxplus

  1. git clone the repo
    git clone https://github.com/lopezzot/ATLHECTB.git
    
  2. cmake build directory and make (using geant4.10.07_p01, check for gcc and cmake dependencies for other versions)
    mkdir ATLHECTB-build; cd ATLHECTB-build/
    source /cvmfs/sft.cern.ch/lcg/contrib/gcc/8.3.0/x86_64-centos7/setup.sh 
    source /cvmfs/geant4.cern.ch/geant4/10.7.p01/x86_64-centos7-gcc8-optdeb-MT/CMake-setup.sh 
    export CXX=`which g++`
    export CC=`which gcc`
    cmake3 -DGeant4_DIR= /cvmfs/geant4.cern.ch/geant4/10.7.p01/x86_64-centos7-gcc8-optdeb-MT/lib64/Geant4-10.7.1 ../ATLHECTB/
    make
    
    Hint: cp and source the scripts/ATLHECTB_lxplus_10.7.p01.sh file in the build directory.
  3. execute (example with ATLHECTB_run.mac macro card, 2 threads and FTFP_BERT physics list)
    ./ATLHECTB -m ATLHECTB_run.mac -t 2 -pl FTFP_BERT
    

Submit a job with HTCondor on lxplus

  1. git clone the repo
    git clone https://github.com/lopezzot/ATLHECTB.git
    
  2. prepare execution files (example with Geant4.10.07_p01, ATLHECTB_run.mac, 2 threads, FTFP_BERT physics list)
    mkdir ATLHECTB-build; cd ATLHECTB-build
    mkdir error log output
    cp ../ATLHECTB/scripts/ATLHECTB_lxplus_10.7.p01.sh .
    source ATLHECTB_lxplus_10.7.p01.sh
    
  3. prepare for HTCondor submission (example with Geant4.10.07_p01, ATLHECTB_run.mac, 2 threads, FTFP_BERT physics list)
    cp ../ATLHECTB/scripts/ATLHECTB_HTCondor_10.7.p01.sh .
    export MYHOME=`pwd`
    echo cd $MYHOME >> ATLHECTB_HTCondor_10.7.p01.sh
    echo $MYHOME/ATLHECTB -m $MYHOME/ATLHECTB_run.mac -t 2 >> ATLHECTB_HTCondor_10.7.p01.sh
    cp ../ATLHECTB/scripts/ATLHECTB_HTCondor.sub .
    sed -i '1 i executable = ATLHECTB_HTCondor_10.7.p01.sh' ATLHECTB_HTCondor.sub
    
  4. submit a job
    condor_submit ATLHECTB_HTCondor.sub 
    
  5. monitor the job
    condor_q
    
    or (for persistency)
    condor_wait -status log/*.log
    
  6. additional info from HTCondor (optional)
    rm all your jobs
    condor_rm username
    
    inspect your accounting group
    condor_q owner $LOGNAME -long | grep '^AccountingGroup' | sort | uniq -c
    
    display all accounting groups
    haggis group list
    
    display your accounting groups
    haggis rights
    
    check what accounting group a job has
    condor_q jobid.0 -af AccountingGroup
    
    specify the accounting group for yout job, to be added in the .sub file
    +AccountingGroup = "group_u_*"
    
    check job CPU usage
    condor_q -l jobid.0 | grep CPUsUsage
    
    ssh to machine where job is running
    condor_ssh_to_job jobid.0
    

Get ATLAS HEC geo parameters from mysql database

Caveat: ATLHECTB geo parameters are hardcoded in the DetectorConstruction, instructions to get geo parameters from ATLAS mysql database are intended for comparisons only.

  1. access mysql database

    mysql --host=dbod-tbnova.cern.ch --user=reader --password=askauthor --port=5501 atlas
    
  2. get ATLAS HEC main geo parameters

    SELECT version.name, version.type, version.value, version.comment FROM structure as directory LEFT JOIN structure ON \
    directory.ID=structure.parent LEFT JOIN relation ON structure.ID=relation.strID LEFT JOIN parameter as version ON \
    version.ID=relation.parID WHERE directory.name="HENDGEO" AND structure.name="HENG";
    
    • Also available at the ATLAS geo web database: Website shields.io
  3. get ATLAS HEC logitudinal block geo parameters

    SELECT version.name, version.type, version.value, version.comment FROM structure as directory LEFT JOIN structure ON \
    directory.ID=structure.parent LEFT JOIN relation ON structure.ID=relation.strID LEFT JOIN parameter as version ON \
    version.ID=relation.parID WHERE directory.name="HENDGEO" AND structure.name="HBLO";
    
    • Also available at the ATLAS geo web database: Website shields.io
  4. get all parameters (use only to visualize each vector entry)

    SELECT * FROM parameter;
    

Dump ATLHECTB GDML geometry description file

We support GDML geometry description. By default it is not active, to activate it, modify the ATLHECTBDetectorConstruction fDumpGDMLgeo data member, as follows

ATLHECTBDetectorConstruction::ATLHECTBDetectorConstruction()
 : G4VUserDetectorConstruction(),
   fCheckOverlaps(false),
   fDumpGDMLgeo(true){}

At the first execution, it will create the ATLHECTBgeo.gdml file with the up to date GDML geometry description.

Use Fluka.Cern hadron inelastic process

Geant4-11.1-ref05 introduces a Fluka.Cern interface to use the Fluka.Cern hadron inelastic process in any geant4 application as explained in examples/extended/hadronic/FlukaCern. The following are my instructions to use this repo with a customized FTFP_BERT physics list using it. It assumes that cvmfs is mounted.

  1. Install Fluka.Cern from source code (example with fluka4-3.3)
    source /cvmfs/sft.cern.ch/lcg/contrib/gcc/10.1.0/x86_64-centos7/setup.sh
    cd fluka4-3.3 && make -j 4
    cd src/ && make cpp_headers
    mkdir /path-to/fluka4-3.3-install && make install DESTDIR=/path-to/fluka4-3.3-install/
    PATH="/users/lopezzot/fluka4-3.3-install/bin/":$PATH
    
  2. Setup geant4-11.1.ref05 and compile the fluka interface as in the example
    source /cvmfs/geant4.cern.ch/geant4/11.1.ref05/x86_64-centos7-gcc10-optdeb-MT/CMake-setup.sh 
    source /cvmfs/geant4.cern.ch/geant4/11.1.ref05/x86_64-centos7-gcc10-optdeb-MT/bin/geant4.sh 
    cd FlukaCern/FlukaInterface/
    make interface
    make env
    source env_FLUKA_G4_interface.sh 
    
  3. Build and execute ATLHECTB
    git clone https://github.com/lopezzot/ATLHECTB.git
    mkdir ATLHECTB-build && cd ATLHECTB-build
    /cvmfs/sft.cern.ch/lcg/contrib/CMake/3.23.2/Linux-x86_64/bin/cmake -DG4_USE_FLUKA=1 ../ATLHECTB/
    make
    
    NOTE: the Fluka.Cern interface can only be used in single-threaded mode.

⬆ back to top

Geant4 and Github Actions

⚠️ ATLHECTB is automatically tested on every push against Geant4.11.0 and the latest Geant4 release via GitHub Actions on ubuntu-latest.

Geant4 binaries are available here. If you want your Geant4 application to be tested automatically, feel free to use this workflow.

Bugs report

List of bugs found.

  1. πŸ› Using ATLHECTB v2.1 and Geant4.10.4(.p01, .p03) executing in multi-threaded mode on lxplus via Geant Val, the M2L2BirkeLayer branch in root output file is out-of-sync with rest of file. Using single-thread mode the output file is correct. Reported by Lorenzo Pezzotti on 25/10/2021.

My quick Geant4 installation

Here is my standard Geant4 installation (example with Geant4.10.7.p01) starting from the unpacked geant4.10.07.tar.gz file under the example path "path/to".

  1. create build directory alongside source files
    cd /path/to
    mkdir geant4.10.07-build
    cd geant4.10.07-build
    
  2. link libraries with CMAKE (example with my favourite libraries)
    cmake -DCMAKE_INSTALL_PREFIX=/Users/lorenzo/myG4/geant4.10.07_p01-install \
    -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_QT=ON -DGEANT4_BUILD_MULTITHREADED=ON \
    -DGEANT4_USE_GDML=ON ../geant4.10.07.p01
    
  3. make it
    make -jN
    make install
    

Selected ATLAS HEC references

⬆ back to top