-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathprojections_scans_kbkc.py
220 lines (173 loc) · 8.93 KB
/
projections_scans_kbkc.py
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#!/usr/bin/env python
"""
Thomas Klijnsma
"""
#____________________________________________________________________
# Imports
import logging
import os, sys, re, copy
from OptionHandler import flag_as_option
import differentials
import differentialutils
import LatestBinning
import LatestPaths
lumiscale300 = 8.356546
lumiscale3000 = 83.56546
#____________________________________________________________________
workspaces = differentials.core.AttrDict()
workspaces.couplingdependentBRs = differentials.core.AttrDict()
workspaces.couplingdependentBRs.scenario2 = differentials.core.AttrDict()
workspaces.floatingBRs = differentials.core.AttrDict()
workspaces.floatingBRs.scenario2 = differentials.core.AttrDict()
workspaces.couplingdependentBRs.hgg = 'out/workspaces_Jul10/projection_yukawa_hgg_Jul09_couplingModel_reweighted_couplingdependentBRs.root'
workspaces.couplingdependentBRs.hzz = 'out/workspaces_Jul09/projection_yukawa_hzz_Jul09_couplingModel_reweighted_couplingdependentBRs.root'
workspaces.couplingdependentBRs.combination = 'out/workspaces_Jul10/projection_yukawa_combination_Jul09_couplingModel_reweighted_couplingdependentBRs.root'
workspaces.couplingdependentBRs.scenario2.hgg = 'out/workspaces_Jul17/projection_yukawa_hgg_s2groups_Jul17_couplingModel_reweighted_scenario2_couplingdependentBRs.root'
workspaces.couplingdependentBRs.scenario2.hzz = 'out/workspaces_Jul17/projection_yukawa_hzz_s2groups_Jul17_couplingModel_reweighted_scenario2_couplingdependentBRs.root'
workspaces.couplingdependentBRs.scenario2.combination = 'out/workspaces_Jul17/projection_yukawa_combination_s2groups_Jul17_couplingModel_reweighted_scenario2_couplingdependentBRs.root'
workspaces.floatingBRs.hgg = 'out/workspaces_Jul10/projection_yukawa_hgg_Jul09_couplingModel_reweighted_floatingBRs.root'
workspaces.floatingBRs.hzz = 'out/workspaces_Jul10/projection_yukawa_hzz_Jul09_couplingModel_reweighted_floatingBRs.root'
workspaces.floatingBRs.combination = 'out/workspaces_Jul10/projection_yukawa_combination_Jul09_couplingModel_reweighted_floatingBRs.root'
workspaces.floatingBRs.scenario2.hgg = 'out/workspaces_Jul17/projection_yukawa_hgg_s2groups_Jul17_couplingModel_reweighted_scenario2_floatingBRs.root'
workspaces.floatingBRs.scenario2.hzz = 'out/workspaces_Jul17/projection_yukawa_hzz_s2groups_Jul17_couplingModel_reweighted_scenario2_floatingBRs.root'
workspaces.floatingBRs.scenario2.combination = 'out/workspaces_Jul17/projection_yukawa_combination_s2groups_Jul17_couplingModel_reweighted_scenario2_floatingBRs.root'
class CombineConfigKBKC(differentials.combine.combine.CombineConfig):
"""docstring for CombineConfigKBKC"""
lumiscale = 83.56546
def __init__(self, args):
super(CombineConfigKBKC, self).__init__(args)
args = differentialutils.force_asimov(args)
self.onBatch = True
self.queue = 'all.q'
self.asimov = True if args.asimov else False
self.decay_channel = differentialutils.get_decay_channel_tag(args)
self.POIs = [ 'kappab', 'kappac' ]
self.PhysicsModelParameters = [ 'kappab=1.0', 'kappac=1.0' ]
self.subDirectory = 'out/Scan_projection_kbkc_{0}_{1}'.format(differentials.core.datestr(), self.decay_channel)
self.hardPhysicsModelParameters.append('lumiscale={0}'.format(self.lumiscale))
self.freezeNuisances.append('lumiscale')
if args.scenario2: self.tags.append('scenario2')
self.set_ranges()
self.datacard = self.get_workspacedict()[self.decay_channel]
def is_combination(self):
return not(self.decay_channel in ['hgg', 'hzz', 'hbb'])
def set_ranges(self):
if self.is_combination():
self.set_ranges_combination()
else:
getattr(self, 'set_ranges_' + self.decay_channel)()
def set_ranges_combination(self):
pass
def set_ranges_hgg(self):
pass
def set_ranges_hzz(self):
pass
class CombineConfigKBKC_couplingdependentBRs(CombineConfigKBKC):
"""docstring for CombineConfigKBKC_couplingdependentBRs"""
def __init__(self, args):
super(CombineConfigKBKC_couplingdependentBRs, self).__init__(args)
self.deltaNLLCutOff = 1000.
self.tags.append('couplingdependentBRs')
def get_workspacedict(self):
return workspaces.couplingdependentBRs.scenario2 if self.args.scenario2 else workspaces.couplingdependentBRs
def set_ranges_combination(self):
self.nPointsPerJob = 22
self.queue = 'all.q'
self.nPoints = 150*150
self.set_parameter_range('kappab', -1.3, 1.3)
self.set_parameter_range('kappac', -6., 6.)
def set_ranges_hgg(self):
self.nPointsPerJob = 48
self.queue = 'all.q'
self.nPoints = 100*100
self.set_parameter_range('kappab', -3.50, 3.50)
self.set_parameter_range('kappac', -8.50, 8.50)
def set_ranges_hzz(self):
self.nPointsPerJob = 500
self.queue = 'short.q'
self.nPoints = 100*100
self.set_parameter_range('kappab', -1.3, 1.3)
self.set_parameter_range('kappac', -6., 6.)
class CombineConfigKBKC_couplingdependentBRs_scenario2(CombineConfigKBKC_couplingdependentBRs):
"""docstring for CombineConfigKBKC_couplingdependentBRs_scenario2"""
def __init__(self, args):
super(CombineConfigKBKC_couplingdependentBRs_scenario2, self).__init__(args)
def set_ranges_combination(self):
self.nPointsPerJob = 79
self.queue = 'all.q'
self.nPoints = 150*150
self.set_parameter_range('kappab', -1.15, 1.15)
self.set_parameter_range('kappac', -5.25, 5.25)
def set_ranges_hgg(self):
self.nPointsPerJob = 147
self.queue = 'all.q'
self.nPoints = 100*100
self.set_parameter_range('kappab', -1.3, 1.3)
self.set_parameter_range('kappac', -5.25, 5.25)
def set_ranges_hzz(self):
self.nPointsPerJob = 500
self.queue = 'short.q'
self.nPoints = 100*100
self.set_parameter_range('kappab', -1.15, 1.15)
self.set_parameter_range('kappac', -5.25, 5.25)
class CombineConfigKBKC_floatingBRs(CombineConfigKBKC):
"""docstring for CombineConfigKBKC_couplingdependentBRs"""
def __init__(self, args):
super(CombineConfigKBKC_floatingBRs, self).__init__(args)
self.tags.append('floatingBRs')
def get_workspacedict(self):
return workspaces.floatingBRs.scenario2 if self.args.scenario2 else workspaces.floatingBRs
def set_ranges_hzz(self):
self.queue = 'short.q'
self.nPoints = 80*80
self.nPointsPerJob = 500
self.set_parameter_range('kappab', -3.5, 6.)
self.set_parameter_range('kappac', -13., 15.)
def set_ranges_hgg(self):
self.queue = 'all.q'
self.nPoints = 45*45
self.nPointsPerJob = 70
self.set_parameter_range('kappab', -2.25, 4.75)
self.set_parameter_range('kappac', -10., 12.5)
def set_ranges_combination(self):
self.queue = 'all.q'
self.nPoints = 45*45
self.nPointsPerJob = 40
self.set_parameter_range('kappab', -2.25, 4.75)
self.set_parameter_range('kappac', -10., 12.5)
class CombineConfigKBKC_floatingBRs_scenario2(CombineConfigKBKC_floatingBRs):
"""docstring for CombineConfigKBKC_floatingBRs_scenario2"""
def __init__(self, args):
super(CombineConfigKBKC_floatingBRs_scenario2, self).__init__(args)
self.tags.append('scenario2')
def set_ranges_hzz(self):
super(CombineConfigKBKC_floatingBRs_scenario2, self).set_ranges_hzz()
def set_ranges_hgg(self):
super(CombineConfigKBKC_floatingBRs_scenario2, self).set_ranges_hgg()
self.nPointsPerJob = 81
def set_ranges_combination(self):
super(CombineConfigKBKC_floatingBRs_scenario2, self).set_ranges_combination()
self.nPointsPerJob = 53
@flag_as_option
def projection_kbkc_scan_couplingdependentBRs(args):
args = differentialutils.force_asimov(args)
Config = CombineConfigKBKC_couplingdependentBRs_scenario2 if args.scenario2 else CombineConfigKBKC_couplingdependentBRs
config = Config(args)
differentialutils.run_postfit_fastscan_scan(config)
@flag_as_option
def projection_kbkc_scan_floatingBRs(args):
args = differentialutils.force_asimov(args)
Config = CombineConfigKBKC_floatingBRs_scenario2 if args.scenario2 else CombineConfigKBKC_floatingBRs
config = Config(args)
differentialutils.run_postfit_scan(config)
@flag_as_option
def test_dopoints_option_implementation(args):
args = differentialutils.set_one_decay_channel(args, 'hzz', asimov=True)
decay_channel = differentialutils.get_decay_channel_tag(args)
config = CombineConfigKBKC(args)
config.datacard = workspaces.couplingdependentBRs[decay_channel]
config.tags.append('couplingdependentBRs')
config.range_couplingdependentBRs(args)
config.nPoints = 10*10
config.nPointsPerJob = 50
differentialutils.run_postfit_fastscan_scan(config)