This repository holds the Geant4 simulation code for timing detectors in the CT-PPS project.
The directory structure is defined as following :
detectorsholding all sub-detectors' geometry, sensitive detectors, event definition, ...beampocketsholding the beam pockets geometries (roman pots and moveable beam pipes)swcontaining the core of the simulation (primary generator, run action, ...)testwith a serie of useful examples for a successful run
To build the source after cloning this repository, you need to create a new folder (let's call it build), enter it and run cmake [path_to_the_sources], then make (warning as from now, the multi-threads compilation is not working properly for some obscure dependencies issue in the ROOT dictionary generation for analysis...)
A Doxygen documentation can also be generated for software developers. To do so, type make doc in your build directory, then go to the doc subfolder generated here and type make to generate the refman.pdf file.
Once the software is properly built, the ppsSim executable should appear in your build directory. A minimal working example can be found in the test/ directory. For instance, one can generate 10 protons with a 100 GeV energy with :
ppsSim test/run1.macwhich will produce an output file named (by default) events.root.
One can then start analyzing its content. For instance, try running
root -l "test/example.C(\"events.root\")"to generate some control distributions.