A Geant4 simulation of the 2018 CMS HGCAL test-beam for geant-val.
Fig. - 20 GeV charged pion interacting in the HGCAL test beam hadronic section.Table of Contents
The project targets a standalone Geant4 simulation of the 2018 CMS HGCAL test beam to perform Geant4 regression testing, physics lists comparison and validation against test-beam data with geant-val.
- ⏰ Start date: 11 January 2024
- 📌 Status: data from v1.0 on are used for Geant4 validation
- 👨🔬 Lorenzo Pezzotti (CERN EP-SFT) - lorenzo.pezzotti@cern.ch
- 👨🔬 Alberto Ribon (CERN EP-SFT)
- 👨🔬 Sunanda Banerjee (CMS)
- End of Fellowship Report, CERN EP-SFT Group Meeting, 22 April 2024
- Testing Geant4 on the CMS HGCAL test beam, Geant4 simulation bi-weekly meeting, 9 April 2024
- Preliminary results of the CMS HGCAL test-beam simulation within Geant-val, CMS Simulation Meeting, 16 February 2024 (CMS restricted)
- Towards a Geant4 CMS HGCAL validation test, Geant4 simulation bi-weekly meeting, 23 January 2024
Dataset | Geant4 | HGCALTB | Comment |
---|---|---|---|
1.0_1 | G4 11.2, 11.1.p01, 11.0.p02, 10.7.p03, 10.6.p03, 10.5.p01, 10.4.p03 FTFP_BERT, QGSP_BERT, FTFP_BERT_ATL, FTFP_BERT_EMZ |
1.0 | Produced with geant-val, replaces all previous results on geant-val. Data for G4 10.4 and 10.5 were produced with 15k reduced statistics due to a problem in the output file for higher samples (likely a bug in g4analysis fixed in new versions). Added to geant-val on 3/4/2024. Used for presentation on 9/4/2024. |
0.2_1 | G4 11.2, 11.1.p01, 11.0.p02, 10.7.p03, 10.6.p03, 10.5.p01, 10.4.p03 FTFP_BERT, QGSP_BERT, FTFP_BERT_ATL, FTFP_BERT_EMZ |
0.2 | Produced with geant-val, replaces all previous results on geant-val. Used for presentation on 16/2/2024. Removed from geant-val on 3/4/2024. |
0.1_1 | G4-11.2 FTFP_BERT, QGSP_BERT, FTFP_BERT_ATL |
0.1 | Produced with geant-val for presentation on 23/1/2024. Removed from geant-val on 4/2/2024. |
- git clone the repo
git clone https://github.com/geant-val/HGCALTB.git
- source Geant4 env
source /relative_path_to/geant4.11.2-install/bin/geant4.sh
- cmake build directory and make
mkdir HGCALTB-build && cd HGCALTB-build/ cmake -DGeant4_DIR=/absolute_path_to/geant4.11.2-install/lib/Geant4-11.2/ relative_path_to/HGCALTB/ make
- execute (example with HGCALTBrun.mac macro card, 2 threads and FTFP_BERT physics list)
./HGCALTB -m HGCALTBrun.mac -t 2 -p FTFP_BERT
- git clone the repo
git clone https://github.com/geant-val/HGCALTB.git
- cmake build directory and make (using geant4-11.2, check for gcc and cmake dependencies for other versions)
mkdir HGCALTB-build && cd HGCALTB-build/ cp ../HGCALTB/scripts/HGCALTB_cvmfs_setup.sh ../HGCALTB/scripts/HGCALTB_lxplus_11.2.sh . source ./HGCALTB_lxplus_11.2.sh
- execute (example with HGCALTBrun.mac macro card, 4 threads and FTFP_BERT physics list)
./HGCALTB -m HGCALTBrun.mac -t 4 -p FTFP_BERT
- First follow the build instructions on lxplus
- prepare for HTCondor submission (example with Geant4.11.2, HGCALTBrun.mac, 4 threads, FTFP_BERT physics list)
mkdir -p error log output cp ../HGCALTB/scripts/HGCALTB_HTCondor.sub ../HGCALTB/scripts/HGCALTB_HTCondor_11.2.sh . sed -i "2 i cd $(pwd)" HGCALTB_HTCondor_11.2.sh echo ./HGCALTB -m HGCALTBrun.mac -t 4 -p FTFP_BERT >> HGCALTB_HTCondor_11.2.sh sed -i "1 i executable = HGCALTB_HTCondor_11.2.sh" HGCALTB_HTCondor.sub
- submit a job
condor_submit HGCALTB_HTCondor.sub
- monitor the job
or (for persistency)
condor_q
condor_wait -status log/*.log
- additional info from HTCondor (optional)
rm all your jobsinspect your accounting groupcondor_rm username
display all accounting groupscondor_q owner $LOGNAME -long | grep '^AccountingGroup' | sort | uniq -c
display your accounting groupshaggis group list
check what accounting group a job hashaggis rights
specify the accounting group for yout job, to be added in the .sub filecondor_q jobid.0 -af AccountingGroup
check job CPU usage+AccountingGroup = "group_u_*"
ssh to machine where job is runningcondor_q -l jobid.0 | grep CPUsUsage
condor_ssh_to_job jobid.0
Geant Val is the Geant4 testing and validation suite. It is a project hosted on gitlab.cern.ch used to facilitate the maintenance and validation of Geant4 applications, referred to as tests.
The following are instructions to use HGCALTB within Geant Val, from batch submission to website deployment.
- On lxplus, clone HGCALTB and the Geant Val geant-config-generator
https://github.com/geant-val/HGCALTB.git git clone https://gitlab.cern.ch/GeantValidation/geant-config-generator.git
- Follow the build instructions on lxplus
- Copy the HGCALTB geant val scripts into
tests/geant4/
cp -r HGCALTB/geantval_scripts/HGCALTB/ geant-config-generator/tests/geant4/ mkdir -p geant-config-generator/tests/geant4/HGCALTB/files cp HGCALTB/TBHGCal181Oct.gdml HGCALTBTB/analysis/energy.C HGCALTBTB/analysis/emprofile.C geant-config-generator/tests/geant4/HGCALTB/files/
- We will execute HGCALTB via Geant Val using Geant4.11.2, therefore we must make sure the file
11.2.sh
exists inconfigs/geant/
. In the file11.2.sh
we also export the path to the HGCALTB executable (compiled with 11.2).
Copy the config file using:./HGCALTB/geantval_scripts/cpconf.sh \ HGCALTB/geantval_scripts/configs/11.2.sh \ geant-config-generator/configs/geant4/ \ $(pwd)/HGCALTB-build
- Create macros and metadata for Geant Val execution
this command creates the Geant Val files for batch submission using HTCondor under the
cd geant-config-generator ./mc-config-generator.py submit -t HGCALTB -d OUTPUT -v 11.2 -q "testmatch" -r
OUTPUT
folder, using HGCALTB, Geant4.11.2 and thetestmatch
job flavor. - To monitor the jobs use
When the job execution ends, the root output files are stored in the corresponding job folder. Each job folder will look like this:
./mc-config-generator.py status -t HGCALTB -d OUTPUT
HGCALTB-env.log test_stderr.txt test_stdout.txt HGCALTB.json HGCALTB.mac HGCALTBout_Run0.root HGCALTB.sh bsub.sh config.sh
- Execute the analysis on the root files in the
OUTPUT
folder to create Geant Val JSON output files./mc-config-generator.py parse -t HGCALTB -d OUTPUT
- The last part is to deploy the results on Geant Val. The HGCALTB layout on the Geant Val
website is defined in the HGCALTB.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
- 📄 Performance of the CMS High Granularity Calorimeter prototype to charged pion beams of 20−300 GeV/c, arXiv:2211.04740, 27 May 2023
- 📄 Response of a CMS HGCAL silicon-pad electromagnetic calorimeter prototype to 20-300 GeV positrons, arXiv:2111.06855, 31 March 2022