Skip to the content.

Simulation

The code available in this repository runs a Monte Carlo (MC) simulation of a vertex detector, i.e. a detector that reconstructs the vertex position. The simulation consists of three parts:

Experimental setup description

In this simulation particles travelling along a $ z $ axis collide, pass through the beam pipe and are detected by $ 2 $ silicon layers. We have $ 3 $ cylindrical layers with $z$ axis corresponding to the trajectory of particles and radii $ r_1,\,r_2,\,r_3 $ with $ r_1<r_2<r_3 $. Geometric features and materials of the $3$ layers can be setted in the configuration file, here we discuss the case in which

Event
Visualisation of generated event

Running the simulation

To compile the simulation, it is sufficient to run ROOT and execute the following command:

.x Compile_Simulation.cpp+

To run the simulation execute the simulation function:

Simulation()

It is possible to add some arguments to the Compile_Simulation.cpp file to activate different options:

It is possible to combine these options: for example, .x Compile_Simulation.cpp+("cleanrun") deletes all the compilation outputs coming from previous compilations, then runs the simulation after compilation

Configuration of the simulation

It is possible to configure a simulation using a .yaml file, following these steps:

The config file can then be passed to the simulation function: Simulation("Config_file.yaml")

Here is an example of settings used to run a simulation.

A description of the settings is available here.

Program implementation

Here we give more details on how the program gets the work done for each run