Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:34:47

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # sort by number of tracks and keep the best
0004 hiBestAdaptiveVertex = cms.EDFilter("HIBestVertexSelection",
0005     src = cms.InputTag("hiPixelAdaptiveVertex"),
0006     maxNumber = cms.uint32(1)
0007 )
0008 
0009 # select best of precise vertex, fast vertex, and beamspot
0010 hiSelectedPixelVertex = cms.EDProducer("HIBestVertexProducer",
0011     beamSpotLabel = cms.InputTag("offlineBeamSpot"),
0012     adaptiveVertexCollection = cms.InputTag("hiBestAdaptiveVertex"),
0013     medianVertexCollection = cms.InputTag("hiPixelMedianVertex"),
0014     useFinalAdaptiveVertexCollection = cms.bool(False),
0015 )
0016 
0017 # best vertex sequence
0018 bestHiVertexTask = cms.Task( hiBestAdaptiveVertex , hiSelectedPixelVertex ) # vertexing run BEFORE tracking
0019 
0020 from RecoHI.HiTracking.HIPixelAdaptiveVertex_cfi import *
0021 hiOfflinePrimaryVertices=hiPixelAdaptiveVertex.clone( # vertexing run AFTER tracking
0022     TrackLabel = "hiGeneralTracks",
0023                                        
0024     TkFilterParameters = cms.PSet(
0025     algorithm                = cms.string('filterWithThreshold'),
0026         maxNormalizedChi2        = cms.double(5.0),
0027         minPixelLayersWithHits   = cms.int32(3),   #0 missing pix hit (Run 1 pixels)
0028         minSiliconLayersWithHits = cms.int32(5), #at least 8 (3pix+5strip) hits total
0029         maxD0Significance        = cms.double(3.0),      #default is 5.0 in pp; 3.0 here suppresses split vtxs
0030         minPt                    = cms.double(0.0),
0031         maxEta                   = cms.double(100.),               
0032         trackQuality             = cms.string("any"),
0033         numTracksThreshold       = cms.int32(2)
0034     )
0035 )
0036 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
0037 trackingPhase1.toModify(hiOfflinePrimaryVertices,
0038     TkFilterParameters = dict (minPixelLayersWithHits = 4, minSiliconLayersWithHits = 4) 
0039     #Phase 1 requires 8 hits total, but 4 from pixels, 4 from strips now instead of 3 and 5
0040 )
0041 
0042 hiBestOfflinePrimaryVertex = cms.EDFilter("HIBestVertexSelection",
0043     src = cms.InputTag("hiOfflinePrimaryVertices"),
0044     maxNumber = cms.uint32(1)
0045 )
0046 # select best of precise vertex, fast vertex, and beamspot
0047 hiSelectedVertex = hiSelectedPixelVertex.clone(
0048     useFinalAdaptiveVertexCollection = True,
0049     finalAdaptiveVertexCollection = cms.InputTag("hiBestOfflinePrimaryVertex")
0050 )
0051 bestFinalHiVertexTask = cms.Task(hiOfflinePrimaryVertices , hiBestOfflinePrimaryVertex , hiSelectedVertex )