Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:07:34

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 selectedOfflinePrimaryVertices = cms.EDFilter("VertexSelector",
0004                                                src = cms.InputTag('offlinePrimaryVertices'),
0005                                                cut = cms.string("isValid & ndof > 4 & tracksSize > 0 & abs(z) <= 24 & abs(position.Rho) <= 2."),
0006                                                filter = cms.bool(False)
0007 )
0008 
0009 selectedOfflinePrimaryVerticesWithBS = selectedOfflinePrimaryVertices.clone(
0010   src = 'offlinePrimaryVerticesWithBS'
0011 )
0012 selectedPixelVertices = selectedOfflinePrimaryVertices.clone(
0013   src = 'pixelVertices'
0014 )
0015 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0016 vertexAnalysis = DQMEDAnalyzer('PrimaryVertexAnalyzer4PUSlimmed',
0017                                 use_only_charged_tracks = cms.untracked.bool(True),
0018                                 do_generic_sim_plots = cms.untracked.bool(True),
0019                                 verbose = cms.untracked.bool(False),
0020                                 root_folder = cms.untracked.string("Vertexing/PrimaryVertexV"),
0021                                 trackingParticleCollection = cms.untracked.InputTag("mix", "MergedTrackTruth"),
0022                                 trackingVertexCollection = cms.untracked.InputTag("mix", "MergedTrackTruth"),
0023                                 trackAssociatorMap = cms.untracked.InputTag("trackingParticleRecoTrackAsssociation"),
0024                                 vertexAssociator = cms.untracked.InputTag("VertexAssociatorByPositionAndTracks"),
0025                                 vertexRecoCollections = cms.VInputTag("offlinePrimaryVertices",
0026                                                                       "offlinePrimaryVerticesWithBS",
0027                                                                       "selectedOfflinePrimaryVertices",
0028                                                                       "selectedOfflinePrimaryVerticesWithBS"
0029                                                                       ),
0030                                nPUbins = cms.uint32(130)
0031 )
0032 
0033 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
0034 phase2_tracker.toModify( vertexAnalysis,
0035                          nPUbins = 250 )
0036 
0037 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
0038 premix_stage2.toModify(vertexAnalysis,
0039     trackingParticleCollection = "mixData:MergedTrackTruth",
0040     trackingVertexCollection = "mixData:MergedTrackTruth",
0041 )
0042 
0043 vertexAnalysisTrackingOnly = vertexAnalysis.clone(
0044     vertexRecoCollections = vertexAnalysis.vertexRecoCollections.value() + [
0045         "firstStepPrimaryVerticesPreSplitting",
0046         "firstStepPrimaryVertices"
0047     ]
0048 )
0049 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
0050 trackingLowPU.toModify(vertexAnalysisTrackingOnly, vertexRecoCollections = vertexAnalysis.vertexRecoCollections.value())
0051 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
0052 trackingPhase2PU140.toModify(vertexAnalysisTrackingOnly,
0053     vertexRecoCollections = vertexAnalysis.vertexRecoCollections.value() + [
0054         "firstStepPrimaryVertices"
0055     ]
0056 )
0057 
0058 pixelVertexAnalysisTrackingOnly = vertexAnalysis.clone(
0059     do_generic_sim_plots = False,
0060     trackAssociatorMap = "trackingParticlePixelTrackAsssociation",
0061     vertexAssociator = "PixelVertexAssociatorByPositionAndTracks",
0062     vertexRecoCollections = [
0063         "pixelVertices",
0064         "selectedPixelVertices"
0065     ]
0066 )
0067 pixelVertexAnalysisPixelTrackingOnly = pixelVertexAnalysisTrackingOnly.clone(
0068     do_generic_sim_plots = True,
0069 )
0070 
0071 ##########
0072 
0073 vertexAnalysisSelection = cms.Sequence(
0074     cms.ignore(selectedOfflinePrimaryVertices)
0075     + cms.ignore(selectedOfflinePrimaryVerticesWithBS)
0076 )
0077 
0078 ##########
0079 
0080 vertexAnalysisSequence = cms.Sequence(
0081     vertexAnalysisSelection
0082     + vertexAnalysis
0083 )
0084 
0085 vertexAnalysisSequenceTrackingOnly = cms.Sequence(
0086     vertexAnalysisSelection
0087     + vertexAnalysisTrackingOnly
0088 )
0089 
0090 _vertexAnalysisSequenceTrackingOnly_trackingLowPU = vertexAnalysisSequenceTrackingOnly.copy()
0091 _vertexAnalysisSequenceTrackingOnly_trackingLowPU += (
0092     selectedPixelVertices
0093     + pixelVertexAnalysisTrackingOnly
0094 )
0095 trackingLowPU.toReplaceWith(vertexAnalysisSequenceTrackingOnly, _vertexAnalysisSequenceTrackingOnly_trackingLowPU)
0096 
0097 vertexAnalysisSequencePixelTrackingOnly = cms.Sequence(
0098     selectedPixelVertices
0099     + pixelVertexAnalysisPixelTrackingOnly
0100 )
0101 
0102 
0103 
0104 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
0105 _vertexRecoCollectionsTiming = cms.VInputTag("offlinePrimaryVertices",
0106                                              "offlinePrimaryVerticesWithBS",
0107                                              "selectedOfflinePrimaryVertices",
0108                                              "selectedOfflinePrimaryVerticesWithBS",
0109                                              "offlinePrimaryVertices4D",
0110                                              "selectedOfflinePrimaryVertices4D",
0111                                              )
0112 selectedOfflinePrimaryVertices4D = selectedOfflinePrimaryVertices.clone(src = cms.InputTag("offlinePrimaryVertices4D"))
0113 
0114 _vertexAnalysisSelectionTiming = vertexAnalysisSelection.copy()
0115 _vertexAnalysisSelectionTiming += selectedOfflinePrimaryVertices4D
0116 
0117 phase2_timing_layer.toModify( vertexAnalysis, 
0118                               vertexRecoCollections = _vertexRecoCollectionsTiming
0119                               )
0120 phase2_timing_layer.toReplaceWith( vertexAnalysisSelection,
0121                                    _vertexAnalysisSelectionTiming )