Skip to content

CMake template project for Geant4 simulations. This directory has been realised watching the YouTube video series linked in the readme file

Notifications You must be signed in to change notification settings

riccardonicolaidis/simulation-Geant4-template

Repository files navigation

My first project in Geant4

Geant4 logo

This project folder is inspired from the YouTube video series you can find at the following link Physics Matters.


Brief description of the directory structure

The project is aimed to be a template project with the definitions of the required classes. In this simulation, a Cherenkov detector has been implemented. The main elements of the detector are the following:

  • Aerogel and Fused Silica radiatior
  • World made with air
  • proton beam
  • Silicon PM detectors This directory is not aimed to give a quantitative simulation of a particular instrument but only to have a template reusable for future projects. The detector, the geometry, and the Physics list can be modified by opening the .cc files and adding the desired features to teh project.

The main folder contains all the sources files.

This is a CMake project. Therefore, a CMake file is required. In this case, the file is named CMakeLists.txt. The subdirectory build/ is needed to compile the project.

The project also contains a method for saving data in root files. The instructions for Geant to store data are contained in the run.cc file.


Build the project

To build the project go to the /build directory and run the command

cmake ..

Then, you can run the command

make

Then, an executable file will be created in the /build directory. To run the executable file, simply run the command

./Name_of_the_executable_file

The name of the executable file, in this case, is simply "simulation", which is exactly the name of the project.


Useful resources

  • Physics Matters Geant4 tutorial : Link
  • Geant4 page : Link
  • Geant4 User guide : Link
  • ROOT Cern C++ : Link

About

CMake template project for Geant4 simulations. This directory has been realised watching the YouTube video series linked in the readme file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published