CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
4 
5 genVertexTable = cms.EDProducer("SimpleXYZPointFlatTableProducer",
6  src = cms.InputTag("genParticles:xyz0"),
7  cut = cms.string(""),
8  name= cms.string("GenVtx"),
9  doc = cms.string("Gen vertex"),
10  singleton = cms.bool(True),
11  extension = cms.bool(False),
12  variables = cms.PSet(
13  x = Var("X", float, doc="gen vertex x", precision=10),
14  y = Var("Y", float, doc="gen vertex y", precision=10),
15  z = Var("Z", float, doc="gen vertex z", precision=16),
16  )
17 )
18 
19 genVertexT0Table = cms.EDProducer("GlobalVariablesTableProducer",
20  name = cms.string("GenVtx"),
21  extension = cms.bool(True),
22  variables = cms.PSet(
23  t0 = ExtVar( cms.InputTag("genParticles:t0"), "float", doc = "gen vertex t0", precision=12),
24  )
25 )
26 
27 genVertexTablesTask = cms.Task(genVertexTable,genVertexT0Table)
28 
29 # GenVertex only stored in newer MiniAOD
30 (run2_nanoAOD_92X | run2_miniAOD_80XLegacy | run2_nanoAOD_94X2016 | run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94XMiniAODv2 | run2_nanoAOD_102Xv1).toReplaceWith(genVertexTablesTask, cms.Task())
def ExtVar
Definition: common_cff.py:31