Resources
Git repo
The source code repository in CERN Gitlab is here:
http://gitlab.cern.ch/BL4S/BL4S_MC
After
setting up Gitlab
, the code can be cloned like so:
git clone ssh://git@gitlab.cern.ch:7999/BL4S/BL4S_MC.git
Documentation
- Geant4 website
- http://geant4.web.cern.ch/geant4/index.shtml
- Developer guide
- https://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/
- Source reference (LXR)
- http://www-geant4.kek.jp/LXR/
- Doxygen
- http://www-geant4.kek.jp/Reference/
- Geant4 twiki
- https://twiki.cern.ch/twiki/bin/view/Geant4/WebHome
Instructions
Set up
The simulations need cmake, Geant4 and Root. The iniGeant4.sh script sets up Geant4 and Root from AFS and runs
cmake
and
make
. The outputs go into
./build/
. To rebuild the code,
make
can be run in the build directory or in a simulation subdirectory of build. If adding or removing source files, you may need to rerun
cmake
from the build directory, like so:
cd build
cmake ..
Execution
The executables in the build directories can be run in interactive mode. E.g:
cd build/lead_glass
./lead_glass
The number of threads can be specified with "-t
" where is the number, e.g. on a quad core PC; "-t 4"
An example macro file is provided for batch runs:
cd build/lead_glass
./lead_glass -m e-_3GeV.mac
hadd e-_3GeV.root lead_glass*.root
Note that there will be n threads plus one files matching lead_glass*.root
. The format of species + charge + '_' + energy + '.root' is understood by the plotting macros.
Plotting
In each build directory is a plots.C macro with some histogramming options for various variables of interest. They can be executed with Root like so:
cd build/lead_glass
root 'plots.C("+", "3GeV", "interaction_depth")'
Note that the macro will try to open Root files with the format specified above, using the charge and energy specified. It will try to plot electrons, muons, pions, protons and neutrons, if Root files are available.
Simulations
Based on the NA62 MC source code, since they use the same OPAL blocks.
- Pion interaction depths:
The Bragg peak is visible for 50MeV Pions. In the second image, 500MeV Pions are shown interacting inside the block in blue, and not interacting in the block in red. A narrow peak is found for non-interacting Pions. Note the end point of the energy distribution is
.
Using some code from the NA62 Cedar detector simulation, but simplified for BCC type detectors.
- Photon multiplicity of negative 5GeV particles in Nitrogen at 2bar:
- Total energy loss of positive 1, 3, 5 and 7GeV particles in Nitrogen at 2bar:
-- TimBrooks - 2015-11-18