ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/README
Revision: 1.4
Committed: Tue Jun 26 09:15:21 2012 UTC (12 years, 10 months ago) by bortigno
Branch: MAIN
CVS Tags: lhcp_UnblindFix, hcp_Unblind, lhcp_11April, LHCP_PreAppFixAfterFreeze, LHCP_PreAppFreeze, workingVersionAfterHCP, hcpApproval, hcpPreApp, ICHEP8TeV, HEAD
Changes since 1.3: +11 -8 lines
Log Message:
fixes

File Contents

# User Rev Content
1 bortigno 1.2 #!/bin/bash
2    
3     #checkout the head of UserCode/VHbb and the Btagging reshaping in VHbb/data/Btag/
4     cvs co -d VHbbSF UserCode/VHbb
5     cd data
6     cvs co -d Btag UserCode/VHbbAnalysis/VHbbDataFormats/interface/BTagReshaping.h
7     cvs co -d Btag UserCode/VHbbAnalysis/VHbbDataFormats/interface/btag_payload_b.h
8     cvs co -d Btag UserCode/VHbbAnalysis/VHbbDataFormats/interface/btag_payload_light.h
9 bortigno 1.1 #go to test
10 bortigno 1.2 cd ../test
11 bortigno 1.1 cp prepare_histo_environment.sh SideBandAnalysis-Pt50To100/
12     cd SideBandAnalysis-Pt50To100/
13 bortigno 1.2
14     #./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
15     echo "Insert the dir where you stored the trees"
16     read TREEDIR
17     ./prepare_histos_environment.sh ${TREEDIR}/
18 bortigno 1.1 ls -l histos # check the links
19     #if you still have the samples splitted by flavours then you need to do the following.
20     #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 &
21     #BETTER TO PARALLELIZE HERE...
22 bortigno 1.4 cd histos
23     for file in ZllH.Jun18.b_*;
24     do
25     FILE=${file/b_/} ;
26     hadd -f ${FILE} ${FILE/Jun18./Jun18.b_} ${FILE/Jun18./Jun18.c_} ${FILE/Jun18./Jun18.udsg_} > hadd_${FILE}.log 2>&1 &
27 bortigno 1.1 done
28    
29     #hadd also the data!
30     hadd Zll.Jun18.DataZ.root ZllH.Jun18.DataZee.root ZllH.Jun18.DataZmm.root
31    
32     #Wait that this is done
33     #then take the histos from b_ and the tree from the hadd"ed" file using this stupid script:
34     cvs co -p UserCode/bortigno/Utils/addHistos.py > addHistos.py
35 bortigno 1.4 chmod u+x addHistos.py
36 bortigno 1.1 # usage : ./addHistos.py -i <input histos file name> -t <input tree file name>
37 bortigno 1.4 # looping does not work. You need to do it by hand...
38     for file in ZllH.Jun18.b_*;
39 bortigno 1.1 do
40 bortigno 1.4 FILE=${file/b_/};
41     ./addHistos.py -t ${FILE} -i ${FILE/Jun18./Jun18.b_} > addHistos_${FILE}.log 2>&1 &
42 bortigno 1.1 done
43    
44 bortigno 1.4 #before running you need to update the name of files and dir in sampleSideBand.h and the lumi!
45 bortigno 1.3 vi sampleSideBand.h
46    
47 bortigno 1.1 #go to test dir
48     cd ../
49     ./compile
50     #run make_histos_pt50To100 and wait ~5 min
51     ./make_histos_Pt50To100
52     # if you want to look to some plots do:
53     cd SideBandAnalysis-Pt50To100/
54     mkdir PlotsJune18
55 bortigno 1.2 root -b plottingmacro.C+
56 bortigno 1.1 #in the dir will show up the plots of the sideband
57    
58     #then run the fit and syst
59 bortigno 1.2 ./do_fit_and_syst.sh
60 bortigno 1.1
61     #the output is a file with SF, one with the correlation matrix, one with the piece for the DC
62     #The implementation does not consider the extrapolation systematics due to JER and JES yet.
63     #It has to be done by hand...