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)
87 from Configuration.Eras.Modifier_phase2_timing_layer_cff
import phase2_timing_layer
88 _vertexRecoCollectionsTiming = cms.VInputTag(
"offlinePrimaryVertices",
89 "offlinePrimaryVerticesWithBS",
90 "selectedOfflinePrimaryVertices",
91 "selectedOfflinePrimaryVerticesWithBS",
92 "offlinePrimaryVertices4D",
93 "selectedOfflinePrimaryVertices4D",
95 selectedOfflinePrimaryVertices4D = selectedOfflinePrimaryVertices.clone(src = cms.InputTag(
"offlinePrimaryVertices4D"))
97 _vertexAnalysisSelectionTiming = vertexAnalysisSelection.copy()
98 _vertexAnalysisSelectionTiming += selectedOfflinePrimaryVertices4D
100 phase2_timing_layer.toModify( vertexAnalysis,
101 vertexRecoCollections = _vertexRecoCollectionsTiming
103 phase2_timing_layer.toReplaceWith( vertexAnalysisSelection,
104 _vertexAnalysisSelectionTiming )