-
Notifications
You must be signed in to change notification settings - Fork 0
/
runL1JetEmulator_my_zeroOut.sh
executable file
·63 lines (50 loc) · 2.34 KB
/
runL1JetEmulator_my_zeroOut.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/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
# # ...
# "/mnt/hadoop/cms/store/user/luck/L1Emulator/HiForest_PbPb_photon2030.root"
# DATA = Skims
# sample = Photon20/30
# "/mnt/hadoop/cms/store/user/luck/L1Emulator/HydjetMB_502TeV_740pre8_MCHI2_74_V3_HiForestAndEmulator_v3.root"
# DATA = MC
# sample = 5.02TeV MB Hydjet
InputHiForest=(
"/mnt/hadoop/cms/store/user/luck/L1Emulator/HiForest_PbPb_photon2030.root"
"/mnt/hadoop/cms/store/user/luck/L1Emulator/HydjetMB_502TeV_740pre8_MCHI2_74_V3_HiForestAndEmulator_v5.root"
);
InputL1=(
"/export/d00/scratch/ginnocen/PhotonSamples/HIHighPt-HIRun2011-RAW-photon20and30_v2_GR_P_V27A_L1UpgradeAnalyzer.root"
);
outDirectory="/export/d00/scratch/tatar/output/out_L1EmulatorMacros_v3";
#declare -a algoTypes=("NOzeroOut_BkgSubtract" "zeroOut_2x2" "zeroOut_3x3");
declare -a algoTypes=("zeroOut_1x1");
outFileNamePrefix=(
"hist_Photon2030"
"hist_HydjetMB_502TeV_v5"
);
# compile the macros with g++
g++ makeTurnOn_photons.C $(root-config --cflags --libs) -Werror -Wall -Wextra -O2 -o makeTurnOn_photons.exe || exit 1
g++ makeTurnOn_fromSameFile_photons.C $(root-config --cflags --libs) -Werror -Wall -Wextra -O2 -o makeTurnOn_fromSameFile_photons.exe || exit 1
for sampleNum in 0 1
do
for i in "${algoTypes[@]}"
do
outFileNameHist=${outFileNamePrefix[sampleNum]}"_"${i}".root"
outFilePathHist=$outDirectory"/"$outFileNameHist
if [ $sampleNum -eq 0 ]
then
./makeTurnOn_photons.exe "${InputL1[sampleNum]}" "${InputHiForest[sampleNum]}" "${outFilePathHist}" || exit 1
elif [ $sampleNum -eq 1 ]
then
./makeTurnOn_fromSameFile_photons.exe "${InputHiForest[sampleNum]}" "${outFilePathHist}" || exit 1
fi
done
done