File indexing completed on 2026-06-02 08:03:53
0001
0002
0003
0004 source helperCalibHGCROC.sh
0005
0006 PlotBaseDir=..
0007 runList=../configs/TB2026/DataTakingDB_TBSPSH2_202605_HGCROC.csv
0008
0009
0010
0011
0012
0013 dataDirRaw=""
0014 dataDirOut=""
0015
0016 if [ $1 = "fbockTB" ]; then
0017 dataDirRaw=/media/fbock/ALICE2-4TB/202605_SPSH2/HGCROCData
0018 dataDirOut=/media/fbock/ALICE2-4TB/202605_SPSH2/HGCROCData
0019 PlotBaseDir=/media/fbock/ALICE2-4TB/202605_SPSH2/
0020 elif [ $1 = "atamis" ]; then
0021 dataDirRaw=/home/drewtam20/Documents/eic/LFHCALDATA/Converted
0022 dataDirOut=/home/drewtam20/Documents/eic/LFHCALDATA/Converted
0023 PlotBaseDir=/home/drewtam20/Documents/eic/LFHCALDATA/Plots
0024 elif [ $1 = "ehagen" ]; then
0025 dataDirRaw=/Users/hagen/Githubs/TB_data
0026 dataDirOut=/Users/hagen/Githubs/TB_data
0027 PlotBaseDir=/Users/hagen/Githubs/TB_data/plots
0028 elif [ $1 = "egpott" ]; then
0029 dataDirRaw=/Users/egpott/rhig/lfhcal/data/TB2025_HVscan1/rawroot
0030 dataDirOut=/Users/egpott/rhig/lfhcal/data/TB2025_HVscan1/rawroot
0031 PlotBaseDir=/Users/egpott/rhig/lfhcal/data/TB2025_HVscan1/plots
0032 elif [ $1 = "Preet" ]; then
0033 dataDirRaw=/home/lfhcal/HGCROCData
0034 dataDirOut=/home/lfhcal/HGCROCData
0035 PlotBaseDir=/home/lfhcal/HGCROCData/plots
0036 else
0037 echo "Please select a known user name, otherwise I don't know where the data is"
0038 exit
0039 fi
0040
0041
0042 if [ $2 = "pedestal" ]; then
0043 runs='';
0044
0045 if [ $3 = "Test" ]; then
0046 runs='72'
0047 elif [ $3 = "FullSetA" ]; then
0048 runs='48'
0049
0050 elif [ $3 = "FullSetB" ]; then
0051
0052 runs='126'
0053 elif [ $3 = "FullSetC" ]; then
0054
0055 runs='135'
0056
0057 elif [ $3 = "FullSetE" ]; then
0058 runs='372'
0059 elif [ $3 = "HVScan" ]; then
0060 runs='188'
0061 elif [ $3 = "HadronScan" ]; then
0062 runs='207'
0063 fi
0064 for runNr in $runs; do
0065 printf -v runNrPed "%03d" "$runNr"
0066 Pedestal $2 $runNrPed $dataDirRaw $dataDirOut Run$runNrPed pdf
0067
0068 done
0069 fi
0070
0071 if [ $2 = "toaPhase" ]; then
0072 if [ $3 = "FullSetB" ]; then
0073 runNrPed='071'
0074 if [ $4 = "Hadron" ]; then
0075 runs=''
0076 elif [ $4 = "Muon" ]; then
0077 runs='072'
0078 fi
0079 elif [ $3 = "HVScan" ]; then
0080 runNrPed='188'
0081 if [ $4 = "Muon" ]; then
0082 runs='202'
0083 fi
0084 fi
0085 if [ $4 = "Hadron" ]; then
0086 for runNr in $runs; do
0087 ./DataPrep -d 1 -f -i $dataDirRaw/rawHGCROC_$runNr.root -o $dataDirOut/rawHGCROC_toaPhase_$runNr.root -O $PlotBaseDir/ToAPhaseExtraction/Run$runNr -r $runList -g $dataDirOut/rawHGCROC_wPed_$runNrPed.root
0088 done
0089 elif [ $4 = "Muon" ]; then
0090 for runNr in $runs; do
0091 echo $runNr
0092 ./DataPrep -d 1 -f -i $dataDirRaw/rawHGCROC_wPed_$runNr.root -o $dataDirOut/rawHGCROC_toaPhase_$runNr.root -O $PlotBaseDir/ToAPhaseExtraction/Run$runNr -r $runList -g $dataDirRaw/rawHGCROC_wPed_$runNrPed.root
0093
0094 done
0095 fi
0096
0097 fi
0098
0099 if [ $2 = "wave" ]; then
0100 echo "Add runnumbers before you try this & remove exit"
0101 exit
0102 runs=''
0103 for runNr in $runs; do
0104 WaveformHGCROC $3 $runNr $dataDirRaw Run_$runNr
0105 done
0106 fi
0107
0108
0109 if [ $2 == "calibMuon" ]; then
0110 toaPhaseOffset=''
0111 if [ $4 = "FullSetB_A" ]; then
0112 runPed='071'
0113 runs='072'
0114 toaPhaseOffset='../configs/TB2026/ToAOffsets_TBSPS2026_FullSetB.csv'
0115
0116 elif [ $4 = "FullSetB_1" ]; then
0117 runPed='071'
0118 runs='Muon_FullSetB_1'
0119 toaPhaseOffset='../configs/TB2026/ToAOffsets_TBSPS2026_FullSetB.csv'
0120 elif [ $4 = "FullSetB_2" ]; then
0121 runPed='126'
0122 runs='Muon_FullSetB_2'
0123 toaPhaseOffset='../configs/TB2026/ToAOffsets_TBSPS2026_FullSetB.csv'
0124 elif [ $4 = "FullSetE_1" ]; then
0125 runPed='372'
0126 runs='Muon_FullSetE_1'
0127 toaPhaseOffset='../configs/TB2026/ToAOffsets_TBSPS2026_FullSetB.csv'
0128
0129
0130 elif [ $4 = "HVScan" ]; then
0131 runPed='188'
0132 runs='194 195 196 197 198 199 200 201 202'
0133 toaPhaseOffset='../configs/TB2026/ToAOffsets_TBSPS2026_FullSetB.csv'
0134 else
0135 echo "No run selected, exiting..."
0136 exit
0137 fi
0138
0139 badChannelMap=../configs/TB2026/badChannel_HGCROC_SPSTB2026_dummy.txt
0140
0141 for runNr in $runs; do
0142 echo "$runNr $runPed"
0143 MuonCalibHGCROC $3 $runPed $runNr $dataDirRaw $dataDirOut Run_$runNr $badChannelMap $toaPhaseOffset
0144 done
0145 fi
0146