Skip to content
Snippets Groups Projects

How to get the code to run

Step 1: Download and compile the codes

  1. Download all *.f files into the same directory.
  2. Open a terminal and navigate to this directory.
  3. Compile the codes FilterExtrAp.f and PTra_c3h8_20170608HIT.f using a Fortran 90/95 compatible compiler.
    Example using gfortran and producing an executable PTra_HIT:
    $ gfortran PTra_c3h8_20170608HIT.f > ~/bin/PTra_HIT Example using gfortran and producing an executable PTra_HIT:
    $ gfortran FilterExtrAp.f > ~/bin/FilterExtrAp

Step 2: Filter events containing charged particles from the Geant4 output files (discarding neutrons and photons)

Run the executable produced from FilterExtrAp.f best with a steering text file.
Example with the executable produced above and the sample steering file cox.dat: $ ~/bin/FilterExtrAp < cox.dat The first two lines are the numbers of files per case (PMMA thickness and primary energy) and of subdirectories (each corresponding to a combination of PMMA thickness and primary energy). The third line is a flag that should normally be set to 1.

Step 3: Run the simulations

  1. Download the data file nanodosimeter3_eff_HIT_1.2mbar-C3H8_drift_V4c_part-1-2_ds2v4508.dat which contains the detection efficiency map.
  2. Create a text file containing the info on the simulation parameters.
    An example is provided here as the file HITEIN_240513.txt. It may be necessary to change the last line of the section "DETECTION EFFICIENCY" containing the path to the efficiency map.
  3. Create a steering text file (to avoid manual input).
    An example is provided here as the file bco.dat. (It will be necessary to change the first line to reflect the correct path to the text file containing the info on the simulation parameters.)
  4. Open a terminal and navigate to the directory where the data files (produced by FilterExrAp) are situated.
  5. Start the simulation.
    Example with the steering file bco.dat:
    $ ~/bin/PTra_HIT < bco.dat
    The output files of the simulation are written to the directory in which the filtered datafiles reside.

Contact

Hans Rabus - hans.rabus@ptb.de

License

GNU GENERAL PUBLIC LICENSE. See LICENSE.txt for more information.

Citation

If you use the code for your research, please consider citing:

Miriam Schwarze, Gerhard Hilgers, and Hans Rabus. "Nanodosimetric investigation of the track structure of therapeutic carbon ion radiation part 2: Detailed simulation." 10.1088/2057-1976/ad9152.