File indexing completed on 2025-01-18 09:15:45
0001
0002 function PedestalCalibSept2023()
0003 {
0004 echo "=================================================================================="
0005 echo "run Nr: $1"
0006 echo "dataRawDir: $2"
0007 echo "dataOutDir: $3"
0008 echo "=================================================================================="
0009 ./Analyse -d 1 -y 2023 -p -i $2/raw_$1.root -f -o $3/PedestalCalib_$1.root -O ../PlotsCalib_Sept2023/Run$1 -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0010 }
0011
0012 function PedestalCalibSeptReext2023()
0013 {
0014 echo "=================================================================================="
0015 echo "run Nr: $1"
0016 echo "dataRawDir: $2"
0017 echo "dataOutDir: $3"
0018 echo "=================================================================================="
0019 ./Analyse -d 1 -y 2023 -p -i $2/raw_pedonly_$1.root -f -o $3/PedestalCalib2nd_$1.root -O ../PlotsCalib_Sept2023/PedRe_Run$1 -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0020
0021 }
0022
0023 function MuonCalibSept2023()
0024 {
0025 echo "=================================================================================="
0026 echo "option $1"
0027 echo "run Nr: $2"
0028 echo "dataRawDir: $3"
0029 echo "dataOutDir: $4"
0030 echo "transfer option: $5"
0031 echo "=================================================================================="
0032 if [ $1 == "transfer" ]; then
0033 if [ $5 == "overwrite" ]; then
0034 ./Analyse -d 1 -y 2023 -f -P $4/PedestalCalib2nd_$2.root -i $3/raw_$2.root -o $3/rawPed_$2.root -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0035 else
0036 ./Analyse -d 1 -y 2023 -f -P $4/PedestalCalib_$2.root -i $3/raw_$2.root -o $3/rawPed_$2.root -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0037 fi
0038 elif [ $1 == "default" ]; then
0039 ./Analyse -f -d 1 -y 2023 -s -i $3/rawPed_$2.root -o $4/rawPedAndMuon_$2.root -O ../PlotsCalibMuon_2024/Run$2 -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0040 elif [ $1 == "improved" ]; then
0041 ./Analyse -f -d 1 -y 2023 -S -i $4/rawPedAndMuon_$2.root -o $4/rawPedAndMuonImp_$2.root -O ../PlotsCalibMuonImproved_2024/Run$2 -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0042 elif [ $1 == "improved2nd" ]; then
0043 ./Analyse -f -d 1 -y 2023 -S -i $4/rawPedAndMuonImp_$2.root -o $4/rawPedAndMuonImp2nd_$2.root -O ../PlotsCalibMuonImproved_2024/Run$2_2ndIte -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0044 elif [ $1 == "noise" ]; then
0045 ./Analyse -f -d 1 -y 2023 -n -i $4/rawPedAndMuon_$2.root -o $4/rawPedAndMuonNoise_$2.root -O ../PlotsCalibNoiseRe_2024/Run$2 -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0046 elif [ $1 == "transferAlt" ]; then
0047 ./Analyse -d 1 -y 2023 -f -P $4/rawPedAndMuonNoise_$2.root -i $3/raw_$2.root -o $3/rawPedImp_$2.root -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0048 elif [ $1 == "defaultImpPed" ]; then
0049 ./Analyse -f -d 1 -y 2023 -s -i $3/rawPedImp_$2.root -o $4/rawPedImpAndMuon_$2.root -O ../PlotsCalibMuonPedImp_2024/Run$2 -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0050 elif [ $1 == "saveNewPed" ]; then
0051 ./Analyse -f -d 1 -N -i $4/rawPedAndMuonNoise_$2.root -o $3/raw_pedonly_$2.root
0052 elif [ $1 == "saveNewMuon" ]; then
0053 ./Analyse -f -d 1 -M -i $4/rawPedAndMuon_$2.root -o $3/raw_muononly_$2.root
0054 elif [ $1 == "improvedMinimal" ]; then
0055 ./Analyse -f -d 1 -y 2023 -S -i $3/raw_muononly_$2.root -o $4/rawPedAndMuonImpMinimal_$2.root -O ../PlotsCalibMuonImproved_2024/Run$2_MinimalSet -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0056 elif [ $1 == "improvedMinimal2nd" ]; then
0057 ./Analyse -f -d 1 -y 2023 -S -i $4/rawPedAndMuonImpMinimal_$2.root -o $4/rawPedAndMuonImpMinimal2nd_$2.root -O ../PlotsCalibMuonImproved_2024/Run$2_MinimalSet2nd -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0058 elif [ $1 == "improvedMinimal3rd" ]; then
0059 ./Analyse -f -d 1 -y 2023 -S -i $4/rawPedAndMuonImpMinimal2nd_$2.root -o $4/rawPedAndMuonImpMinimal3rd_$2.root -O ../PlotsCalibMuonImproved_2024/Run$2_MinimalSet3rd -r ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0060 fi
0061 }
0062
0063
0064 dataDirRaw=""
0065 dataDirOut=""
0066 baseDir=""
0067
0068
0069 if [ $1 = "fbock" ]; then
0070 baseDir=/media/fbock/Samsung_T5/LFHCAL_TB/202309_SPSH4
0071 else
0072 echo "Please select a known user name, otherwise I don't know where the data is"
0073 exit
0074 fi
0075
0076
0077
0078
0079
0080 if [ $2 = "pedestal" ]; then
0081
0082 dataDirOut=$baseDir/Calibrations
0083
0084 pedestalRuns='47 48 50 51 52 53 54 74 75 76 77 78 79 80 81 82 142 143 144 145 146 147 148 149'
0085 dataDirRaw=$baseDir/pionsEnergyScan
0086 for runNr in $pedestalRuns; do
0087 PedestalCalibSept2023 $runNr $dataDirRaw $dataDirOut
0088 done;
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125 elif [ $2 = "pedestalRe" ]; then
0126
0127 dataDirOut=$baseDir/Calibrations
0128
0129
0130
0131
0132
0133
0134
0135
0136 pedestalRuns='120'
0137 dataDirRaw=$baseDir/pions300GeV_positionScan
0138 for runNr in $pedestalRuns; do
0139 PedestalCalibSeptReext2023 $runNr $dataDirRaw $dataDirOut
0140 done;
0141
0142
0143 elif [ $2 = "muoncalib" ]; then
0144
0145 dataDirOut=$baseDir/Calibrations
0146 dataDirRaw=$baseDir/pionsEnergyScan
0147
0148
0149 runs='48'
0150 for runNr in $runs; do
0151 MuonCalibSept2023 $3 $runNr $dataDirRaw $dataDirOut $4
0152 done
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162 fi
0163
0164