CMS 3D CMS Logo

relval_nano.py
Go to the documentation of this file.
2 import math
3 
4 
5 class WFN:
6  def __init__(self, offset):
7  self.offset = offset
8  self.index=0
9  self.subindex=0
10  def __call__(self):
11  if self.subindex==100:
12  print("this is not going to work nicely")
13  self.subindex=0/0
14  r=float(f'{self.offset}.{self.index}{self.subindex:02d}')
15  self.subindex+=1
16  return r
17  def next(self):
18  self.index+=1
19  self.subindex=0
20  def subnext(self):
21  # go to the next tenth for the subindex 10 because of 02d formating
22  self.subindex = math.ceil(self.subindex/10.)*10
23 
24 workflows = Matrix()
25 
26 _runOnly20events={'-n':'20'}
27 _run10kevents={'-n':'10000'}
28 
29 _NANO_data = merge([{'-s':'NANO,DQM:@nanoAODDQM',
30  '--process':'NANO',
31  '--data':'',
32  '--eventcontent':'NANOAOD,DQM',
33  '--datatier':'NANOAOD,DQMIO',
34  '-n':'10000',
35  '--customise':'"Configuration/DataProcessing/Utils.addMonitoring"'
36  }])
37 _HARVEST_nano = merge([{'-s':'HARVESTING:@nanoAODDQM',
38  '--filetype':'DQM',
39  '--filein':'file:step2_inDQM.root',
40  '--conditions':'auto:run2_data'
41  }])
42 _HARVEST_data = merge([_HARVEST_nano, {'--data':''}])
43 
44 
45 run2_lumis={ 277168: [[1, 1708]],
46  277194: [[913, 913], [916, 916], [919, 919], [932, 932], [939, 939]],
47  283877: [[1, 1496]],
48  299649: [[155, 332]],
49  303885: [[60, 2052]],
50  305040: [[200, 700]],
51  305050: [[200, 700]],
52  305234: [[1, 200]],
53  305377: [[1, 500]],
54  315489: [[1, 100]],
55  320822: [[1, 200]],
56  }
57 run3_lumis={}
58 
59 _NANO_mc = merge([{'-s':'NANO,DQM:@nanoAODDQM',
60  '--process':'NANO',
61  '--mc':'',
62  '--eventcontent':'NANOAODSIM,DQM',
63  '--datatier':'NANOAODSIM,DQMIO',
64  '-n':'10000',
65  '--customise':'"Configuration/DataProcessing/Utils.addMonitoring"'
66  }])
67 _HARVEST_mc = merge([_HARVEST_nano, {'--mc':''}])
68 steps['HRV_NANO_mc'] = _HARVEST_mc
69 steps['HRV_NANO_data'] = _HARVEST_data
70 
71 
72 steps['TTbarMINIAOD10.6_UL16v2'] = {'INPUT':InputInfo(location='STD',
73  dataSet='/TTJets_SingleLeptFromT_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL16MiniAODv2-106X_mcRun2_asymptotic_v17-v2/MINIAODSIM')}
74 steps['NANO_mc10.6ul16v2']=merge([{'--era':'Run2_2016,run2_nanoAOD_106Xv2',
75  '--conditions':'auto:run2_mc'},
76  _NANO_mc])
77 
78 steps['TTbarMINIAOD10.6_UL17v2'] = {'INPUT':InputInfo(location='STD',
79  dataSet='/TTJets_SingleLeptFromT_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL17MiniAODv2-106X_mc2017_realistic_v9-v2/MINIAODSIM')}
80 steps['NANO_mc10.6ul17v2']=merge([{'--era':'Run2_2017,run2_nanoAOD_106Xv2',
81  '--conditions':'auto:phase1_2017_realistic'},
82  _NANO_mc])
83 
84 steps['TTbarMINIAOD10.6_UL18v2'] = {'INPUT':InputInfo(location='STD',
85  dataSet='/TTJets_SingleLeptFromT_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL18MiniAODv2-106X_upgrade2018_realistic_v16_L1v1-v2/MINIAODSIM')}
86 steps['NANO_mc10.6ul18v2']=merge([{'--era':'Run2_2018,run2_nanoAOD_106Xv2',
87  '--conditions':'auto:phase1_2018_realistic'},
88  _NANO_mc])
89 
90 
91 steps['MuonEG2016MINIAOD10.6v2'] = {'INPUT':InputInfo(location='STD',ls=run2_lumis,
92  dataSet='/MuonEG/Run2016E-HIPM_UL2016_MiniAODv2-v2/MINIAOD')}
93 steps['NANO_data10.6ul16v2']=merge([{'--era':'Run2_2016,run2_nanoAOD_106Xv2,tracker_apv_vfp30_2016',
94  '--conditions':'auto:run2_data'},
95  _NANO_data])
96 
97 steps['MuonEG2017MINIAOD10.6v2'] = {'INPUT':InputInfo(location='STD',ls=run2_lumis,
98  dataSet='/MuonEG/Run2017F-UL2017_MiniAODv2-v1/MINIAOD')}
99 steps['NANO_data10.6ul17v2']=merge([{'--era':'Run2_2017,run2_nanoAOD_106Xv2',
100  '--conditions':'auto:run2_data'},
101  _NANO_data])
102 
103 
104 steps['MuonEG2018MINIAOD10.6v2'] = {'INPUT':InputInfo(location='STD',ls=run2_lumis,
105  dataSet='/MuonEG/Run2018D-UL2018_MiniAODv2-v1/MINIAOD')}
106 steps['NANO_data10.6ul18v2']=merge([{'--era':'Run2_2018,run2_nanoAOD_106Xv2',
107  '--conditions':'auto:run2_data'},
108  _NANO_data])
109 
110 steps['TTbarMINIAOD12.2'] = {'INPUT':InputInfo(location='STD',
111  dataSet='/TTToSemiLeptonic_TuneCP5_13p6TeV-powheg-pythia8/Run3Winter22MiniAOD-FlatPU0to70_122X_mcRun3_2021_realistic_v9-v2/MINIAODSIM')}
112 steps['NANO_mc12.2']=merge([{'--era':'Run3,run3_nanoAOD_122',
113  '--conditions':'auto:phase1_2022_realistic'},
114  _NANO_mc])
115 
116 
117 steps['TTbarMINIAOD12.4'] = {'INPUT':InputInfo(location='STD',
118  dataSet='/TT_TuneCP5_13p6TeV_powheg-pythia8/Run3Summer22MiniAODv3-124X_mcRun3_2022_realistic_v12-v3/MINIAODSIM')}
119 steps['NANO_mc12.4']=merge([{'--era':'Run3,run3_nanoAOD_124',
120  '--conditions':'124X_mcRun3_2022_realistic_v12'},
121  _NANO_mc])
122 
123 steps['MuonEG2022MINIAOD12.4'] = {'INPUT':InputInfo(location='STD',ls=run3_lumis,
124  dataSet='/MuonEG/Run2022D-PromptReco-v2/MINIAOD')}
125 steps['NANO_data12.4']=merge([{'--era':'Run3,run3_nanoAOD_124',
126  '--conditions':'auto:run3_data'},
127  _NANO_data])
128 steps['NANO_data12.4_prompt']=merge([{'--customise' : 'PhysicsTools/NanoAOD/nano_cff.nanoL1TrigObjCustomize', '-n' : '1000'},
129  steps['NANO_data12.4']])
130 
131 
132 steps['TTBarMINIAOD13.0'] = {'INPUT':InputInfo(location='STD',
133  dataSet='/RelValTTbar_14TeV/CMSSW_13_0_0-PU_130X_mcRun3_2022_realistic_v2_HS-v4/MINIAODSIM')}
134 
135 steps['NANO_mc13.0']=merge([{'--era':'Run3',
136  '--conditions':'130X_mcRun3_2022_realistic_v2'},
137  _NANO_mc])
138 
139 steps['MuonEG2023MINIAOD13.0'] = { 'INPUT':InputInfo(location='STD',ls=run3_lumis,
140  dataSet='/MuonEG/Run2023C-PromptReco-v4/MINIAOD')}
141 
142 steps['ZMuSkim2023DRAWRECO13.0'] = { 'INPUT':InputInfo(location='STD',ls={ 370775: [[1, 168]]},
143  dataSet='/Muon0/Run2023D-ZMu-PromptReco-v2/RAW-RECO')}
144 
145 steps['ZeroBias2023DRAW13.0']={'INPUT':InputInfo(location='STD', ls={369978: [[1, 800]]},
146  dataSet='/ZeroBias/Run2023D-v1/RAW')}
147 
148 steps['NANO_data13.0']=merge([{'--era':'Run3',
149  '--conditions':'auto:run3_data'},
150  _NANO_data])
151 
152 steps['NANO_data13.0_prompt']=merge([{'--customise' : 'PhysicsTools/NanoAOD/nano_cff.nanoL1TrigObjCustomize', '-n' : '1000'},
153  steps['NANO_data13.0']])
154 
155 steps['muDPGNANO_data13.0']=merge([{'-s' : 'RAW2DIGI,NANO:@MUDPG',
156  '--conditions':'auto:run3_data',
157  '-n' : '100',
158  '--era' : 'Run3',
159  '--datatier':'NANOAOD',
160  '--eventcontent':'NANOAOD'}])
161 
162 steps['muDPGNANOBkg_data13.0']=merge([{'-s' : 'RAW2DIGI,NANO:@MUDPGBKG',
163  '--conditions':'auto:run3_data',
164  '-n' : '100',
165  '--era' : 'Run3',
166  '--datatier':'NANOAOD',
167  '--eventcontent':'NANOAOD'}])
168 
169 steps['muPOGNANO_data13.0']=merge([{'-s' : 'NANO:@MUPOG,DQM:@nanoAODDQM', '-n' : '1000'},
170  steps['NANO_data13.0']])
171 
172 steps['EGMNano_data13.0'] = merge([{'-s':'NANO:@EGM,DQM:@nanoAODDQM', '-n' : '1000'},
173  steps['NANO_data13.0']])
174 
175 steps['EGMNano_mc13.0'] = merge([{'-s':'NANO:@EGM,DQM:@nanoAODDQM', '-n' : '1000'},
176  steps['NANO_mc13.0']])
177 
178 steps['BTVNANO_data13.0']=merge([{'-s' : 'NANO:@BTV',
179  '-n' : '1000'},
180  steps['NANO_data13.0']])
181 
182 steps['jmeNANO_data13.0'] = merge([{'-s':'NANO:@JME', '-n' : '1000'},
183  steps['NANO_data13.0']])
184 
185 steps['lepTrackInfoNANO_data13.0']=merge([{'-s' : 'NANO:@LepTrackInfo,DQM:@nanoAODDQM',
186  '-n' : '1000'},
187  steps['NANO_data13.0']])
188 
189 steps['jmeNANO_rePuppi_data13.0']= merge([{'-s':'NANO:@JMErePuppi', '-n' : '1000'},
190  steps['NANO_data13.0']])
191 
192 
193 steps['TTBarMINIAOD13.2'] = {'INPUT':InputInfo(location='STD',
194  dataSet='/RelValTTbar_14TeV/CMSSW_13_2_0-PU_131X_mcRun3_2023_realistic_v9-v1/MINIAODSIM')}
195 
196 steps['NANO_mc13.2']=merge([{'--era':'Run3',
197  '--conditions':'auto:phase1_2022_realistic'},
198  _NANO_mc])
199 
200 steps['muPOGNANO_mc13.2']=merge([{'-s' : 'NANO:@MUPOG,DQM:@nanoAODDQM', '-n' : '1000'},
201  steps['NANO_mc13.2']])
202 
203 steps['EGMNano_mc13.2'] = merge([{'-s':'NANO:@EGM,DQM:@nanoAODDQM', '-n' : '1000'},
204  steps['NANO_mc13.2']])
205 
206 steps['BTVNANO_mc13.2']=merge([{'-s' : 'NANO:@BTV',
207  '-n' : '1000'},
208  steps['NANO_mc13.2']])
209 
210 steps['jmeNANO_mc13.2']=merge([{'-s' : 'NANO:@JME ', '-n' : '1000'},
211  steps['NANO_mc13.2']])
212 
213 steps['lepTrackInfoNANO_mc13.2']=merge([{'-s' : 'NANO:@LepTrackInfo,DQM:@nanoAODDQM',
214  '-n' : '1000'},
215  steps['NANO_mc13.2']])
216 
217 steps['jmeNANO_rePuppi_mc13.2']=merge([{'-s' : 'NANO:@JMErePuppi ', '-n' : '1000'},
218  steps['NANO_mc13.2']])
219 
220 
221 
222 steps['ScoutingPFRun32022DRAW13.X']={'INPUT':InputInfo(dataSet='/ScoutingPFRun3/Run2022D-v1/RAW',label='2022D',events=100000,location='STD', ls=Run2022D)}
223 
224 steps['NANO_dataRun3ScoutingPF13.X']=merge([{'-s':'NANO:@Scout'},
225  steps['NANO_data13.0']])
226 
227 steps['TTBarMINIAOD13.3'] = {'INPUT':InputInfo(location='STD',
228  dataSet='/RelValTTbar_14TeV/CMSSW_13_3_0-PU_133X_mcRun3_2023_realistic_v3-v1/MINIAODSIM')}
229 
230 steps['NANO_mc13.3']=merge([{'--era':'Run3',
231  '--conditions':'133X_mcRun3_2023_realistic_v3'},
232  _NANO_mc])
233 
234 steps['NANO_mcScouting13.X']=merge([{'-s':'NANO:@Scout'},
235  steps['NANO_mc13.3']])
236 
237 _wfn=WFN(2500)
238 
240 workflows[_wfn()] = ['NANOmc106Xul16v2', ['TTbarMINIAOD10.6_UL16v2','NANO_mc10.6ul16v2', 'HRV_NANO_mc']]
241 workflows[_wfn()] = ['NANOmc106Xul17v2', ['TTbarMINIAOD10.6_UL17v2','NANO_mc10.6ul17v2', 'HRV_NANO_mc']]
242 workflows[_wfn()] = ['NANOmc106Xul18v2', ['TTbarMINIAOD10.6_UL18v2','NANO_mc10.6ul18v2', 'HRV_NANO_mc']]
243 _wfn.subnext()
244 workflows[_wfn()] = ['NANOdata106Xul16v2', ['MuonEG2016MINIAOD10.6v2', 'NANO_data10.6ul16v2', 'HRV_NANO_data']]
245 workflows[_wfn()] = ['NANOdata106Xul17v2', ['MuonEG2017MINIAOD10.6v2', 'NANO_data10.6ul17v2', 'HRV_NANO_data']]
246 workflows[_wfn()] = ['NANOdata106Xul18v2', ['MuonEG2018MINIAOD10.6v2', 'NANO_data10.6ul18v2', 'HRV_NANO_data']]
247 
248 _wfn.next()
249 
251 workflows[_wfn()] = ['NANOmc122Xrun3', ['TTbarMINIAOD12.2','NANO_mc12.2', 'HRV_NANO_mc']]
252 
253 _wfn.next()
254 
256 workflows[_wfn()] = ['NANOmc124Xrun3', ['TTbarMINIAOD12.4','NANO_mc12.4', 'HRV_NANO_mc']]
257 _wfn.subnext()
258 workflows[_wfn()] = ['NANOdata124Xrun3', ['MuonEG2022MINIAOD12.4','NANO_data12.4', 'HRV_NANO_data']]
259 workflows[_wfn()] = ['NANOdata124Xrun3', ['MuonEG2022MINIAOD12.4','NANO_data12.4_prompt', 'HRV_NANO_data']]
260 
261 _wfn.next()
262 
264 workflows[_wfn()] = ['NANOmc130X', ['TTBarMINIAOD13.0', 'NANO_mc13.0', 'HRV_NANO_mc']]
265 workflows[_wfn()] = ['EGMNANOmc130X', ['TTBarMINIAOD13.0', 'EGMNano_mc13.0']]
266 _wfn.subnext()
267 workflows[_wfn()] = ['NANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'NANO_data13.0', 'HRV_NANO_data']]
268 workflows[_wfn()] = ['NANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'NANO_data13.0_prompt', 'HRV_NANO_data']]
269 workflows[_wfn()] = ['muDPGNANO130Xrun3', ['ZMuSkim2023DRAWRECO13.0', 'muDPGNANO_data13.0']]
270 workflows[_wfn()] = ['muDPGNANOBkg130Xrun3', ['ZeroBias2023DRAW13.0', 'muDPGNANOBkg_data13.0']]
271 workflows[_wfn()] = ['muPOGNANO130Xrun3', ['MuonEG2023MINIAOD13.0', 'muPOGNANO_data13.0']]
272 workflows[_wfn()] = ['EGMNANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'EGMNano_data13.0']]
273 workflows[_wfn()] = ['jmeNANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'jmeNANO_data13.0']]
274 workflows[_wfn()] = ['lepTrackInfoNANOdata130Xrun3', ['MuonEG2023MINIAOD13.0', 'lepTrackInfoNANO_data13.0']]
275 workflows[_wfn()] = ['BTVNANO_data130Xrun3', ['MuonEG2023MINIAOD13.0', 'BTVNANO_data13.0']]
276 workflows[_wfn()] = ['jmeNANOrePuppidata130Xrun3', ['MuonEG2023MINIAOD13.0', 'jmeNANO_rePuppi_data13.0']]
277 
278 _wfn.next()
279 
281 workflows[_wfn()] = ['NANOmc132X', ['TTBarMINIAOD13.2', 'NANO_mc13.2', 'HRV_NANO_mc']]
282 workflows[_wfn()] = ['muPOGNANOmc132X', ['TTBarMINIAOD13.2', 'muPOGNANO_mc13.2']]
283 workflows[_wfn()] = ['EGMNANOmc132X', ['TTBarMINIAOD13.2', 'EGMNano_mc13.2']]
284 workflows[_wfn()] = ['jmeNANOmc132X', ['TTBarMINIAOD13.2', 'jmeNANO_mc13.2']]
285 workflows[_wfn()] = ['lepTrackInfoNANOmc132X', ['TTBarMINIAOD13.2', 'lepTrackInfoNANO_mc13.2']]
286 workflows[_wfn()] = ['BTVNANO_mc132X', ['TTBarMINIAOD13.2', 'BTVNANO_mc13.2']]
287 workflows[_wfn()] = ['jmeNANOrePuppimc132X', ['TTBarMINIAOD13.2', 'jmeNANO_rePuppi_mc13.2']]
288 
289 _wfn.next()
290 
292 workflows[_wfn()] = ['ScoutingNanodata13X',['ScoutingPFRun32022DRAW13.X', 'NANO_dataRun3ScoutingPF13.X']]
293 _wfn.subnext()
294 workflows[_wfn()] = ['ScoutingNanomc13X',['TTBarMINIAOD13.3','NANO_mcScouting13.X']]
295 
296 
Definition: merge.py:1
def next(self)
Definition: relval_nano.py:17
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
as simple class to number workflows dynamically
Definition: relval_nano.py:5
def __init__(self, offset)
Definition: relval_nano.py:6
portabletest::Matrix Matrix
def subnext(self)
Definition: relval_nano.py:20
def __call__(self)
Definition: relval_nano.py:10