1 import FWCore.ParameterSet.Config
as cms
3 from PhysicsTools.NanoAOD.globalVariablesTableProducer_cfi
import globalVariablesTableProducer
4 from PhysicsTools.NanoAOD.simpleXYZPointFlatTableProducer_cfi
import simpleXYZPointFlatTableProducer
6 genVertexTable = simpleXYZPointFlatTableProducer.clone(
7 src = cms.InputTag(
"genParticles:xyz0"),
8 name= cms.string(
"GenVtx"),
9 doc = cms.string(
"Gen vertex"),
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),
17 genVertexT0Table = globalVariablesTableProducer.clone(
18 name = cms.string(
"GenVtx"),
19 extension = cms.bool(
True),
21 t0 =
ExtVar( cms.InputTag(
"genParticles:t0"),
"float", doc =
"gen vertex t0", precision=12),
25 genVertexTablesTask = cms.Task(genVertexTable,genVertexT0Table)
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
def ExtVar(tag, valtype, doc=None, precision=-1)