forked from lucasc896/RA1_Offline_Analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Prediction_RA1.py
executable file
·839 lines (708 loc) · 53.2 KB
/
Prediction_RA1.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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
#!/usr/bin/env python
import argparse
parser = argparse.ArgumentParser(description ='Produce RA1 Results')
parser.add_argument('-c',help= 'Make RA1 Closure Tests, Choose all, 2 or 3 or jetcat',nargs='+', type =str)
parser.add_argument('-u',help= 'Make RA1 Tables Uncorrected Yields', nargs='+', type =str)
parser.add_argument('-a',help= 'AlphaT threshold, used to make RA1 Tables Uncorrected Yields', nargs='+', type =str,default=[""])
parser.add_argument('-m',help= 'Make RA1 MC Normalisation Tables',action="store_true")
parser.add_argument('-r',help= 'Make RA1 Root Files, Choose all, 2 or 3',nargs='+',type=str)
parser.add_argument('-n',help= 'Make RA1 Tables, Choose all, 2 or 3',nargs='+',type =str)
parser.add_argument('-t',help= 'Make Template fitting',choices = ['had','muon'])
parser.add_argument('-j',help= 'Set jet categories fit to default 2,3,4,>=5', nargs='+',type = str,default=["2","3","4","5"])
parser.add_argument('-d',help= 'For debug use', action="store_true")
args = parser.parse_args()
import ROOT as r
import logging,itertools
import os,fnmatch,sys
import glob, errno
import array
import math as m
from plottingUtils import *
from NumberCruncher import *
from time import strftime, time, sleep
from run_details import this_run
from make_latex_files import process_files
r.gROOT.SetBatch(r.kTRUE)
baseTime = time()
settings = {
"dirs":["200_275","275_325","325_375","375_475","475_575","575_675","675_775","775_875","875_975","975_1075","1075"], #HT Bins
"bins":["200","275","325","375","475","575","675","775","875","975","1075"], #HT Bins
"plots":["AlphaT_",], # Histogram that Yields are taken from
"AlphaTSlices":["0.55_50", "0.56_50", "0.57_50", "0.58_50", "0.59_50", "0.60_50", "0.53_50", "0.52_0.53", "0.53_0.55", "0.7_50"][:1], # AlphaT Slices, WARNING: this fucks up Formula Method!!
"Lumo":this_run()["had_lumi"], # Luminosity in fb
"Multi_Lumi":{'Had':this_run()["had_lumi"],'Muon':this_run()["mu_lumi"],'DiMuon':this_run()["mu_lumi"],'Photon':this_run()["ph_lumi"]}, # Different Luminosity per sample, used when SplitLumi = True
"sb_corrs":{'WJets':this_run()["wj_corr"], "Photon":this_run()["dy_corr"], "Zinv":this_run()["dy_corr"], "DY":this_run()["dy_corr"], "Top":this_run()["tt_corr"]},
"Analysis":"8TeV", # Differentiate between 7 and 8 TeV analysis i.e. uses alphaT cut in lowest two bins if 7TeV is selected
"MHTMET":["False", "True"][1], #turn sideband corrections on or off
"Table_Pulls":[False, True][0],
"global_alphat":[False, True][0], # uses alphaT slices in mu sele. only works for vanilla.
}
''' Set some variables for file access '''
path_name = "../../" + this_run()["path_name"] if not this_run()["path_name"].startswith("/") else this_run()["path_name"]
print "\n>> Opening directory:", path_name
sleep(3)
rootDirectory = path_name
rootDirectoryNorm = rootDirectory
data_run_suf = ["", "_2012A", "_2012B", "_2012C", "_2012D", "_2012ABC", "_2012BC"][0]
def ensure_dir(dir):
try:
os.makedirs(dir)
except OSError as exc:
pass
def Directory_Maker():
print "\n Making RA1 Directories"
folder_options = {'NormalisationTables':args.m,'ClosureTests':args.c,'TexFiles':args.n,'TexFilesuncorrected':args.u,'RootFiles':args.r,'Templates':args.t }
folders = []
for key,fi in folder_options.iteritems():
# print folder_options
if fi != None and fi != False:
if key == "TexFilesuncorrected": folders.append("TexFiles")
else: folders.append(key)
dir_stamp = "RA1_Documents_"+strftime("%d_%b")
if len(args.a[0]) > 0 : dir_stamp = dir_stamp + "_" + args.a[0].replace(".","p")
ensure_dir(dir_stamp)
os.chdir(dir_stamp)
owd = os.getcwd()
for path in folders:
print "Making Dir %s"%path
ensure_dir(path)
os.chdir(owd)
'''
Sample Dictionary Instructions
eg "nMuon":("./May_11_root_Files/Muon_Data","btag_two_OneMuon_","Data","Muon"),
if n at start of name entry then the file is data and will no be scaled to luminosity.
first argument is path to root file
second argument is prefix to ht bin. i.e OneMuon_275_325
third argument is data/mc type, i.e. Data, WJets - MC relating to the SM Process
fourth argument is sample Type, Had/DiMuon/Muon.
the only thing that will have to be changed is the second argument depending on wether you are running btag multiplicity/baseline
'''
btag_more_than_three_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_morethanthree_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_morethanthree_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_morethanthree_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"nPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_morethanthree_Photon_","Data","Photon"),
}
btag_more_than_three_uncorrected_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_morethanthree_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","btag_morethanthree_","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","btag_morethanthree_","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","btag_morethanthree_","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","btag_morethanthree_","SingleTop","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","btag_morethanthree_","DY","Had"),
# "mcSMS":(rootDirectory+"/Had_T2cc","btag_morethanthree_","T2cc","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_morethanthree_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","btag_morethanthree_OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","btag_morethanthree_OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","btag_morethanthree_OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","btag_morethanthree_OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","btag_morethanthree_OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","btag_morethanthree_OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_morethanthree_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","btag_morethanthree_DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","btag_morethanthree_DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","btag_morethanthree_DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","btag_morethanthree_DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","btag_morethanthree_DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","btag_morethanthree_DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","btag_morethanthree_Photon_","Photon","Photon"),
"nPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_morethanthree_Photon_","Data","Photon"),
}
btag_two_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_two_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_two_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_two_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"nPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_two_Photon_","Data","Photon"),
}
btag_more_than_zero_normalisation = {
"nMuon":(rootDirectoryNorm+"/Muon_Data"+data_run_suf,"btag_morethanzero_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectoryNorm+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectoryNorm+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectoryNorm+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectoryNorm+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectoryNorm+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectoryNorm+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectoryNorm+"/Muon_Data"+data_run_suf,"btag_morethanzero_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectoryNorm+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectoryNorm+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectoryNorm+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectoryNorm+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectoryNorm+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectoryNorm+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectoryNorm+"/Photon_MC","Photon_","Photon","Photon"),
"ncPhoton":(rootDirectoryNorm+"/Photon_Data"+data_run_suf,"btag_morethanzero_Photon_","Data","Photon"),
}
btag_more_than_one_normalisation = {
"nMuon":(rootDirectoryNorm+"/Muon_Data"+data_run_suf,"btag_morethanone_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectoryNorm+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectoryNorm+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectoryNorm+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectoryNorm+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectoryNorm+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectoryNorm+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectoryNorm+"/Muon_Data"+data_run_suf,"btag_morethanone_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectoryNorm+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectoryNorm+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectoryNorm+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectoryNorm+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectoryNorm+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectoryNorm+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectoryNorm+"/Photon_MC","Photon_","Photon","Photon"),
"ncPhoton":(rootDirectoryNorm+"/Photon_Data"+data_run_suf,"btag_morethanone_Photon_","Data","Photon"),
}
btag_two_normalisation = {
"nMuon":(rootDirectoryNorm+"/Muon_Data"+data_run_suf,"btag_two_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectoryNorm+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectoryNorm+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectoryNorm+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectoryNorm+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectoryNorm+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectoryNorm+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectoryNorm+"/Muon_Data"+data_run_suf,"btag_two_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectoryNorm+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectoryNorm+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectoryNorm+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectoryNorm+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectoryNorm+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectoryNorm+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectoryNorm+"/Photon_MC","Photon_","Photon","Photon"),
"nPhoton":(rootDirectoryNorm+"/Photon_Data"+data_run_suf,"btag_two_Photon_","Data","Photon"),
}
btag_two_uncorrected_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_two_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","btag_two_","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","btag_two_","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","btag_two_","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","btag_two_","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","btag_two_","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","btag_two_","DY","Had"),
# "mcSMS":(rootDirectory+"/Had_T2cc","btag_two_","T2cc","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_two_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","btag_two_OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","btag_two_OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","btag_two_OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","btag_two_OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","btag_two_OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","btag_two_OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_two_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","btag_two_DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","btag_two_DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","btag_two_DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","btag_two_DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","btag_two_DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","btag_two_DiMuon_","DY","DiMuon"),
"nPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_two_Photon_","Data","Photon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
}
btag_one_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_one_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_one_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_one_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"nPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_one_Photon_","Data","Photon"),
}
btag_one_uncorrected_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_one_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","btag_one_","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","btag_one_","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","btag_one_","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","btag_one_","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","btag_one_","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","btag_one_","DY","Had"),
# "mcSMS":(rootDirectory+"/Had_T2cc","btag_one_","T2cc","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_one_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","btag_one_OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","btag_one_OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","btag_one_OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","btag_one_OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","btag_one_OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","btag_one_OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_one_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","btag_one_DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","btag_one_DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","btag_one_DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","btag_one_DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","btag_one_DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","btag_one_DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","btag_one_Photon_","Photon","Photon"),
"nPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_one_Photon_","Data","Photon"),
}
btag_zero_normalisation = {
"nMuon":(rootDirectoryNorm+"/Muon_Data"+data_run_suf,"btag_zero_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectoryNorm+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectoryNorm+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectoryNorm+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectoryNorm+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectoryNorm+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectoryNorm+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectoryNorm+"/Muon_Data"+data_run_suf,"btag_zero_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectoryNorm+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectoryNorm+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectoryNorm+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectoryNorm+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectoryNorm+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectoryNorm+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectoryNorm+"/Photon_MC","Photon_","Photon","Photon"),
"nPhoton":(rootDirectoryNorm+"/Photon_Data"+data_run_suf,"btag_zero_Photon_","Data","Photon"),
}
btag_zero_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_zero_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_zero_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_zero_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"ncPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_zero_Photon_","Data","Photon"),
}
btag_zero_samples_failedSITV = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_zero_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_zero_OneMuon_failedSITV_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_failedSITV_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_failedSITV_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_failedSITV_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_failedSITV_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_failedSITV_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_failedSITV_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_zero_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"ncPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_zero_Photon_","Data","Photon"),
}
btag_zero_uncorrected_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_zero_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","btag_zero_","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","btag_zero_","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","btag_zero_","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","btag_zero_","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","btag_zero_","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","btag_zero_","DY","Had"),
# "mcSMS":(rootDirectory+"/Had_T2cc","btag_zero_","T2cc","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_zero_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","btag_zero_OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","btag_zero_OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","btag_zero_OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","btag_zero_OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","btag_zero_OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","btag_zero_OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_zero_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","btag_zero_DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","btag_zero_DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","btag_zero_DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","btag_zero_DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","btag_zero_DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","btag_zero_DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","btag_zero_Photon_","Photon","Photon"),
"ncPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_zero_Photon_","Data","Photon"),
}
btag_three_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_three_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_three_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_three_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"ncPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_three_Photon_","Data","Photon"),
}
btag_three_uncorrected_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_three_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","btag_three_","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","btag_three_","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","btag_three_","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","btag_three_","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","btag_three_","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","btag_three_","DY","Had"),
# "mcSMS":(rootDirectory+"/Had_T2cc","btag_three_","T2cc","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_three_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","btag_three_OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","btag_three_OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","btag_three_OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","btag_three_OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","btag_three_OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","btag_three_OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_three_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","btag_three_DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","btag_three_DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","btag_three_DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","btag_three_DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","btag_three_DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","btag_three_DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","btag_three_Photon_","Photon","Photon"),
"ncPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_three_Photon_","Data","Photon"),
}
btag_more_than_zero_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_morethanzero_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_morethanzero_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_morethanzero_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"ncPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_morethanzero_Photon_","Data","Photon"),
}
btag_more_than_zero_samples_failedSITV = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_morethanzero_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_morethanzero_OneMuon_failedSITV_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_failedSITV_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_failedSITV_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_failedSITV_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_failedSITV_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_failedSITV_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_failedSITV_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_morethanzero_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"ncPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_morethanzero_Photon_","Data","Photon"),
}
btag_more_than_one_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"btag_morethanone_","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_morethanone_OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"btag_morethanone_DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"ncPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"btag_morethanzero_Photon_","Data","Photon"),
}
inclusive_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
# "mcSMS":(rootDirectory+"/Had_T2cc","","T2cc","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"OneMuon_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"DiMuon_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"ncPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"Photon_","Data","Photon"),
}
inclusive_samples_failedMHTMET = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"","Data","Had"),
"mcHadW1":(rootDirectory+"/Had_WJets","","WJets","Had"),
"mcHadttbar":(rootDirectory+"/Had_TTbar","","TTbar","Had"),
"mcHadzinv":(rootDirectory+"/Had_Zinv","","Zinv","Had"),
"mcHadsingt":(rootDirectory+"/Had_SingleTop","","SingleTop","Had"),
"mcHaddiboson":(rootDirectory+"/Had_DiBoson","","DiBoson","Had"),
"mcHadDY":(rootDirectory+"/Had_DY","","DY","Had"),
# "mcSMS":(rootDirectory+"/Had_T2cc","","T2cc","Had"),
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"OneMuon_failed_MHT_MET_","Data","Muon"),
"mcMuonW1":(rootDirectory+"/Muon_WJets","OneMuon_failed_MHT_MET_","WJets","Muon"),
"mcMuonttbar":(rootDirectory+"/Muon_TTbar","OneMuon_failed_MHT_MET_","TTbar","Muon"),
"mcMuonzinv":(rootDirectory+"/Muon_Zinv","OneMuon_failed_MHT_MET_","Zinv","Muon"),
"mcMuonsingt":(rootDirectory+"/Muon_SingleTop","OneMuon_failed_MHT_MET_","SingleTop","Muon"),
"mcMuondiboson":(rootDirectory+"/Muon_DiBoson","OneMuon_failed_MHT_MET_","DiBoson","Muon"),
"mcMuonDY":(rootDirectory+"/Muon_DY","OneMuon_failed_MHT_MET_","DY","Muon"),
"nDiMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"DiMuon_failed_MHT_MET_","Data","DiMuon"),
"mcDiMuonW1":(rootDirectory+"/Muon_WJets","DiMuon_failed_MHT_MET_","WJets","DiMuon"),
"mcDiMuonttbar":(rootDirectory+"/Muon_TTbar","DiMuon_failed_MHT_MET_","TTbar","DiMuon"),
"mcDiMuonzinv":(rootDirectory+"/Muon_Zinv","DiMuon_failed_MHT_MET_","Zinv","DiMuon"),
"mcDiMuonsingt":(rootDirectory+"/Muon_SingleTop","DiMuon_failed_MHT_MET_","SingleTop","DiMuon"),
"mcDiMuondiboson":(rootDirectory+"/Muon_DiBoson","DiMuon_failed_MHT_MET_","DiBoson","DiMuon"),
"mcDiMuonDY":(rootDirectory+"/Muon_DY","DiMuon_failed_MHT_MET_","DY","DiMuon"),
"mcPhoton":(rootDirectory+"/Photon_MC","Photon_","Photon","Photon"),
"ncPhoton":(rootDirectory+"/Photon_Data"+data_run_suf,"Photon_","Data","Photon"),
}
"""
These are the files used to calculate the btag,mistag rate per HT bin for each of the different processes.
Z0 - WJets, DY, Zinv
Z2 - TTbar, DiBoson, SingleTop
"""
calc_file = {
"mchadz2":(rootDirectory+"/Had_Z2.root","Had_Z2",""),
"mchadz0":(rootDirectory+"/Had_Z0.root","Had_Z0",""),
"mcmuonz2":(rootDirectory+"/Muon_Z2.root","Muon_Z2","OneMuon_"),
"mcmuonz0":(rootDirectory+"/Muon_Z0.root","Muon_Z0","OneMuon_"),
"mcdimuon":(rootDirectory+"/Muon_Z0.root","DiMuon","DiMuon_"),
"mcphoton":(rootDirectory+"/Had_Z0.root","Photon",""),
}
#============== File Lists for template fitting ==============
had_template_samples = {
"nHad":(rootDirectory+"/Had_Data"+data_run_suf,"","Data","Had"),
"mcHadComb":(rootDirectory+"/Had_MC_Template","","MC","Had"),
"mcHadZ0":(rootDirectory+"/Had_Z0","","Z0","Had"),
"mcHadZ2":(rootDirectory+"/Had_Z2","","Z2","Had"),
}
muon_template_samples = {
"nMuon":(rootDirectory+"/Muon_Data"+data_run_suf,"OneMuon_","Data","Muon"),
"mcMuonComb":(rootDirectory+"/Muon_MC_Template","OneMuon_","MC","Muon"),
"mcMuonZ0":(rootDirectory+"/Muon_Z0_v2","OneMuon_","Z0","Muon"),
"mcMunZ2":(rootDirectory+"/Muon_Z2","OneMuon_","Z2","Muon"),
}
if __name__=="__main__":
Directory_Maker()
if args.t :
WP = ["Loose","Medium","Tight"]
settings["dirs"] = ["275_325","325_375","Template_375"]
template_ = {'had':had_template_samples,'muon':muon_template_samples}
for point in WP:
Number_Extractor(settings,template_[args.t],"Inclusive",Triggers = "True",AlphaT="False",Split_Lumi = "True",Analysis_category="all",Template=args.j,Do_sys = "True",Working_Point = point)
if args.m :
settings["dirs"] = ["150_200"] + settings["dirs"]
settings["bins"] = ["150"] + settings["bins"]
#settings["dirs"] = ["275_325","325_375","375_475","475_575","575_675","675_775","775_875","875_975","975_1075","1075"] #HT Bins
#settings["bins"] = ["275","325","375","475","575","675","775","875","975","1075"] #HT Bins
print" ================== \n Making MC Clamping Normalisation Yields \n ==================== \n"
Number_Extractor(settings,btag_zero_normalisation,"Zero_btags",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category="2",RunOption = "MCNormalisation")
#Number_Extractor(settings,btag_zero_normalisation,"Zero_btags",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category="all",RunOption = "MCNormalisation")
#Number_Extractor(settings,btag_more_than_zero_normalisation,"More_Than_Zero_btag",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category="3",RunOption = "MCNormalisation")
#Number_Extractor(settings,btag_more_than_one_normalisation,"More_Than_One_btag",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category="2",RunOption = "MCNormalisation")
#Number_Extractor(settings,btag_more_than_one_normalisation,"More_Than_One_btag",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category="3",RunOption = "MCNormalisation")
#Number_Extractor(settings,btag_more_than_one_normalisation,"More_Than_One_btag",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category="all",RunOption = "MCNormalisation")
Number_Extractor(settings,btag_two_normalisation,"Two_btags",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category="all",RunOption ="MCNormalisation")
Number_Extractor(settings,btag_two_normalisation,"Two_btags",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category="2",RunOption ="MCNormalisation")
if args.n :
print" ================== \n Making Tables Formula Yields \n ==================== \n"
# dict_list = [inclusive_samples, btag_zero_samples, btag_one_samples, btag_two_samples, btag_three_samples, btag_more_than_three_samples, calc_file]
# for d in dict_list:
# poppers = []
# for key in d:
# if "mcHad" not in key:
# poppers.append(key)
# for p in poppers:
# d.pop(p)
# for sample_set in [inclusive_samples, btag_zero_samples, btag_one_samples, btag_two_samples, btag_three_samples, btag_more_than_three_samples]:
# for sample in sample_set:
# # if "Muon" in sample and "DiMuon" not in sample:
# if "Photon" not in sample:
# sample_set[sample] = (sample_set[sample][0], sample_set[sample][1]+"failedSITV_", sample_set[sample][2], sample_set[sample][3])
for j in args.n:
print " ========= Jet Mult %s ======== " %j
Number_Extractor(settings,inclusive_samples,"Inclusive",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_zero_samples,"Zero_btags",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_one_samples,"One_btag",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_two_samples,"Two_btags",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_three_samples,"Three_btags",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_more_than_three_samples,"More_Than_Three_btag",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category=j)
process_files(os.getcwd() +"/TexFiles")
if args.u:
print" ================== \n Making Tables Uncorrected Yields \n ==================== \n"
# for i in [inclusive_samples, btag_zero_uncorrected_samples, btag_one_uncorrected_samples, btag_two_uncorrected_samples, btag_three_uncorrected_samples, btag_more_than_three_uncorrected_samples]:
# poppers = []
# for key in i:
# if "SMS" not in key:
# poppers.append(key)
# for pkey in poppers:
# i.pop(pkey)
for j in args.u:
print " ========= Jet Mult %s ======== " %j
Number_Extractor(settings,inclusive_samples,"Inclusive",Triggers = "True",AlphaT="False",Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_zero_uncorrected_samples,"Zero_btags",Triggers = "True",AlphaT="False",Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_one_uncorrected_samples,"One_btag",Triggers = "True",AlphaT="False",Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_two_uncorrected_samples,"Two_btags",Triggers = "True",AlphaT="False",Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_three_uncorrected_samples,"Three_btags",Triggers = "True",AlphaT="False",Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_more_than_three_uncorrected_samples,"More_Than_Three_btag",Triggers = "True",AlphaT="False",Split_Lumi = "True",Analysis_category= j)
process_files(os.getcwd() +"/TexFiles")
if args.r:
print" ================== \n Making Root Files \n ==================== \n"
for j in args.r:
print " ====== Jet Mult %s ========= \n"%j
Number_Extractor(settings,btag_two_samples,"Two_btags",Triggers = "False",AlphaT="False",Calculation=calc_file,Stats = "True",Split_Lumi = "True",Analysis_category =j)
Number_Extractor(settings,btag_one_samples,"One_btag",Triggers = "False",AlphaT="False",Calculation=calc_file,Stats = "True",Split_Lumi = "True",Analysis_category =j)
Number_Extractor(settings,btag_zero_samples,"Zero_btags",Triggers = "False",AlphaT="False",Calculation=calc_file,Stats = "True",Split_Lumi = "True",Analysis_category =j)
Number_Extractor(settings,btag_three_samples,"Three_btags",Triggers = "False",AlphaT="False",Calculation=calc_file,Stats = "True",Split_Lumi = "True",Analysis_category =j)
Number_Extractor(settings,btag_more_than_three_samples,"More_Than_Three_btag",Triggers = "False",AlphaT="False",Calculation=calc_file,Stats = "True",Split_Lumi = "True",Analysis_category =j)
if args.c:
print" ================== \n Making Closure Tests \n ==================== \n"
settings["AlphaTSlices"] = ["0.55_20","0.01_10"]
# calc_file = None # hack to run closure tests with uncorrected vanilla yields
if "jetcat" in args.c:
print " ======= Making Jetcategory closure tests ========"
CLOSURE_TESTS = []
Number_Extractor(settings,inclusive_samples,"Inclusive",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category="2")
Number_Extractor(settings,inclusive_samples,"Inclusive",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category="3")
Number_Extractor(settings,inclusive_samples,"Inclusive",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category="all")
Jad_Compute(settings,CLOSURE_TESTS,classic ="False",Lumo = settings["Lumo"],jetcat = "True")
if "sitv" in args.c:
print " ======= Making SITV closure tests ========"
# for j in ['2', '3', 'all']:
# CLOSURE_TESTS = []
# Number_Extractor(settings,inclusive_samples,"Inclusive",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category=j)
# Number_Extractor(settings,inclusive_samples_failedSITV,"Inclusive",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category=j, Sitv = "Failed")
# Jad_Compute(settings,CLOSURE_TESTS,classic ="False",Lumo = settings["Lumo"],jetcat = "False", jet_mult = "_%s"%j)
CLOSURE_TESTS = []
# Number_Extractor(settings,btag_zero_samples,"Zero_btags",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category="2")
# test 4
# Number_Extractor(settings,btag_more_than_zero_samples_failedSITV,"More_Than_Zero_btag",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category="3", Sitv = "Failed")
# Number_Extractor(settings,btag_more_than_zero_samples,"More_Than_Zero_btag",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category="3")
# test 5
# Number_Extractor(settings,btag_zero_samples_failedSITV,"Zero_btags",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category="2", Sitv = "Failed")
# Number_Extractor(settings,btag_zero_samples,"Zero_btags",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category="2")
# Jad_Compute(settings,CLOSURE_TESTS,classic ="False",Lumo = settings["Lumo"],jetcat = "False", jet_mult = "_3")
# for sample_set in [inclusive_samples, btag_zero_samples, btag_one_samples, btag_two_samples, btag_three_samples, btag_more_than_three_samples, btag_more_than_zero_samples, btag_more_than_one_samples]:
# for sample in sample_set:
# # if "Muon" in sample and "DiMuon" not in sample:
# if "Muon" in sample:
# sample_set[sample] = (sample_set[sample][0], sample_set[sample][1]+"failed_MHT_MET_", sample_set[sample][2], sample_set[sample][3])
for j in args.c:
if "jetcat" in args.c : continue
if "sitv" in args.c : continue
print " ====== Jet Mult %s ========= \n"%j
CLOSURE_TESTS = []
Number_Extractor(settings,btag_two_samples,"Two_btags",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_one_samples,"One_btag",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_zero_samples,"Zero_btags",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_more_than_zero_samples,"More_Than_Zero_btag",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,btag_more_than_one_samples,"More_Than_One_btag",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category=j)
Number_Extractor(settings,inclusive_samples,"Inclusive",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category=j)
Jad_Compute(settings,CLOSURE_TESTS,Lumo = settings["Lumo"],classic="False",jetcat = "False",jet_mult = "_%s"%j)
if args.d:
print" ================== \n In DEBUG mode \n ==================== \n"
CLOSURE_TESTS = []
# Number_Extractor(settings,btag_two_samples,"Two_btags",c_file = CLOSURE_TESTS,Closure = "True",Triggers = "True",AlphaT="True",Calculation=calc_file,Split_Lumi = "True",Analysis_category="all")
Number_Extractor(settings,inclusive_samples,"Inclusive",Triggers = "True",AlphaT="False",Calculation=calc_file,Stats = "False",Split_Lumi = "True",Analysis_category="all")
print "\n", "*"*52
print "\tTotal Analysis time: ", time()-baseTime, "s"
print "*"*52