-
Notifications
You must be signed in to change notification settings - Fork 9
/
mvaEvaluatorSL.py
1300 lines (1253 loc) · 128 KB
/
mvaEvaluatorSL.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
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
from bamboo import treefunctions as op
from highlevelLambdas import highlevelLambdas
import random
#from bamboo.root import loadHeader
#loadHeader("/home/ucl/cp3/gsaha/bamboodev/HHbbWWAnalysis/jpa.h")
# Format : Dict with key = (variable name, title for plot, binning for plot)
# val = bamboo variable
# ---------------------- 2b2Wj ----------------------- #
def returnClassicInputs_2b2Wj(self, lep, jet1, jet2, jet3, jet4, VBFJetPairs, L2Scores):
return{('leppdgId', 'leppdgId', (45,-22.,22.)): lep.pdgId,
('lepcharge', 'lepcharge', (3,-1,1.)): lep.charge,
('JPAcat', 'JPAcat', (9,0.,8.)): op.c_int(1),
('L22b2Wj', 'L2_2b2Wj', (10,0,1.)): L2Scores[0],
('L22b1Wj', 'L2_2b1Wj', (10,0,1.)): L2Scores[1],
('L22b0Wj', 'L2_2b0Wj', (10,0,1.)): L2Scores[3],
('L21b2Wj', 'L2_1b2Wj', (10,0,1.)): L2Scores[2],
('L21b1Wj', 'L2_1b1Wj', (10,0,1.)): L2Scores[4],
('L21b0Wj', 'L2_1b0Wj', (10,0,1.)): L2Scores[5],
('L20b', 'L2_0b', (10,0,1.)): L2Scores[6],
('METpx', 'METpx', (50,0.,500.)): self.corrMET.p4.Px(),
('METpy', 'METpy', (50,0.,500.)): self.corrMET.p4.Py(),
('METenergy', 'METenergy', (50,0.,500.)): self.corrMET.p4.E(),
('lepPx', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lepPy', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lepPz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('lepE', 'lep_E', (50,0.,500.)): lep.p4.E(),
('bj1Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj1E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): jet1.btagDeepFlavB,
('bj2Px', 'bj2_Px', (50,-250.,250.)): jet2.p4.Px(),
('bj2Py', 'bj2_Py', (50,-250.,250.)): jet2.p4.Py(),
('bj2Pz', 'bj2_Pz', (50,-250.,250.)): jet2.p4.Pz(),
('bj2E', 'bj2_E', (50,0.,500.)): jet2.p4.E(),
('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): jet2.btagDeepFlavB,
('wj1Px', 'wj1_Px', (50,-250.,250.)): jet3.p4.Px(),
('wj1Py', 'wj1_Py', (50,-250.,250.)): jet3.p4.Py(),
('wj1Pz', 'wj1_Pz', (50,-250.,250.)): jet3.p4.Pz(),
('wj1E', 'wj1_E', (50,0.,500.)): jet3.p4.E(),
('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): jet3.btagDeepFlavB,
('wj2Px', 'wj2_Px', (50,-250.,250.)): jet4.p4.Px(),
('wj2Py', 'wj2_Py', (50,-250.,250.)): jet4.p4.Py(),
('wj2Pz', 'wj2_Pz', (50,-250.,250.)): jet4.p4.Pz(),
('wj2E', 'wj2_E', (50,0.,500.)): jet4.p4.E(),
('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): jet4.btagDeepFlavB,
('VBFtag', 'VBF_tag', (2,0.,2.)): op.c_int(op.rng_len(VBFJetPairs) > 0),
('lepmetDPhi', 'lepmetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(lep,self.corrMET)),
('lepmetpt', 'lepmet_pt', (50,0.,500.)): self.HLL.SinglepMet_Pt(lep,self.corrMET),
('lepMT', 'lep_MT', (50,0.,500.)): self.HLL.MT(lep,self.corrMET),
('METLD', 'MET_LD', (50,0.,500.)): self.HLL.MET_LD_DL(self.corrMET, self.ak4Jets, self.electronsFakeSel, self.muonsFakeSel),
('hT', 'hT', (50,0.,500.)): self.HLL.HT_SL(self.ak4Jets),
('bj1LepDR', 'bj1LepDR', (50,0.,5.)): op.deltaR(jet1.p4, lep.p4),
('bj2LepDR', 'bj2LepDR', (50,0.,5.)): op.deltaR(jet2.p4, lep.p4),
('bj1MetDPhi', 'bj1MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet1, self.corrMET)),
('bj2MetDPhi', 'bj2MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet2, self.corrMET)),
('minDRlepallJets', 'minDRlepallJets', (50,0.,5.)): self.HLL.mindr_lep1_jet(lep, self.ak4Jets),
('bj1bj2pt', 'bj1bj2_pt', (50,0.,500.)): (self.HLL.bJetCorrP4(jet1)+self.HLL.bJetCorrP4(jet2)).Pt(),
('wj1wj2pt', 'wj1wj2_pt', (50,0.,500.)): (jet3.p4 + jet4.p4).Pt(),
('cosThetaSHbb', 'cosThetaSHbb', (50,0.,1.)): op.extMethod("HHbbWWJPA::cosThetaS", returnType="float")(self.HLL.bJetCorrP4(jet1), self.HLL.bJetCorrP4(jet2)),
('mTtop3particle', 'mT_top_3particle', (50,0.,500.)): op.min(self.HLL.mT2(self.HLL.bJetCorrP4(jet1),lep.p4 ,self.corrMET.p4),
self.HLL.mT2(self.HLL.bJetCorrP4(jet2),lep.p4 ,self.corrMET.p4)),
('wj1LepDR', 'wj1LepDR', (50,0.,5.)): op.deltaR(jet3.p4, lep.p4),
('wj2LepDR', 'wj2LepDR', (50,0.,5.)): op.deltaR(jet4.p4, lep.p4),
('wj1MetDPhi', 'wj1MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet3, self.corrMET)),
('wj2MetDPhi', 'wj2MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet4, self.corrMET)),
('wj1wj2M', 'wj1wj2_M', (50,0.,500.)): op.invariant_mass(jet3.p4, jet4.p4),
('HWWSimpleMass', 'HWW_Simple_Mass', (50,0.,500.)): self.HLL.HWW_met_simple(jet3.p4,jet4.p4,lep.p4,self.corrMET.p4).M(),
('HWWdR', 'HWW_dR', (50,0.,5.)): self.HLL.dR_Hww(jet3.p4,jet4.p4,lep.p4,self.corrMET),
('cosThetaSWjjsimple', 'cosThetaSWjjsimple', (50,0.,1.)): op.extMethod("HHbbWWJPA::cosThetaS", returnType="float")(jet3.p4, jet4.p4),
('cosThetaSWWsimplemet', 'cosThetaS_WW_simple_met', (50,0.,1.)): op.extMethod("HHbbWWJPA::cosThetaS", returnType="float")(self.HLL.Wjj_simple(jet3.p4,jet4.p4), self.HLL.Wlep_met_simple(lep.p4, self.corrMET.p4)),
('cosThetaSHHsimplemet', 'cosThetaS_HH_simple_met', (50,0.,1.)): op.extMethod("HHbbWWJPA::cosThetaS", returnType="float")(self.HLL.bJetCorrP4(jet1)+self.HLL.bJetCorrP4(jet2),self.HLL.HWW_met_simple(jet3.p4,jet4.p4,lep.p4, self.corrMET.p4)),
('angleBetWWPlane', 'angleBetWWPlane', (50,0.,5.)): self.HLL.angleWWplane(lep.p4, self.corrMET, jet3.p4, jet4.p4),
('angleBetHWPlane', 'angleBetHWPlane', (50,0.,5.)): self.HLL.angleBetPlanes(jet1.p4,jet2.p4,jet3.p4,jet4.p4),
('bj1bj2DR', 'bj1bj2_DR', (50,0.,5.)): op.deltaR(jet1.p4,jet2.p4),
('bj1wj1DR', 'bj1wj1_DR', (50,0.,5.)): op.deltaR(jet1.p4,jet3.p4),
('bj1wj2DR', 'bj1wj2_DR', (50,0.,5.)): op.deltaR(jet1.p4,jet4.p4),
('bj2wj1DR', 'bj2wj1_DR', (50,0.,5.)): op.deltaR(jet2.p4,jet3.p4),
('wj1wj2DR', 'wj1wj2_DR', (50,0.,5.)): op.deltaR(jet3.p4,jet4.p4),
('VBFj1pt', 'VBFj1pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,
op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,
VBFJetPairs[0][0].pt, VBFJetPairs[0][1].pt),
op.c_float(0.)),
('VBFj2pt', 'VBFj2pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,
op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,
VBFJetPairs[0][1].pt, VBFJetPairs[0][0].pt),
op.c_float(0.)),
('VBFj1j2dEta', 'VBFj1j2dEta', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,
op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),
op.c_float(0.)),
('VBFj1j2dPhi', 'VBFj1j2dPhi', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,
op.abs(op.deltaPhi(VBFJetPairs[0][0].p4,VBFJetPairs[0][1].p4)),
op.c_float(0.)),
('VBFj1j2invM', 'VBFj1j2invM', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,
op.invariant_mass(VBFJetPairs[0][0].p4, VBFJetPairs[0][1].p4),
op.c_float(0.)),
('zeppenfeldVar', 'zeppenfeldVar', (50,0.,5.)): op.switch(op.rng_len(VBFJetPairs) > 0,
op.abs(lep.eta - (VBFJetPairs[0][0].eta + VBFJetPairs[0][1].eta)/2.0)/op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),
op.c_float(0.)),
('minJetDR', 'minJetDR', (50,0.,5.)): self.HLL.MinDiJetDRTight(jet1,jet2,jet3,jet4),
('minLepJetDR', 'minLepJetDR', (50,0.,5.)): self.HLL.MinDR_lep4j(lep,jet1,jet2,jet3,jet4),
('HbbLepDR', 'HbbLepDR', (50,0.,5.)): op.deltaR(jet1.p4+jet2.p4, lep.p4),
('HWWLepDR', 'HWWLepDR', (50,0.,5.)): op.deltaR(jet3.p4+jet4.p4, lep.p4),
('HWWMetDPhi', 'HWWMetDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet3.p4+jet4.p4, self.corrMET.p4)),
('HT2lepJetMet', 'HT2lepJetMet', (50,0,300)): self.HLL.HT2_2b2Wj(lep,jet1,jet2,jet3,jet4,self.corrMET)
#('bj1LepDPhi', 'bj1LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4, lep.p4)),
#('leppt', 'lep_pt', (50,0.,500.)): lep.pt,
#('bj1pt', 'bj1_pt', (50,0.,500.)): jet1.pt,
#('bj2pt', 'bj2_pt', (50,0.,500.)): jet2.pt,
#('bj2eta', 'bj2_eta', (20,0.,3.2)): jet2.eta,
#('wj1pt', 'wj1_pt', (50,0.,500.)): jet3.pt,
#('wj2pt', 'wj2_pt', (50,0.,500.)): jet4.pt,
#('nAk4BJets', 'nAk4BJets', (6,0.,5.)): op.rng_len(self.ak4BJets),
#('bj2LepDPhi', 'bj2LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet2.p4, lep.p4)),
#('bj1bj2M', 'bj1bj2_M', (50,0.,500.)): op.invariant_mass(self.HLL.bJetCorrP4(jet1),self.HLL.bJetCorrP4(jet2)),
##('cosThetaSHbb', 'cosThetaSHbb', (50,0.,1.)): self.HLL.comp_cosThetaS(self.HLL.bJetCorrP4(jet1), self.HLL.bJetCorrP4(jet2)),
#('wj1LepDPhi', 'wj1LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet3.p4, lep.p4)),
#('wj2LepDPhi', 'wj2LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet4.p4, lep.p4)),
#('w1w2MT', 'w1w2_MT', (50,0.,500.)): self.HLL.MT_W1W2_ljj(lep,jet3,jet4, self.corrMET),
#('HWW_Mass', 'HWW_Mass', (50,0.,500.)): self.HLL.HWW_simple(jet3.p4,jet4.p4,lep.p4,self.corrMET).M(),
#('HWWMass', 'HWW_Mass', (50,0.,500.)): op.extMethod("HHbbWWJPA::HWW_SimpleMassWithRecoNeutrino", returnType="float")(jet3.p4, jet4.p4, lep.p4, self.corrMET.p4),
##('cosThetaS_Wjj_simple', 'cosThetaS_Wjj_simple', (50,0.,1.)): self.HLL.comp_cosThetaS(jet3.p4, jet4.p4),
##('cosThetaS_WW_simple_met', 'cosThetaS_WW_simple_met', (50,0.,1.)): self.HLL.comp_cosThetaS(self.HLL.Wjj_simple(jet3.p4,jet4.p4), self.HLL.Wlep_met_simple(lep.p4, self.corrMET.p4)),
##('cosThetaS_HH_simple_met', 'cosThetaS_HH_simple_met', (50,0.,1.)): self.HLL.comp_cosThetaS(self.HLL.bJetCorrP4(jet1)+self.HLL.bJetCorrP4(jet2),self.HLL.HWW_met_simple(jet3.p4,jet4.p4,lep.p4, self.corrMET.p4)),
#('bj1bj2DPhi', 'bj1bj2_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4,jet2.p4)),
#('bj2wj1DPhi', 'bj2wj1_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet2.p4,jet3.p4)),
#('wj1wj2DPhi', 'wj1wj2_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet3.p4,jet4.p4)),
#('bj1wj2DPhi', 'bj1wj2_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4,jet4.p4)),
#('bj1wj1DPhi', 'bj1wj1_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4,jet3.p4)),
#('HbbLepDPhi', 'HbbLepDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet1.p4+jet2.p4, lep.p4)),
#('HbbMetDPhi', 'HbbMetDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet1.p4+jet2.p4, self.corrMET.p4)),
#('HWWLepDPhi', 'HWWLepDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet3.p4+jet4.p4, lep.p4))
}
def returnLBNInputs_2b2Wj(self,lep,jet1,jet2,jet3,jet4):
return{('lep_E', 'lep_E', (50,0.,500.)): lep.p4.E(),
('lep_Px', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lep_Py', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lep_Pz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('bj1_E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1_Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1_Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1_Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj2_E', 'bj2_E', (50,0.,500.)): jet2.p4.E(),
('bj2_Px', 'bj2_Px', (50,-250.,250.)): jet2.p4.Px(),
('bj2_Py', 'bj2_Py', (50,-250.,250.)): jet2.p4.Py(),
('bj2_Pz', 'bj2_Pz', (50,-250.,250.)): jet2.p4.Pz(),
('wj1_E', 'wj1_E', (50,0.,500.)): jet3.p4.E(),
('wj1_Px', 'wj1_Px', (50,-250.,250.)): jet3.p4.Px(),
('wj1_Py', 'wj1_Py', (50,-250.,250.)): jet3.p4.Py(),
('wj1_Pz', 'wj1_Pz', (50,-250.,250.)): jet3.p4.Pz(),
('wj2_E', 'wj2_E', (50,0.,500.)): jet4.p4.E(),
('wj2_Px', 'wj2_Px', (50,-250.,250.)): jet4.p4.Px(),
('wj2_Py', 'wj2_Py', (50,-250.,250.)): jet4.p4.Py(),
('wj2_Pz', 'wj2_Pz', (50,-250.,250.)): jet4.p4.Pz()}
# ---------------------- 2b1Wj ----------------------- #
def returnClassicInputs_2b1Wj(self, lep, jet1, jet2, jet3, jet4, VBFJetPairs, L2Scores):
return{('leppdgId', 'leppdgId', (45,-22.,22.)): lep.pdgId,
('lepcharge', 'lepcharge', (3,-1,1.)): lep.charge,
('JPAcat', 'JPAcat', (9,0.,8.)): op.c_int(2),
('L22b2Wj', 'L2_2b2Wj', (10,0,1.)): L2Scores[0],
('L22b1Wj', 'L2_2b1Wj', (10,0,1.)): L2Scores[1],
('L22b0Wj', 'L2_2b0Wj', (10,0,1.)): L2Scores[3],
('L21b2Wj', 'L2_1b2Wj', (10,0,1.)): L2Scores[2],
('L21b1Wj', 'L2_1b1Wj', (10,0,1.)): L2Scores[4],
('L21b0Wj', 'L2_1b0Wj', (10,0,1.)): L2Scores[5],
('L20b', 'L2_0b', (10,0,1.)): L2Scores[6],
('METpx', 'METpx', (50,0.,500.)): self.corrMET.p4.Px(),
('METpy', 'METpy', (50,0.,500.)): self.corrMET.p4.Py(),
('METenergy', 'METenergy', (50,0.,500.)): self.corrMET.p4.E(),
('lepPx', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lepPy', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lepPz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('lepE', 'lep_E', (50,-250.,250.)): lep.p4.E(),
('bj1Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj1E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): jet1.btagDeepFlavB,
('bj2Px', 'bj2_Px', (50,-250.,250.)): jet2.p4.Px(),
('bj2Py', 'bj2_Py', (50,-250.,250.)): jet2.p4.Py(),
('bj2Pz', 'bj2_Pz', (50,-250.,250.)): jet2.p4.Pz(),
('bj2E', 'bj2_E', (50,0.,500.)): jet2.p4.E(),
('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): jet2.btagDeepFlavB,
('wj1Px', 'wj1_Px', (50,-250.,250.)): jet3.p4.Px(),
('wj1Py', 'wj1_Py', (50,-250.,250.)): jet3.p4.Py(),
('wj1Pz', 'wj1_Pz', (50,-250.,250.)): jet3.p4.Pz(),
('wj1E', 'wj1_E', (50,0.,500.)): jet3.p4.E(),
('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): jet3.btagDeepFlavB,
('wj2Px', 'wj2_Px', (50,-250.,250.)): op.c_float(0.),
('wj2Py', 'wj2_Py', (50,-250.,250.)): op.c_float(0.),
('wj2Pz', 'wj2_Pz', (50,-250.,250.)): op.c_float(0.),
('wj2E', 'wj2_E', (50,0.,500.)): op.c_float(0.),
('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('VBFtag', 'VBF_tag', (2,0.,2.)): op.c_int(op.rng_len(VBFJetPairs) > 0),
('lepmetDPhi', 'lepmetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(lep,self.corrMET)),
('lepmetpt', 'lepmet_pt', (50,0.,500.)): self.HLL.SinglepMet_Pt(lep,self.corrMET),
('lepMT', 'lep_MT', (50,0.,500.)): self.HLL.MT(lep,self.corrMET),
('METLD', 'MET_LD', (50,0.,500.)): self.HLL.MET_LD_DL(self.corrMET, self.ak4Jets, self.electronsFakeSel, self.muonsFakeSel),
('hT', 'hT', (50,0.,500.)): self.HLL.HT_SL(self.ak4Jets),
('bj1LepDR', 'bj1LepDR', (50,0.,5.)): op.deltaR(jet1.p4, lep.p4),
('bj2LepDR', 'bj2LepDR', (50,0.,5.)): op.deltaR(jet2.p4, lep.p4),
('bj1MetDPhi', 'bj1MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet1, self.corrMET)),
('bj2MetDPhi', 'bj2MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet2, self.corrMET)),
('minDRlepallJets', 'minDRlepallJets', (50,0.,5.)): self.HLL.mindr_lep1_jet(lep, self.ak4Jets),
('bj1bj2pt', 'bj1bj2_pt', (50,0.,500.)): (self.HLL.bJetCorrP4(jet1)+self.HLL.bJetCorrP4(jet2)).Pt(),
('wj1wj2pt', 'wj1wj2_pt', (50,0.,500.)): op.c_float(0.),
#('wj1wj2pt', 'wj1wj2_pt', (50,0.,500.)): jet3.pt,
('cosThetaSHbb', 'cosThetaSHbb', (50,0.,1.)): op.extMethod("HHbbWWJPA::cosThetaS", returnType="float")(self.HLL.bJetCorrP4(jet1), self.HLL.bJetCorrP4(jet2)),
('mTtop3particle', 'mT_top_3particle', (50,0.,500.)): op.min(self.HLL.mT2(self.HLL.bJetCorrP4(jet1),lep.p4 ,self.corrMET.p4),
self.HLL.mT2(self.HLL.bJetCorrP4(jet2), lep.p4, self.corrMET.p4)),
('wj1LepDR', 'wj1LepDR', (50,0.,5.)): op.deltaR(jet3.p4, lep.p4),
('wj2LepDR', 'wj2LepDR', (50,0.,5.)): op.c_float(0.),
('wj1MetDPhi', 'wj1MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet3, self.corrMET)),
('wj2MetDPhi', 'wj2MetDPhi', (50,0.,4.)): op.c_float(0.),
#('wj1wj2M', 'wj1wj2_M', (50,0.,500.)): jet3.p4.M(),
('wj1wj2M', 'wj1wj2_M', (50,0.,500.)): op.c_float(0.),
('HWWSimpleMass', 'HWW_Simple_Mass', (50,0.,500.)): op.c_float(0.),
('HWWdR', 'HWW_dR', (50,0.,5.)): op.c_float(0.),
('cosThetaSWjjsimple', 'cosThetaSWjjsimple', (50,0.,5.)): op.c_float(0.),
('cosThetaSWWsimplemet', 'cosThetaS_WW_simple_met', (50,0.,5.)): op.c_float(0.),
('cosThetaSHHsimplemet', 'cosThetaS_HH_simple_met', (50,0.,5.)): op.c_float(0.),
('angleBetWWPlane', 'angleBetWWPlane', (50,0.,5.)): op.c_float(0.),
('angleBetHWPlane', 'angleBetHWPlane', (50,0.,5.)): op.c_float(0.),
('bj1bj2DR', 'bj1bj2_DR', (50,0.,5.)): op.deltaR(jet1.p4,jet2.p4),
('bj1wj1DR', 'bj1wj1_DR', (50,0.,5.)): op.deltaR(jet1.p4,jet3.p4),
('bj1wj2DR', 'bj1wj2_DR', (50,0.,5.)): op.c_float(0.),
('bj2wj1DR', 'bj2wj1_DR', (50,0.,5.)): op.deltaR(jet2.p4,jet3.p4),
('wj1wj2DR', 'wj1wj2_DR', (50,0.,5.)): op.c_float(0.),
('VBFj1pt', 'VBFj1pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,VBFJetPairs[0][0].pt, VBFJetPairs[0][1].pt),op.c_float(0.)),
('VBFj2pt', 'VBFj2pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,VBFJetPairs[0][1].pt, VBFJetPairs[0][0].pt),op.c_float(0.)),
('VBFj1j2dEta', 'VBFj1j2dEta', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),op.c_float(0.)),
('VBFj1j2dPhi', 'VBFj1j2dPhi', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.abs(op.deltaPhi(VBFJetPairs[0][0].p4,VBFJetPairs[0][1].p4)),op.c_float(0.)),
('VBFj1j2invM', 'VBFj1j2invM', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.invariant_mass(VBFJetPairs[0][0].p4, VBFJetPairs[0][1].p4),op.c_float(0.)),
('zeppenfeldVar', 'zeppenfeldVar', (50,0.,5.)): op.switch(op.rng_len(VBFJetPairs) > 0, op.abs(lep.eta - (VBFJetPairs[0][0].eta + VBFJetPairs[0][1].eta)/2.0)/op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),op.static_cast("Float_t",op.c_float(0.))),
('minJetDR', 'minJetDR', (50,0.,5.)): self.HLL.MinDiJetDRLoose(jet1,jet2,jet3),
('minLepJetDR', 'minLepJetDR', (50,0.,5.)): self.HLL.MinDR_lep3j(lep,jet1,jet2,jet3),
('HbbLepDR', 'HbbLepDR', (50,0.,5.)): op.deltaR(jet1.p4+jet2.p4, lep.p4),
#('HWWLepDR', 'HWWLepDR', (50,0.,5.)): op.deltaR(jet3.p4, lep.p4),
('HWWLepDR', 'HWWLepDR', (50,0.,5.)): op.c_float(0.),
#('HWWMetDPhi', 'HWWMetDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet3.p4, self.corrMET.p4)),
('HWWMetDPhi', 'HWWMetDPhi', (50,0.,5.)): op.c_float(0.),
('HT2lepJetMet', 'HT2lepJetMet', (50,0,300)): self.HLL.HT2_2b1Wj(lep,jet1,jet2,jet3,self.corrMET)
}
#('HT2_lepJetMet', 'HT2_lepJetMet', (50,0.,500.)): self.HLL.HT2_2b1Wj(lep,jet1,jet2,jet3,self.corrMET)
#('bj1LepDPhi', 'bj1LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4, lep.p4)),
#('bj2LepDPhi', 'bj2LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet2.p4, lep.p4)),
#('bj1bj2M', 'bj1bj2_M', (50,0.,500.)): op.invariant_mass(self.HLL.bJetCorrP4(jet1),self.HLL.bJetCorrP4(jet2)),
#('cosThetaSHbb', 'cosThetaSHbb', (50,0.,5.)): self.HLL.comp_cosThetaS(self.HLL.bJetCorrP4(jet1), self.HLL.bJetCorrP4(jet2)),
#('wj1LepDPhi', 'wj1LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet3.p4, lep.p4)),
#('wj2LepDPhi', 'wj2LepDPhi', (50,0.,4.)): op.c_float(0.),
#('w1w2MT', 'w1w2_MT', (50,0.,500.)): op.c_float(0.),
#('HWWMass', 'HWW_Mass', (50,0.,500.)): op.c_float(0.),
#('bj1bj2DPhi', 'bj1bj2_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4,jet2.p4)),
#('bj2wj1DPhi', 'bj2wj1_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet2.p4,jet3.p4)),
#('wj1wj2DPhi', 'wj1wj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj1wj2DPhi', 'bj1wj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj1wj1DPhi', 'bj1wj1_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4,jet3.p4)),
#('HbbLepDPhi', 'HbbLepDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet1.p4+jet2.p4, lep.p4)),
#('HbbMetDPhi', 'HbbMetDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet1.p4+jet2.p4, self.corrMET.p4)),
#('HWWLepDPhi', 'HWWLepDPhi', (50,0.,5.)): op.c_float(0.),
def returnLBNInputs_2b1Wj(self,lep,jet1,jet2,jet3,jet4):
return{('lep_E', 'lep_E', (50,0.,500.)): lep.p4.E(),
('lep_Px', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lep_Py', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lep_Pz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('bj1_E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1_Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1_Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1_Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj2_E', 'bj2_E', (50,0.,500.)): jet2.p4.E(),
('bj2_Px', 'bj2_Px', (50,-250.,250.)): jet2.p4.Px(),
('bj2_Py', 'bj2_Py', (50,-250.,250.)): jet2.p4.Py(),
('bj2_Pz', 'bj2_Pz', (50,-250.,250.)): jet2.p4.Pz(),
('wj1_E', 'wj1_E', (50,0.,500.)): jet3.p4.E(),
('wj1_Px', 'wj1_Px', (50,-250.,250.)): jet3.p4.Px(),
('wj1_Py', 'wj1_Py', (50,-250.,250.)): jet3.p4.Py(),
('wj1_Pz', 'wj1_Pz', (50,-250.,250.)): jet3.p4.Pz(),
('wj2_E', 'wj2_E', (50,0.,500.)): op.c_float(0.),
('wj2_Px', 'wj2_Px', (50,-250.,250.)): op.c_float(0.),
('wj2_Py', 'wj2_Py', (50,-250.,250.)): op.c_float(0.),
('wj2_Pz', 'wj2_Pz', (50,-250.,250.)): op.c_float(0.)}
# ---------------------- 2b0Wj ----------------------- #
def returnClassicInputs_2b0Wj(self, lep, jet1, jet2, jet3, jet4, VBFJetPairs, L2Scores):
return{('leppdgId', 'leppdgId', (45,-22.,22.)): lep.pdgId,
('lepcharge', 'lepcharge', (3,-1,1.)): lep.charge,
('JPAcat', 'JPAcat', (9,0.,8.)): op.c_int(3),
('L22b2Wj', 'L2_2b2Wj', (10,0,1.)): L2Scores[0],
('L22b1Wj', 'L2_2b1Wj', (10,0,1.)): L2Scores[1],
('L22b0Wj', 'L2_2b0Wj', (10,0,1.)): L2Scores[3],
('L21b2Wj', 'L2_1b2Wj', (10,0,1.)): L2Scores[2],
('L21b1Wj', 'L2_1b1Wj', (10,0,1.)): L2Scores[4],
('L21b0Wj', 'L2_1b0Wj', (10,0,1.)): L2Scores[5],
('L20b', 'L2_0b', (10,0,1.)): L2Scores[6],
('METpx', 'METpx', (50,0.,500.)): self.corrMET.p4.Px(),
('METpy', 'METpy', (50,0.,500.)): self.corrMET.p4.Py(),
('METenergy', 'METenergy', (50,0.,500.)): self.corrMET.p4.E(),
('lepPx', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lepPy', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lepPz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('lepE', 'lep_E', (50,-250.,250.)): lep.p4.E(),
('bj1Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj1E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): jet1.btagDeepFlavB,
('bj2Px', 'bj2_Px', (50,-250.,250.)): jet2.p4.Px(),
('bj2Py', 'bj2_Py', (50,-250.,250.)): jet2.p4.Py(),
('bj2Pz', 'bj2_Pz', (50,-250.,250.)): jet2.p4.Pz(),
('bj2E', 'bj2_E', (50,0.,500.)): jet2.p4.E(),
('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): jet2.btagDeepFlavB,
('wj1Px', 'wj1_Px', (50,-250.,250.)): op.c_float(0.),
('wj1Py', 'wj1_Py', (50,-250.,250.)): op.c_float(0.),
('wj1Pz', 'wj1_Pz', (50,-250.,250.)): op.c_float(0.),
('wj1E', 'wj1_E', (50,0.,500.)): op.c_float(0.),
('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('wj2Px', 'wj2_Px', (50,-250.,250.)): op.c_float(0.),
('wj2Py', 'wj2_Py', (50,-250.,250.)): op.c_float(0.),
('wj2Pz', 'wj2_Pz', (50,-250.,250.)): op.c_float(0.),
('wj2E', 'wj2_E', (50,0.,500.)): op.c_float(0.),
('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('VBFtag', 'VBF_tag', (2,0.,2.)): op.c_int(op.rng_len(VBFJetPairs) > 0),
('lepmetDPhi', 'lepmetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(lep,self.corrMET)),
('lepmetpt', 'lepmet_pt', (50,0.,500.)): self.HLL.SinglepMet_Pt(lep,self.corrMET),
('lepMT', 'lep_MT', (50,0.,500.)): self.HLL.MT(lep,self.corrMET),
('METLD', 'MET_LD', (50,0.,500.)): self.HLL.MET_LD_DL(self.corrMET, self.ak4Jets, self.electronsFakeSel, self.muonsFakeSel),
('hT', 'hT', (50,0.,500.)): self.HLL.HT_SL(self.ak4Jets),
('bj1LepDR', 'bj1LepDR', (50,0.,5.)): op.deltaR(jet1.p4, lep.p4),
('bj2LepDR', 'bj2LepDR', (50,0.,5.)): op.deltaR(jet2.p4, lep.p4),
('bj1MetDPhi', 'bj1MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet1, self.corrMET)),
('bj2MetDPhi', 'bj2MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet2, self.corrMET)),
('minDRlepallJets', 'minDRlepallJets', (50,0.,5.)): self.HLL.mindr_lep1_jet(lep, self.ak4Jets),
('bj1bj2pt', 'bj1bj2_pt', (50,0.,500.)): (self.HLL.bJetCorrP4(jet1)+self.HLL.bJetCorrP4(jet2)).Pt(),
('wj1wj2pt', 'wj1wj2_pt', (50,0.,500.)): op.c_float(0.),
('cosThetaSHbb', 'cosThetaSHbb', (50,0.,1.)): op.extMethod("HHbbWWJPA::cosThetaS", returnType="float")(self.HLL.bJetCorrP4(jet1), self.HLL.bJetCorrP4(jet2)),
('mTtop3particle', 'mT_top_3particle', (50,0.,500.)): op.min(self.HLL.mT2(self.HLL.bJetCorrP4(jet1),lep.p4 ,self.corrMET.p4),
self.HLL.mT2(self.HLL.bJetCorrP4(jet2), lep.p4, self.corrMET.p4)),
('wj1LepDR', 'wj1LepDR', (50,0.,5.)): op.c_float(0.),
('wj2LepDR', 'wj2LepDR', (50,0.,5.)): op.c_float(0.),
('wj1MetDPhi', 'wj1MetDPhi', (50,0.,4.)): op.c_float(0.),
('wj2MetDPhi', 'wj2MetDPhi', (50,0.,4.)): op.c_float(0.),
('wj1wj2M', 'wj1wj2_M', (50,0.,500.)): op.c_float(0.),
('HWWSimpleMass', 'HWW_Simple_Mass', (50,0.,500.)): op.c_float(0.),
('HWWdR', 'HWW_dR', (50,0.,5.)): op.c_float(0.),
('cosThetaSWjjsimple', 'cosThetaSWjjsimple', (50,0.,5.)): op.c_float(0.),
('cosThetaSWWsimplemet', 'cosThetaS_WW_simple_met', (50,0.,5.)): op.c_float(0.),
('cosThetaSHHsimplemet', 'cosThetaS_HH_simple_met', (50,0.,5.)): op.c_float(0.),
('angleBetWWPlane', 'angleBetWWPlane', (50,0.,5.)): op.c_float(0.),
('angleBetHWPlane', 'angleBetHWPlane', (50,0.,5.)): op.c_float(0.),
('bj1bj2DR', 'bj1bj2_DR', (50,0.,5.)): op.deltaR(jet1.p4,jet2.p4),
('bj1wj1DR', 'bj1wj1_DR', (50,0.,5.)): op.c_float(0.),
('bj1wj2DR', 'bj1wj2_DR', (50,0.,5.)): op.c_float(0.),
('bj2wj1DR', 'bj2wj1_DR', (50,0.,5.)): op.c_float(0.),
('wj1wj2DR', 'wj1wj2_DR', (50,0.,5.)): op.c_float(0.),
('VBFj1pt', 'VBFj1pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,VBFJetPairs[0][0].pt, VBFJetPairs[0][1].pt),op.c_float(0.)),
('VBFj2pt', 'VBFj2pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,VBFJetPairs[0][1].pt, VBFJetPairs[0][0].pt),op.c_float(0.)),
('VBFj1j2dEta', 'VBFj1j2dEta', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),op.c_float(0.)),
('VBFj1j2dPhi', 'VBFj1j2dPhi', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.abs(op.deltaPhi(VBFJetPairs[0][0].p4,VBFJetPairs[0][1].p4)),op.c_float(0.)),
('VBFj1j2invM', 'VBFj1j2invM', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.invariant_mass(VBFJetPairs[0][0].p4, VBFJetPairs[0][1].p4),op.c_float(0.)),
('zeppenfeldVar', 'zeppenfeldVar', (50,0.,5.)): op.switch(op.rng_len(VBFJetPairs) > 0, op.abs(lep.eta - (VBFJetPairs[0][0].eta + VBFJetPairs[0][1].eta)/2.0)/op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),op.static_cast("Float_t",op.c_float(0.))),
('minJetDR', 'minJetDR', (50,0.,5.)): op.deltaR(jet1.p4,jet2.p4),
('minLepJetDR', 'minLepJetDR', (50,0.,5.)): self.HLL.MinDR_lep2j(lep,jet1,jet2),
('HbbLepDR', 'HbbLepDR', (50,0.,5.)): op.deltaR(jet1.p4+jet2.p4, lep.p4),
('HWWLepDR', 'HWWLepDR', (50,0.,5.)): op.c_float(0.),
('HWWMetDPhi', 'HWWMetDPhi', (50,0.,5.)): op.c_float(0.),
('HT2lepJetMet', 'HT2lepJetMet', (50,0,300)): self.HLL.HT2_2b0Wj(lep,jet1,jet2,self.corrMET)
}
#('HT2_lepJetMet', 'HT2_lepJetMet', (50,0.,500.)): self.HLL.HT2_2b0Wj(lep,jet1,jet2,self.corrMET)}
#('leppt', 'lep_pt', (50,0.,500.)): lep.pt,
#('bj1pt', 'bj1_pt', (50,0.,500.)): jet1.pt,
#('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): jet1.btagDeepFlavB,
#('bj2pt', 'bj2_pt', (50,0.,500.)): jet2.pt,
#('bj2eta', 'bj2_eta', (20,0.,3.2)): jet2.eta,
#('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): jet2.btagDeepFlavB,
#('wj1pt', 'wj1_pt', (50,0.,500.)): op.c_float(0.),
#('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('wj2pt', 'wj2_pt', (50,0.,500.)): op.c_float(0.),
#('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('nAk4BJets', 'nAk4BJets', (6,0.,5.)): op.rng_len(self.ak4BJets),
#('bj1LepDPhi', 'bj1LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4, lep.p4)),
#('bj2LepDPhi', 'bj2LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet2.p4, lep.p4)),
#('bj1bj2M', 'bj1bj2_M', (50,0.,500.)): op.invariant_mass(self.HLL.bJetCorrP4(jet1),self.HLL.bJetCorrP4(jet2)),
#('cosThetaSHbb', 'cosThetaSHbb', (50,0.,5.)): self.HLL.comp_cosThetaS(self.HLL.bJetCorrP4(jet1), self.HLL.bJetCorrP4(jet2)),
#('wj1LepDPhi', 'wj1LepDPhi', (50,0.,4.)): op.c_float(0.),
#('wj2LepDPhi', 'wj2LepDPhi', (50,0.,4.)): op.c_float(0.),
#('w1w2MT', 'w1w2_MT', (50,0.,500.)): op.c_float(0.),
#('HWWMass', 'HWW_Mass', (50,0.,500.)): op.c_float(0.),
#('bj1bj2DPhi', 'bj1bj2_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4,jet2.p4)),
#('bj2wj1DPhi', 'bj2wj1_DPhi', (50,0.,4.)): op.c_float(0.),
#('wj1wj2DPhi', 'wj1wj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj1wj2DPhi', 'bj1wj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj1wj1DPhi', 'bj1wj1_DPhi', (50,0.,4.)): op.c_float(0.),
#('HbbLepDPhi', 'HbbLepDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet1.p4+jet2.p4, lep.p4)),
#('HbbMetDPhi', 'HbbMetDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet1.p4+jet2.p4, self.corrMET.p4)),
#('HWWLepDPhi', 'HWWLepDPhi', (50,0.,5.)): op.c_float(0.),
def returnLBNInputs_2b0Wj(self,lep,jet1,jet2,jet3,jet4):
return{('lep_E', 'lep_E', (50,0.,500.)): lep.p4.E(),
('lep_Px', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lep_Py', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lep_Pz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('bj1_E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1_Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1_Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1_Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj2_E', 'bj2_E', (50,0.,500.)): jet2.p4.E(),
('bj2_Px', 'bj2_Px', (50,-250.,250.)): jet2.p4.Px(),
('bj2_Py', 'bj2_Py', (50,-250.,250.)): jet2.p4.Py(),
('bj2_Pz', 'bj2_Pz', (50,-250.,250.)): jet2.p4.Pz(),
('wj1_E', 'wj1_E', (50,0.,500.)): op.c_float(0.),
('wj1_Px', 'wj1_Px', (50,-250.,250.)): op.c_float(0.),
('wj1_Py', 'wj1_Py', (50,-250.,250.)): op.c_float(0.),
('wj1_Pz', 'wj1_Pz', (50,-250.,250.)): op.c_float(0.),
('wj2_E', 'wj2_E', (50,0.,500.)): op.c_float(0.),
('wj2_Px', 'wj2_Px', (50,-250.,250.)): op.c_float(0.),
('wj2_Py', 'wj2_Py', (50,-250.,250.)): op.c_float(0.),
('wj2_Pz', 'wj2_Pz', (50,-250.,250.)): op.c_float(0.)}
# ---------------------- 1b2Wj ----------------------- #
def returnClassicInputs_1b2Wj(self, lep, jet1, jet2, jet3, jet4, VBFJetPairs, L2Scores):
return{('leppdgId', 'leppdgId', (45,-22.,22.)): lep.pdgId,
('lepcharge', 'lepcharge', (3,-1,1.)): lep.charge,
('JPAcat', 'JPAcat', (9,0.,8.)): op.c_int(4),
('L22b2Wj', 'L2_2b2Wj', (10,0,1.)): L2Scores[0],
('L22b1Wj', 'L2_2b1Wj', (10,0,1.)): L2Scores[1],
('L22b0Wj', 'L2_2b0Wj', (10,0,1.)): L2Scores[3],
('L21b2Wj', 'L2_1b2Wj', (10,0,1.)): L2Scores[2],
('L21b1Wj', 'L2_1b1Wj', (10,0,1.)): L2Scores[4],
('L21b0Wj', 'L2_1b0Wj', (10,0,1.)): L2Scores[5],
('L20b', 'L2_0b', (10,0,1.)): L2Scores[6],
('METpx', 'METpx', (50,0.,500.)): self.corrMET.p4.Px(),
('METpy', 'METpy', (50,0.,500.)): self.corrMET.p4.Py(),
('METenergy', 'METenergy', (50,0.,500.)): self.corrMET.p4.E(),
('lepPx', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lepPy', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lepPz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('lepE', 'lep_E', (50,-250.,250.)): lep.p4.E(),
('bj1Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj1E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): jet1.btagDeepFlavB,
('bj2Px', 'bj2_Px', (50,-250.,250.)): op.c_float(0.),
('bj2Py', 'bj2_Py', (50,-250.,250.)): op.c_float(0.),
('bj2Pz', 'bj2_Pz', (50,-250.,250.)): op.c_float(0.),
('bj2E', 'bj2_E', (50,0.,500.)): op.c_float(0.),
('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('wj1Px', 'wj1_Px', (50,-250.,250.)): jet3.p4.Px(),
('wj1Py', 'wj1_Py', (50,-250.,250.)): jet3.p4.Py(),
('wj1Pz', 'wj1_Pz', (50,-250.,250.)): jet3.p4.Pz(),
('wj1E', 'wj1_E', (50,0.,500.)): jet3.p4.E(),
('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): jet3.btagDeepFlavB,
('wj2Px', 'wj2_Px', (50,-250.,250.)): jet4.p4.Px(),
('wj2Py', 'wj2_Py', (50,-250.,250.)): jet4.p4.Py(),
('wj2Pz', 'wj2_Pz', (50,-250.,250.)): jet4.p4.Pz(),
('wj2E', 'wj2_E', (50,0.,500.)): jet4.p4.E(),
('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): jet4.btagDeepFlavB,
('VBFtag', 'VBF_tag', (2,0.,2.)): op.c_int(op.rng_len(VBFJetPairs) > 0),
('lepmetDPhi', 'lepmetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(lep,self.corrMET)),
('lepmetpt', 'lepmet_pt', (50,0.,500.)): self.HLL.SinglepMet_Pt(lep,self.corrMET),
('lepMT', 'lep_MT', (50,0.,500.)): self.HLL.MT(lep,self.corrMET),
('METLD', 'MET_LD', (50,0.,500.)): self.HLL.MET_LD_DL(self.corrMET, self.ak4Jets, self.electronsFakeSel, self.muonsFakeSel),
('hT', 'hT', (50,0.,500.)): self.HLL.HT_SL(self.ak4Jets),
('bj1LepDR', 'bj1LepDR', (50,0.,5.)): op.deltaR(jet1.p4, lep.p4),
('bj2LepDR', 'bj2LepDR', (50,0.,5.)): op.c_float(0.),
('bj1MetDPhi', 'bj1MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet1, self.corrMET)),
('bj2MetDPhi', 'bj2MetDPhi', (50,0.,4.)): op.c_float(0.),
('minDRlepallJets', 'minDRlepallJets', (50,0.,5.)): self.HLL.mindr_lep1_jet(lep, self.ak4Jets),
('bj1bj2pt', 'bj1bj2_pt', (50,0.,500.)): op.c_float(0.),
#('bj1bj2pt', 'bj1bj2_pt', (50,0.,500.)): self.HLL.bJetCorrP4(jet1).Pt(),
('wj1wj2pt', 'wj1wj2_pt', (50,0.,500.)): (jet3.p4 + jet4.p4).Pt(),
('cosThetaSHbb', 'cosThetaSHbb', (50,0.,5.)): op.c_float(0.),
('mTtop3particle', 'mT_top_3particle', (50,0.,500.)): op.c_float(0.),
#('mTtop3particle', 'mT_top_3particle', (50,0.,500.)): self.HLL.mT2(self.HLL.bJetCorrP4(jet1),lep.p4 ,self.corrMET.p4),
('wj1LepDR', 'wj1LepDR', (50,0.,5.)): op.deltaR(jet3.p4, lep.p4),
('wj2LepDR', 'wj2LepDR', (50,0.,5.)): op.deltaR(jet4.p4, lep.p4),
('wj1MetDPhi', 'wj1MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet3, self.corrMET)),
('wj2MetDPhi', 'wj2MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet4, self.corrMET)),
('wj1wj2M', 'wj1wj2_M', (50,0.,500.)): op.invariant_mass(jet3.p4, jet4.p4),
('HWWSimpleMass', 'HWW_Simple_Mass', (50,0.,500.)): self.HLL.HWW_met_simple(jet3.p4,jet4.p4,lep.p4,self.corrMET.p4).M(),
('HWWdR', 'HWW_dR', (50,0.,5.)): self.HLL.dR_Hww(jet3.p4,jet4.p4,lep.p4,self.corrMET),
('cosThetaSWjjsimple', 'cosThetaSWjjsimple', (50,0.,1.)): op.extMethod("HHbbWWJPA::cosThetaS", returnType="float")(jet3.p4, jet4.p4),
('cosThetaSWWsimplemet', 'cosThetaS_WW_simple_met', (50,0.,1.)): op.extMethod("HHbbWWJPA::cosThetaS", returnType="float")(self.HLL.Wjj_simple(jet3.p4,jet4.p4), self.HLL.Wlep_met_simple(lep.p4, self.corrMET.p4)),
('cosThetaSHHsimplemet', 'cosThetaS_HH_simple_met', (50,0.,5.)): op.c_float(0.),
('angleBetWWPlane', 'angleBetWWPlane', (50,0.,5.)): self.HLL.angleWWplane(lep.p4, self.corrMET, jet3.p4, jet4.p4),
('angleBetHWPlane', 'angleBetHWPlane', (50,0.,5.)): op.c_float(0.),
('bj1bj2DR', 'bj1bj2_DR', (50,0.,5.)): op.c_float(0.),
('bj1wj1DR', 'bj1wj1_DR', (50,0.,5.)): op.deltaR(jet1.p4,jet3.p4),
('bj1wj2DR', 'bj1wj2_DR', (50,0.,5.)): op.deltaR(jet1.p4,jet4.p4),
('bj2wj1DR', 'bj2wj1_DR', (50,0.,5.)): op.c_float(0.),
('wj1wj2DR', 'wj1wj2_DR', (50,0.,5.)): op.deltaR(jet3.p4,jet4.p4),
('VBFj1pt', 'VBFj1pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,VBFJetPairs[0][0].pt, VBFJetPairs[0][1].pt),op.c_float(0.)),
('VBFj2pt', 'VBFj2pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,VBFJetPairs[0][1].pt, VBFJetPairs[0][0].pt),op.c_float(0.)),
('VBFj1j2dEta', 'VBFj1j2dEta', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),op.c_float(0.)),
('VBFj1j2dPhi', 'VBFj1j2dPhi', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.abs(op.deltaPhi(VBFJetPairs[0][0].p4,VBFJetPairs[0][1].p4)),op.c_float(0.)),
('VBFj1j2invM', 'VBFj1j2invM', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.invariant_mass(VBFJetPairs[0][0].p4, VBFJetPairs[0][1].p4),op.c_float(0.)),
('zeppenfeldVar', 'zeppenfeldVar', (50,0.,5.)): op.switch(op.rng_len(VBFJetPairs) > 0, op.abs(lep.eta - (VBFJetPairs[0][0].eta + VBFJetPairs[0][1].eta)/2.0)/op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),op.static_cast("Float_t",op.c_float(0.))),
('minJetDR', 'minJetDR', (50,0.,5.)): self.HLL.MinDiJetDRLoose(jet1,jet3,jet4),
('minLepJetDR', 'minLepJetDR', (50,0.,5.)): self.HLL.MinDR_lep3j(lep,jet1,jet3,jet4),
('HbbLepDR', 'HbbLepDR', (50,0.,5.)): op.c_float(0.),
#('HbbLepDR', 'HbbLepDR', (50,0.,5.)): op.deltaR(jet1.p4, lep.p4),
('HWWLepDR', 'HWWLepDR', (50,0.,5.)): op.deltaR(jet3.p4+jet4.p4, lep.p4),
('HWWMetDPhi', 'HWWMetDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet3.p4+jet4.p4, self.corrMET.p4)),
('HT2lepJetMet', 'HT2lepJetMet', (50,0,300)): self.HLL.HT2_1b2Wj(lep,jet1,jet3,jet4,self.corrMET)
}
#('HT2_lepJetMet', 'HT2_lepJetMet', (50,0.,500.)): self.HLL.HT2_1b2Wj(lep,jet1,jet3,jet4,self.corrMET)}
#('leppt', 'lep_pt', (50,0.,500.)): lep.pt,
#('bj1pt', 'bj1_pt', (50,0.,500.)): jet1.pt,
#('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): jet1.btagDeepFlavB,
#('bj2pt', 'bj2_pt', (50,0.,500.)): op.c_float(0.),
#('bj2eta', 'bj2_eta', (20,0.,3.2)): op.c_float(0.),
#('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('wj1pt', 'wj1_pt', (50,0.,500.)): jet3.pt,
#('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): jet3.btagDeepFlavB,
#('wj2pt', 'wj2_pt', (50,0.,500.)): jet4.pt,
#('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): jet4.btagDeepFlavB,
#('nAk4BJets', 'nAk4BJets', (6,0.,5.)): op.rng_len(self.ak4BJets),
#('bj1LepDPhi', 'bj1LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4, lep.p4)),
#('bj2LepDPhi', 'bj2LepDPhi', (50,0.,4.)): op.c_float(0.),
#('bj1bj2M', 'bj1bj2_M', (50,0.,500.)): op.c_float(0.),
#('wj2LepDPhi', 'wj2LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet4.p4, lep.p4)),
#('w1w2MT', 'w1w2_MT', (50,0.,500.)): self.HLL.MT_W1W2_ljj(lep,jet3,jet4, self.corrMET),
#('HWW_Mass', 'HWW_Mass', (50,0.,500.)): self.HLL.HWW_simple(jet3.p4,jet4.p4,lep.p4,self.corrMET).M(),
#('HWWMass', 'HWW_Mass', (50,0.,500.)): op.extMethod("HHbbWWJPA::HWW_SimpleMassWithRecoNeutrino", returnType="float")(jet3.p4, jet4.p4, lep.p4, self.corrMET.p4),
#('cosThetaSWjjsimple', 'cosThetaSWjjsimple', (50,0.,5.)): op.static_cast("Float_t", self.HLL.comp_cosThetaS(jet3.p4, jet4.p4)),
#('cosThetaSWWsimplemet', 'cosThetaS_WW_simple_met', (50,0.,5.)): op.static_cast("Float_t", self.HLL.comp_cosThetaS(self.HLL.Wjj_simple(jet3.p4,jet4.p4), self.HLL.Wlep_met_simple(lep.p4, self.corrMET.p4))),
#('bj1bj2DPhi', 'bj1bj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj2wj1DPhi', 'bj2wj1_DPhi', (50,0.,4.)): op.c_float(0.),
#('wj1wj2DPhi', 'wj1wj2_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet3.p4,jet4.p4)),
#('bj1wj2DPhi', 'bj1wj2_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4,jet4.p4)),
#('bj1wj1DPhi', 'bj1wj1_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4,jet3.p4)),
#('HbbLepDPhi', 'HbbLepDPhi', (50,0.,5.)): op.c_float(0.),
#('HbbMetDPhi', 'HbbMetDPhi', (50,0.,5.)): op.c_float(0.),
#('HWWLepDPhi', 'HWWLepDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet3.p4+jet4.p4, lep.p4)),
def returnLBNInputs_1b2Wj(self,lep,jet1,jet2,jet3,jet4):
return{('lep_E', 'lep_E', (50,0.,500.)): lep.p4.E(),
('lep_Px', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lep_Py', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lep_Pz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('bj1_E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1_Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1_Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1_Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj2_E', 'bj2_E', (50,0.,500.)): op.c_float(0.),
('bj2_Px', 'bj2_Px', (50,-250.,250.)): op.c_float(0.),
('bj2_Py', 'bj2_Py', (50,-250.,250.)): op.c_float(0.),
('bj2_Pz', 'bj2_Pz', (50,-250.,250.)): op.c_float(0.),
('wj1_E', 'wj1_E', (50,0.,500.)): jet3.p4.E(),
('wj1_Px', 'wj1_Px', (50,-250.,250.)): jet3.p4.Px(),
('wj1_Py', 'wj1_Py', (50,-250.,250.)): jet3.p4.Py(),
('wj1_Pz', 'wj1_Pz', (50,-250.,250.)): jet3.p4.Pz(),
('wj2_E', 'wj2_E', (50,0.,500.)): jet4.p4.E(),
('wj2_Px', 'wj2_Px', (50,-250.,250.)): jet4.p4.Px(),
('wj2_Py', 'wj2_Py', (50,-250.,250.)): jet4.p4.Py(),
('wj2_Pz', 'wj2_Pz', (50,-250.,250.)): jet4.p4.Pz()}
# ---------------------- 1b1Wj ----------------------- #
def returnClassicInputs_1b1Wj(self, lep, jet1, jet2, jet3, jet4, VBFJetPairs, L2Scores):
return{('leppdgId', 'leppdgId', (45,-22.,22.)): lep.pdgId,
('lepcharge', 'lepcharge', (3,-1,1.)): lep.charge,
('JPAcat', 'JPAcat', (9,0.,8.)): op.c_int(5),
('L22b2Wj', 'L2_2b2Wj', (10,0,1.)): L2Scores[0],
('L22b1Wj', 'L2_2b1Wj', (10,0,1.)): L2Scores[1],
('L22b0Wj', 'L2_2b0Wj', (10,0,1.)): L2Scores[3],
('L21b2Wj', 'L2_1b2Wj', (10,0,1.)): L2Scores[2],
('L21b1Wj', 'L2_1b1Wj', (10,0,1.)): L2Scores[4],
('L21b0Wj', 'L2_1b0Wj', (10,0,1.)): L2Scores[5],
('L20b', 'L2_0b', (10,0,1.)): L2Scores[6],
('METpx', 'METpx', (50,0.,500.)): self.corrMET.p4.Px(),
('METpy', 'METpy', (50,0.,500.)): self.corrMET.p4.Py(),
('METenergy', 'METenergy', (50,0.,500.)): self.corrMET.p4.E(),
('lepPx', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lepPy', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lepPz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('lepE', 'lep_E', (50,-250.,250.)): lep.p4.E(),
('bj1Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj1E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): jet1.btagDeepFlavB,
('bj2Px', 'bj2_Px', (50,-250.,250.)): op.c_float(0.),
('bj2Py', 'bj2_Py', (50,-250.,250.)): op.c_float(0.),
('bj2Pz', 'bj2_Pz', (50,-250.,250.)): op.c_float(0.),
('bj2E', 'bj2_E', (50,0.,500.)): op.c_float(0.),
('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('wj1Px', 'wj1_Px', (50,-250.,250.)): jet3.p4.Px(),
('wj1Py', 'wj1_Py', (50,-250.,250.)): jet3.p4.Py(),
('wj1Pz', 'wj1_Pz', (50,-250.,250.)): jet3.p4.Pz(),
('wj1E', 'wj1_E', (50,0.,500.)): jet3.p4.E(),
('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): jet3.btagDeepFlavB,
('wj2Px', 'wj2_Px', (50,-250.,250.)): op.c_float(0.),
('wj2Py', 'wj2_Py', (50,-250.,250.)): op.c_float(0.),
('wj2Pz', 'wj2_Pz', (50,-250.,250.)): op.c_float(0.),
('wj2E', 'wj2_E', (50,0.,500.)): op.c_float(0.),
('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('VBFtag', 'VBF_tag', (2,0.,2.)): op.c_int(op.rng_len(VBFJetPairs) > 0),
('lepmetDPhi', 'lepmetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(lep,self.corrMET)),
('lepmetpt', 'lepmet_pt', (50,0.,500.)): self.HLL.SinglepMet_Pt(lep,self.corrMET),
('lepMT', 'lep_MT', (50,0.,500.)): self.HLL.MT(lep,self.corrMET),
('METLD', 'MET_LD', (50,0.,500.)): self.HLL.MET_LD_DL(self.corrMET, self.ak4Jets, self.electronsFakeSel, self.muonsFakeSel),
('hT', 'hT', (50,0.,500.)): self.HLL.HT_SL(self.ak4Jets),
('bj1LepDR', 'bj1LepDR', (50,0.,5.)): op.deltaR(jet1.p4, lep.p4),
('bj2LepDR', 'bj2LepDR', (50,0.,5.)): op.c_float(0.),
('bj1MetDPhi', 'bj1MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet1, self.corrMET)),
('bj2MetDPhi', 'bj2MetDPhi', (50,0.,4.)): op.c_float(0.),
('minDRlepallJets', 'minDRlepallJets', (50,0.,5.)): self.HLL.mindr_lep1_jet(lep, self.ak4Jets),
('bj1bj2pt', 'bj1bj2_pt', (50,0.,500.)): op.c_float(0.),
#('bj1bj2pt', 'bj1bj2_pt', (50,0.,500.)): self.HLL.bJetCorrP4(jet1).Pt(),
('wj1wj2pt', 'wj1wj2_pt', (50,0.,500.)): op.c_float(0.),
#('wj1wj2pt', 'wj1wj2_pt', (50,0.,500.)): jet3.pt,
('cosThetaSHbb', 'cosThetaSHbb', (50,0.,5.)): op.c_float(0.),
('mTtop3particle', 'mT_top_3particle', (50,0.,500.)): op.c_float(0.),
#('mTtop3particle', 'mT_top_3particle', (50,0.,500.)): self.HLL.mT2(self.HLL.bJetCorrP4(jet1),lep.p4 ,self.corrMET.p4),
('wj1LepDR', 'wj1LepDR', (50,0.,5.)): op.deltaR(jet3.p4, lep.p4),
('wj2LepDR', 'wj2LepDR', (50,0.,5.)): op.c_float(0.),
('wj1MetDPhi', 'wj1MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet3, self.corrMET)),
('wj2MetDPhi', 'wj2MetDPhi', (50,0.,4.)): op.c_float(0.),
('wj1wj2M', 'wj1wj2_M', (50,0.,500.)): op.c_float(0.),
#('wj1wj2M', 'wj1wj2_M', (50,0.,500.)): jet3.p4.M(),
('HWWSimpleMass', 'HWW_Simple_Mass', (50,0.,500.)): op.c_float(0.),
('HWWdR', 'HWW_dR', (50,0.,5.)): op.c_float(0.),
('cosThetaSWjjsimple', 'cosThetaSWjjsimple', (50,0.,5.)): op.c_float(0.),
('cosThetaSWWsimplemet', 'cosThetaS_WW_simple_met', (50,0.,5.)): op.c_float(0.),
('cosThetaSHHsimplemet', 'cosThetaS_HH_simple_met', (50,0.,5.)): op.c_float(0.),
('angleBetWWPlane', 'angleBetWWPlane', (50,0.,5.)): op.c_float(0.),
('angleBetHWPlane', 'angleBetHWPlane', (50,0.,5.)): op.c_float(0.),
('bj1bj2DR', 'bj1bj2_DR', (50,0.,5.)): op.c_float(0.),
('bj1wj1DR', 'bj1wj1_DR', (50,0.,5.)): op.deltaR(jet1.p4,jet3.p4),
('bj1wj2DR', 'bj1wj2_DR', (50,0.,5.)): op.c_float(0.),
('bj2wj1DR', 'bj2wj1_DR', (50,0.,5.)): op.c_float(0.),
('wj1wj2DR', 'wj1wj2_DR', (50,0.,5.)): op.c_float(0.),
('VBFj1pt', 'VBFj1pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,VBFJetPairs[0][0].pt, VBFJetPairs[0][1].pt),op.c_float(0.)),
('VBFj2pt', 'VBFj2pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,VBFJetPairs[0][1].pt, VBFJetPairs[0][0].pt),op.c_float(0.)),
('VBFj1j2dEta', 'VBFj1j2dEta', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),op.c_float(0.)),
('VBFj1j2dPhi', 'VBFj1j2dPhi', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.abs(op.deltaPhi(VBFJetPairs[0][0].p4,VBFJetPairs[0][1].p4)),op.c_float(0.)),
('VBFj1j2invM', 'VBFj1j2invM', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.invariant_mass(VBFJetPairs[0][0].p4, VBFJetPairs[0][1].p4),op.c_float(0.)),
('zeppenfeldVar', 'zeppenfeldVar', (50,0.,5.)): op.switch(op.rng_len(VBFJetPairs) > 0, op.abs(lep.eta - (VBFJetPairs[0][0].eta + VBFJetPairs[0][1].eta)/2.0)/op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),op.static_cast("Float_t",op.c_float(0.))),
('minJetDR', 'minJetDR', (50,0.,5.)): op.deltaR(jet1.p4,jet3.p4),
('minLepJetDR', 'minLepJetDR', (50,0.,5.)): self.HLL.MinDR_lep2j(lep,jet1,jet3),
#('HbbLepDR', 'HbbLepDR', (50,0.,5.)): op.deltaR(lep.p4,jet1.p4),
('HbbLepDR', 'HbbLepDR', (50,0.,5.)): op.c_float(0.),
#('HWWLepDR', 'HWWLepDR', (50,0.,5.)): op.deltaR(lep.p4,jet3.p4),
('HWWLepDR', 'HWWLepDR', (50,0.,5.)): op.c_float(0.),
#('HWWMetDPhi', 'HWWMetDPhi', (50,0.,5.)): op.abs(op.deltaPhi(jet3.p4, self.corrMET.p4)),
('HWWMetDPhi', 'HWWMetDPhi', (50,0.,5.)): op.c_float(0.),
('HT2lepJetMet', 'HT2lepJetMet', (50,0,300)): self.HLL.HT2_1b1Wj(lep,jet1,jet3,self.corrMET)
}
#('HT2_lepJetMet', 'HT2_lepJetMet', (50,0.,500.)): self.HLL.HT2_1b1Wj(lep,jet1,jet3,self.corrMET)}
#('leppt', 'lep_pt', (50,0.,500.)): lep.pt,
#('bj1pt', 'bj1_pt', (50,0.,500.)): jet1.pt,
#('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): jet1.btagDeepFlavB,
#('bj2pt', 'bj2_pt', (50,0.,500.)): op.c_float(0.),
#('bj2eta', 'bj2_eta', (50,0.,500.)): op.c_float(0.),
#('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('wj1pt', 'wj1_pt', (50,0.,500.)): jet3.pt,
#('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): jet3.btagDeepFlavB,
#('wj2pt', 'wj2_pt', (50,0.,500.)): op.c_float(0.),
#('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('nAk4BJets', 'nAk4BJets', (6,0.,5.)): op.rng_len(self.ak4BJets),
#('bj1LepDPhi', 'bj1LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4, lep.p4)),
#('bj2LepDPhi', 'bj2LepDPhi', (50,0.,4.)): op.c_float(0.),
#('bj1bj2M', 'bj1bj2_M', (50,0.,500.)): op.c_float(0.),
#('wj1LepDPhi', 'wj1LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet3.p4, lep.p4)),
#('wj2LepDPhi', 'wj2LepDPhi', (50,0.,4.)): op.c_float(0.),
#('w1w2MT', 'w1w2_MT', (50,0.,500.)): op.c_float(0.),
#('HWWMass', 'HWW_Mass', (50,0.,500.)): op.c_float(0.),
#('bj1bj2DPhi', 'bj1bj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj2wj1DPhi', 'bj2wj1_DPhi', (50,0.,4.)): op.c_float(0.),
#('wj1wj2DPhi', 'wj1wj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj1wj2DPhi', 'bj1wj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj1wj1DPhi', 'bj1wj1_DPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4,jet3.p4)),
#('HbbLepDPhi', 'HbbLepDPhi', (50,0.,5.)): op.c_float(0.),
#('HbbMetDPhi', 'HbbMetDPhi', (50,0.,5.)): op.c_float(0.),
#('HWWLepDPhi', 'HWWLepDPhi', (50,0.,5.)): op.c_float(0.),
def returnLBNInputs_1b1Wj(self,lep,jet1,jet2,jet3,jet4):
return{('lep_E', 'lep_E', (50,0.,500.)): lep.p4.E(),
('lep_Px', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lep_Py', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lep_Pz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('bj1_E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1_Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1_Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1_Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj2_E', 'bj2_E', (50,0.,500.)): op.c_float(0.),
('bj2_Px', 'bj2_Px', (50,-250.,250.)): op.c_float(0.),
('bj2_Py', 'bj2_Py', (50,-250.,250.)): op.c_float(0.),
('bj2_Pz', 'bj2_Pz', (50,-250.,250.)): op.c_float(0.),
('wj1_E', 'wj1_E', (50,0.,500.)): jet3.p4.E(),
('wj1_Px', 'wj1_Px', (50,-250.,250.)): jet3.p4.Px(),
('wj1_Py', 'wj1_Py', (50,-250.,250.)): jet3.p4.Py(),
('wj1_Pz', 'wj1_Pz', (50,-250.,250.)): jet3.p4.Pz(),
('wj2_E', 'wj2_E', (50,0.,500.)): op.c_float(0.),
('wj2_Px', 'wj2_Px', (50,-250.,250.)): op.c_float(0.),
('wj2_Py', 'wj2_Py', (50,-250.,250.)): op.c_float(0.),
('wj2_Pz', 'wj2_Pz', (50,-250.,250.)): op.c_float(0.)}
# ---------------------- 1b0Wj ----------------------- #
def returnClassicInputs_1b0Wj(self, lep, jet1, jet2, jet3, jet4, VBFJetPairs, L2Scores):
return{('leppdgId', 'leppdgId', (45,-22.,22.)): lep.pdgId,
('lepcharge', 'lepcharge', (3,-1,1.)): lep.charge,
('JPAcat', 'JPAcat', (9,0.,8.)): op.c_int(6),
('L22b2Wj', 'L2_2b2Wj', (10,0,1.)): L2Scores[0],
('L22b1Wj', 'L2_2b1Wj', (10,0,1.)): L2Scores[1],
('L22b0Wj', 'L2_2b0Wj', (10,0,1.)): L2Scores[3],
('L21b2Wj', 'L2_1b2Wj', (10,0,1.)): L2Scores[2],
('L21b1Wj', 'L2_1b1Wj', (10,0,1.)): L2Scores[4],
('L21b0Wj', 'L2_1b0Wj', (10,0,1.)): L2Scores[5],
('L20b', 'L2_0b', (10,0,1.)): L2Scores[6],
('METpx', 'METpx', (50,0.,500.)): self.corrMET.p4.Px(),
('METpy', 'METpy', (50,0.,500.)): self.corrMET.p4.Py(),
('METenergy', 'METenergy', (50,0.,500.)): self.corrMET.p4.E(),
('lepPx', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lepPy', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lepPz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('lepE', 'lep_E', (50,-250.,250.)): lep.p4.E(),
('bj1Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj1E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): jet1.btagDeepFlavB,
('bj2Px', 'bj2_Px', (50,-250.,250.)): op.c_float(0.),
('bj2Py', 'bj2_Py', (50,-250.,250.)): op.c_float(0.),
('bj2Pz', 'bj2_Pz', (50,-250.,250.)): op.c_float(0.),
('bj2E', 'bj2_E', (50,0.,500.)): op.c_float(0.),
('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('wj1Px', 'wj1_Px', (50,-250.,250.)): op.c_float(0.),
('wj1Py', 'wj1_Py', (50,-250.,250.)): op.c_float(0.),
('wj1Pz', 'wj1_Pz', (50,-250.,250.)): op.c_float(0.),
('wj1E', 'wj1_E', (50,0.,500.)): op.c_float(0.),
('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('wj2Px', 'wj2_Px', (50,-250.,250.)): op.c_float(0.),
('wj2Py', 'wj2_Py', (50,-250.,250.)): op.c_float(0.),
('wj2Pz', 'wj2_Pz', (50,-250.,250.)): op.c_float(0.),
('wj2E', 'wj2_E', (50,0.,500.)): op.c_float(0.),
('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('VBFtag', 'VBF_tag', (2,0.,2.)): op.c_int(op.rng_len(VBFJetPairs) > 0),
('lepmetDPhi', 'lepmetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(lep,self.corrMET)),
('lepmetpt', 'lepmet_pt', (50,0.,500.)): self.HLL.SinglepMet_Pt(lep,self.corrMET),
('lepMT', 'lep_MT', (50,0.,500.)): self.HLL.MT(lep,self.corrMET),
('METLD', 'MET_LD', (50,0.,500.)): self.HLL.MET_LD_DL(self.corrMET, self.ak4Jets, self.electronsFakeSel, self.muonsFakeSel),
('hT', 'hT', (50,0.,500.)): self.HLL.HT_SL(self.ak4Jets),
('bj1LepDR', 'bj1LepDR', (50,0.,5.)): op.deltaR(jet1.p4, lep.p4),
('bj2LepDR', 'bj2LepDR', (50,0.,5.)): op.c_float(0.),
('bj1MetDPhi', 'bj1MetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(jet1, self.corrMET)),
('bj2MetDPhi', 'bj2MetDPhi', (50,0.,4.)): op.c_float(0.),
('minDRlepallJets', 'minDRlepallJets', (50,0.,5.)): self.HLL.mindr_lep1_jet(lep, self.ak4Jets),
('bj1bj2pt', 'bj1bj2_pt', (50,0.,500.)): op.c_float(0.),
#('bj1bj2pt', 'bj1bj2_pt', (50,0.,500.)): self.HLL.bJetCorrP4(jet1).Pt(),
('wj1wj2pt', 'wj1wj2_pt', (50,0.,500.)): op.c_float(0.),
('cosThetaSHbb', 'cosThetaSHbb', (50,0.,5.)): op.c_float(0.),
('mTtop3particle', 'mT_top_3particle', (50,0.,500.)): op.c_float(0.),
#('mTtop3particle', 'mT_top_3particle', (50,0.,500.)): self.HLL.mT2(self.HLL.bJetCorrP4(jet1),lep.p4 ,self.corrMET.p4),
('wj1LepDR', 'wj1LepDR', (50,0.,5.)): op.c_float(0.),
('wj2LepDR', 'wj2LepDR', (50,0.,5.)): op.c_float(0.),
('wj1MetDPhi', 'wj1MetDPhi', (50,0.,4.)): op.c_float(0.),
('wj2MetDPhi', 'wj2MetDPhi', (50,0.,4.)): op.c_float(0.),
('wj1wj2M', 'wj1wj2_M', (50,0.,500.)): op.c_float(0.),
('HWWSimpleMass', 'HWW_Simple_Mass', (50,0.,500.)): op.c_float(0.),
('HWWdR', 'HWW_dR', (50,0.,5.)): op.c_float(0.),
('cosThetaSWjjsimple', 'cosThetaSWjjsimple', (50,0.,5.)): op.c_float(0.),
('cosThetaSWWsimplemet', 'cosThetaS_WW_simple_met', (50,0.,5.)): op.c_float(0.),
('cosThetaSHHsimplemet', 'cosThetaS_HH_simple_met', (50,0.,5.)): op.c_float(0.),
('angleBetWWPlane', 'angleBetWWPlane', (50,0.,5.)): op.c_float(0.),
('angleBetHWPlane', 'angleBetHWPlane', (50,0.,5.)): op.c_float(0.),
('bj1bj2DR', 'bj1bj2_DR', (50,0.,5.)): op.c_float(0.),
('bj1wj1DR', 'bj1wj1_DR', (50,0.,5.)): op.c_float(0.),
('bj1wj2DR', 'bj1wj2_DR', (50,0.,5.)): op.c_float(0.),
('bj2wj1DR', 'bj2wj1_DR', (50,0.,5.)): op.c_float(0.),
('wj1wj2DR', 'wj1wj2_DR', (50,0.,5.)): op.c_float(0.),
('VBFj1pt', 'VBFj1pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,VBFJetPairs[0][0].pt, VBFJetPairs[0][1].pt),op.c_float(0.)),
('VBFj2pt', 'VBFj2pt', (100,0,200)): op.switch(op.rng_len(VBFJetPairs) > 0,op.switch(VBFJetPairs[0][0].pt > VBFJetPairs[0][1].pt,VBFJetPairs[0][1].pt, VBFJetPairs[0][0].pt),op.c_float(0.)),
('VBFj1j2dEta', 'VBFj1j2dEta', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),op.c_float(0.)),
('VBFj1j2dPhi', 'VBFj1j2dPhi', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.abs(op.deltaPhi(VBFJetPairs[0][0].p4,VBFJetPairs[0][1].p4)),op.c_float(0.)),
('VBFj1j2invM', 'VBFj1j2invM', (20,0,5)): op.switch(op.rng_len(VBFJetPairs) > 0,op.invariant_mass(VBFJetPairs[0][0].p4, VBFJetPairs[0][1].p4),op.c_float(0.)),
('zeppenfeldVar', 'zeppenfeldVar', (50,0.,5.)): op.switch(op.rng_len(VBFJetPairs) > 0, op.abs(lep.eta - (VBFJetPairs[0][0].eta + VBFJetPairs[0][1].eta)/2.0)/op.abs(VBFJetPairs[0][0].eta - VBFJetPairs[0][1].eta),op.static_cast("Float_t",op.c_float(0.))),
('minJetDR', 'minJetDR', (50,0.,5.)): op.c_float(0.),
('minLepJetDR', 'minLepJetDR', (50,0.,5.)): op.deltaR(lep.p4, jet1.p4),
('HbbLepDR', 'HbbLepDR', (50,0.,5.)): op.c_float(0.),
('HWWLepDR', 'HWWLepDR', (50,0.,5.)): op.c_float(0.),
('HWWMetDPhi', 'HWWMetDPhi', (50,0.,5.)): op.c_float(0.),
('HT2lepJetMet', 'HT2lepJetMet', (50,0,300)): self.HLL.HT2_1b0Wj(lep,jet1,self.corrMET)
}
#('HT2_lepJetMet', 'HT2_lepJetMet', (50,0.,500.)): self.HLL.HT2_1b0Wj(lep,jet1,self.corrMET)}
#('leppt', 'lep_pt', (50,0.,500.)): lep.pt,
#('bj1pt', 'bj1_pt', (50,0.,500.)): jet1.pt,
#('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): jet1.btagDeepFlavB,
#('bj2pt', 'bj2_pt', (50,0.,500.)): op.c_float(0.),
#('bj2eta', 'bj2_eta', (50,0.,500.)): op.c_float(0.),
#('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('wj1pt', 'wj1_pt', (50,0.,500.)): op.c_float(0.),
#('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('wj2pt', 'wj2_pt', (50,0.,500.)): op.c_float(0.),
#('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('nAk4BJets', 'nAk4BJets', (6,0.,5.)): op.rng_len(self.ak4BJets),
#('bj1LepDPhi', 'bj1LepDPhi', (50,0.,4.)): op.abs(op.deltaPhi(jet1.p4, lep.p4)),
#('bj2LepDPhi', 'bj2LepDPhi', (50,0.,4.)): op.c_float(0.),
#('bj1bj2M', 'bj1bj2_M', (50,0.,500.)): op.c_float(0.),
#('wj1LepDPhi', 'wj1LepDPhi', (50,0.,4.)): op.c_float(0.),
#('wj2LepDPhi', 'wj2LepDPhi', (50,0.,4.)): op.c_float(0.),
#('w1w2MT', 'w1w2_MT', (50,0.,500.)): op.c_float(0.),
#('HWWMass', 'HWW_Mass', (50,0.,500.)): op.c_float(0.),
#('bj1bj2DPhi', 'bj1bj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj2wj1DPhi', 'bj2wj1_DPhi', (50,0.,4.)): op.c_float(0.),
#('wj1wj2DPhi', 'wj1wj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj1wj2DPhi', 'bj1wj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj1wj1DPhi', 'bj1wj1_DPhi', (50,0.,4.)): op.c_float(0.),
#('HbbLepDPhi', 'HbbLepDPhi', (50,0.,5.)): op.c_float(0.),
#('HbbMetDPhi', 'HbbMetDPhi', (50,0.,5.)): op.c_float(0.),
#('HWWLepDPhi', 'HWWLepDPhi', (50,0.,5.)): op.c_float(0.),
def returnLBNInputs_1b0Wj(self,lep,jet1,jet2,jet3,jet4):
return{('lep_E', 'lep_E', (50,0.,500.)): lep.p4.E(),
('lep_Px', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lep_Py', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lep_Pz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('bj1_E', 'bj1_E', (50,0.,500.)): jet1.p4.E(),
('bj1_Px', 'bj1_Px', (50,-250.,250.)): jet1.p4.Px(),
('bj1_Py', 'bj1_Py', (50,-250.,250.)): jet1.p4.Py(),
('bj1_Pz', 'bj1_Pz', (50,-250.,250.)): jet1.p4.Pz(),
('bj2_E', 'bj2_E', (50,0.,500.)): op.c_float(0.),
('bj2_Px', 'bj2_Px', (50,-250.,250.)): op.c_float(0.),
('bj2_Py', 'bj2_Py', (50,-250.,250.)): op.c_float(0.),
('bj2_Pz', 'bj2_Pz', (50,-250.,250.)): op.c_float(0.),
('wj1_E', 'wj1_E', (50,0.,500.)): op.c_float(0.),
('wj1_Px', 'wj1_Px', (50,-250.,250.)): op.c_float(0.),
('wj1_Py', 'wj1_Py', (50,-250.,250.)): op.c_float(0.),
('wj1_Pz', 'wj1_Pz', (50,-250.,250.)): op.c_float(0.),
('wj2_E', 'wj2_E', (50,0.,500.)): op.c_float(0.),
('wj2_Px', 'wj2_Px', (50,-250.,250.)): op.c_float(0.),
('wj2_Py', 'wj2_Py', (50,-250.,250.)): op.c_float(0.),
('wj2_Pz', 'wj2_Pz', (50,-250.,250.)): op.c_float(0.)}
# ---------------------- 0b ----------------------- #
def returnClassicInputs_0b(self, lep, jet1, jet2, jet3, jet4, VBFJetPairs, L2Scores):
return{('leppdgId', 'leppdgId', (45,-22.,22.)): lep.pdgId,
('lepcharge', 'lepcharge', (3,-1,1.)): lep.charge,
('JPAcat', 'JPAcat', (9,0.,8.)): op.c_int(7),
('L22b2Wj', 'L2_2b2Wj', (10,0,1.)): L2Scores[0],
('L22b1Wj', 'L2_2b1Wj', (10,0,1.)): L2Scores[1],
('L22b0Wj', 'L2_2b0Wj', (10,0,1.)): L2Scores[3],
('L21b2Wj', 'L2_1b2Wj', (10,0,1.)): L2Scores[2],
('L21b1Wj', 'L2_1b1Wj', (10,0,1.)): L2Scores[4],
('L21b0Wj', 'L2_1b0Wj', (10,0,1.)): L2Scores[5],
('L20b', 'L2_0b', (10,0,1.)): L2Scores[6],
#('METpt', 'METpt', (50,0.,500.)): self.corrMET.pt,
('METpx', 'METpx', (50,0.,500.)): self.corrMET.p4.Px(),
('METpy', 'METpy', (50,0.,500.)): self.corrMET.p4.Py(),
('METenergy', 'METenergy', (50,0.,500.)): self.corrMET.p4.E(),
('lepPx', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lepPy', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lepPz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('lepE', 'lep_E', (50,-250.,250.)): lep.p4.E(),
('bj1Px', 'bj1_Px', (50,-250.,250.)): op.c_float(0.),
('bj1Py', 'bj1_Py', (50,-250.,250.)): op.c_float(0.),
('bj1Pz', 'bj1_Pz', (50,-250.,250.)): op.c_float(0.),
('bj1E', 'bj1_E', (50,0.,500.)): op.c_float(0.),
('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('bj2Px', 'bj2_Px', (50,-250.,250.)): op.c_float(0.),
('bj2Py', 'bj2_Py', (50,-250.,250.)): op.c_float(0.),
('bj2Pz', 'bj2_Pz', (50,-250.,250.)): op.c_float(0.),
('bj2E', 'bj2_E', (50,0.,500.)): op.c_float(0.),
('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('wj1Px', 'wj1_Px', (50,-250.,250.)): op.c_float(0.),
('wj1Py', 'wj1_Py', (50,-250.,250.)): op.c_float(0.),
('wj1Pz', 'wj1_Pz', (50,-250.,250.)): op.c_float(0.),
('wj1E', 'wj1_E', (50,0.,500.)): op.c_float(0.),
('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
('wj2Px', 'wj2_Px', (50,-250.,250.)): op.c_float(0.),
('wj2Py', 'wj2_Py', (50,-250.,250.)): op.c_float(0.),
('wj2Pz', 'wj2_Pz', (50,-250.,250.)): op.c_float(0.),
('wj2E', 'wj2_E', (50,0.,500.)): op.c_float(0.),
('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('leppt', 'lep_pt', (50,0.,500.)): lep.pt,
#('bj1pt', 'bj1_pt', (50,0.,500.)): op.c_float(0.),
#('bj1bTagDeepFlavB', 'bj1_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('bj2pt', 'bj2_pt', (50,0.,500.)): op.c_float(0.),
#('bj2eta', 'bj2_eta', (50,0.,500.)): op.c_float(0.),
#('bj2bTagDeepFlavB', 'bj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('wj1pt', 'wj1_pt', (50,0.,500.)): op.c_float(0.),
#('wj1bTagDeepFlavB', 'wj1_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('wj2pt', 'wj2_pt', (50,0.,500.)): op.c_float(0.),
#('wj2bTagDeepFlavB', 'wj2_bTagDeepFlavB', (50,0.,1.)): op.c_float(0.),
#('nAk4BJets', 'nAk4BJets', (6,0.,5.)): op.c_float(0.),
('VBFtag', 'VBF_tag', (2,0.,2.)): op.c_float(0.),
('lepmetDPhi', 'lepmetDPhi', (50,0.,4.)): op.abs(self.HLL.SinglepMet_dPhi(lep,self.corrMET)),
('lepmetpt', 'lepmet_pt', (50,0.,500.)): self.HLL.SinglepMet_Pt(lep,self.corrMET),
('lepMT', 'lep_MT', (50,0.,500.)): self.HLL.MT(lep,self.corrMET),
('METLD', 'MET_LD', (50,0.,500.)): self.HLL.MET_LD_DL(self.corrMET, self.ak4Jets, self.electronsFakeSel, self.muonsFakeSel),
('hT', 'hT', (50,0.,500.)): self.HLL.HT_SL(self.ak4Jets),
('bj1LepDR', 'bj1LepDR', (50,0.,5.)): op.c_float(0.),
('bj2LepDR', 'bj2LepDR', (50,0.,5.)): op.c_float(0.),
#('bj1LepDPhi', 'bj1LepDPhi', (50,0.,4.)): op.c_float(0.),
('bj1MetDPhi', 'bj1MetDPhi', (50,0.,4.)): op.c_float(0.),
('bj2MetDPhi', 'bj2MetDPhi', (50,0.,4.)): op.c_float(0.),
('minDRlepallJets', 'minDRlepallJets', (50,0.,5.)): self.HLL.mindr_lep1_jet(lep, self.ak4Jets),
#('bj2LepDPhi', 'bj2LepDPhi', (50,0.,4.)): op.c_float(0.),
('bj1bj2pt', 'bj1bj2_pt', (50,0.,500.)): op.c_float(0.),
('wj1wj2pt', 'wj1wj2_pt', (50,0.,500.)): op.c_float(0.),
('cosThetaSHbb', 'cosThetaSHbb', (50,0.,5.)): op.c_float(0.),
('mTtop3particle', 'mT_top_3particle', (50,0.,500.)): op.c_float(0.),
#('bj1bj2M', 'bj1bj2_M', (50,0.,500.)): op.c_float(0.),
('wj1LepDR', 'wj1LepDR', (50,0.,5.)): op.c_float(0.),
('wj2LepDR', 'wj2LepDR', (50,0.,5.)): op.c_float(0.),
#('wj1LepDPhi', 'wj1LepDPhi', (50,0.,4.)): op.c_float(0.),
('wj1MetDPhi', 'wj1MetDPhi', (50,0.,4.)): op.c_float(0.),
#('wj2LepDPhi', 'wj2LepDPhi', (50,0.,4.)): op.c_float(0.),
('wj2MetDPhi', 'wj2MetDPhi', (50,0.,4.)): op.c_float(0.),
('wj1wj2M', 'wj1wj2_M', (50,0.,500.)): op.c_float(0.),
#('w1w2MT', 'w1w2_MT', (50,0.,500.)): op.c_float(0.),
#('HWWMass', 'HWW_Mass', (50,0.,500.)): op.c_float(0.),
('HWWSimpleMass', 'HWW_Simple_Mass', (50,0.,500.)): op.c_float(0.),
('HWWdR', 'HWW_dR', (50,0.,5.)): op.c_float(0.),
('cosThetaSWjjsimple', 'cosThetaSWjjsimple', (50,0.,5.)): op.c_float(0.),
('cosThetaSWWsimplemet', 'cosThetaS_WW_simple_met', (50,0.,5.)): op.c_float(0.),
('cosThetaSHHsimplemet', 'cosThetaS_HH_simple_met', (50,0.,5.)): op.c_float(0.),
('angleBetWWPlane', 'angleBetWWPlane', (50,0.,5.)): op.c_float(0.),
('angleBetHWPlane', 'angleBetHWPlane', (50,0.,5.)): op.c_float(0.),
('bj1bj2DR', 'bj1bj2_DR', (50,0.,5.)): op.c_float(0.),
('bj1wj1DR', 'bj1wj1_DR', (50,0.,5.)): op.c_float(0.),
('bj1wj2DR', 'bj1wj2_DR', (50,0.,5.)): op.c_float(0.),
#('bj1bj2DPhi', 'bj1bj2_DPhi', (50,0.,4.)): op.c_float(0.),
('bj2wj1DR', 'bj2wj1_DR', (50,0.,5.)): op.c_float(0.),
#('bj2wj1DPhi', 'bj2wj1_DPhi', (50,0.,4.)): op.c_float(0.),
('wj1wj2DR', 'wj1wj2_DR', (50,0.,5.)): op.c_float(0.),
#('wj1wj2DPhi', 'wj1wj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj1wj2DPhi', 'bj1wj2_DPhi', (50,0.,4.)): op.c_float(0.),
#('bj1wj1DPhi', 'bj1wj1_DPhi', (50,0.,4.)): op.c_float(0.),
('VBFj1pt', 'VBFj1pt', (100,0,200)): op.c_float(0.),
('VBFj2pt', 'VBFj2pt', (100,0,200)): op.c_float(0.),
('VBFj1j2dEta', 'VBFj1j2dEta', (20,0,5)): op.c_float(0.),
('VBFj1j2dPhi', 'VBFj1j2dPhi', (20,0,5)): op.c_float(0.),
('VBFj1j2invM', 'VBFj1j2invM', (20,0,5)): op.c_float(0.),
('zeppenfeldVar', 'zeppenfeldVar', (50,0.,5.)): op.c_float(0.),
('minJetDR', 'minJetDR', (50,0.,5.)): op.c_float(0.),
('minLepJetDR', 'minLepJetDR', (50,0.,5.)): op.c_float(0.),
('HbbLepDR', 'HbbLepDR', (50,0.,5.)): op.c_float(0.),
#('HbbLepDPhi', 'HbbLepDPhi', (50,0.,5.)): op.c_float(0.),
#('HbbMetDPhi', 'HbbMetDPhi', (50,0.,5.)): op.c_float(0.),
('HWWLepDR', 'HWWLepDR', (50,0.,5.)): op.c_float(0.),
#('HWWLepDPhi', 'HWWLepDPhi', (50,0.,5.)): op.c_float(0.),
('HWWMetDPhi', 'HWWMetDPhi', (50,0.,5.)): op.c_float(0.),
('HT2lepJetMet', 'HT2lepJetMet', (50,0,300)): self.HLL.HT2_0b(lep,self.corrMET)
}
#('HT2_lepJetMet', 'HT2_lepJetMet', (50,0.,500.)): op.c_float(0.)}
def returnLBNInputs_0b(self,lep,jet1,jet2,jet3,jet4):
return{('lep_E', 'lep_E', (50,0.,500.)): lep.p4.E(),
('lep_Px', 'lep_Px', (50,-250.,250.)): lep.p4.Px(),
('lep_Py', 'lep_Py', (50,-250.,250.)): lep.p4.Py(),
('lep_Pz', 'lep_Pz', (50,-250.,250.)): lep.p4.Pz(),
('bj1_E', 'bj1_E', (50,0.,500.)): op.c_float(0.),
('bj1_Px', 'bj1_Px', (50,-250.,250.)): op.c_float(0.),
('bj1_Py', 'bj1_Py', (50,-250.,250.)): op.c_float(0.),
('bj1_Pz', 'bj1_Pz', (50,-250.,250.)): op.c_float(0.),
('bj2_E', 'bj2_E', (50,0.,500.)): op.c_float(0.),
('bj2_Px', 'bj2_Px', (50,-250.,250.)): op.c_float(0.),
('bj2_Py', 'bj2_Py', (50,-250.,250.)): op.c_float(0.),
('bj2_Pz', 'bj2_Pz', (50,-250.,250.)): op.c_float(0.),
('wj1_E', 'wj1_E', (50,0.,500.)): op.c_float(0.),
('wj1_Px', 'wj1_Px', (50,-250.,250.)): op.c_float(0.),
('wj1_Py', 'wj1_Py', (50,-250.,250.)): op.c_float(0.),
('wj1_Pz', 'wj1_Pz', (50,-250.,250.)): op.c_float(0.),
('wj2_E', 'wj2_E', (50,0.,500.)): op.c_float(0.),
('wj2_Px', 'wj2_Px', (50,-250.,250.)): op.c_float(0.),
('wj2_Py', 'wj2_Py', (50,-250.,250.)): op.c_float(0.),
('wj2_Pz', 'wj2_Pz', (50,-250.,250.)): op.c_float(0.)}
# ---------------------- Hbb2Wj ----------------------- #
def returnClassicInputs_Hbb2Wj(self, lep, fjet, jet3, jet4, VBFJetPairs, L2Scores, era):
return{('era', 'era', (3,2016.,2019.)): op.c_float(float(era)),
('leppdgId', 'leppdgId', (45,-22.,22.)): lep.pdgId,
('lepcharge', 'lepcharge', (3,-1,1.)): lep.charge,
('JPAcat', 'JPAcat', (9,0.,8.)): op.c_int(1),
('L2Hbb2Wj', 'L2_Hbb2Wj', (10,0,1.)): L2Scores[0],
('L2Hbb1Wj', 'L2_Hbb1Wj', (10,0,1.)): L2Scores[1],
('L2Hbb0Wj', 'L2_Hbb0Wj', (10,0,1.)): L2Scores[2],