CMS 3D CMS Logo

Functions | Variables
leptonTimeLifeInfo_common_cff Namespace Reference

Functions

def addExtendVertexInfo (process)
 
def addTimeLifeInfo (process)
 
def addTimeLifeInfoToElectrons (process)
 
def addTimeLifeInfoToMuons (process)
 
def addTimeLifeInfoToTaus (process)
 

Variables

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

Function Documentation

◆ addExtendVertexInfo()

def leptonTimeLifeInfo_common_cff.addExtendVertexInfo (   process)

Definition at line 236 of file leptonTimeLifeInfo_common_cff.py.

References common_cff.Var().

Referenced by addTimeLifeInfo().

236 def addExtendVertexInfo(process):
237  process.pvbsTable = simpleVertexFlatTableProducer.clone(
238  src = prod_common.pvSource,
239  name = "PVBS",
240  doc = "main primary vertex with beam-spot",
241  maxLen = 1,
242  variables = cms.PSet(
243  pvCovVars,
244  x = Var("position().x()", float, doc = "position x coordinate, in cm", precision = 10),
245  y = Var("position().y()", float, doc = "position y coordinate, in cm", precision = 10),
246  z = Var("position().z()", float, doc = "position z coordinate, in cm", precision = 16),
247  ndof = Var("ndof()", float, doc = "number of degrees of freedom", precision = 8),
248  chi2 = Var("normalizedChi2()", float, doc = "reduced chi2, i.e. chi2/ndof", precision = 8),
249  ),
250  )
251  process.pvbsTableTask = cms.Task(process.pvbsTable)
252  # refit PV with beam-spot constraint that is not present in Run-2 samples
253  if not hasattr(process,'refittedPV'):
254  setattr(process,'refittedPV',refittedPV)
255  _pvbsTableTaskRun2 = process.pvbsTableTask.copy()
256  _pvbsTableTaskRun2.add(process.refittedPV)
257  run2_nanoAOD_ANY.toReplaceWith(process.pvbsTableTask,
258  _pvbsTableTaskRun2)
259  process.vertexTablesTask.add(process.pvbsTableTask)
260  return process
261 
262 # Full
def Var(expr, valtype, doc=None, precision=-1)
Definition: common_cff.py:16

◆ addTimeLifeInfo()

def leptonTimeLifeInfo_common_cff.addTimeLifeInfo (   process)

◆ addTimeLifeInfoToElectrons()

def leptonTimeLifeInfo_common_cff.addTimeLifeInfoToElectrons (   process)

Definition at line 124 of file leptonTimeLifeInfo_common_cff.py.

Referenced by addTimeLifeInfo().

124 def addTimeLifeInfoToElectrons(process):
125  process.electronTimeLifeInfos = patElectronTimeLifeInfoProducer.clone(
126  src = process.electronTable.src,
127  selection = 'pt > 15',
128  pvSource = prod_common.pvSource,
129  pvChoice = prod_common.pvChoice
130  )
131  process.electronTimeLifeInfoTable = simpleCandidate2TrackTimeLifeInfoFlatTableProducer.clone(
132  name = process.electronTable.name,
133  src = process.electronTable.src,
134  doc = cms.string("Additional time-life info for non-prompt electrons"),
135  extension = True,
136  externalTypedVariables = electronVars
137  )
138  process.electronTimeLifeInfoTask = cms.Task(
139  process.electronTimeLifeInfos,
140  process.electronTimeLifeInfoTable
141  )
142  # refit PV with beam-spot constraint that is not present in Run-2 samples
143  if not hasattr(process,'refittedPV'):
144  setattr(process,'refittedPV',refittedPV)
145  _electronTimeLifeInfoTaskRun2 = process.electronTimeLifeInfoTask.copy()
146  _electronTimeLifeInfoTaskRun2.add(process.refittedPV)
147  run2_nanoAOD_ANY.toReplaceWith(process.electronTimeLifeInfoTask,
148  _electronTimeLifeInfoTaskRun2)
149  process.electronTablesTask.add(process.electronTimeLifeInfoTask)
150  # add DQM plots if needed
151  if hasattr(process,'nanoDQM'):
152  process.nanoDQM.vplots.Electron.plots.extend(ipVarsPlots)
153  process.nanoDQM.vplots.Electron.plots.extend(trackVarsPlots)
154  return process
155 
156 # muons

◆ addTimeLifeInfoToMuons()

def leptonTimeLifeInfo_common_cff.addTimeLifeInfoToMuons (   process)

Definition at line 163 of file leptonTimeLifeInfo_common_cff.py.

Referenced by addTimeLifeInfo().

163 def addTimeLifeInfoToMuons(process):
164  process.muonTimeLifeInfos = patMuonTimeLifeInfoProducer.clone(
165  src = process.muonTable.src,
166  selection = 'pt > 15',
167  pvSource = prod_common.pvSource,
168  pvChoice = prod_common.pvChoice
169  )
170  process.muonTimeLifeInfoTable = simpleCandidate2TrackTimeLifeInfoFlatTableProducer.clone(
171  name = process.muonTable.name,
172  src = process.muonTable.src,
173  doc = cms.string("Additional time-life info for non-prompt muon"),
174  extension = True,
175  externalTypedVariables = muonVars
176  )
177  process.muonTimeLifeInfoTask = cms.Task(
178  process.muonTimeLifeInfos,
179  process.muonTimeLifeInfoTable
180  )
181  # refit PV with beam-spot constraint that is not present in Run-2 samples
182  if not hasattr(process,'refittedPV'):
183  setattr(process,'refittedPV',refittedPV)
184  _muonTimeLifeInfoTaskRun2 = process.muonTimeLifeInfoTask.copy()
185  _muonTimeLifeInfoTaskRun2.add(process.refittedPV)
186  run2_nanoAOD_ANY.toReplaceWith(process.muonTimeLifeInfoTask,
187  _muonTimeLifeInfoTaskRun2)
188  process.muonTablesTask.add(process.muonTimeLifeInfoTask)
189  # add DQM plots if needed
190  if hasattr(process,'nanoDQM'):
191  process.nanoDQM.vplots.Muon.plots.extend(ipVarsPlots)
192  process.nanoDQM.vplots.Muon.plots.extend(trackVarsPlots)
193  return process
194 
195 # taus

◆ addTimeLifeInfoToTaus()

def leptonTimeLifeInfo_common_cff.addTimeLifeInfoToTaus (   process)

Definition at line 203 of file leptonTimeLifeInfo_common_cff.py.

Referenced by addTimeLifeInfo().

203 def addTimeLifeInfoToTaus(process):
204  process.tauTimeLifeInfos = patTauTimeLifeInfoProducer.clone(
205  src = process.tauTable.src,
206  pvSource = prod_common.pvSource,
207  pvChoice = prod_common.pvChoice
208  )
209  process.tauTimeLifeInfoTable = simpleCandidate2TrackTimeLifeInfoFlatTableProducer.clone(
210  name = process.tauTable.name,
211  src = process.tauTable.src,
212  doc = cms.string("Additional tau time-life info"),
213  extension = True,
214  externalTypedVariables = tauVars
215  )
216  process.tauTimeLifeInfoTask = cms.Task(
217  process.tauTimeLifeInfos,
218  process.tauTimeLifeInfoTable
219  )
220  # refit PV with beam-spot constraint that is not present in Run-2 samples
221  if not hasattr(process,'refittedPV'):
222  setattr(process,'refittedPV',refittedPV)
223  _tauTimeLifeInfoTaskRun2 = process.tauTimeLifeInfoTask.copy()
224  _tauTimeLifeInfoTaskRun2.add(process.refittedPV)
225  run2_nanoAOD_ANY.toReplaceWith(process.tauTimeLifeInfoTask,
226  _tauTimeLifeInfoTaskRun2)
227  process.tauTablesTask.add(process.tauTimeLifeInfoTask)
228  # add DQM plots if needed
229  if hasattr(process,'nanoDQM'):
230  process.nanoDQM.vplots.Tau.plots.extend(ipVarsPlots)
231  process.nanoDQM.vplots.Tau.plots.extend(trackVarsPlots)
232  process.nanoDQM.vplots.Tau.plots.extend(svVarsPlots)
233  return process
234 
235 # Vertices

Variable Documentation

◆ bField_z

leptonTimeLifeInfo_common_cff.bField_z

Definition at line 40 of file leptonTimeLifeInfo_common_cff.py.

◆ bool

leptonTimeLifeInfo_common_cff.bool

Definition at line 51 of file leptonTimeLifeInfo_common_cff.py.

◆ doc

leptonTimeLifeInfo_common_cff.doc

Definition at line 25 of file leptonTimeLifeInfo_common_cff.py.

◆ electronVars

leptonTimeLifeInfo_common_cff.electronVars

Definition at line 118 of file leptonTimeLifeInfo_common_cff.py.

◆ float

leptonTimeLifeInfo_common_cff.float

Definition at line 25 of file leptonTimeLifeInfo_common_cff.py.

◆ hasRefitSV

leptonTimeLifeInfo_common_cff.hasRefitSV

Definition at line 51 of file leptonTimeLifeInfo_common_cff.py.

◆ ipLength

leptonTimeLifeInfo_common_cff.ipLength

Definition at line 25 of file leptonTimeLifeInfo_common_cff.py.

◆ ipLengthSig

leptonTimeLifeInfo_common_cff.ipLengthSig

Definition at line 26 of file leptonTimeLifeInfo_common_cff.py.

◆ ipVars

leptonTimeLifeInfo_common_cff.ipVars

Definition at line 24 of file leptonTimeLifeInfo_common_cff.py.

◆ ipVarsPlots

leptonTimeLifeInfo_common_cff.ipVarsPlots

Definition at line 82 of file leptonTimeLifeInfo_common_cff.py.

◆ IPx

leptonTimeLifeInfo_common_cff.IPx

◆ IPy

leptonTimeLifeInfo_common_cff.IPy

◆ IPz

leptonTimeLifeInfo_common_cff.IPz

Definition at line 29 of file leptonTimeLifeInfo_common_cff.py.

◆ jistr

leptonTimeLifeInfo_common_cff.jistr

Definition at line 45 of file leptonTimeLifeInfo_common_cff.py.

◆ muonVars

leptonTimeLifeInfo_common_cff.muonVars

Definition at line 157 of file leptonTimeLifeInfo_common_cff.py.

◆ precision

leptonTimeLifeInfo_common_cff.precision

Definition at line 25 of file leptonTimeLifeInfo_common_cff.py.

◆ prod_common

leptonTimeLifeInfo_common_cff.prod_common

Definition at line 18 of file leptonTimeLifeInfo_common_cff.py.

◆ pvChoice

leptonTimeLifeInfo_common_cff.pvChoice

Definition at line 20 of file leptonTimeLifeInfo_common_cff.py.

◆ pvCovVars

leptonTimeLifeInfo_common_cff.pvCovVars

Definition at line 68 of file leptonTimeLifeInfo_common_cff.py.

◆ pvSource

leptonTimeLifeInfo_common_cff.pvSource

Definition at line 19 of file leptonTimeLifeInfo_common_cff.py.

◆ refitSVchi2

leptonTimeLifeInfo_common_cff.refitSVchi2

Definition at line 55 of file leptonTimeLifeInfo_common_cff.py.

◆ refitSVndof

leptonTimeLifeInfo_common_cff.refitSVndof

Definition at line 56 of file leptonTimeLifeInfo_common_cff.py.

◆ refitSVx

leptonTimeLifeInfo_common_cff.refitSVx

Definition at line 52 of file leptonTimeLifeInfo_common_cff.py.

◆ refitSVy

leptonTimeLifeInfo_common_cff.refitSVy

Definition at line 53 of file leptonTimeLifeInfo_common_cff.py.

◆ refitSVz

leptonTimeLifeInfo_common_cff.refitSVz

Definition at line 54 of file leptonTimeLifeInfo_common_cff.py.

◆ refittedPV

leptonTimeLifeInfo_common_cff.refittedPV

Definition at line 75 of file leptonTimeLifeInfo_common_cff.py.

◆ srcVertices

leptonTimeLifeInfo_common_cff.srcVertices

Definition at line 76 of file leptonTimeLifeInfo_common_cff.py.

◆ svVars

leptonTimeLifeInfo_common_cff.svVars

Definition at line 49 of file leptonTimeLifeInfo_common_cff.py.

◆ svVarsPlots

leptonTimeLifeInfo_common_cff.svVarsPlots

Definition at line 101 of file leptonTimeLifeInfo_common_cff.py.

◆ tauVars

◆ track_dsz

leptonTimeLifeInfo_common_cff.track_dsz

Definition at line 39 of file leptonTimeLifeInfo_common_cff.py.

◆ track_dxy

leptonTimeLifeInfo_common_cff.track_dxy

Definition at line 38 of file leptonTimeLifeInfo_common_cff.py.

◆ track_lambda

leptonTimeLifeInfo_common_cff.track_lambda

Definition at line 35 of file leptonTimeLifeInfo_common_cff.py.

◆ track_phi

◆ track_qoverp

leptonTimeLifeInfo_common_cff.track_qoverp

Definition at line 34 of file leptonTimeLifeInfo_common_cff.py.

◆ trackVars

leptonTimeLifeInfo_common_cff.trackVars

Definition at line 33 of file leptonTimeLifeInfo_common_cff.py.

◆ trackVarsPlots

leptonTimeLifeInfo_common_cff.trackVarsPlots

Definition at line 89 of file leptonTimeLifeInfo_common_cff.py.