1 |
dhidas |
1.1 |
##
|
2 |
|
|
## 15 Jul 2010
|
3 |
|
|
##
|
4 |
|
|
## * This is the run script to plot/fit RelIso using only MC events.
|
5 |
|
|
## * It calls fit_new.C and perform gaussian fit over all permutations of fit ranges,
|
6 |
|
|
## and make 2 version of plots: one zoomed-in on y-axis and the other not.
|
7 |
|
|
##
|
8 |
|
|
## * plot_qcd_estimate.C
|
9 |
|
|
##
|
10 |
|
|
## * It creates the following directories to store the output:
|
11 |
|
|
## mc_only_[DT]/nofit
|
12 |
|
|
## mc_only_[DT]/gaus_free12j_fix34j
|
13 |
|
|
## mc_only_[DT]/gaus_mean_0.3to0.6_12j_fix34j
|
14 |
|
|
## mc_only_[DT]/gaus_mean_0.4to0.6_12j_fix34j
|
15 |
|
|
## [DT] above means Date and Time, ie the time stamp of when the dir is created.
|
16 |
|
|
##
|
17 |
|
|
## * The time stamp format can be changed below by adapting the mytime variable.
|
18 |
|
|
##
|
19 |
|
|
#####################################################################################
|
20 |
|
|
|
21 |
|
|
# main dir
|
22 |
|
|
dir=mc_only
|
23 |
|
|
|
24 |
|
|
# To add time stamp to "mc_only"
|
25 |
|
|
#mytime=`date "+%d%m%y_%Hh%Mm"` ## produces eg '150710_13h55m' for 13 July 2010, 1.55pm
|
26 |
|
|
mytime=`date "+%d%h%y_%Hh%Mm"` ## produces eg '15Jul10_13h55m' for 13 July 2010, 1.55pm
|
27 |
|
|
dir=${dir}_$mytime
|
28 |
|
|
|
29 |
|
|
# subdirectories
|
30 |
|
|
sd1=nofit
|
31 |
|
|
sd2=gaus_free12j_fix34j
|
32 |
|
|
sd3=gaus_mean_0.3to0.6_12j_fix34j
|
33 |
|
|
sd4=gaus_mean_0.4to0.6_12j_fix34j
|
34 |
|
|
|
35 |
|
|
# create directories
|
36 |
|
|
mkdir -p $dir/$sd1
|
37 |
|
|
mkdir -p $dir/$sd2
|
38 |
|
|
mkdir -p $dir/$sd3
|
39 |
|
|
mkdir -p $dir/$sd4
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
# plot without fit
|
43 |
|
|
echo "plot without fit"
|
44 |
|
|
echo " op: $dir/$sd1"
|
45 |
|
|
root -q -b 'run_fit_none.cc(1,0)' >& fit_none.txt
|
46 |
|
|
mv -f *QCD_reliso*.pdf fit_none.txt $dir/$sd1
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
# Fit: gaus, no constrain in 1,2j, constrain in 3,4j
|
51 |
|
|
echo "Fit gaus"
|
52 |
|
|
echo " op: $dir/$sd2"
|
53 |
|
|
root -q -b 'run_fit.cc(1,0)' >& fit_res_gaus.txt
|
54 |
|
|
so animate_gaus.sh
|
55 |
|
|
mv -f *pdf *txt *gif $dir/$sd2
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
# Fit gaus, constrain mean in 1,2j mean:0.3-1.6, fix 3,4j
|
59 |
|
|
#echo "Fit gaus, constrain mean in 1,2j (0.3-1.6)"
|
60 |
|
|
#echo " op: $dir/$sd3"
|
61 |
|
|
#root -q -b 'run_fit_mean12j_geq03.cc(1,0)' >& fit_res_mean12j_geq03.txt
|
62 |
|
|
#so animate_gaus.sh
|
63 |
|
|
#mv -f *pdf *txt *gif $dir/$sd3
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
# Fit gaus, constrain mean in 1,2j mean:0.4-1.6, fix 3,4j
|
67 |
|
|
#echo "Fit gaus, constrain mean in 1,2j (0.4-1.6)"
|
68 |
|
|
#echo " op: $dir/$sd4"
|
69 |
|
|
#root -q -b 'run_fit_mean12j_geq04.cc(1,0)' >& fit_res_mean12j_geq04.txt
|
70 |
|
|
#so animate_gaus.sh
|
71 |
|
|
#mv -f *pdf *txt *gif $dir/$sd4
|
72 |
|
|
|
73 |
|
|
rm -f *eps
|
74 |
|
|
echo done
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
###############################
|
79 |
|
|
# #
|
80 |
|
|
# Some notes on the workflow #
|
81 |
|
|
# #
|
82 |
|
|
# #
|
83 |
|
|
###############################
|
84 |
|
|
#
|
85 |
|
|
# run_fit.cc calls fit_new.C, and runs the "fit" function for each fit range. For each case,
|
86 |
|
|
# it plots 6 histograms for alljet, 0 jet, 1 jet...4mjets.
|
87 |
|
|
# In doing so, it calculates estimates of the QCD in the signal region, and outputs the estimates
|
88 |
|
|
# to fit_res_gaus.txt, and the relative deviations ([est-true]/true) to est_free_gaus.txt.
|
89 |
|
|
# plot_qcd_estimate.C is then called, which reads in the values from est_free_gaus.txt, and plots these.
|
90 |
|
|
# It does this for unconstrained fits, or for constrained fits.
|
91 |
|
|
#
|
92 |
|
|
#
|
93 |
|
|
#
|
94 |
|
|
#
|