TWiki> BL4S Web>SimulationSoftware (revision 8)EditAttachPDF

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

LeadGlassCalorimeter

Based on the NA62 MC source code, since they use the same OPAL blocks.
  • Pion interaction depths:
    50MeV_pi_bragg.png 500MeV_pi_interaction.png
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 $p_{beam} c + m_{\pi^\pm} c^2$.

CherenkovCounter

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:
    2bar_-5GeV.png
  • Parameter scans of photon multiplicity with positive electrons, protons, muons and pions:
    e.png proton.png mu.png pi.png
  • Total energy loss of positive 1, 3, 5 and 7GeV particles in Nitrogen at 2bar:
    2bar_1GeV.png 2bar_3GeV.png 2bar_5GeV.png 2bar_7GeV.png

-- TimBrooks - 2015-11-18

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng 2bar_-5GeV.png r2 r1 manage 11.6 K 2015-12-01 - 17:17 TimBrooks Cherenkov photon multiplicity at 2bar
PNGpng 2bar_1GeV.png r2 r1 manage 11.7 K 2015-11-19 - 20:22 TimBrooks Cherenkov energy losses at 2bar
PNGpng 2bar_3GeV.png r2 r1 manage 11.7 K 2015-11-19 - 20:26 TimBrooks Cherenkov energy losses at 2bar
PNGpng 2bar_5GeV.png r2 r1 manage 11.8 K 2015-11-19 - 20:26 TimBrooks Cherenkov energy losses at 2bar
PNGpng 2bar_7GeV.png r2 r1 manage 11.7 K 2015-11-19 - 20:27 TimBrooks Cherenkov energy losses at 2bar
PNGpng 500MeV_pi_interaction.png r1 manage 12.9 K 2015-11-18 - 21:31 TimBrooks Pion interaction depths
PNGpng 50MeV_pi_bragg.png r1 manage 8.9 K 2015-11-18 - 21:31 TimBrooks Pion interaction depths
PNGpng e.png r3 r2 r1 manage 22.7 K 2015-12-08 - 16:54 TimBrooks Parameter scans
PNGpng mu.png r1 manage 33.5 K 2015-12-08 - 11:13 TimBrooks Parameter scans
PNGpng pi.png r1 manage 33.0 K 2015-12-08 - 11:13 TimBrooks Parameter scans
PNGpng proton.png r1 manage 33.6 K 2015-12-08 - 16:46 TimBrooks Parameter scans
Edit | Attach | Watch | Print version | History: r12 | r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r8 - 2015-12-08 - TimBrooks
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    BL4S All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback