Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-29 01:21:40

0001 import FWCore.ParameterSet.Config as cms
0002 from  PhysicsTools.NanoAOD.common_cff import *
0003 
0004 
0005 
0006 ##################### User floats producers, selectors ##########################
0007 
0008 
0009 ##################### Tables for final output and docs ##########################
0010 vertexTable = cms.EDProducer("VertexTableProducer",
0011     pvSrc = cms.InputTag("offlineSlimmedPrimaryVertices"),
0012     goodPvCut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"), 
0013     svSrc = cms.InputTag("slimmedSecondaryVertices"),
0014     svCut = cms.string(""),
0015     dlenMin = cms.double(0),
0016     dlenSigMin = cms.double(3),
0017     pvName = cms.string("PV"),
0018     svName = cms.string("SV"),
0019     svDoc  = cms.string("secondary vertices from IVF algorithm"),
0020 )
0021 
0022 svCandidateTable =  cms.EDProducer("SimpleCandidateFlatTableProducer",
0023     src = cms.InputTag("vertexTable"),
0024     cut = cms.string(""),  #DO NOT further cut here, use vertexTable.svCut
0025     name = cms.string("SV"),
0026     singleton = cms.bool(False), # the number of entries is variable
0027     extension = cms.bool(True), 
0028     variables = cms.PSet(P4Vars,
0029         x   = Var("position().x()", float, doc = "secondary vertex X position, in cm",precision=10),
0030         y   = Var("position().y()", float, doc = "secondary vertex Y position, in cm",precision=10),
0031         z   = Var("position().z()", float, doc = "secondary vertex Z position, in cm",precision=14),
0032         ndof    = Var("vertexNdof()", float, doc = "number of degrees of freedom",precision=8),
0033         chi2    = Var("vertexNormalizedChi2()", float, doc = "reduced chi2, i.e. chi/ndof",precision=8),
0034         ntracks = Var("numberOfDaughters()", "uint8", doc = "number of tracks"),
0035     ),
0036 )
0037 svCandidateTable.variables.pt.precision=10
0038 svCandidateTable.variables.phi.precision=12
0039 
0040 
0041 #before cross linking
0042 vertexTask = cms.Task()
0043 #after cross linkining
0044 vertexTablesTask = cms.Task( vertexTable, svCandidateTable )
0045