CMS 3D CMS Logo

genVertex_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from PhysicsTools.NanoAOD.common_cff import Var,ExtVar
3 from PhysicsTools.NanoAOD.globalVariablesTableProducer_cfi import globalVariablesTableProducer
4 from PhysicsTools.NanoAOD.simpleXYZPointFlatTableProducer_cfi import simpleXYZPointFlatTableProducer
5 
6 genVertexTable = simpleXYZPointFlatTableProducer.clone(
7  src = cms.InputTag("genParticles:xyz0"),
8  name= cms.string("GenVtx"),
9  doc = cms.string("Gen vertex"),
10  variables = cms.PSet(
11  x = Var("X", float, doc="gen vertex x", precision=10),
12  y = Var("Y", float, doc="gen vertex y", precision=10),
13  z = Var("Z", float, doc="gen vertex z", precision=16),
14  )
15 )
16 
17 genVertexT0Table = globalVariablesTableProducer.clone(
18  name = cms.string("GenVtx"),
19  extension = cms.bool(True),
20  variables = cms.PSet(
21  t0 = ExtVar( cms.InputTag("genParticles:t0"), "float", doc = "gen vertex t0", precision=12),
22  )
23 )
24 
25 genVertexTablesTask = cms.Task(genVertexTable,genVertexT0Table)
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
Definition: common_cff.py:17
def ExtVar(tag, valtype, doc=None, precision=-1)
Definition: common_cff.py:28