CMS 3D CMS Logo

vertices_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 from PhysicsTools.NanoAOD.simpleSecondaryVertexFlatTableProducer_cfi import simpleSecondaryVertexFlatTableProducer
4 
5 
6 
7 
8 
9 
10 vertexTable = cms.EDProducer("VertexTableProducer",
11  pvSrc = cms.InputTag("offlineSlimmedPrimaryVertices"),
12  goodPvCut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"),
13  pfcSrc = cms.InputTag("packedPFCandidates"),
14  svSrc = cms.InputTag("linkedObjects", "vertices"),
15  svCut = cms.string(""), # careful: adding a cut here would make the collection matching inconsistent with the SV table
16  dlenMin = cms.double(0),
17  dlenSigMin = cms.double(3),
18  pvName = cms.string("PV"),
19  svName = cms.string("SV"),
20  svDoc = cms.string("secondary vertices from IVF algorithm"),
21 )
22 
23 svCandidateTable = simpleSecondaryVertexFlatTableProducer.clone(
24  src = cms.InputTag("vertexTable"),
25  name = cms.string("SV"),
26  extension = cms.bool(True),
27  variables = cms.PSet(P4Vars,
28  x = Var("position().x()", float, doc = "secondary vertex X position, in cm",precision=10),
29  y = Var("position().y()", float, doc = "secondary vertex Y position, in cm",precision=10),
30  z = Var("position().z()", float, doc = "secondary vertex Z position, in cm",precision=14),
31  ndof = Var("vertexNdof()", float, doc = "number of degrees of freedom",precision=8),
32  chi2 = Var("vertexNormalizedChi2()", float, doc = "reduced chi2, i.e. chi/ndof",precision=8),
33  ntracks = Var("numberOfDaughters()", "uint8", doc = "number of tracks"),
34  ),
35 )
36 svCandidateTable.variables.pt.precision=10
37 svCandidateTable.variables.phi.precision=12
38 
39 
40 #before cross linking
41 vertexTask = cms.Task()
42 #after cross linkining
43 vertexTablesTask = cms.Task( vertexTable, svCandidateTable )
44 
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
Definition: common_cff.py:17