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_trackingPhase1PU70_cff
import trackingPhase1PU70
40 trackingPhase1PU70.toModify(vertexAnalysisTrackingOnly, vertexRecoCollections = vertexAnalysis.vertexRecoCollections.value())
41 from Configuration.Eras.Modifier_trackingPhase2PU140_cff
import trackingPhase2PU140
42 trackingPhase2PU140.toModify(vertexAnalysisTrackingOnly, vertexRecoCollections = vertexAnalysis.vertexRecoCollections.value())
44 pixelVertexAnalysisTrackingOnly = vertexAnalysis.clone(
45 do_generic_sim_plots =
False,
46 trackAssociatorMap =
"trackingParticlePixelTrackAsssociation",
47 vertexRecoCollections = [
49 "selectedPixelVertices" 55 vertexAnalysisSelection = cms.Sequence(
56 cms.ignore(selectedOfflinePrimaryVertices)
57 + cms.ignore(selectedOfflinePrimaryVerticesWithBS)
62 vertexAnalysisSequence = cms.Sequence(
63 vertexAnalysisSelection
67 vertexAnalysisSequenceTrackingOnly = cms.Sequence(
68 vertexAnalysisSelection
69 + vertexAnalysisTrackingOnly
73 trackingParticlePixelTrackAsssociation = _trackingParticleRecoTrackAsssociation.clone(
74 label_tr =
"pixelTracks" 77 _vertexAnalysisSequenceTrackingOnly_trackingLowPU = vertexAnalysisSequenceTrackingOnly.copy()
78 _vertexAnalysisSequenceTrackingOnly_trackingLowPU += (
79 trackingParticlePixelTrackAsssociation
80 + selectedPixelVertices
81 + pixelVertexAnalysisTrackingOnly
83 trackingLowPU.toReplaceWith(vertexAnalysisSequenceTrackingOnly, _vertexAnalysisSequenceTrackingOnly_trackingLowPU)
84 trackingPhase1PU70.toReplaceWith(vertexAnalysisSequenceTrackingOnly, _vertexAnalysisSequenceTrackingOnly_trackingLowPU)
85 trackingPhase2PU140.toReplaceWith(vertexAnalysisSequenceTrackingOnly, _vertexAnalysisSequenceTrackingOnly_trackingLowPU)