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

Automated doxygen
http://test-bl4s-mc-cherenkov.web.cern.ch/test-bl4s-mc-cherenkov/
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
Tutorial
https://www-zeuthen.desy.de/geant4/g4course2011/day1/overview.html

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.

Documentation

Each simulation has a Doxyfile to drive doxygen generation of documentation. Just run doxygen in the same folder as the Doxyfile. The documentation is hosted from AFS (by TimBrooks) at http://test-bl4s-mc-cherenkov.web.cern.ch/

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:
    5000MeV_2.0bar.png
  • Parameter scans of photon multiplicity with positive electrons, kaons, muons, pions and protons:
    e.png kaon.png mu.png pi.png proton.png
  • Photon energy spectrum:
    energies.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 WhoSorted ascending 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 5000MeV_2.0bar.png r1 manage 18.4 K 2015-12-08 - 19:34 TimBrooks Cherenkov photon multiplicity 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 r4 r3 r2 r1 manage 29.0 K 2015-12-08 - 19:01 TimBrooks Parameter scans
PNGpng energies.png r3 r2 r1 manage 10.9 K 2015-12-11 - 13:32 TimBrooks Photon energy spectrum
PNGpng kaon.png r1 manage 32.8 K 2015-12-08 - 18:59 TimBrooks Parameter scans
PNGpng mu.png r2 r1 manage 32.8 K 2015-12-08 - 19:02 TimBrooks Parameter scans
PNGpng pi.png r2 r1 manage 30.5 K 2015-12-08 - 19:02 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 < r11 < r10 < r9 < r8 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r12 - 2015-12-16 - 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