File indexing completed on 2025-01-18 10:18:33
0001
0002
0003
0004
0005
0006
0007
0008
0009 echo "=========FOR EPIC Craterlake, 03.2024========="
0010 source detector_setup.sh
0011 ACTS_PATH=""
0012 XML_NAME="epic_craterlake_matmap.xml"
0013 XML_PATH=${PWD}
0014 XML_FILE=${XML_PATH}/${XML_NAME}
0015
0016 nev=1000
0017 nparticles=1000
0018 tag=""
0019 kopt=$1
0020 while [[ $
0021 do
0022 key="$2"
0023
0024 case $key in
0025 --nev)
0026 nev=$3
0027 shift
0028 shift
0029 ;;
0030 --nparticles)
0031 nparticles=$3
0032 shift
0033 shift
0034 ;;
0035 --tag)
0036 tag=$3
0037 shift
0038 shift
0039 ;;
0040 *)
0041
0042 echo "unknown option $2"
0043 print_the_help
0044 shift
0045 ;;
0046 esac
0047 done
0048 set -- "${POSITIONAL[@]}"
0049
0050 recordingFile=geant4_material_tracks${tag}.root
0051 geoFile=geometry-map${tag}.json
0052 matFile=material-map${tag}.json
0053 trackFile=material-map${tag}_tracks.root
0054 propFile=propagation-material${tag}.root
0055
0056
0057 if [ "$kopt" == 0 ] || [ "$kopt" -lt 0 ]; then
0058
0059
0060
0061 python material_recording_ePIC.py -i ${XML_FILE} -n ${nev} -t ${nparticles} -o ${recordingFile}
0062
0063 fi
0064
0065
0066
0067 if [ "$kopt" == 1 ]|| [ "$kopt" -lt 0 ]; then
0068
0069
0070
0071 python geometry_ePIC.py -i ${XML_FILE} -o ${geoFile}
0072
0073
0074 python3 ${ACTS_PATH}/Examples/Scripts/MaterialMapping/writeMapConfig.py ${geoFile} config-map${tag}.json
0075
0076
0077
0078 python3 materialmap_config.py -i config-map${tag}.json -o config-map_new${tag}.json
0079
0080 fi
0081
0082 if [ "$kopt" == 2 ]|| [ "$kopt" -lt 0 ]; then
0083
0084 python3 ${ACTS_PATH}/Examples/Scripts/MaterialMapping/configureMap.py ${geoFile} config-map_new${tag}.json
0085
0086
0087
0088
0089
0090
0091
0092 python material_mapping_ePIC.py --xmlFile $XML_FILE --stepFile ${recordingFile} --geoFile ${geoFile} --matFile ${matFile}
0093
0094 fi
0095
0096
0097 if [ "$kopt" == 3 ]|| [ "$kopt" -lt 0 ]; then
0098
0099
0100 python material_validation_ePIC.py --xmlFile $XML_FILE --outputName ${propFile} --matFile ${matFile} -n ${nev} -t ${nparticles}
0101
0102
0103
0104
0105 fi
0106
0107
0108 if [ "$kopt" == 4 ]; then
0109 rm -rf Validation
0110 mkdir Validation
0111 root -l -b -q ${ACTS_PATH}/Examples/Scripts/MaterialMapping/Mat_map.C'("'$propFile'","'$trackFile'","Validation")'
0112 root -l -b -q mat_map_local.C'("'$propFile'","'$trackFile'","Validation")'
0113
0114
0115
0116 rm -rf Surfaces
0117 mkdir Surfaces
0118 cd Surfaces
0119 mkdir prop_plot
0120 mkdir map_plot
0121 mkdir ratio_plot
0122 mkdir dist_plot
0123 mkdir 1D_plot
0124 cd ..
0125 root -l -b -q ${ACTS_PATH}/Examples/Scripts/MaterialMapping/Mat_map_surface_plot_ratio.C'("'$propFile'","'$trackFile'",-1,"Surfaces/ratio_plot","Surfaces/prop_plot","Surfaces/map_plot")'
0126 root -l -b -q ${ACTS_PATH}/Examples/Scripts/MaterialMapping/Mat_map_surface_plot_dist.C'("'$trackFile'",-1,"Surfaces/dist_plot")'
0127 root -l -b -q ${ACTS_PATH}/Examples/Scripts/MaterialMapping/Mat_map_surface_plot_1D.C'("'$trackFile'",-1,"Surfaces/1D_plot")'
0128 fi