forked from nmohr/VHbb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
63 lines (55 loc) · 2.57 KB
/
README
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
63
#!/bin/bash
#checkout the head of UserCode/VHbb and the Btagging reshaping in VHbb/data/Btag/
cvs co -d VHbbSF UserCode/VHbb
cd data
cvs co -d Btag UserCode/VHbbAnalysis/VHbbDataFormats/interface/BTagReshaping.h
cvs co -d Btag UserCode/VHbbAnalysis/VHbbDataFormats/interface/btag_payload_b.h
cvs co -d Btag UserCode/VHbbAnalysis/VHbbDataFormats/interface/btag_payload_light.h
#go to test
cd ../test
cp prepare_histo_environment.sh SideBandAnalysis-Pt50To100/
cd SideBandAnalysis-Pt50To100/
#./prepare_histo_environment.sh <dir where you have the trees> # this thing creates histo dir and put there all the links to the trees. An example would be
echo "Insert the dir where you stored the trees"
read TREEDIR
./prepare_histos_environment.sh ${TREEDIR}/
ls -l histos # check the links
#if you still have the samples splitted by flavours then you need to do the following.
#hadd ZllH.Jun18.DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball.root ZllH.Jun18.b_DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball.root ZllH.Jun18.c_DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball.root ZllH.Jun18.udsg_DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball.root > hadd_M50.log 2>&1 &
#BETTER TO PARALLELIZE HERE...
cd histos
for file in ZllH.Jun18.b_*;
do
FILE=${file/b_/} ;
hadd -f ${FILE} ${FILE/Jun18./Jun18.b_} ${FILE/Jun18./Jun18.c_} ${FILE/Jun18./Jun18.udsg_} > hadd_${FILE}.log 2>&1 &
done
#hadd also the data!
hadd Zll.Jun18.DataZ.root ZllH.Jun18.DataZee.root ZllH.Jun18.DataZmm.root
#Wait that this is done
#then take the histos from b_ and the tree from the hadd"ed" file using this stupid script:
cvs co -p UserCode/bortigno/Utils/addHistos.py > addHistos.py
chmod u+x addHistos.py
# usage : ./addHistos.py -i <input histos file name> -t <input tree file name>
# looping does not work. You need to do it by hand...
for file in ZllH.Jun18.b_*;
do
FILE=${file/b_/};
./addHistos.py -t ${FILE} -i ${FILE/Jun18./Jun18.b_} > addHistos_${FILE}.log 2>&1 &
done
#before running you need to update the name of files and dir in sampleSideBand.h and the lumi!
vi sampleSideBand.h
#go to test dir
cd ../
./compile
#run make_histos_pt50To100 and wait ~5 min
./make_histos_Pt50To100
# if you want to look to some plots do:
cd SideBandAnalysis-Pt50To100/
mkdir PlotsJune18
root -b plottingmacro.C+
#in the dir will show up the plots of the sideband
#then run the fit and syst
./do_fit_and_syst.sh
#the output is a file with SF, one with the correlation matrix, one with the piece for the DC
#The implementation does not consider the extrapolation systematics due to JER and JES yet.
#It has to be done by hand...