Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:15:45

0001 #! /bin/bash
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 #mapping file ../configs/mappingTBSetupNewStructure_Sept2023_SPSfirstdays.txt 
0077 #run list file  ../configs/DataTakingDB_TBSept2023_SPSH4.csv
0078 
0079 # pedestal runs 
0080 if [ $2 = "pedestal" ]; then
0081 
0082   dataDirOut=$baseDir/Calibrations
0083 #   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' 
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 #   pedestalRuns='120 121' 
0091 #   dataDirRaw=$baseDir/pions300GeV_positionScan
0092 #   for runNr in $pedestalRuns; do
0093 #       PedestalCalibSept2023 $runNr $dataDirRaw $dataDirOut
0094 #   done;
0095 #   pedestalRuns='30 31 32 33 34 35 36 ' 
0096 #   dataDirRaw=$baseDir/pions360GeV_PositionScan
0097 #   for runNr in $pedestalRuns; do
0098 #       PedestalCalibSept2023 $runNr $dataDirRaw $dataDirOut
0099 #   done;
0100 
0101 #   pedestalRuns='99 100 101 102 104 124 125' 
0102 #   dataDirRaw=$baseDir/electron60GeV-VoltageScan
0103 #   for runNr in $pedestalRuns; do
0104 #       PedestalCalibSept2023 $runNr $dataDirRaw $dataDirOut
0105 #   done;
0106 
0107 #   pedestalRuns='105 106 107 108' 
0108 #   dataDirRaw=$baseDir/electron60GeV_GainScan
0109 #   for runNr in $pedestalRuns; do
0110 #       PedestalCalibSept2023 $runNr $dataDirRaw $dataDirOut
0111 #   done;
0112 # 
0113 #   pedestalRuns='55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 83 85 86 87 88 89 90 91 140 141' 
0114 #   dataDirRaw=$baseDir/electron_EnergyScan
0115 #   for runNr in $pedestalRuns; do
0116 #       PedestalCalibSept2023 $runNr $dataDirRaw $dataDirOut
0117 #   done;
0118 
0119 #   pedestalRuns='3 20 21 22 23 24 150 152 153'
0120 #   dataDirRaw=$baseDir/electrons100GeV_positionScan
0121 #   for runNr in $pedestalRuns; do
0122 #     PedestalCalibSept2023 $runNr $dataDirRaw $dataDirOut
0123 #   done;
0124 
0125 elif [ $2 = "pedestalRe" ]; then
0126 
0127   dataDirOut=$baseDir/Calibrations
0128 #   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' 
0129 #   pedestalRuns='47' 
0130 #   dataDirRaw=$baseDir/pionsEnergyScan
0131 #   for runNr in $pedestalRuns; do
0132 #       PedestalCalibSeptReext2023 $runNr $dataDirRaw $dataDirOut
0133 #   done;
0134 
0135 #   pedestalRuns='120 121' 
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 # #     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' 
0148 #   runs='47' 
0149   runs='48' 
0150   for runNr in $runs; do
0151     MuonCalibSept2023 $3 $runNr $dataDirRaw $dataDirOut $4
0152   done
0153 
0154 #   runs='120 121' 
0155 #   runs='120' 
0156 #   dataDirRaw=$baseDir/pions300GeV_positionScan
0157 #   for runNr in $runs; do
0158 #     MuonCalibSept2023 $3 $runNr $dataDirRaw $dataDirOut $4
0159 #   done;
0160   
0161   
0162 fi
0163 
0164