-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot-test
executable file
·83 lines (74 loc) · 2.37 KB
/
plot-test
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env python
import os
import pickle
from mva.cmd import get_parser
args = get_parser(actions=False).parse_args()
from mva.categories import *
from mva.analysis import get_analysis
from mva.plotting import draw_channel_array
from mva.variables import VARIABLES
from mva import CACHE_DIR
from rootpy.tree import Cut
from rootpy.plotting import Hist
from math import pi
analysis = get_analysis(
args, year=2012,
systematics=False)
decay = 'rhorho'
prod = 'vbf'
if decay == 'pipi':
field = 'Acoplanarity_IP'
norm_category = Category_Preselection_PiPi
if prod == 'vbf':
category = Category_VBF_PiPi_SR
elif prod == 'boosted':
category = Category_Boosted_PiPi_SR
elif decay == 'rhorho':
field = 'Acoplanarity_rho_cluster'
norm_category = Category_Preselection_RhoRho
if prod == 'vbf':
category = Category_VBF_RhoRho_SR
elif prod == 'boosted':
category = Category_Boosted_RhoRho_SR
elif decay == 'pirho':
field = 'Acoplanarity_tau1_IP_tau2_rho_cluster'
norm_category = Category_Preselection_PiRho
if prod == 'vbf':
category = Category_VBF_PiRho_SR
elif prod == 'boosted':
category = Category_Boosted_PiRho_SR
elif decay == 'rhopi':
field = 'Acoplanarity_tau2_IP_tau1_rho_cluster'
norm_category = Category_Preselection_RhoPi
if prod == 'vbf':
category = Category_VBF_RhoPi_SR
elif prod == 'boosted':
category = Category_Boosted_RhoPi_SR
# norm_category = Category_Preselection
# category = Category_VBF
analysis.normalize(norm_category)
if 'Acoplanarity' in field:
templates = {field: Hist(2,0.0,math.pi, type='D')}
elif 'BDTScore' in field:
with open(os.path.join(CACHE_DIR, 'binning/binning_vbf_125_12.pickle')) as f:
binning = pickle.load(f)
templates = {field: Hist(binning, type='D')}
# field = 'mass_jet1_jet2'
# templates = {field: Hist(10, 0.0, 1500, type='D')}
draw_channel_array(
analysis, {field: VARIABLES[field]},
templates=templates,
mass=125, mode='combined', signal_scale=1.42,
signal_on_top=True,
signal_colors=['blue'],
signal_odd_colors=['red'],
category=category,
region=analysis.target_region,
show_ratio=False,
output_dir='plots/categories',
output_suffix='_2012',
output_formats=['pdf', 'eps'],
arrow_values=[100],
log_ypadding=(0.3, 0),
logy_min=0.11,
uniform=False)