# Step 2: Filter events containing charged particles from the Geant4 output files
### Step 2: Filter events containing charged particles from the Geant4 output files
Run the executable produced from FilterExtrAp.f best with a steering text file. <br/>
Run the executable produced from FilterExtrAp.f best with a steering text file. <br/>
Example with the executable produced above and the sample steering file **cox.dat**:
Example with the executable produced above and the sample steering file **cox.dat**:
$ ~/bin/FilterExtrAp < 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 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 be set to 0 if the results from the Geant4 simulations have been produced in different runs and are merged during the filtering. (In this case files named F_ExtractionScoringPlane_t*.dat resdiding in the output directories must be deleted before running FilterExtrAp.)
The third line is a flag that should be set to 0 if the results from the Geant4 simulations have been produced in different runs and are merged during the filtering. (In this case files named F_ExtractionScoringPlane_t*.dat resdiding in the output directories must be deleted before running FilterExtrAp.)
The remaining even lines are the paths to the Geant4 simulation output files and the ensuing odd lines are the corresponding paths where the output files are written.
The remaining even lines are the paths to the Geant4 simulation output files and the ensuing odd lines are the corresponding paths where the output files are written.
# Step 3: Run the simulations
### 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. <br/>
1. Download the data file **nanodosimeter3_eff_HIT_1.2mbar-C3H8_drift_V4c_part-1-2_ds2v4508.dat** which contains the detection efficiency map. <br/>
2. Create a text file containing the info on the simulation parameters. <br/>
2. Create a text file containing the info on the simulation parameters. <br/>
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.
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.