-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathTreeProducerMuEle.py
75 lines (61 loc) · 3.88 KB
/
TreeProducerMuEle.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
import ROOT
import math
import numpy as num
from TreeProducerCommon import *
class TreeProducerMuEle(TreeProducerCommon):
def __init__(self, name):
super(TreeProducerMuEle, self).__init__(name)
print 'TreeProducerMuEle is called', name
# trees
##################
# muon
##################
self.pt_1 = num.zeros(1, dtype=float)
self.eta_1 = num.zeros(1, dtype=float)
self.phi_1 = num.zeros(1, dtype=float)
self.mass_1 = num.zeros(1, dtype=float)
self.dxy_1 = num.zeros(1, dtype=float)
self.dz_1 = num.zeros(1, dtype=float)
self.pfRelIso04_all_1 = num.zeros(1, dtype=float)
self.q_1 = num.zeros(1, dtype=int)
self.genPartFlav_1 = num.zeros(1, dtype=int)
self.tree.Branch('pt_1' , self.pt_1, 'pt_1/D')
self.tree.Branch('eta_1' , self.eta_1, 'eta_1/D')
self.tree.Branch('phi_1' , self.phi_1, 'phi_1/D')
self.tree.Branch('mass_1' , self.mass_1, 'mass_1/D')
self.tree.Branch('dxy_1' , self.dxy_1, 'dxy_1/D')
self.tree.Branch('dz_1' , self.dz_1, 'dz_1/D')
self.tree.Branch('q_1' , self.q_1, 'q_1/I')
self.tree.Branch('pfRelIso04_all_1' , self.pfRelIso04_all_1, 'pfRelIso04_all_1/D')
self.tree.Branch('genPartFlav_1' , self.genPartFlav_1, 'genPartFlav_1/I')
##################
# electron
##################
self.pt_2 = num.zeros(1, dtype=float)
self.eta_2 = num.zeros(1, dtype=float)
self.phi_2 = num.zeros(1, dtype=float)
self.mass_2 = num.zeros(1, dtype=float)
self.dxy_2 = num.zeros(1, dtype=float)
self.dz_2 = num.zeros(1, dtype=float)
self.q_2 = num.zeros(1, dtype=int)
self.pfRelIso03_all_2 = num.zeros(1, dtype=float)
self.genPartFlav_2 = num.zeros(1, dtype=int)
self.cutBased_2 = num.zeros(1, dtype=int)
self.mvaFall17Iso_2 = num.zeros(1, dtype=float)
self.mvaFall17Iso_WP80_2 = num.zeros(1, dtype=int)
self.mvaFall17Iso_WP90_2 = num.zeros(1, dtype=int)
self.mvaFall17Iso_WPL_2 = num.zeros(1, dtype=int)
self.tree.Branch('pt_2' , self.pt_2, 'pt_2/D')
self.tree.Branch('eta_2' , self.eta_2, 'eta_2/D')
self.tree.Branch('phi_2' , self.phi_2, 'phi_2/D')
self.tree.Branch('mass_2' , self.mass_2, 'mass_2/D')
self.tree.Branch('dxy_2' , self.dxy_2, 'dxy_2/D')
self.tree.Branch('dz_2' , self.dz_2, 'dz_2/D')
self.tree.Branch('q_2' , self.q_2, 'q_2/I')
self.tree.Branch('pfRelIso03_all_2' , self.pfRelIso03_all_2, 'pfRelIso04_all_2/D')
self.tree.Branch('genPartFlav_2' , self.genPartFlav_2, 'genPartFlav_2/I')
self.tree.Branch('cutBased_2' , self.cutBased_2, 'cutBased_2/I')
self.tree.Branch('mvaFall17Iso_2' , self.mvaFall17Iso_2, 'mvaFall17Iso_2/D')
self.tree.Branch('mvaFall17Iso_WP80_2' , self.mvaFall17Iso_WP80_2, 'mvaFall17Iso_WP80_2/I')
self.tree.Branch('mvaFall17Iso_WP90_2' , self.mvaFall17Iso_WP90_2, 'mvaFall17Iso_WP90_2/I')
self.tree.Branch('mvaFall17Iso_WPL_2' , self.mvaFall17Iso_WPL_2, 'mvaFall17Iso_WPL_2/I')