CMS 3D CMS Logo

Functions | Variables
leptonTimeLifeInfo_common_cff Namespace Reference

Functions

def addElectronTimeLifeInfoTask (process)
 
def addElectronTrackVarsToTimeLifeInfo (process)
 
def addExtendVertexInfo (process)
 
def addMuonTimeLifeInfoTask (process)
 
def addMuonTrackVarsToTimeLifeInfo (process)
 
def addTauTimeLifeInfoTask (process)
 
def addTauTrackVarsToTimeLifeInfo (process)
 
def addTimeLifeInfo (process)
 
def addTimeLifeInfoBase (process)
 
def addTimeLifeInfoToElectrons (process)
 
def addTimeLifeInfoToMuons (process)
 
def addTimeLifeInfoToTaus (process)
 
def addTrackVarsToTimeLifeInfo (process)
 

Variables

 bField_z
 
 bool
 
 doc
 
 electronTrackVars
 
 electronVars
 
 float
 
 hasRefitSV
 
 ipLengthSig
 
 ipVars
 
 ipVarsPlots
 
 IPx
 
 IPy
 
 IPz
 
 jistr
 
 muonTrackVars
 
 muonVars
 
 precision
 
 prod_common
 
 pvChoice
 
 pvCovVars
 
 pvSource
 
 refitSVchi2
 
 refitSVx
 
 refitSVy
 
 refitSVz
 
 refittedPV
 
 srcVertices
 
 svVars
 
 svVarsPlots
 
 tauTrackVars
 
 tauVars
 
 track_dsz
 
 track_dxy
 
 track_lambda
 
 track_phi
 
 track_qoverp
 
 trackVars
 
 trackVarsPlots
 

Function Documentation

◆ addElectronTimeLifeInfoTask()

def leptonTimeLifeInfo_common_cff.addElectronTimeLifeInfoTask (   process)

Definition at line 120 of file leptonTimeLifeInfo_common_cff.py.

Referenced by addElectronTrackVarsToTimeLifeInfo(), and addTimeLifeInfoToElectrons().

120 def addElectronTimeLifeInfoTask(process):
121  process.electronTimeLifeInfos = patElectronTimeLifeInfoProducer.clone(
122  src = process.electronTable.src,
123  selection = 'pt > 15',
124  pvSource = prod_common.pvSource,
125  pvChoice = prod_common.pvChoice
126  )
127  process.electronTimeLifeInfoTable = simplePATElectron2TrackTimeLifeInfoFlatTableProducer.clone(
128  name = process.electronTable.name,
129  src = process.electronTable.src,
130  doc = cms.string("Additional time-life info for non-prompt electrons"),
131  extension = True,
132  externalTypedVariables = cms.PSet()
133  )
134  process.electronTimeLifeInfoTask = cms.Task(
135  process.electronTimeLifeInfos,
136  process.electronTimeLifeInfoTable
137  )
138  # refit PV with beam-spot constraint that is not present in Run-2 samples
139  if not hasattr(process,'refittedPV'):
140  setattr(process,'refittedPV',refittedPV)
141  _electronTimeLifeInfoTaskRun2 = process.electronTimeLifeInfoTask.copy()
142  _electronTimeLifeInfoTaskRun2.add(process.refittedPV)
143  run2_nanoAOD_ANY.toReplaceWith(process.electronTimeLifeInfoTask,
144  _electronTimeLifeInfoTaskRun2)
145  process.electronTablesTask.add(process.electronTimeLifeInfoTask)
146  return process
147 #base vars

◆ addElectronTrackVarsToTimeLifeInfo()

def leptonTimeLifeInfo_common_cff.addElectronTrackVarsToTimeLifeInfo (   process)

Definition at line 171 of file leptonTimeLifeInfo_common_cff.py.

References addElectronTimeLifeInfoTask().

Referenced by addTrackVarsToTimeLifeInfo().

172  if not hasattr(process,'electronTimeLifeInfoTask'):
173  process = addElectronTimeLifeInfoTask(process)
174  electronExtVars = cms.PSet(
175  process.electronTimeLifeInfoTable.externalTypedVariables,
176  electronTrackVars
177  )
178  process.electronTimeLifeInfoTable.externalTypedVariables = electronExtVars
179  # add DQM plots if needed
180  if hasattr(process,'nanoDQM'):
181  process.nanoDQM.vplots.Electron.plots.extend(trackVarsPlots)
182  return process
183 
184 # muons

◆ addExtendVertexInfo()

def leptonTimeLifeInfo_common_cff.addExtendVertexInfo (   process)

Definition at line 316 of file leptonTimeLifeInfo_common_cff.py.

References common_cff.Var().

Referenced by addTimeLifeInfoBase().

316 def addExtendVertexInfo(process):
317  process.pvbsTable = simpleVertexFlatTableProducer.clone(
318  src = prod_common.pvSource,
319  name = "PVBS",
320  doc = "main primary vertex with beam-spot",
321  maxLen = 1,
322  variables = cms.PSet(
323  pvCovVars,
324  x = Var("position().x()", float, doc = "position x coordinate, in cm", precision = 10),
325  y = Var("position().y()", float, doc = "position y coordinate, in cm", precision = 10),
326  z = Var("position().z()", float, doc = "position z coordinate, in cm", precision = 16),
327  #ndof = Var("ndof()", float, doc = "number of degrees of freedom", precision = 8),#MB: not important
328  chi2 = Var("normalizedChi2()", float, doc = "reduced chi2, i.e. chi2/ndof", precision = 8),
329  ),
330  )
331  process.pvbsTableTask = cms.Task(process.pvbsTable)
332  # refit PV with beam-spot constraint that is not present in Run-2 samples
333  if not hasattr(process,'refittedPV'):
334  setattr(process,'refittedPV',refittedPV)
335  _pvbsTableTaskRun2 = process.pvbsTableTask.copy()
336  _pvbsTableTaskRun2.add(process.refittedPV)
337  run2_nanoAOD_ANY.toReplaceWith(process.pvbsTableTask,
338  _pvbsTableTaskRun2)
339  process.vertexTablesTask.add(process.pvbsTableTask)
340  return process
341 
342 # Time-life info without track parameters
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
Definition: common_cff.py:17

◆ addMuonTimeLifeInfoTask()

def leptonTimeLifeInfo_common_cff.addMuonTimeLifeInfoTask (   process)

Definition at line 185 of file leptonTimeLifeInfo_common_cff.py.

Referenced by addMuonTrackVarsToTimeLifeInfo(), and addTimeLifeInfoToMuons().

185 def addMuonTimeLifeInfoTask(process):
186  process.muonTimeLifeInfos = patMuonTimeLifeInfoProducer.clone(
187  src = process.muonTable.src,
188  selection = 'pt > 15',
189  pvSource = prod_common.pvSource,
190  pvChoice = prod_common.pvChoice
191  )
192  process.muonTimeLifeInfoTable = simplePATMuon2TrackTimeLifeInfoFlatTableProducer.clone(
193  name = process.muonTable.name,
194  src = process.muonTable.src,
195  doc = cms.string("Additional time-life info for non-prompt muon"),
196  extension = True,
197  externalTypedVariables = cms.PSet()
198  )
199  process.muonTimeLifeInfoTask = cms.Task(
200  process.muonTimeLifeInfos,
201  process.muonTimeLifeInfoTable
202  )
203  # refit PV with beam-spot constraint that is not present in Run-2 samples
204  if not hasattr(process,'refittedPV'):
205  setattr(process,'refittedPV',refittedPV)
206  _muonTimeLifeInfoTaskRun2 = process.muonTimeLifeInfoTask.copy()
207  _muonTimeLifeInfoTaskRun2.add(process.refittedPV)
208  run2_nanoAOD_ANY.toReplaceWith(process.muonTimeLifeInfoTask,
209  _muonTimeLifeInfoTaskRun2)
210  process.muonTablesTask.add(process.muonTimeLifeInfoTask)
211  return process
212 #base vars

◆ addMuonTrackVarsToTimeLifeInfo()

def leptonTimeLifeInfo_common_cff.addMuonTrackVarsToTimeLifeInfo (   process)

Definition at line 236 of file leptonTimeLifeInfo_common_cff.py.

References addMuonTimeLifeInfoTask().

Referenced by addTrackVarsToTimeLifeInfo().

236 def addMuonTrackVarsToTimeLifeInfo(process):
237  if not hasattr(process,'muonTimeLifeInfoTask'):
238  process = addMuonTimeLifeInfoTask(process)
239  muonExtVars = cms.PSet(
240  process.muonTimeLifeInfoTable.externalTypedVariables,
241  muonTrackVars
242  )
243  process.muonTimeLifeInfoTable.externalTypedVariables = muonExtVars
244  # add DQM plots if needed
245  if hasattr(process,'nanoDQM'):
246  process.nanoDQM.vplots.Muon.plots.extend(trackVarsPlots)
247  return process
248 
249 # taus

◆ addTauTimeLifeInfoTask()

def leptonTimeLifeInfo_common_cff.addTauTimeLifeInfoTask (   process)

Definition at line 250 of file leptonTimeLifeInfo_common_cff.py.

Referenced by addTauTrackVarsToTimeLifeInfo(), and addTimeLifeInfoToTaus().

250 def addTauTimeLifeInfoTask(process):
251  process.tauTimeLifeInfos = patTauTimeLifeInfoProducer.clone(
252  src = process.tauTable.src,
253  pvSource = prod_common.pvSource,
254  pvChoice = prod_common.pvChoice
255  )
256  process.tauTimeLifeInfoTable = simplePATTau2TrackTimeLifeInfoFlatTableProducer.clone(
257  name = process.tauTable.name,
258  src = process.tauTable.src,
259  doc = cms.string("Additional tau time-life info"),
260  extension = True,
261  externalTypedVariables = cms.PSet()
262  )
263  process.tauTimeLifeInfoTask = cms.Task(
264  process.tauTimeLifeInfos,
265  process.tauTimeLifeInfoTable
266  )
267  # refit PV with beam-spot constraint that is not present in Run-2 samples
268  if not hasattr(process,'refittedPV'):
269  setattr(process,'refittedPV',refittedPV)
270  _tauTimeLifeInfoTaskRun2 = process.tauTimeLifeInfoTask.copy()
271  _tauTimeLifeInfoTaskRun2.add(process.refittedPV)
272  run2_nanoAOD_ANY.toReplaceWith(process.tauTimeLifeInfoTask,
273  _tauTimeLifeInfoTaskRun2)
274  process.tauTablesTask.add(process.tauTimeLifeInfoTask)
275  return process
276 # base vars

◆ addTauTrackVarsToTimeLifeInfo()

def leptonTimeLifeInfo_common_cff.addTauTrackVarsToTimeLifeInfo (   process)

Definition at line 302 of file leptonTimeLifeInfo_common_cff.py.

References addTauTimeLifeInfoTask().

Referenced by addTrackVarsToTimeLifeInfo().

302 def addTauTrackVarsToTimeLifeInfo(process):
303  if not hasattr(process,'tauTimeLifeInfoTask'):
304  process = addTauTimeLifeInfoTask(process)
305  tauExtVars = cms.PSet(
306  process.tauTimeLifeInfoTable.externalTypedVariables,
307  tauTrackVars
308  )
309  process.tauTimeLifeInfoTable.externalTypedVariables = tauExtVars
310  # add DQM plots if needed
311  if hasattr(process,'nanoDQM'):
312  process.nanoDQM.vplots.Tau.plots.extend(trackVarsPlots)
313  return process
314 
315 # Vertices

◆ addTimeLifeInfo()

def leptonTimeLifeInfo_common_cff.addTimeLifeInfo (   process)

◆ addTimeLifeInfoBase()

def leptonTimeLifeInfo_common_cff.addTimeLifeInfoBase (   process)

◆ addTimeLifeInfoToElectrons()

def leptonTimeLifeInfo_common_cff.addTimeLifeInfoToElectrons (   process)

Definition at line 153 of file leptonTimeLifeInfo_common_cff.py.

References addElectronTimeLifeInfoTask().

Referenced by addTimeLifeInfoBase().

153 def addTimeLifeInfoToElectrons(process):
154  if not hasattr(process,'electronTimeLifeInfoTask'):
155  process = addElectronTimeLifeInfoTask(process)
156  electronExtVars = cms.PSet(
157  process.electronTimeLifeInfoTable.externalTypedVariables,
158  electronVars
159  )
160  process.electronTimeLifeInfoTable.externalTypedVariables = electronExtVars
161  # add DQM plots if needed
162  if hasattr(process,'nanoDQM'):
163  process.nanoDQM.vplots.Electron.plots.extend(ipVarsPlots)
164  return process
165 #track vars

◆ addTimeLifeInfoToMuons()

def leptonTimeLifeInfo_common_cff.addTimeLifeInfoToMuons (   process)

Definition at line 218 of file leptonTimeLifeInfo_common_cff.py.

References addMuonTimeLifeInfoTask().

Referenced by addTimeLifeInfoBase().

218 def addTimeLifeInfoToMuons(process):
219  if not hasattr(process,'muonTimeLifeInfoTask'):
220  process = addMuonTimeLifeInfoTask(process)
221  muonExtVars = cms.PSet(
222  process.muonTimeLifeInfoTable.externalTypedVariables,
223  muonVars
224  )
225  process.muonTimeLifeInfoTable.externalTypedVariables = muonExtVars
226  # add DQM plots if needed
227  if hasattr(process,'nanoDQM'):
228  process.nanoDQM.vplots.Muon.plots.extend(ipVarsPlots)
229  return process
230 #track vars

◆ addTimeLifeInfoToTaus()

def leptonTimeLifeInfo_common_cff.addTimeLifeInfoToTaus (   process)

Definition at line 283 of file leptonTimeLifeInfo_common_cff.py.

References addTauTimeLifeInfoTask().

Referenced by addTimeLifeInfoBase().

283 def addTimeLifeInfoToTaus(process):
284  if not hasattr(process,'tauTimeLifeInfoTask'):
285  process = addTauTimeLifeInfoTask(process)
286  tauExtVars = cms.PSet(
287  process.tauTimeLifeInfoTable.externalTypedVariables,
288  tauVars
289  )
290  process.tauTimeLifeInfoTable.externalTypedVariables = tauExtVars
291  # add DQM plots if needed
292  if hasattr(process,'nanoDQM'):
293  process.nanoDQM.vplots.Tau.plots.extend(ipVarsPlots)
294  process.nanoDQM.vplots.Tau.plots.extend(svVarsPlots)
295  return process
296 #track vars

◆ addTrackVarsToTimeLifeInfo()

def leptonTimeLifeInfo_common_cff.addTrackVarsToTimeLifeInfo (   process)

Variable Documentation

◆ bField_z

leptonTimeLifeInfo_common_cff.bField_z

Definition at line 42 of file leptonTimeLifeInfo_common_cff.py.

◆ bool

leptonTimeLifeInfo_common_cff.bool

Definition at line 53 of file leptonTimeLifeInfo_common_cff.py.

◆ doc

leptonTimeLifeInfo_common_cff.doc

Definition at line 28 of file leptonTimeLifeInfo_common_cff.py.

◆ electronTrackVars

leptonTimeLifeInfo_common_cff.electronTrackVars

Definition at line 166 of file leptonTimeLifeInfo_common_cff.py.

◆ electronVars

leptonTimeLifeInfo_common_cff.electronVars

Definition at line 148 of file leptonTimeLifeInfo_common_cff.py.

◆ float

leptonTimeLifeInfo_common_cff.float

Definition at line 28 of file leptonTimeLifeInfo_common_cff.py.

◆ hasRefitSV

leptonTimeLifeInfo_common_cff.hasRefitSV

Definition at line 53 of file leptonTimeLifeInfo_common_cff.py.

◆ ipLengthSig

leptonTimeLifeInfo_common_cff.ipLengthSig

Definition at line 28 of file leptonTimeLifeInfo_common_cff.py.

◆ ipVars

leptonTimeLifeInfo_common_cff.ipVars

Definition at line 26 of file leptonTimeLifeInfo_common_cff.py.

◆ ipVarsPlots

leptonTimeLifeInfo_common_cff.ipVarsPlots

Definition at line 84 of file leptonTimeLifeInfo_common_cff.py.

◆ IPx

leptonTimeLifeInfo_common_cff.IPx

◆ IPy

leptonTimeLifeInfo_common_cff.IPy

◆ IPz

leptonTimeLifeInfo_common_cff.IPz

Definition at line 31 of file leptonTimeLifeInfo_common_cff.py.

◆ jistr

leptonTimeLifeInfo_common_cff.jistr

Definition at line 47 of file leptonTimeLifeInfo_common_cff.py.

◆ muonTrackVars

leptonTimeLifeInfo_common_cff.muonTrackVars

Definition at line 231 of file leptonTimeLifeInfo_common_cff.py.

◆ muonVars

leptonTimeLifeInfo_common_cff.muonVars

Definition at line 213 of file leptonTimeLifeInfo_common_cff.py.

◆ precision

leptonTimeLifeInfo_common_cff.precision

Definition at line 28 of file leptonTimeLifeInfo_common_cff.py.

◆ prod_common

leptonTimeLifeInfo_common_cff.prod_common

Definition at line 20 of file leptonTimeLifeInfo_common_cff.py.

◆ pvChoice

leptonTimeLifeInfo_common_cff.pvChoice

Definition at line 22 of file leptonTimeLifeInfo_common_cff.py.

◆ pvCovVars

leptonTimeLifeInfo_common_cff.pvCovVars

Definition at line 70 of file leptonTimeLifeInfo_common_cff.py.

◆ pvSource

leptonTimeLifeInfo_common_cff.pvSource

Definition at line 21 of file leptonTimeLifeInfo_common_cff.py.

◆ refitSVchi2

leptonTimeLifeInfo_common_cff.refitSVchi2

Definition at line 57 of file leptonTimeLifeInfo_common_cff.py.

◆ refitSVx

leptonTimeLifeInfo_common_cff.refitSVx

Definition at line 54 of file leptonTimeLifeInfo_common_cff.py.

◆ refitSVy

leptonTimeLifeInfo_common_cff.refitSVy

Definition at line 55 of file leptonTimeLifeInfo_common_cff.py.

◆ refitSVz

leptonTimeLifeInfo_common_cff.refitSVz

Definition at line 56 of file leptonTimeLifeInfo_common_cff.py.

◆ refittedPV

leptonTimeLifeInfo_common_cff.refittedPV

Definition at line 77 of file leptonTimeLifeInfo_common_cff.py.

◆ srcVertices

leptonTimeLifeInfo_common_cff.srcVertices

Definition at line 78 of file leptonTimeLifeInfo_common_cff.py.

◆ svVars

leptonTimeLifeInfo_common_cff.svVars

Definition at line 51 of file leptonTimeLifeInfo_common_cff.py.

◆ svVarsPlots

leptonTimeLifeInfo_common_cff.svVarsPlots

Definition at line 103 of file leptonTimeLifeInfo_common_cff.py.

◆ tauTrackVars

leptonTimeLifeInfo_common_cff.tauTrackVars

Definition at line 297 of file leptonTimeLifeInfo_common_cff.py.

◆ tauVars

◆ track_dsz

leptonTimeLifeInfo_common_cff.track_dsz

Definition at line 41 of file leptonTimeLifeInfo_common_cff.py.

◆ track_dxy

leptonTimeLifeInfo_common_cff.track_dxy

Definition at line 40 of file leptonTimeLifeInfo_common_cff.py.

◆ track_lambda

leptonTimeLifeInfo_common_cff.track_lambda

Definition at line 37 of file leptonTimeLifeInfo_common_cff.py.

◆ track_phi

◆ track_qoverp

leptonTimeLifeInfo_common_cff.track_qoverp

Definition at line 36 of file leptonTimeLifeInfo_common_cff.py.

◆ trackVars

leptonTimeLifeInfo_common_cff.trackVars

Definition at line 35 of file leptonTimeLifeInfo_common_cff.py.

◆ trackVarsPlots

leptonTimeLifeInfo_common_cff.trackVarsPlots

Definition at line 91 of file leptonTimeLifeInfo_common_cff.py.