CMS 3D CMS Logo

vertices_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
4 
5 
6 ##################### User floats producers, selectors ##########################
7 
8 
9 ##################### Tables for final output and docs ##########################
10 vertexTable = cms.EDProducer("VertexTableProducer",
11  pvSrc = cms.InputTag("offlineSlimmedPrimaryVertices"),
12  goodPvCut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"),
13  svSrc = cms.InputTag("slimmedSecondaryVertices"),
14  svCut = cms.string(""),
15  dlenMin = cms.double(0),
16  dlenSigMin = cms.double(3),
17  storeCharge = cms.bool(True),
18  pvName = cms.string("PV"),
19  svName = cms.string("SV"),
20  svDoc = cms.string("secondary vertices from IVF algorithm"),
21 )
22 
23 svCandidateTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
24  src = cms.InputTag("vertexTable"),
25  cut = cms.string(""), #DO NOT further cut here, use vertexTable.svCut
26  name = cms.string("SV"),
27  singleton = cms.bool(False), # the number of entries is variable
28  extension = cms.bool(True),
29  variables = cms.PSet(P4Vars,
30  x = Var("position().x()", float, doc = "secondary vertex X position, in cm",precision=10),
31  y = Var("position().y()", float, doc = "secondary vertex Y position, in cm",precision=10),
32  z = Var("position().z()", float, doc = "secondary vertex Z position, in cm",precision=14),
33  ndof = Var("vertexNdof()", float, doc = "number of degrees of freedom",precision=8),
34  chi2 = Var("vertexNormalizedChi2()", float, doc = "reduced chi2, i.e. chi/ndof",precision=8),
35  ntracks = Var("numberOfDaughters()", "uint8", doc = "number of tracks"),
36  ),
37 )
38 
39 ## do not add SV_charge in nanoAODv8
40 (run2_nanoAOD_106Xv1 & ~run2_nanoAOD_devel).toModify(vertexTable , storeCharge = False)
41 
42 
43 
44 svCandidateTable.variables.pt.precision=10
45 svCandidateTable.variables.phi.precision=12
46 
47 
48 #before cross linking
49 vertexSequence = cms.Sequence()
50 #after cross linkining
51 vertexTables = cms.Sequence( vertexTable+svCandidateTable)
52 
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:20