-
Notifications
You must be signed in to change notification settings - Fork 0
/
runPlotTurnOn_photons_my_zeroOut_v502MB.sh
executable file
·43 lines (33 loc) · 1.58 KB
/
runPlotTurnOn_photons_my_zeroOut_v502MB.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# The input files are listed here : https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideL1TValidationSamples
# # Alex's email that led to this bash script
# # Kaya, Bi Ran,
# # I've uploaded a few macros that you can use to draw turn-on curves based on different L1 seeds for offline photons:
# # For use with most datasets:
# # https://github.com/CmsHI/L1EmulatorMacros/blob/master/makeTurnOn_photons.C
# # You should find the L1Tuples/HiForests used as input here:
# # https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideL1TValidationSamples
# # For use only with the 5.02 TeV Hydjet sample:
# # https://github.com/CmsHI/L1EmulatorMacros/blob/master/makeTurnOn_fromSameFile_photons.C
# # ...
outDirectory="/export/d00/scratch/tatar/output/out_L1EmulatorMacros_v3";
# http://stackoverflow.com/questions/8880603/loop-through-array-of-strings-in-bash-script
## declare an array variable for the types of algorithms
declare -a algoTypes=("NOzeroOut_BkgSubtract" "zeroOut_2x2" "zeroOut_3x3");
tag="v60GeV";
fileNameHist=(
"hist_HydjetMB_502TeV_v5"
"hist_AllQCDPhoton30_PhotonFilter20GeV"
"hist_PyquenUnquenched_DiJet_pt30_PbPb_5020GeV"
);
# compile the macros with g++
g++ plotTurnOn_photons.C $(root-config --cflags --libs) -Werror -Wall -Wextra -O2 -o plotTurnOn_photons.exe || exit 1
for sampleNum in 0 1 2
do
for i in "${algoTypes[@]}"
do
filePathHist=$outDirectory"/"${fileNameHist[sampleNum]}"_"${i}".root"
outFilePathTag=$outDirectory"/"${fileNameHist[sampleNum]}"_"${i}"_"$tag
./plotTurnOn_photons.exe "${filePathHist}" "${outFilePathTag}" || exit 1
done
done