1 import FWCore.ParameterSet.Config
as cms
3 selectedOfflinePrimaryVertices = cms.EDFilter(
"VertexSelector",
4 src = cms.InputTag(
'offlinePrimaryVertices'),
5 cut = cms.string(
"isValid & ndof > 4 & tracksSize > 0 & abs(z) <= 24 & abs(position.Rho) <= 2."),
6 filter = cms.bool(
False)
9 selectedOfflinePrimaryVerticesWithBS = selectedOfflinePrimaryVertices.clone()
10 selectedOfflinePrimaryVerticesWithBS.src = cms.InputTag(
'offlinePrimaryVerticesWithBS')
12 selectedPixelVertices = selectedOfflinePrimaryVertices.clone()
13 selectedPixelVertices.src = cms.InputTag(
'pixelVertices')
15 vertexAnalysis = cms.EDAnalyzer(
"PrimaryVertexAnalyzer4PUSlimmed",
16 use_only_charged_tracks = cms.untracked.bool(
True),
17 do_generic_sim_plots = cms.untracked.bool(
True),
18 verbose = cms.untracked.bool(
False),
19 root_folder = cms.untracked.string(
"Vertexing/PrimaryVertexV"),
20 trackingParticleCollection = cms.untracked.InputTag(
"mix",
"MergedTrackTruth"),
21 trackingVertexCollection = cms.untracked.InputTag(
"mix",
"MergedTrackTruth"),
22 trackAssociatorMap = cms.untracked.InputTag(
"trackingParticleRecoTrackAsssociation"),
23 vertexAssociator = cms.untracked.InputTag(
"VertexAssociatorByPositionAndTracks"),
24 vertexRecoCollections = cms.VInputTag(
"offlinePrimaryVertices",
25 "offlinePrimaryVerticesWithBS",
26 "selectedOfflinePrimaryVertices",
27 "selectedOfflinePrimaryVerticesWithBS",
31 vertexAnalysisTrackingOnly = vertexAnalysis.clone(
32 vertexRecoCollections = vertexAnalysis.vertexRecoCollections.value() + [
33 "firstStepPrimaryVerticesPreSplitting",
34 "firstStepPrimaryVertices" 37 from Configuration.Eras.Modifier_trackingLowPU_cff
import trackingLowPU
38 trackingLowPU.toModify(vertexAnalysisTrackingOnly, vertexRecoCollections = vertexAnalysis.vertexRecoCollections.value())
39 from Configuration.Eras.Modifier_trackingPhase2PU140_cff
import trackingPhase2PU140
40 trackingPhase2PU140.toModify(vertexAnalysisTrackingOnly,
41 vertexRecoCollections = vertexAnalysis.vertexRecoCollections.value() + [
42 "firstStepPrimaryVertices" 46 pixelVertexAnalysisTrackingOnly = vertexAnalysis.clone(
47 do_generic_sim_plots =
False,
48 trackAssociatorMap =
"trackingParticlePixelTrackAsssociation",
49 vertexRecoCollections = [
51 "selectedPixelVertices" 57 vertexAnalysisSelection = cms.Sequence(
58 cms.ignore(selectedOfflinePrimaryVertices)
59 + cms.ignore(selectedOfflinePrimaryVerticesWithBS)
64 vertexAnalysisSequence = cms.Sequence(
65 vertexAnalysisSelection
69 vertexAnalysisSequenceTrackingOnly = cms.Sequence(
70 vertexAnalysisSelection
71 + vertexAnalysisTrackingOnly
75 trackingParticlePixelTrackAsssociation = _trackingParticleRecoTrackAsssociation.clone(
76 label_tr =
"pixelTracks" 79 _vertexAnalysisSequenceTrackingOnly_trackingLowPU = vertexAnalysisSequenceTrackingOnly.copy()
80 _vertexAnalysisSequenceTrackingOnly_trackingLowPU += (
81 trackingParticlePixelTrackAsssociation
82 + selectedPixelVertices
83 + pixelVertexAnalysisTrackingOnly
85 trackingLowPU.toReplaceWith(vertexAnalysisSequenceTrackingOnly, _vertexAnalysisSequenceTrackingOnly_trackingLowPU)