A Geant4 simulation of the ATLAS LAr Barrel beam test setup.
Table of Contents
The project targets a standalone Geant4 simulation of the ATLAS LAr Barrel test beam setup. It is used for Geant4 regression testing and physics lists comparison, as well as for testing speeding up solutions.
- ⏰ Start date: February 2023
- 📌 Status: development
- 👨🔬 Lorenzo Pezzotti (CERN EP-SFT) - lorenzo.pezzotti@cern.ch
- 👨🔬 Supervisor: Alberto Ribon (CERN EP-SFT)
- 🗣️ CERN EP-SFT Simulation Meeting 16/5/2023, Preliminary results from the ATLLArBarrel test
- 🗣️ CERN EP-SFT Simulation Meeting 21/3/2023, Towards a Geant4 ATLAS LAr Barrel Validation Test
We provide datasets and ROOT analyses, as well as instructions for their reproducibility. Ask authors for access to datasets.
ATLLArBarrel | Reproduce data | Reproduce analysis | Comments |
---|---|---|---|
v0.3 Dataset #1 tag 0.3_1 |
Geant4-11.1 ALLArBarrel v0.3 ./ATLLArBarrel -m runcards/run_gps.mac -pl FTFP_BERT -t 8 |
root -l v0.3/ATLLArBarrelAnalysis.c | Preliminary esults for gamma and pi-, assuming run_gps_output/ is alongside root macro. Created on 15/05/2023. |
- git clone the repo
git clone https://github.com/lopezzot/ATLLArBarrel.git
- source Geant4-11.1 env
source /relative_path_to/geant4.11.1-install/bin/geant4.sh
- cmake build directory and make (using geant4.11.1)
mkdir build; cd build/ cmake -DGeant4_DIR=/absolute_path_to/geant4.11.1-install/lib/Geant4-11.1.0/ relative_path_to/ATLLarBarrel/ make
- execute (example with run.mac macro card, 2 threads and FTFP_BERT physics list)
./ATLLarBarrel -m run.mac -t 2 -p FTFP_BERT
Parser options
-m macro.mac
: pass a Geant4 macro card (example-m run.mac
available in source directory and automatically copied in build directory)-t integer
: pass number of threads for multi-thread execution (example-t 2
, default is the number of threads on the machine)-p Physics_List
: select Geant4 physics list (example-p FTFP_BERT
)
- git clone the repo
git clone https://github.com/lopezzot/ATLLArBarrel.git
- cmake build directory and make (using geant4.11.1, check for gcc and cmake dependencies for other versions)
mkdir build; cd build/ source /cvmfs/sft.cern.ch/lcg/contrib/gcc/8.3.0/x86_64-centos7/setup.sh source /cvmfs/geant4.cern.ch/geant4/11.1/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/11.1/x86_64-centos7-gcc8-optdeb-MT/lib64/Geant4-11.1.0/ ../ATLLArBarrel/
- execute (example with TBrun.mac macro card, 2 threads and FTFP_BERT physics list)
./ATLLArBarrel -m run.mac -t 2 -p FTFP_BERT
- Compile with debug compiler option, make and start debugger
cmake -DCMAKE_BUILD_TYPE=Debug -DGeant4_DIR=/path-to/geant4-11.1.0-install/lib/Geant4-11.1.0/ /path-to-dir/ATLLArBarrel/ make lldb
- Set the lldb target and run with arguments
target create ATLLArBarrel run -m run.mac -p FTFP_BERT -t 2
G4HepEm is a project from the Geant4 Collaboration targeting a library for speeding up the electromagnetic shower generation. G4HepEm is an optional dependency to ATLLarBarrel. The following are istructions for its usage:
- Install G4HepEm as described in the documentation
- source geant4 env (example with Geant4-11.1)
source /path-to/geant4-11.1.0/geant4-11.1.0-install/bin/geant4.sh
- Build and compile with G4HepEm
cmake -DGeant4_DIR=/path-to/geant4-11.1.0/geant4-11.1.0-install/lib/Geant4-11.1.0/ -DG4HepEm_DIR=/path-to/g4hepem-install/lib/cmake/G4HepEm/ -DWITH_G4HepEm=ON ../ATLLArBarrel/ make
- Execute (example with run.mac macro, 2 threads and FTFP_BERT physics list)
./ATLLArBarrel -m run.mac -t 2 -p FTFP_BERT
Note: the -DWITH_G4HepEm=ON
will compile the files under hepemlib/
that are needed to register the G4HepEmProcess
. It is possible to use the G4HepEmTrackingManager
instead of the G4HepEmProcess
using the CMAKE option -DWITH_G4HepEmTracking=ON
.
cmake -DGeant4_DIR=/path-to/geant4-11.1.0/geant4-11.1.0-install/lib/Geant4-11.1.0/ -DG4HepEm_DIR=/path-to/g4hepem-install/lib/cmake/G4HepEm/ -DWITH_G4HepEm=ON -DWITH_G4HepEmTracking=ON ../ATLLArBarrel/
VecGeom is a geometry modeller library and optional dependency to Geant4. ATLLArBarrel can be used with VecGeom. The following are my instructions for VecGeom usage:
- Install VecGeom (example with VecGeom-v1.2.1)
cd VecGeom-v1.2.1/ mkdir build; cd build cmake -DCMAKE_INSTALL_PREFIX=/absolute-path-to/VecGeom-v1.2.1/install/ -DVECGEOM_BUILTIN_VECCORE=ON .. cmake --build . cmake --build . --target install
- Install Geant4 with VecGeom dependency (example with geant4-11.1.0)
mkdir buildg4vecgeom; cd buildg4vecgeom cmake -DCMAKE_INSTALL_PREFIX=/abolute-path-to/installg4vecgeom -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_QT=ON -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_USE_USOLIDS=ON -DVecGeom_DIR=/abolute-path-to/VecGeom-v1.2.1/install/lib/cmake/VecGeom/ -DGEANT4_USE_GDML=ON /relative-path-to/geant4-11.1.0/ make -jN make install
- Build ATLLArBarrel
git clone https://github.com/lopezzot/ATLLArBarrel.git source /path_to/installg4vecgeom/bin/geant4.sh mkdir build; cd build/ cmake -DGeant4_DIR=/absolute-path_to/installg4vecgeom/lib/Geant4-11.1.0/ -DVecGeom_DIR=/abolute-path-to/VecGeom-v1.2.1/install/lib/cmake/VecGeom /relative_path_to/ATLLarBarrel/ make
Note: the instructions above build VecGeom in backend scalar mode. To build it in backend vector use this script, then specify -DVc_DIR
when building the simulation.