File indexing completed on 2024-04-25 02:14:05
0001 import FWCore.ParameterSet.Config as cms
0002 from PhysicsTools.NanoAOD.common_cff import *
0003 from PhysicsTools.NanoAOD.simpleSecondaryVertexFlatTableProducer_cfi import simpleSecondaryVertexFlatTableProducer
0004
0005
0006
0007
0008
0009
0010 vertexTable = cms.EDProducer("VertexTableProducer",
0011 pvSrc = cms.InputTag("offlineSlimmedPrimaryVertices"),
0012 goodPvCut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"),
0013 pfcSrc = cms.InputTag("packedPFCandidates"),
0014 svSrc = cms.InputTag("linkedObjects", "vertices"),
0015 svCut = cms.string(""),
0016 dlenMin = cms.double(0),
0017 dlenSigMin = cms.double(3),
0018 pvName = cms.string("PV"),
0019 svName = cms.string("SV"),
0020 svDoc = cms.string("secondary vertices from IVF algorithm"),
0021 )
0022
0023 svCandidateTable = simpleSecondaryVertexFlatTableProducer.clone(
0024 src = cms.InputTag("vertexTable"),
0025 name = cms.string("SV"),
0026 extension = cms.bool(True),
0027 variables = cms.PSet(P4Vars,
0028 x = Var("position().x()", float, doc = "secondary vertex X position, in cm",precision=10),
0029 y = Var("position().y()", float, doc = "secondary vertex Y position, in cm",precision=10),
0030 z = Var("position().z()", float, doc = "secondary vertex Z position, in cm",precision=14),
0031 ndof = Var("vertexNdof()", float, doc = "number of degrees of freedom",precision=8),
0032 chi2 = Var("vertexNormalizedChi2()", float, doc = "reduced chi2, i.e. chi/ndof",precision=8),
0033 ntracks = Var("numberOfDaughters()", "uint8", doc = "number of tracks"),
0034 ),
0035 )
0036 svCandidateTable.variables.pt.precision=10
0037 svCandidateTable.variables.phi.precision=12
0038
0039
0040
0041 vertexTask = cms.Task()
0042
0043 vertexTablesTask = cms.Task( vertexTable, svCandidateTable )
0044