File indexing completed on 2026-04-21 07:51:42
0001
0002
0003
0004 source helperCalibHGCROC.sh
0005
0006 PlotBaseDir=..
0007 runList=../configs/TB2026/DataTakingDB_TBPST10_202604_HGCROC.csv
0008
0009
0010
0011
0012
0013 dataDirRaw=""
0014 dataDirOut=""
0015
0016 if [ $1 = "fbockTB" ]; then
0017 dataDirRaw=/media/fbock/Lennard4TB/202604_PST10/HGCROCData
0018 dataDirOut=/media/fbock/Lennard4TB/202604_PST10/HGCROCData
0019 PlotBaseDir=/media/fbock/Lennard4TB/202604_PST10/
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 else
0033 echo "Please select a known user name, otherwise I don't know where the data is"
0034 exit
0035 fi
0036
0037
0038 if [ $2 = "pedestal" ]; then
0039 runs='';
0040
0041 if [ $3 = "Test" ]; then
0042 runs=''
0043
0044 elif [ $3 = "FirstPosScanMuons" ]; then
0045 runs='1 39'
0046 elif [ $3 = "HVScan1" ]; then
0047 runs='39 66 70 79 80 82 221 225 228 231'
0048
0049 elif [ $3 = "FullSetA" ]; then
0050 runs='085 120'
0051
0052 elif [ $3 = "FullSetB" ]; then
0053 runs='215'
0054
0055 elif [ $3 = "FullSetC" ]; then
0056 runs='130 171'
0057
0058 elif [ $3 = "FullSetD" ]; then
0059 runs='238 265'
0060
0061 elif [ $3 = "FullSetE" ]; then
0062 runs='287 315'
0063 fi
0064 for runNr in $runs; do
0065 printf -v runNrPed "%03d" "$runNr"
0066 ./DataPrep -a -d 1 -p -i $dataDirRaw/rawHGCROC_$runNrPed.root -f -o $dataDirOut/rawHGCROC_wPed_$runNrPed.root -O $PlotBaseDir/PlotsPedestal/Run$runNrPed -r $runList
0067 done
0068 fi
0069
0070 if [ $2 = "toaPhase" ]; then
0071 echo "Add runnumbers before you try this & remove exit"
0072 exit
0073 runNrPed='208'
0074 if [ $3 = "Hadron" ]; then
0075 runs='184'
0076 for rn in $runs; do
0077 printf -v runNr "%03d" "$rn"
0078 ./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
0079 done
0080 elif [ $3 = "Electron" ]; then
0081 runs=''
0082 for runNr in $runs; do
0083 ./DataPrep -d 1 -f -i $dataDirRaw/rawHGCROC_miptrigg_wPedwMuon_wBC_$runNr.root -o $dataDirOut/rawHGCROC_toaPhase_$runNr.root -O $PlotBaseDir/ToAPhaseExtraction/Run$runNr -r $runList -g $dataDirRaw/rawHGCROC_miptrigg_wPedwMuon_wBC_$runNr.root
0084 done
0085 elif [ $3 = "Muon" ]; then
0086 runs=''
0087 for runNr in $runs; do
0088 ./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_$runNr.root
0089
0090 done
0091 fi
0092
0093 fi
0094
0095 if [ $2 = "wave" ]; then
0096 echo "Add runnumbers before you try this & remove exit"
0097 exit
0098 runs=''
0099 for runNr in $runs; do
0100 WaveformHGCROC $3 $runNr $dataDirRaw Run_$runNr
0101 done
0102 fi
0103
0104
0105 if [ $2 == "calibMuon" ]; then
0106
0107
0108
0109
0110
0111
0112 toaPhaseOffset=''
0113 if [ $4 == "FMuon" ]; then
0114 runPed='39'
0115 runs='FMuon_-5_-5 FMuon_0_5 FMuon_5_-5 FMuon_5_5 FMuon_5_0 FMuonCent'
0116 elif [ $4 = "HVScan42" ]; then
0117 runPed='70'
0118 runs='Muon_HVScan_42V'
0119 elif [ $4 = "HVScan42_5" ]; then
0120 runPed='66'
0121 runs='Muon_HVScan_42_5V'
0122 elif [ $4 = "HVScan42_5" ]; then
0123 runPed='66'
0124 runs='Muon_HVScan_42_5V'
0125 elif [ $4 = "FullSetE_1" ]; then
0126 runPed='287'
0127 runs='Muon_FullSetE_1'
0128 toaPhaseOffset='../configs/TB2025/ToAOffsets_TB2025_HadRun.csv'
0129 elif [ $4 = "FullSetE_2" ]; then
0130 runPed='315'
0131 runs='Muon_FullSetE_2'
0132 toaPhaseOffset='../configs/TB2025/ToAOffsets_TB2025_HadRun.csv'
0133 else
0134
0135 runPed='85'
0136 runs='Muon_-5_-5 Muon_-5_0 Muon_0_5 Muon_5_5'
0137 fi
0138
0139 badChannelMap=../configs/TB2026/badChannel_HGCROC_PSTB2026_dummy.txt
0140
0141 for runNr in $runs; do
0142 MuonCalibHGCROC $3 $runPed $runNr $dataDirRaw $dataDirOut Run_$runNr $badChannelMap $toaPhaseOffset
0143
0144 done
0145 fi
0146
0147 if [ $2 == "calibMuon2" ]; then
0148
0149
0150
0151
0152
0153 runPed='39'
0154 runs='FMuon_-5_0 FMuon_0_-5 FMuon_-5_5'
0155
0156
0157 badChannelMap=../configs/TB2026/badChannel_HGCROC_PSTB2026_dummy.txt
0158 toaPhaseOffset=''
0159 for runNr in $runs; do
0160 MuonCalibHGCROC $3 $runPed $runNr $dataDirRaw $dataDirOut Run_$runNr $badChannelMap $toaPhaseOffset
0161
0162 done
0163 fi
0164
0165