Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:12:07

0001 #!/bin/bash
0002 
0003 # We first run a single batch of jobs using the geant4 material track as an input.
0004 # This will allow us to obtain a new material track file with the material associated with their respective surfaces.
0005 # This file is then move to the input directory using it will allow us to speed up the following mapping by 50%
0006 python3 ../Examples/Scripts/Python/material_mapping_optimisation.py  --numberOfJobs 40 --topNumberOfEvents 10000 --inputPath "MaterialMappingInputDir" --outputPath "MaterialMappingOutputDir" --doPloting  2>&1 | tee log/opti_log_init.txt
0007 mv MaterialMappingOutputDir/optimised-material-map_tracks.root MaterialMappingInputDir/optimised-material-map_tracks.root
0008 
0009 # In case of crash the databases might get corrupted. To prevent this we create a backup every 10 iteration of the optimisation script (roughly every 3 hours)
0010 # In case of crash, it is then preferable to replace Mapping/Database by the last backup.
0011 for j in {0..4}
0012 do
0013     # Create a back up of the database
0014     if [ -d "Mapping/Database-backup-$j" ]; then
0015         rm -rf Mapping/Database-backup-$j
0016     fi
0017     mkdir Mapping/Database-backup-$j
0018     cp  Mapping/Database/*  Mapping/Database-backup-$j/
0019     for i in {0..9}
0020     do
0021         # Run a batch of optimisation jobs
0022         python3 ../Examples/Scripts/Python/material_mapping_optimisation.py  --numberOfJobs 40 --topNumberOfEvents 10000 --inputPath "/data/atlas/callaire/Acts/Material-Mapping-ODD" --outputPath "." --readCachedSurfaceInformation  2>&1 | tee log/opti_log_${j}_${i}.txt
0023         rm Mapping/Database/*.lock
0024         rm Mapping/Database/*.tmp
0025     done
0026 done
0027 
0028 # Now that the optimisation is over, the script is run one last time to create the optimised material map and the result plots
0029 python3 ../Examples/Scripts/Python/material_mapping_optimisation.py  --numberOfJobs 00 --topNumberOfEvents 10000 --inputPath "/data/atlas/callaire/Acts/Material-Mapping-ODD" --outputPath "." --doPloting  2>&1 | tee log/opti_log.txt