forked from cvernier/HH4b2016
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doBuildInputsLMR.sh
executable file
·44 lines (36 loc) · 1.36 KB
/
doBuildInputsLMR.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
#!/bin/bash
mass=$1
function=$2
range=$3
background="_${function}_${range}"
dir_preselection="PreselectedWithRegressionDeepCSV"
dir_selection="LMRSelection_chi2"
dest_dir="PreselectedWithRegressionDeepCSV/LMRSelection_chi2/fit"
background_type="fit_split.c"
Type="Split"
file_histograms="Histograms_LMR_GluGluToBulkGravitonToHHTo4B_M-"
rm -fr ${dest_dir}"/SignalFits_LMRreg"
mkdir ${dest_dir}"/SignalFits_LMRreg"
folder=${dest_dir}/LMR_${mass}${background}
rm -fr $folder
mkdir $folder
echo $folder
rm -f test.c
echo " { gSystem->Load(\"PDFs/ExpGaussExp_cxx.so\"); gROOT->LoadMacro(\"Display_SignalFits_LMR.cc\"); Display_SignalFits_LMR(\"$dir_preselection\",\"reg\",\"$dir_selection\",\"$dest_dir\",\"$file_histograms\",${mass},\"false\"); }" > test.c
echo
root -x -b -l -q test.c > $folder/signal${mass}_sig.log
mv ${dest_dir}/SignalFits_LMRreg/*${mass}* $folder/
echo "Done Signal"
echo
echo "root -x -b -l -q " $dir_preselection/$dir_selection/$background_type
root -x -b -l -q $dir_preselection/$dir_selection/$background_type > $folder/data_bkg.log
echo "Done Background"
echo
echo "PDF"
python PDFSyst.py --mass $1 --location $4> $folder/pdf.log
mv $dest_dir/w_background$background.root $folder/
mv $dest_dir/*BackgroundFit_*${background}*.png* $folder/
mv $dest_dir/BackgroundFit_SB_Split* $folder/
rm -fr $dest_dir/Background*
rm -fr $dest_dir/w_background*
echo "end"