High Energy Physics simulations using FLUKA and Geant4
-
Install dependencies manually or by running
pip install -r requirements.txt
-
Create .inp-files
- Format: <bulk identifier/material>-<index for bulk thickness>-<index for beam energy>.inp
- Easiest is to use Loop-tool in Flair to create runs iterating over a parameter and then run them with 0 repetitions. This throws an error, but the .inp file is created.
-
Run generate_runs.py
- This runs the simulation and combines the results with usXsuw-programs (part of FLUKA installation).
- After combining results, also removes the large binaries (denoted by _fort), possibly totaling up to hundreds of gigabytes of data
-
Run plot_attenuation.py
- Calls method from output_processing.py to convert boundary crossing fluences to tabular form (.csv) and then plots them.
-
Run plot_energy_and_displacements.py
- Similarly to the previous one, converts files to csv and plots figures of displacements and deposited energy.
- Also plots separate heatmaps for every simulation if not disabled. Disabling this does not effect the summary plots created from csv-file.
-
Run plot_fluence.py
- Plots boundary crossing fluences and fluences inside bulk material to separate files.
- Beer-Lambert law: attenuation coefficient µ = ln(<entering fluence>/<exiting fluence>)/<thickness of bulk> = slopes of plots below
- Beer-Lambert law
- Reference values from Nist XCOM database (only available for photons)
- Calculated as sums of USRBIN card results, divided by volume
- Todo: displacements per atom could be a better metric, since cadmium telluride has much higher density compared to silicon
- http://ijrr.com/article-1-1895-en.html
- NIST XCOM Photon cross sections https://www.physics.nist.gov/PhysRefData/Xcom/html/xcom1.html
- NIST cross section to attenuation coefficient https://www.physics.nist.gov/PhysRefData/XrayMassCoef/chap2.html
Allpix² does not natively support other sensor materials than silicon. Geant4 has a database for several different materials in terms of energy deposition, but not charge carrier propagation. For further info, see https://gitlab.cern.ch/allpix-squared/allpix-squared/-/issues/109
There however exists an experimental build on Gitlab merge requests, which offers change of detector material and parametrization of charge carriers. It has been merged to a fork of Allpix² here and features CdTe as detector material and a custom module for constant charge carrier propagation.