CMS 3D CMS Logo

customiseL1Ntuple.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import os
3 
4 
13 
14 def L1NtupleTFileOut(process):
15 
16  process.TFileService = cms.Service(
17  "TFileService",
18  fileName = cms.string('L1Ntuple.root')
19  )
20 
21  return process
22 
24 
25 
26 def L1NtupleAOD(process):
27 
28  L1NtupleTFileOut(process)
29  L1NtupleCustomReco(process)
30 
31  process.load('L1Trigger.L1TNtuples.L1NtupleAOD_cff')
32  process.l1ntupleaod = cms.Path(
33  process.L1NtupleAOD
34  )
35 
36  process.schedule.append(process.l1ntupleaod)
37 
38  return process
39 
40 def L1NtupleAODCalo(process):
41 
42  L1NtupleTFileOut(process)
43  L1NtupleCustomReco(process)
44 
45  process.load('L1Trigger.L1TNtuples.L1NtupleAODCalo_cff')
46  process.l1ntupleaodcalo = cms.Path(
47  process.L1NtupleAODCalo
48  )
49 
50  process.schedule.append(process.l1ntupleaodcalo)
51 
52  return process
53 
54 
55 def L1NtupleAOD_MC(process):
56 
57  L1NtupleAOD(process)
58 
59  process.l1JetRecoTree.jecToken = cms.untracked.InputTag("ak4PFCHSL1FastL2L3Corrector")
60 
61  return process
62 
63 
64 
65 def L1NtupleRAW(process):
66 
67  L1NtupleTFileOut(process)
68 
69  process.load('L1Trigger.L1TNtuples.L1NtupleRAW_cff')
70  process.l1ntupleraw = cms.Path(
71  process.L1NtupleRAW
72  )
73 
74  process.schedule.append(process.l1ntupleraw)
75 
76  # for 5 BX of candidates in L1Extra
77  if "gctDigis" in process.producers:
78  process.gctDigis.numberOfGctSamplesToUnpack = cms.uint32(5)
79 
80  if "l1extraParticles" in process.producers:
81  process.l1extraParticles.centralBxOnly = cms.bool(False)
82 
83  return process
84 
85 def L1NtupleNanoDST(process):
86 
87  L1NtupleTFileOut(process)
88 
89  process.load('L1Trigger.L1TNtuples.L1NtupleNanoDST_cff')
90  process.l1ntuplenano = cms.Path(
91  process.L1NtupleNANO
92  )
93 
94  process.schedule.append(process.l1ntuplenano)
95 
96  # unpack uGT/test crate from the dedicated FED selectors post this update: https://its.cern.ch/jira/browse/CMSHLT-3172
97  process.gtStage2Digis.InputLabel = cms.InputTag("hltFEDSelectorL1")
98  process.gtTestcrateStage2Digis.InputLabel = cms.InputTag("hltFEDSelectorL1uGTTest")
99 
100  return process
101 
102 def L1NtupleMINI(process):
103 
104  L1NtupleTFileOut(process)
105 
106  process.load('L1Trigger.L1TNtuples.L1NtupleMINI_cff')
107  process.l1ntuplenano = cms.Path(
108  process.L1NtupleMINI
109  )
110  process.schedule.append(process.l1ntuplenano)
111 
112  return process
113 
114 
115 def L1NtupleNANO(process):
116 
117  L1NtupleTFileOut(process)
118 
119  process.load('L1Trigger.L1TNtuples.L1NtupleNANO_cff')
120  process.l1ntuplenano = cms.Path(
121  process.L1NtupleNANO
122  )
123 
124  process.schedule.append(process.l1ntuplenano)
125 
126  return process
127 
128 def L1NtupleRAWCalo(process):
129 
130  L1NtupleTFileOut(process)
131 
132  process.load('L1Trigger.L1TNtuples.L1NtupleRAWCalo_cff')
133  process.l1ntuplerawcalo = cms.Path(
134  process.L1NtupleRAWCalo
135  )
136 
137  process.schedule.append(process.l1ntuplerawcalo)
138 
139  return process
140 
141 
142 def L1NtupleEMU(process):
143 
144  L1NtupleTFileOut(process)
145 
146  process.load('L1Trigger.L1TNtuples.L1NtupleEMU_cff')
147  process.l1ntupleemu = cms.Path(
148  process.L1NtupleEMU
149  )
150 
151  process.schedule.append(process.l1ntupleemu)
152 
153  return process
154 
155 def L1NtupleEMUCalo(process):
156 
157  L1NtupleTFileOut(process)
158 
159  process.load('L1Trigger.L1TNtuples.L1NtupleEMUCalo_cff')
160  process.l1ntupleemucalo = cms.Path(
161  process.L1NtupleEMUCalo
162  )
163 
164  process.schedule.append(process.l1ntupleemucalo)
165 
166  return process
167 
168 
169 def L1NtupleEMULegacy(process):
170 
171  L1NtupleTFileOut(process)
172 
173  process.load('L1Trigger.L1TNtuples.L1NtupleEMULegacy_cff')
174  process.l1ntupleemulegacy = cms.Path(
175  process.L1NtupleEMULegacy
176  )
177 
178  process.schedule.append(process.l1ntupleemulegacy)
179 
180  return process
181 
182 
183 def L1NtupleGEN(process):
184 
185  L1NtupleTFileOut(process)
186 
187  process.load('L1Trigger.L1TNtuples.L1NtupleGEN_cff')
188  process.l1ntuplegen = cms.Path(
189  process.L1NtupleGEN
190  )
191 
192  process.schedule.append(process.l1ntuplegen)
193 
194  return process
195 
196 
197 def L1NtupleRAWEMU(process):
198 
199  L1NtupleRAW(process)
200  L1NtupleEMU(process)
201 
202  return process
203 
204 def L1NtupleRAWEMUCalo(process):
205 
206  L1NtupleRAWCalo(process)
207  L1NtupleEMUCalo(process)
208 
209  return process
210 
211 def L1NtupleNANOEMU(process):
212 
213  L1NtupleNANO(process)
214  process.load('L1Trigger.L1TNtuples.L1NtupleEMU_cff')
215 
216  process.L1NtupleGTEMU = cms.Sequence( process.l1uGTEmuTree )
217  process.l1ntuplegtemu = cms.Path(
218  process.L1NtupleGTEMU
219  )
220  process.schedule.append(process.l1ntuplegtemu)
221 
222  return process
223 
224 def L1NtupleRAWEMULegacy(process):
225 
226  L1NtupleRAW(process)
227  L1NtupleEMU(process)
228  L1NtupleEMULegacy(process)
229 
230  return process
231 
232 
233 def L1NtupleAODRAW(process):
234 
235  L1NtupleRAW(process)
236  L1NtupleAOD(process)
237 
238  return process
239 
240 def L1NtupleAODRAWCalo(process):
241 
242  L1NtupleRAWCalo(process)
243  L1NtupleAODCalo(process)
244 
245  return process
246 
248 
249  L1NtupleRAW(process)
250  L1NtupleEMU(process)
251  L1NtupleEMULegacy(process)
252  L1NtupleAOD(process)
253 
254  return process
255 
256 
257 def L1NtupleAODRAWEMU(process):
258 
259  L1NtupleRAW(process)
260  L1NtupleEMU(process)
261  L1NtupleAOD(process)
262 
263  return process
264 
266 
267  L1NtupleRAWCalo(process)
268  L1NtupleEMUCalo(process)
269  L1NtupleAODCalo(process)
270 
271  return process
272 
273 def L1NtupleAODEMU(process):
274 
275  L1NtupleEMU(process)
276  L1NtupleAOD(process)
277 
278  return process
279 
280 def L1NtupleAODEMUCalo(process):
281 
282  L1NtupleEMUCalo(process)
283  L1NtupleAODCalo(process)
284 
285  return process
286 
287 
288 def L1NtupleAODEMU_MC(process):
289 
290  L1NtupleEMU(process)
291  L1NtupleAOD_MC(process)
292 
293  return process
294 
295 
296 def L1NtupleRAWEMUGEN_MC(process):
297 
298  L1NtupleRAW(process)
299  L1NtupleEMU(process)
300  L1NtupleGEN(process)
301 
302  return process
303 
304 def L1NtupleAODEMUGEN_MC(process):
305 
306  L1NtupleEMU(process)
307  L1NtupleAOD_MC(process)
308  L1NtupleGEN(process)
309 
310  return process
311 
313 
314  L1NtupleRAW(process)
315  L1NtupleEMU(process)
316  L1NtupleAOD_MC(process)
317  L1NtupleGEN(process)
318 
319  return process
320 
322 
323  L1NtupleTFileOut(process)
324 
325  process.load('L1Trigger.L1TNtuples.L1NtupleEMU_cff')
326  process.L1NtupleEMU = cms.Sequence( process.l1CaloTowerEmuTree+process.l1UpgradeEmuTree+process.l1UpgradeTfMuonEmuTree )
327  process.l1ntuplesim = cms.Path(
328  process.L1NtupleEMU
329  )
330  process.schedule.append(process.l1ntuplesim)
331 
332  return process
333 
334 def PrefireVetoFilter(process):
335 
336  process.load('EventFilter.L1TRawToDigi.triggerRulePrefireVetoFilter_cfi')
337 
338  if hasattr(process, 'l1ntupleraw'):
339  process.l1ntupleraw.insert(0,process.triggerRulePrefireVetoFilter)
340  if hasattr(process, 'l1ntupleemu'):
341  process.l1ntupleemu.insert(0,process.triggerRulePrefireVetoFilter)
342  if hasattr(process, 'l1ntupleaod'):
343  process.l1ntupleaod.insert(0,process.triggerRulePrefireVetoFilter)
344  if hasattr(process, 'l1ntuplerawcalo'):
345  process.l1ntuplerawcalo.insert(0,process.triggerRulePrefireVetoFilter)
346  if hasattr(process, 'l1ntupleemucalo'):
347  process.l1ntupleemucalo.insert(0,process.triggerRulePrefireVetoFilter)
348  if hasattr(process, 'l1ntupleaodcalo'):
349  process.l1ntupleaodcalo.insert(0,process.triggerRulePrefireVetoFilter)
350 
351  return process
def L1NtupleRAWEMUCalo(process)
def L1NtupleAODEMU_MC(process)
def L1NtupleRAWEMULegacy(process)
def L1NtupleAODCalo(process)
def L1NtupleEMULegacy(process)
def L1NtupleAOD(process)
def L1NtupleNANOEMU(process)
def L1NtupleAODRAW(process)
def L1NtupleEMUCalo(process)
def L1NtupleEMUNoEventTree(process)
def L1NtupleAODEMUCalo(process)
def L1NtupleNANO(process)
def L1NtupleEMU(process)
def PrefireVetoFilter(process)
def L1NtupleNanoDST(process)
def L1NtupleRAWCalo(process)
def L1NtupleAODEMUGEN_MC(process)
def L1NtupleAOD_MC(process)
def L1NtupleAODRAWEMULegacy(process)
def L1NtupleGEN(process)
def L1NtupleRAWEMU(process)
def L1NtupleRAWEMUGEN_MC(process)
def L1NtupleAODRAWEMUCalo(process)
def L1NtupleTFileOut(process)
customisations for L1 ntuple generation
def L1NtupleAODEMU(process)
def L1NtupleAODRAWEMUGEN_MC(process)
def L1NtupleMINI(process)
def L1NtupleAODRAWEMU(process)
def L1NtupleRAW(process)
def L1NtupleAODRAWCalo(process)