-
Notifications
You must be signed in to change notification settings - Fork 5
/
test.py
142 lines (119 loc) · 4.72 KB
/
test.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
#!/usr/bin/env python
"""
Thomas Klijnsma
"""
########################################
# Imports
########################################
import argparse
# New style option handling
from OptionHandler import OptionHandler
########################################
# Main
########################################
def main():
parser = argparse.ArgumentParser()
group_decay_channel = parser.add_mutually_exclusive_group(required=False)
group_decay_channel.add_argument( '--combination', action='store_true' )
group_decay_channel.add_argument( '--hzz', action='store_true' )
group_decay_channel.add_argument( '--hgg', action='store_true' )
group_decay_channel.add_argument( '--hbb', action='store_true' )
group_decay_channel.add_argument( '--combWithHbb', action='store_true' )
parser.add_argument( '--bkg', action='store_true' )
parser.add_argument( '--test', action='store_true' )
parser.add_argument( '--debug', action='store_true' )
parser.add_argument( '--trace', action='store_true' )
parser.add_argument( '--fastscan', action='store_true' )
parser.add_argument( '--asimov', action='store_true' )
parser.add_argument( '--notAsimov', action='store_true' )
parser.add_argument( '--table', action='store_true' )
parser.add_argument( '--saveroot', action='store_true' )
parser.add_argument( '--savepng', action='store_true' )
parser.add_argument( '--savepng_convert', action='store_true' )
parser.add_argument( '--savegray', action='store_true' )
parser.add_argument( '--statonly', action='store_true' )
parser.add_argument( '--statsyst', action='store_true' )
parser.add_argument( '--lumiScale', action='store_true' )
parser.add_argument( '--no-preliminary-tag', action='store_true' )
parser.add_argument( '--no-tag', action='store_true' )
parser.add_argument( '--projection-tag', action='store_true' )
#____________________________________________________________________
# New style imports
optionHandler = OptionHandler()
optionHandler.set_parser(parser)
optionHandler.process_modules([
'datacard_preprocessing',
#
'differentials_scans',
'differentials_plots',
#
'yukawa_scans',
'yukawa_t2ws',
'yukawa_plots',
'top_scans',
'top_plots',
'top_t2ws',
#
'debug',
'inclusive_scans',
# 'onetimeplotsCommands', # Not optimized for new code base
#
'scalecorrelationmatrices',
'crosschecks',
'correlationmatrices',
#
'fermilab',
'projections_preprocessing',
'projections_t2ws',
'projections_scans',
'projections_scans_kbkc',
'projections_scans_ktcgkb',
'projections_plots',
'projections_plots_kbkc',
'projections_plots_ktcgkb',
#
'parametrization_plots',
])
args = parser.parse_args()
import differentials
differentials.logger.set_basic_format()
if args.test:
differentials.core.testmode()
if args.debug:
differentials.logger.set_level_debug()
if args.trace:
differentials.logger.set_level_trace()
import logging
# args.no_preliminary_tag = True
# args.no_preliminary_tag = False
if args.no_preliminary_tag:
logging.info('Remove the default \'Preliminary\' tag from plots')
differentials.plotting.pywrappers.CMS_Latex_type.CMS_type_str = ''
if args.no_tag:
logging.info('Removing the CMS tag entirely')
differentials.plotting.pywrappers.CMS_Latex_type.disable = True
if args.projection_tag:
differentials.plotting.pywrappers.CMS_Latex_type.CMS_type_str = 'Projection'
# projections_plotting = True
projections_plotting = False
if projections_plotting:
differentials.plotting.pywrappers.CMS_Latex_type.CMS_type_str = 'Projection'
differentials.plotting.plots.MultiContourPlot.z_axis_title = 'q'
if args.saveroot:
differentials.core.save_root()
if args.savepng:
differentials.core.save_png()
if args.savepng_convert:
differentials.core.save_png_through_convert()
if args.savegray:
differentials.core.save_gray()
########################################
# New style options
########################################
optionHandler.args = args
optionHandler.execute_functions()
########################################
# End of Main
########################################
if __name__ == "__main__":
main()