CMS 3D CMS Logo

HIBestVertexSequences_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # sort by number of tracks and keep the best
4 hiBestAdaptiveVertex = cms.EDFilter("HIBestVertexSelection",
5  src = cms.InputTag("hiPixelAdaptiveVertex"),
6  maxNumber = cms.uint32(1)
7 )
8 
9 # select best of precise vertex, fast vertex, and beamspot
10 hiSelectedPixelVertex = cms.EDProducer("HIBestVertexProducer",
11  beamSpotLabel = cms.InputTag("offlineBeamSpot"),
12  adaptiveVertexCollection = cms.InputTag("hiBestAdaptiveVertex"),
13  medianVertexCollection = cms.InputTag("hiPixelMedianVertex"),
14  useFinalAdaptiveVertexCollection = cms.bool(False),
15 )
16 
17 # best vertex sequence
18 bestHiVertex = cms.Sequence( hiBestAdaptiveVertex * hiSelectedPixelVertex ) # vertexing run BEFORE tracking
19 
21 hiOfflinePrimaryVertices=hiPixelAdaptiveVertex.clone( # vertexing run AFTER tracking
22  TrackLabel = cms.InputTag("hiGeneralTracks"),
23 
24  TkFilterParameters = cms.PSet(
25  algorithm = cms.string('filterWithThreshold'),
26  maxNormalizedChi2 = cms.double(5.0),
27  minPixelLayersWithHits=cms.int32(3), #0 missing pix hit (Run 1 pixels)
28  minSiliconLayersWithHits = cms.int32(5),#at least 8 (3pix+5strip) hits total
29  maxD0Significance = cms.double(3.0), #default is 5.0 in pp; 3.0 here suppresses split vtxs
30  minPt = cms.double(0.0),
31  maxEta = cms.double(100.),
32  trackQuality = cms.string("any"),
33  numTracksThreshold = cms.int32(2)
34  )
35 )
36 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
37 trackingPhase1.toModify(hiOfflinePrimaryVertices,
38  TkFilterParameters = dict (minPixelLayersWithHits = 4, minSiliconLayersWithHits = 4)
39  #Phase 1 requires 8 hits total, but 4 from pixels, 4 from strips now instead of 3 and 5
40 )
41 
42 hiBestOfflinePrimaryVertex = cms.EDFilter("HIBestVertexSelection",
43  src = cms.InputTag("hiOfflinePrimaryVertices"),
44  maxNumber = cms.uint32(1)
45 )
46 # select best of precise vertex, fast vertex, and beamspot
47 hiSelectedVertex = hiSelectedPixelVertex.clone(
48  useFinalAdaptiveVertexCollection = cms.bool(True),
49  finalAdaptiveVertexCollection = cms.InputTag("hiBestOfflinePrimaryVertex")
50 )
51 bestFinalHiVertex = cms.Sequence(hiOfflinePrimaryVertices * hiBestOfflinePrimaryVertex * hiSelectedVertex ) # vertexing run AFTER tracking