forked from apaasch/UHH_EXP18_LHC-Analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_analysis.py
34 lines (29 loc) · 1.13 KB
/
test_analysis.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
from TTbarAnalyzer import TTbarAnalyzer
from Plotter import Plotter
from collections import OrderedDict
from Fitter import Fitter
if __name__ == "__main__":
"""
Test Analysis to check if the framework runs properly
"""
print("Staring test analysis...")
datasets = OrderedDict([('Data', 'data.root'),
('QCD', 'qcd.root'),
('Diboson', 'diboson.root'),
('DY+jets', 'dy.root'),
('single top', 'single_top.root'),
('TTbar', 'ttbar.root'),
('W+jets', 'wjets.root'), ])
event_options = {'JEC': 'nominal',
'muon_isolation': 0.1,
'max_events':10
}
analyzers = OrderedDict()
for name, file_name in datasets.items():
analyzer = TTbarAnalyzer(name, file_name, event_options)
# run analysis for dataset
analyzer.run()
analyzers[name] = analyzer
plotter = Plotter(analyzers)
plotter.process()
print("test analysis finished successfully.")