forked from CMSTrackingPOG/spark_tnp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdataset_allowed_definitions.py
153 lines (142 loc) · 5.57 KB
/
dataset_allowed_definitions.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
# allowed choices
def get_allowed_resonances():
resonances = [
'Z',
'JPsi'
]
return resonances
def get_allowed_eras(resonance):
eras = {
'Z': [
# ultra legacy
'Run2016_UL_HIPM',
'Run2016_UL',
'Run2017_UL',
'Run2018_UL',
# Double muon PD
'Run2016_UL_HIPM_DM',
'Run2016_UL_DM',
'Run2017_UL_DM',
'Run2018_UL_DM',
# rereco (i.e. legacy)
'Run2016',
'Run2017',
'Run2018',
'Run2022',
'Run2022_EE',
],
'JPsi': [
# heavy ion
'Run2016_HI_pPb_8TeV',
# ultra legacy
'Run2016_UL_HIPM',
'Run2016_UL',
'Run2017_UL',
'Run2018_UL',
# rereco (i.e. legacy)
'Run2016',
'Run2017',
'Run2018',
'Run2022',
'Run2022_EE',
],
}
return eras.get(resonance, [])
def get_allowed_sub_eras(resonance, era):
subEras = {
'Z': {
# ultra legacy
'Run2016_UL_HIPM': ['Run2016_UL_HIPM'] + [
f'Run2016{b}' for b in 'BCDEF']+['DY_madgraph'],
'Run2016_UL': ['Run2016_UL'] + [
f'Run2016{b}' for b in 'FGH']+['DY_madgraph'],
'Run2017_UL': ['Run2017_UL'] + [
f'Run2017{b}' for b in 'BCDEF']+['DY_madgraph'],
'Run2018_UL': ['Run2018_UL'] + [
#f'Run2018{b}' for b in 'ABCD']+['DY_madgraph'],
f'Run2018{b}' for b in 'ABCD']+['DY_madgraph'],
#f'Run2018{b}' for b in 'B'],#+['DY_madgraph', 'DY_powheg'],
# Double muon PD
'Run2016_UL_HIPM_DM': ['Run2016_UL_HIPM_DM'] + [
f'Run2016{b}' for b in 'BCDEF']+['DY_madgraph'],
'Run2016_UL_DM': ['Run2016_UL_DM'] + [
f'Run2016{b}' for b in 'FGH']+['DY_madgraph'],
'Run2017_UL_DM': ['Run2017_UL_DM'] + [
f'Run2017{b}' for b in 'BCDEF']+['DY_madgraph'],
'Run2018_UL_DM': ['Run2018_UL_DM'] + [
f'Run2018{b}' for b in 'ABCD']+['DY_madgraph'],
# rereco (i.e. legacy)
'Run2016': ['Run2016'] + [
f'Run2016{b}' for b in 'BCDEFGH']+['DY_madgraph'],
'Run2017': ['Run2017'] + [
f'Run2017{b}' for b in 'BCDEF']+['DY_madgraph'],
'Run2018': ['Run2018'] + [
f'Run2018{b}' for b in 'ABCD']+['DY_madgraph'],
'Run2022': ['Run2022'] + [
f'Run2022{b}' for b in 'BCD']+['DY_madgraph'],
'Run2022_EE': ['Run2022_EE'] + [
f'Run2022{b}' for b in 'EFG']+['DY_madgraph'],
},
'JPsi': {
# ultra legacy
'Run2016_UL_HIPM': ['Run2016_UL_HIPM'] + [
f'Run2016{b}' for b in 'BCDEF']+['JPsi_pythia8'],
'Run2016_UL': ['Run2016_UL'] + [
f'Run2016{b}' for b in 'FGH']+['JPsi_pythia8'],
'Run2017_UL': ['Run2017_UL'] + [
f'Run2017{b}' for b in 'BCDEF']+['JPsi_pythia8'],
'Run2018_UL': ['Run2018_UL'] + [
f'Run2018{b}' for b in 'ABCD']+['JPsi_pythia8'],
# heavy ion
'Run2016_HI_pPb_8TeV': ['Run2016'],
# rereco (i.e. legacy)
'Run2016': ['Run2016'] + [
f'Run2016{b}' for b in 'BCDEFGH']+['JPsi_pythia8'],
'Run2017': ['Run2017'] + [
f'Run2017{b}' for b in 'BCDEF']+['JPsi_pythia8'],
'Run2018': ['Run2018'] + [
f'Run2018{b}' for b in 'ABCD']+['JPsi_pythia8'],
'Run2022': ['Run2022'] + [
f'Run2022{b}' for b in 'BC']+['DY_madgraph'],
'Run2022_EE': ['Run2022_EE'] + [
f'Run2022{b}' for b in 'EFG']+['DY_madgraph'],
},
}
return subEras.get(resonance, {}).get(era, [])
def get_data_mc_sub_eras(resonance, era):
eraMap = {
'Z': {
# TODO: decide how to handle alternate generators
# ultra legacy
'Run2016_UL_HIPM': ['Run2016_UL_HIPM', 'DY_madgraph'],
'Run2016_UL': ['Run2016_UL', 'DY_madgraph'],
'Run2017_UL': ['Run2017_UL', 'DY_madgraph'],
'Run2018_UL': ['Run2018_UL', 'DY_madgraph'],
# Double muon PD
'Run2016_UL_HIPM_DM': ['Run2016_UL_HIPM_DM', 'DY_madgraph'],
'Run2016_UL_DM': ['Run2016_UL_DM', 'DY_madgraph'],
'Run2017_UL_DM': ['Run2017_UL_DM', 'DY_madgraph'],
'Run2018_UL_DM': ['Run2018_UL_DM', 'DY_madgraph'],
# rereco (i.e. legacy)
'Run2016': ['Run2016', 'DY_madgraph'],
'Run2017': ['Run2017', 'DY_madgraph'],
'Run2018': ['Run2018', 'DY_madgraph'],
'Run2022': ['Run2022', 'DY_madgraph'],
'Run2022_EE': ['Run2022_EE', 'DY_madgraph'],
},
'JPsi': {
# ultra legacy
'Run2016_UL_HIPM': ['Run2016_UL_HIPM', 'JPsi_pythia8'],
'Run2016_UL': ['Run2016_UL', 'JPsi_pythia8'],
'Run2017_UL': ['Run2017_UL', 'JPsi_pythia8'],
'Run2018_UL': ['Run2018_UL', 'JPsi_pythia8'],
# heavy ion
'Run2016_HI_pPb_8TeV': ['Run2016', None],
# rereco (i.e. legacy)
'Run2016': ['Run2016', 'JPsi_pythia8'],
'Run2017': ['Run2017', 'JPsi_pythia8'],
'Run2018': ['Run2018', 'JPsi_pythia8'],
'Run2022_EE': ['Run2022_EE', 'DY_madgraph'],
},
}
return eraMap.get(resonance, {}).get(era, [None, None])