Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:12

0001 import FWCore.ParameterSet.Config as cms
0002 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
0003 import RecoTracker.IterativeTracking.iterativeTkUtils as _utils
0004 
0005 ### load which are the tracks collection 2 be monitored
0006 from DQM.TrackingMonitorSource.TrackCollections2monitor_cff import *
0007 
0008 ### load the different flavour of settings of the TrackingMonitor module
0009 from DQM.TrackingMonitorSource.TrackerCollisionTrackingMonitor_cff import *
0010 
0011 #import DQM.TrackingMonitor.TrackerCosmicsTrackingMonitor_cfi
0012 import DQM.TrackingMonitor.TrackEfficiencyMonitor_cfi
0013 TrackMon_ckf                       = DQM.TrackingMonitor.TrackEfficiencyMonitor_cfi.TrackEffMon.clone()
0014 TrackMon_ckf.TKTrackCollection                     = 'generalTracks'#ctfWithMaterialTracksBeamHaloMuon'#rsWithMaterialTracksP5'#muons'#globalCosmicMuons'#ctfWithMaterialTracksP5'
0015 TrackMon_ckf.AlgoName                              = 'CKFTk'
0016 TrackMon_ckf.FolderName                            = 'Tracking/TrackParameters/TrackEfficiency'
0017 
0018 # Clone for RS Tracks
0019 #import DQM.TrackingMonitor.TrackEfficiencyMonitor_cfi
0020 #TrackEffMon_rs = DQM.TrackingMonitor.TrackEfficiencyMonitor_cfi.TrackEffMon.clone()
0021 #TrackEffMon_rs.TKTrackCollection                   = 'rsWithMaterialTracksP5'
0022 #TrackEffMon_rs.AlgoName                            = 'RSTk'
0023 #TrackEffMon_rs.FolderName                          = 'Tracking/TrackParameters/TrackEfficiency'
0024 
0025 # Clone for Beam Halo  Tracks
0026 #import DQM.TrackingMonitor.TrackEfficiencyMonitor_cfi
0027 #TrackEffMon_bhmuon = DQM.TrackingMonitor.TrackEfficiencyMonitor_cfi.TrackEffMon.clone()
0028 #TrackEffMon_bhmuon.TKTrackCollection               = 'ctfWithMaterialTracksBeamHaloMuon'
0029 #TrackEffMon_bhmuon.AlgoName                        = 'BHMuonTk'
0030 #TrackEffMon_bhmuon.FolderName                      = 'Tracking/TrackParameters/TrackEfficiency'
0031 
0032 # Split Tracking
0033 # from  DQM.TrackingMonitor.TrackSplittingMonitor_cfi import *
0034 # TrackSplitMonitor.FolderName = 'Tracking/TrackParameters/SplitTracks'
0035 
0036 
0037 # DQM Services
0038 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0039 dqmInfoTracking = DQMEDAnalyzer('DQMEventInfo',
0040      subSystemFolder = cms.untracked.string('Tracking')
0041 )
0042 
0043 
0044 ### define one EDAnalyzer per each track collection
0045 ### following suggestion 2. in
0046 ### https://hypernews.cern.ch/HyperNews/CMS/get/sw-develtools/1908/1.html
0047 for tracks in selectedTracks :
0048     label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
0049     locals()[label] = TrackerCollisionTrackMonCommon.clone()
0050     locals()[label].TrackProducer    = cms.InputTag(tracks)
0051     locals()[label].allTrackProducer = cms.InputTag(allTrackProducer[tracks])
0052     locals()[label].FolderName       = cms.string(mainfolderName[tracks])
0053     locals()[label].PVFolderName     = cms.string(vertexfolderName[tracks])
0054     locals()[label].TrackPtMin       = trackPtMin[tracks]
0055     locals()[label].TrackPtBin       = trackPtN[tracks]
0056     locals()[label].TrackPtMax       = trackPtMax[tracks]
0057     locals()[label].TrackPBin        = trackPtN[tracks]
0058     locals()[label].TrackPMin        = trackPtMin[tracks]
0059     locals()[label].TrackPMax        = trackPtMax[tracks]
0060     locals()[label].VZ_PVMax         = pcaZtoPVMax[tracks]
0061     locals()[label].VZ_PVMin         = pcaZtoPVMin[tracks]
0062     locals()[label].doDCAPlots       = doPlotsPCA[tracks]
0063     locals()[label].doDCAwrtPVPlots  = doPlotsPCA[tracks]
0064     locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks]
0065     locals()[label].doSIPPlots       = doPlotsPCA[tracks]
0066     locals()[label].numCut           = numCutString[tracks]
0067     locals()[label].denCut           = denCutString[tracks]
0068     locals()[label].doGoodTracksPlots                   = doGoodTracksPlots                   [tracks]
0069     locals()[label].doTrackerSpecific                   = doTrackerSpecific                   [tracks]
0070     locals()[label].doHitPropertiesPlots                = doHitPropertiesPlots                [tracks]
0071     locals()[label].doGeneralPropertiesPlots            = doGeneralPropertiesPlots            [tracks]
0072     locals()[label].doBeamSpotPlots                     = doBeamSpotPlots                     [tracks]
0073     locals()[label].doSeedParameterHistos               = doSeedParameterHistos               [tracks]
0074     locals()[label].doRecHitVsPhiVsEtaPerTrack          = doRecHitVsPhiVsEtaPerTrack          [tracks]
0075     locals()[label].doRecHitVsPtVsEtaPerTrack           = doRecHitVsPtVsEtaPerTrack           [tracks]
0076     locals()[label].doGoodTrackRecHitVsPhiVsEtaPerTrack = doGoodTrackRecHitVsPhiVsEtaPerTrack [tracks]
0077     locals()[label].doLayersVsPhiVsEtaPerTrack          = doLayersVsPhiVsEtaPerTrack          [tracks]
0078     locals()[label].doGoodTrackLayersVsPhiVsEtaPerTrack = doGoodTrackLayersVsPhiVsEtaPerTrack [tracks]
0079     locals()[label].doPUmonitoring                      = doPUmonitoring                      [tracks]
0080     locals()[label].doPlotsVsBXlumi                     = doPlotsVsBXlumi                     [tracks]
0081     locals()[label].doPlotsVsGoodPVtx                   = doPlotsVsGoodPVtx                   [tracks]
0082     locals()[label].doEffFromHitPatternVsPU             = doEffFromHitPatternVsPU             [tracks]
0083     locals()[label].doEffFromHitPatternVsLUMI           = doEffFromHitPatternVsLumi           [tracks]
0084     if tracks == 'generalTracks':
0085         locals()[label].doEffFromHitPatternVsBX = False
0086     else:
0087         locals()[label].doEffFromHitPatternVsBX = doEffFromHitPatternVsBX[tracks]
0088 #    locals()[label].doStopSource                        = doStopSource                        [tracks]    
0089     locals()[label].setLabel(label)
0090     
0091     # ZeroBias
0092     label = 'TrackerCollisionSelectedTrackMonMB' + str(tracks)                       
0093     locals()[label] = TrackerCollisionTrackMonMB.clone()
0094     locals()[label].TrackProducer    = cms.InputTag(tracks)
0095     locals()[label].FolderName       = cms.string(mainfolderName[tracks])
0096     locals()[label].PVFolderName     = cms.string(vertexfolderName[tracks])
0097     locals()[label].TrackPtMin       = trackPtMin[tracks]
0098     locals()[label].TrackPtBin       = trackPtN[tracks]
0099     locals()[label].TrackPtMax       = trackPtMax[tracks]
0100     locals()[label].TrackPBin        = trackPtN[tracks]
0101     locals()[label].TrackPMin        = trackPtMin[tracks]
0102     locals()[label].TrackPMax        = trackPtMax[tracks]
0103     locals()[label].VZ_PVMax         = pcaZtoPVMax[tracks]
0104     locals()[label].VZ_PVMin         = pcaZtoPVMin[tracks]
0105     locals()[label].doDCAPlots       = doPlotsPCA[tracks]
0106     locals()[label].doDCAwrtPVPlots  = doPlotsPCA[tracks]
0107     locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks]
0108     locals()[label].doSIPPlots       = doPlotsPCA[tracks]
0109     locals()[label].numCut           = numCutString[tracks]
0110     locals()[label].denCut           = denCutString[tracks]
0111     locals()[label].doGoodTracksPlots                   = doGoodTracksPlots                   [tracks]
0112     locals()[label].doTrackerSpecific                   = doTrackerSpecific                   [tracks]
0113     locals()[label].doHitPropertiesPlots                = doHitPropertiesPlots                [tracks]
0114     locals()[label].doGeneralPropertiesPlots            = doGeneralPropertiesPlots            [tracks]
0115     locals()[label].doBeamSpotPlots                     = doBeamSpotPlots                     [tracks]
0116     locals()[label].doSeedParameterHistos               = doSeedParameterHistos               [tracks]
0117     locals()[label].doRecHitVsPhiVsEtaPerTrack          = doRecHitVsPhiVsEtaPerTrack          [tracks]
0118     locals()[label].doRecHitVsPtVsEtaPerTrack           = doRecHitVsPtVsEtaPerTrack           [tracks]
0119     locals()[label].doGoodTrackRecHitVsPhiVsEtaPerTrack = doGoodTrackRecHitVsPhiVsEtaPerTrack [tracks]
0120     locals()[label].doLayersVsPhiVsEtaPerTrack          = doLayersVsPhiVsEtaPerTrack          [tracks]
0121     locals()[label].doGoodTrackLayersVsPhiVsEtaPerTrack = doGoodTrackLayersVsPhiVsEtaPerTrack [tracks]
0122     locals()[label].doPUmonitoring                      = doPUmonitoring                      [tracks]
0123     locals()[label].doPlotsVsBXlumi                     = doPlotsVsBXlumi                     [tracks]
0124     locals()[label].doPlotsVsGoodPVtx                   = doPlotsVsGoodPVtx                   [tracks]
0125     locals()[label].doPlotsVsLUMI                       = cms.bool(True)
0126     locals()[label].doPlotsVsBX                         = cms.bool(True)
0127     locals()[label].doEffFromHitPatternVsPU             = doEffFromHitPatternVsPU             [tracks]
0128     locals()[label].doEffFromHitPatternVsBX             = doEffFromHitPatternVsBX             [tracks]
0129     locals()[label].doEffFromHitPatternVsLUMI           = cms.bool(True)
0130     locals()[label].doStopSource                        = doStopSource                        [tracks]    
0131     locals()[label].setLabel(label)
0132 
0133     # ZeroBias, no hip, no OOT pu (1st collision after abort gap) ###
0134     label = 'TrackerCollisionSelectedTrackMonZBnoHIPnoOOT' + str(tracks)                       
0135     locals()[label] = TrackerCollisionTrackMonZBnoHIPnoOOT.clone()
0136     locals()[label].TrackProducer    = cms.InputTag(tracks)
0137     locals()[label].FolderName       = cms.string(mainfolderName[tracks]+"/noHIP_noOOT_INpu")
0138     locals()[label].PVFolderName     = cms.string(vertexfolderName[tracks]+"/noHIP_noOOT_INpu")
0139     locals()[label].TrackPtMin       = trackPtMin[tracks]
0140     locals()[label].TrackPtBin       = trackPtN[tracks]
0141     locals()[label].TrackPtMax       = trackPtMax[tracks]
0142     locals()[label].TrackPBin        = trackPtN[tracks]
0143     locals()[label].TrackPMin        = trackPtMin[tracks]
0144     locals()[label].TrackPMax        = trackPtMax[tracks]
0145     locals()[label].VZ_PVMax         = pcaZtoPVMax[tracks]
0146     locals()[label].VZ_PVMin         = pcaZtoPVMin[tracks]
0147     locals()[label].doDCAPlots       = doPlotsPCA[tracks]
0148     locals()[label].doDCAwrtPVPlots  = doPlotsPCA[tracks]
0149     locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks]
0150     locals()[label].doSIPPlots       = doPlotsPCA[tracks]
0151     locals()[label].numCut           = numCutString[tracks]
0152     locals()[label].denCut           = denCutString[tracks]
0153     locals()[label].doGoodTracksPlots                   = doGoodTracksPlots                   [tracks]
0154     locals()[label].doTrackerSpecific                   = doTrackerSpecific                   [tracks]
0155     locals()[label].doHitPropertiesPlots                = doHitPropertiesPlots                [tracks]
0156     locals()[label].doGeneralPropertiesPlots            = doGeneralPropertiesPlots            [tracks]
0157     locals()[label].doBeamSpotPlots                     = doBeamSpotPlots                     [tracks]
0158     locals()[label].doSeedParameterHistos               = doSeedParameterHistos               [tracks]
0159     locals()[label].doRecHitVsPhiVsEtaPerTrack          = doRecHitVsPhiVsEtaPerTrack          [tracks]
0160     locals()[label].doRecHitVsPtVsEtaPerTrack           = doRecHitVsPtVsEtaPerTrack           [tracks]
0161     locals()[label].doGoodTrackRecHitVsPhiVsEtaPerTrack = doGoodTrackRecHitVsPhiVsEtaPerTrack [tracks]
0162     locals()[label].doLayersVsPhiVsEtaPerTrack          = doLayersVsPhiVsEtaPerTrack          [tracks]
0163     locals()[label].doGoodTrackLayersVsPhiVsEtaPerTrack = doGoodTrackLayersVsPhiVsEtaPerTrack [tracks]
0164     locals()[label].doPUmonitoring                      = doPUmonitoring                      [tracks]
0165     locals()[label].doPlotsVsBXlumi                     = doPlotsVsBXlumi                     [tracks]
0166     locals()[label].doPlotsVsGoodPVtx                   = doPlotsVsGoodPVtx                   [tracks]
0167     locals()[label].doPlotsVsLUMI                       = cms.bool(True)
0168     locals()[label].doPlotsVsBX                         = cms.bool(True)
0169     locals()[label].doEffFromHitPatternVsPU             = doEffFromHitPatternVsPU             [tracks]
0170     locals()[label].doEffFromHitPatternVsBX             = doEffFromHitPatternVsBX             [tracks]
0171     locals()[label].doEffFromHitPatternVsLUMI           = False
0172     locals()[label].doStopSource                        = doStopSource                        [tracks]    
0173     locals()[label].setLabel(label)
0174 
0175     # ZeroBias, hip, no OOT pu (1st collision in train) ###
0176     label = 'TrackerCollisionSelectedTrackMonZBHIPnoOOT' + str(tracks)                       
0177     locals()[label] = TrackerCollisionTrackMonZBHIPnoOOT.clone()
0178     locals()[label].TrackProducer    = cms.InputTag(tracks)
0179     locals()[label].FolderName       = cms.string(mainfolderName[tracks]+"/HIP_noOOT_INpu")
0180     locals()[label].PVFolderName     = cms.string(vertexfolderName[tracks]+"/HIP_noOOT_INpu")
0181     locals()[label].TrackPtMin       = trackPtMin[tracks]
0182     locals()[label].TrackPtBin       = trackPtN[tracks]
0183     locals()[label].TrackPtMax       = trackPtMax[tracks]
0184     locals()[label].TrackPBin        = trackPtN[tracks]
0185     locals()[label].TrackPMin        = trackPtMin[tracks]
0186     locals()[label].TrackPMax        = trackPtMax[tracks]
0187     locals()[label].VZ_PVMax         = pcaZtoPVMax[tracks]
0188     locals()[label].VZ_PVMin         = pcaZtoPVMin[tracks]
0189     locals()[label].doDCAPlots       = doPlotsPCA[tracks]
0190     locals()[label].doDCAwrtPVPlots  = doPlotsPCA[tracks]
0191     locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks]
0192     locals()[label].doSIPPlots       = doPlotsPCA[tracks]
0193     locals()[label].numCut           = numCutString[tracks]
0194     locals()[label].denCut           = denCutString[tracks]
0195     locals()[label].doGoodTracksPlots                   = doGoodTracksPlots                   [tracks]
0196     locals()[label].doTrackerSpecific                   = doTrackerSpecific                   [tracks]
0197     locals()[label].doHitPropertiesPlots                = doHitPropertiesPlots                [tracks]
0198     locals()[label].doGeneralPropertiesPlots            = doGeneralPropertiesPlots            [tracks]
0199     locals()[label].doBeamSpotPlots                     = doBeamSpotPlots                     [tracks]
0200     locals()[label].doSeedParameterHistos               = doSeedParameterHistos               [tracks]
0201     locals()[label].doRecHitVsPhiVsEtaPerTrack          = doRecHitVsPhiVsEtaPerTrack          [tracks]
0202     locals()[label].doRecHitVsPtVsEtaPerTrack           = doRecHitVsPtVsEtaPerTrack           [tracks]
0203     locals()[label].doGoodTrackRecHitVsPhiVsEtaPerTrack = doGoodTrackRecHitVsPhiVsEtaPerTrack [tracks]
0204     locals()[label].doLayersVsPhiVsEtaPerTrack          = doLayersVsPhiVsEtaPerTrack          [tracks]
0205     locals()[label].doGoodTrackLayersVsPhiVsEtaPerTrack = doGoodTrackLayersVsPhiVsEtaPerTrack [tracks]
0206     locals()[label].doPUmonitoring                      = doPUmonitoring                      [tracks]
0207     locals()[label].doPlotsVsBXlumi                     = doPlotsVsBXlumi                     [tracks]
0208     locals()[label].doPlotsVsGoodPVtx                   = doPlotsVsGoodPVtx                   [tracks]
0209     locals()[label].doPlotsVsLUMI                       = cms.bool(True)
0210     locals()[label].doPlotsVsBX                         = cms.bool(True)
0211     locals()[label].doEffFromHitPatternVsPU             = doEffFromHitPatternVsPU             [tracks]
0212     locals()[label].doEffFromHitPatternVsBX             = doEffFromHitPatternVsBX             [tracks]
0213     locals()[label].doEffFromHitPatternVsLUMI           = False
0214     locals()[label].doStopSource                        = doStopSource                        [tracks]    
0215     locals()[label].setLabel(label)
0216 
0217 
0218     # ZeroBias, hip, OOT pu (1st collision after train) ###
0219     label = 'TrackerCollisionSelectedTrackMonZBHIPOOT' + str(tracks)                       
0220     locals()[label] = TrackerCollisionTrackMonZBHIPOOT.clone()
0221     locals()[label].TrackProducer    = cms.InputTag(tracks)
0222     locals()[label].FolderName       = cms.string(mainfolderName[tracks]+"/HIP_OOT_noINpu")
0223     locals()[label].PVFolderName     = cms.string(vertexfolderName[tracks]+"/HIP_OOT_noINpu")
0224     locals()[label].TrackPtMin       = trackPtMin[tracks]
0225     locals()[label].TrackPtBin       = trackPtN[tracks]
0226     locals()[label].TrackPtMax       = trackPtMax[tracks]
0227     locals()[label].TrackPBin        = trackPtN[tracks]
0228     locals()[label].TrackPMin        = trackPtMin[tracks]
0229     locals()[label].TrackPMax        = trackPtMax[tracks]
0230     locals()[label].VZ_PVMax         = pcaZtoPVMax[tracks]
0231     locals()[label].VZ_PVMin         = pcaZtoPVMin[tracks]
0232     locals()[label].doDCAPlots       = doPlotsPCA[tracks]
0233     locals()[label].doDCAwrtPVPlots  = doPlotsPCA[tracks]
0234     locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks]
0235     locals()[label].doSIPPlots       = doPlotsPCA[tracks]
0236     locals()[label].numCut           = numCutString[tracks]
0237     locals()[label].denCut           = denCutString[tracks]
0238     locals()[label].doGoodTracksPlots                   = doGoodTracksPlots                   [tracks]
0239     locals()[label].doTrackerSpecific                   = doTrackerSpecific                   [tracks]
0240     locals()[label].doHitPropertiesPlots                = doHitPropertiesPlots                [tracks]
0241     locals()[label].doGeneralPropertiesPlots            = doGeneralPropertiesPlots            [tracks]
0242     locals()[label].doBeamSpotPlots                     = doBeamSpotPlots                     [tracks]
0243     locals()[label].doSeedParameterHistos               = doSeedParameterHistos               [tracks]
0244     locals()[label].doRecHitVsPhiVsEtaPerTrack          = doRecHitVsPhiVsEtaPerTrack          [tracks]
0245     locals()[label].doRecHitVsPtVsEtaPerTrack           = doRecHitVsPtVsEtaPerTrack           [tracks]
0246     locals()[label].doGoodTrackRecHitVsPhiVsEtaPerTrack = doGoodTrackRecHitVsPhiVsEtaPerTrack [tracks]
0247     locals()[label].doLayersVsPhiVsEtaPerTrack          = doLayersVsPhiVsEtaPerTrack          [tracks]
0248     locals()[label].doGoodTrackLayersVsPhiVsEtaPerTrack = doGoodTrackLayersVsPhiVsEtaPerTrack [tracks]
0249     locals()[label].doPUmonitoring                      = doPUmonitoring                      [tracks]
0250     locals()[label].doPlotsVsBXlumi                     = doPlotsVsBXlumi                     [tracks]
0251     locals()[label].doPlotsVsGoodPVtx                   = doPlotsVsGoodPVtx                   [tracks]
0252     locals()[label].doPlotsVsLUMI                       = cms.bool(True)
0253     locals()[label].doPlotsVsBX                         = cms.bool(True)
0254     locals()[label].doEffFromHitPatternVsPU             = doEffFromHitPatternVsPU             [tracks]
0255     locals()[label].doEffFromHitPatternVsBX             = doEffFromHitPatternVsBX             [tracks]
0256     locals()[label].doEffFromHitPatternVsLUMI           = False
0257     locals()[label].doStopSource                        = doStopSource                        [tracks]    
0258     locals()[label].setLabel(label)
0259 
0260 
0261 #-------------------------------------------------
0262 # Tracking Monitor 
0263 #-------------------------------------------------
0264 import DQM.TrackingMonitor.TrackingMonitorSeed_cfi
0265 
0266 from DQM.TrackingMonitorSource.IterTrackingModules4seedMonitoring_cfi import *
0267 # Create first modules for all possible iterations, select later which
0268 # ones to actually use based on era
0269 def _copyIfExists(mod, pset, name):
0270     if hasattr(pset, name):
0271         setattr(mod, name, getattr(pset, name))
0272 for _step, _pset in seedMonitoring.items():
0273     _mod = DQM.TrackingMonitor.TrackingMonitorSeed_cfi.TrackMonSeed.clone(
0274         doTrackCandHistos = cms.bool(True)
0275     )
0276     locals()['TrackSeedMon'+str(_step)] = _mod
0277     _mod.TrackProducer = cms.InputTag("generalTracks")
0278     _mod.FolderName = cms.string("Tracking/TrackParameters/generalTracks/SeedMon/"+str(_step))
0279     _mod.doPUmonitoring = cms.bool(False)
0280     _mod.doLumiAnalysis = cms.bool(False)
0281     _mod.doPlotsVsGoodPVtx = cms.bool(False)
0282     _mod.SeedProducer  = _pset.seedInputTag
0283     _mod.TCProducer    = _pset.trackCandInputTag
0284     _mod.AlgoName      = cms.string( str(_step) )
0285     _mod.TkSeedSizeBin = _pset.trackSeedSizeBin
0286     _mod.TkSeedSizeMin = _pset.trackSeedSizeMin
0287     _mod.TkSeedSizeMax = _pset.trackSeedSizeMax
0288     _mod.ClusterLabels = _pset.clusterLabel
0289     if _pset.clusterLabel == cms.vstring('Pix') :
0290         _mod.NClusPxBin = _pset.clusterBin
0291         _mod.NClusPxMax = _pset.clusterMax
0292     elif _pset.clusterLabel == cms.vstring('Strip') or _pset.clusterLabel == cms.vstring('Tot') :
0293         _mod.NClusStrBin = _pset.clusterBin
0294         _mod.NClusStrMax = _pset.clusterMax
0295     if hasattr(_pset, "RegionProducer") or hasattr(_pset, "RegionSeedingLayersProducer"):
0296         _mod.doRegionPlots = True
0297         _copyIfExists(_mod, _pset, "RegionProducer")
0298         _copyIfExists(_mod, _pset, "RegionSeedingLayersProducer")
0299         _copyIfExists(_mod, _pset, "RegionSizeBin")
0300         _copyIfExists(_mod, _pset, "RegionSizeMax")
0301         if hasattr(_pset, "RegionCandidates"):
0302             _mod.doRegionCandidatePlots = True
0303             _mod.RegionCandidates = _pset.RegionCandidates
0304     if hasattr(_pset, "trajCandPerSeedBin"):
0305         _mod.SeedCandBin = _pset.trajCandPerSeedBin
0306         _mod.SeedCandMax = _pset.trajCandPerSeedMax
0307 
0308 # DQM Services
0309 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0310 dqmInfoTracking = DQMEDAnalyzer('DQMEventInfo',
0311     subSystemFolder = cms.untracked.string('Tracking')
0312 )
0313 
0314 # LogMessageMonitor ####
0315 ### load which are the module to monitor
0316 from DQM.TrackingMonitorSource.EDModules2monitor_cfi import *
0317 
0318 ### load the different flavour of settings of the LogMessageMonitor module
0319 from DQM.TrackingMonitorSource.LogMessageMonitor_cff import *
0320 
0321 for module in selectedModules :
0322     label = str(module)+'LogMessageMonCommon'
0323     locals()[label] = LogMessageMonCommon.clone()
0324     locals()[label].pluginsMonName = pluginsMonName[module]
0325     locals()[label].modules        = modulesLabel[module]
0326     locals()[label].categories     = categories[module]
0327     locals()[label].setLabel(label)
0328 
0329     label = str(module)+'LogMessageMonMB'
0330     locals()[label] = LogMessageMonMB.clone()
0331     locals()[label].pluginsMonName = pluginsMonName[module]
0332     locals()[label].modules        = modulesLabel[module]
0333     locals()[label].categories     = categories[module]
0334     locals()[label].setLabel(label)
0335 
0336 
0337 # dEdx monitor ####
0338 ### load which dedx
0339 from DQM.TrackingMonitorSource.dedxHarmonic2monitor_cfi import *
0340 
0341 ### load the different flavour of settings of the dEdxAnalyzer module
0342 from DQM.TrackingMonitorSource.dEdxAnalyzer_cff import *
0343 
0344 
0345 # temporary patch in order to have BXlumi 
0346 from RecoLuminosity.LumiProducer.lumiProducer_cff import *
0347 
0348 # import v0 monitoring
0349 from DQM.TrackingMonitor.V0Monitor_cff import *
0350 
0351 # better clone for now because goodOfflinePrimaryVertices is used also
0352 # within the reco sequence, and without cloning framework will throw
0353 # "unrunnable schedule" exception for workflows without --runUnscheduled
0354 from CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi import goodOfflinePrimaryVertices
0355 trackingDQMgoodOfflinePrimaryVertices = goodOfflinePrimaryVertices.clone()
0356 
0357 
0358 # import PV resolution
0359 from DQM.TrackingMonitor.primaryVertexResolution_cfi import *
0360 from Configuration.Eras.Modifier_run3_common_cff import run3_common
0361 run3_common.toModify(primaryVertexResolution, forceSCAL = False)
0362 # Sequence
0363 TrackingDQMSourceTier0 = cms.Sequence(cms.ignore(trackingDQMgoodOfflinePrimaryVertices))
0364 # dEdx monitoring
0365 TrackingDQMSourceTier0 += dedxHarmonicSequence * dEdxMonCommon * dEdxHitMonCommon * TrackMon_ckf * dqmInfoTracking
0366 #TrackMon_cosmicTk*TrackMon_ckf*TrackEffMon_ckf*TrackSplitMonitor*dqmInfoTracking
0367 #    # temporary patch in order to have BXlumi
0368 #    * lumiProducer
0369 # track collections
0370 for tracks in selectedTracks :
0371     if tracks != 'generalTracks':
0372         TrackingDQMSourceTier0 += cms.ignore(sequenceName[tracks])
0373     label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
0374     TrackingDQMSourceTier0 += cms.ignore(locals()[label])
0375 # seeding monitoring
0376 for _eraName, _postfix, _era in _cfg.allEras():
0377     mvaSel = _utils.getMVASelectors(_postfix)
0378     _seq = cms.Sequence()
0379     for step in locals()["selectedIterTrackingStep"+_postfix]:
0380         if step in mvaSel:
0381             locals()["TrackSeedMon"+step].doMVAPlots = True
0382             locals()["TrackSeedMon"+step].TrackProducerForMVA = mvaSel[step][0]
0383             locals()["TrackSeedMon"+step].MVAProducers = mvaSel[step][1]
0384 
0385         _seq += locals()["TrackSeedMon"+step]
0386     if _eraName == "":
0387         locals()["TrackSeedMonSequence"] = _seq
0388     else:
0389         _era.toReplaceWith(TrackSeedMonSequence, _seq)
0390 
0391 _seedingDeepCore_TrackSeedMonSequence = TrackSeedMonSequence.copy()
0392 _seedingDeepCore_TrackSeedMonSequence.remove(locals()["TrackSeedMonjetCoreRegionalStep"])
0393 #_seedingDeepCore_TrackSeedMonSequence += (locals()["TrackSeedMonjetCoreRegionalStepBarrel"])
0394 _seedingDeepCore_TrackSeedMonSequence += (locals()["TrackSeedMonjetCoreRegionalStepEndcap"])
0395 from Configuration.ProcessModifiers.seedingDeepCore_cff import seedingDeepCore
0396 seedingDeepCore.toReplaceWith(TrackSeedMonSequence,_seedingDeepCore_TrackSeedMonSequence)
0397 
0398 TrackingDQMSourceTier0 += TrackSeedMonSequence
0399 
0400 from DQM.TrackingMonitorSource.shortTrackResolution_cff import *
0401 
0402 # MessageLog
0403 for module in selectedModules :
0404     label = str(module)+'LogMessageMonCommon'
0405     TrackingDQMSourceTier0 += locals()[label]
0406 TrackingDQMSourceTier0 += voMonitoringSequence
0407 TrackingDQMSourceTier0 += voWcutMonitoringSequence
0408 TrackingDQMSourceTier0 += primaryVertexResolution
0409 TrackingDQMSourceTier0 += shortTrackResolution3to8
0410 TrackingDQMSourceTier0 += dqmInfoTracking
0411 
0412 
0413 TrackingDQMSourceTier0Common = cms.Sequence(cms.ignore(trackingDQMgoodOfflinePrimaryVertices))
0414 # dEdx monitoring
0415 TrackingDQMSourceTier0Common += (dedxHarmonicSequence * dEdxMonCommon * dEdxHitMonCommon * TrackMon_ckf * dqmInfoTracking)
0416 #TrackEffMon_ckf*TrackSplitMonitor*dqmInfoTracking)    
0417 ## monitor track collections
0418 for tracks in selectedTracks :
0419     if tracks != 'generalTracks':
0420         TrackingDQMSourceTier0Common+=cms.ignore(sequenceName[tracks])
0421     label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
0422     TrackingDQMSourceTier0Common += cms.ignore(locals()[label])
0423 # seeding monitoring
0424 TrackingDQMSourceTier0Common += TrackSeedMonSequence
0425 # MessageLog
0426 for module in selectedModules :
0427     label = str(module)+'LogMessageMonCommon'
0428     TrackingDQMSourceTier0Common += locals()[label]
0429 TrackingDQMSourceTier0Common += voMonitoringCommonSequence
0430 TrackingDQMSourceTier0Common += voWcutMonitoringCommonSequence
0431 TrackingDQMSourceTier0Common += primaryVertexResolution
0432 TrackingDQMSourceTier0Common += shortTrackResolution3to8
0433 TrackingDQMSourceTier0Common += dqmInfoTracking
0434 
0435 TrackingDQMSourceTier0MinBias = cms.Sequence(cms.ignore(trackingDQMgoodOfflinePrimaryVertices))
0436 # dEdx monitoring
0437 TrackingDQMSourceTier0MinBias += dedxHarmonicSequence * dEdxMonCommon * dEdxHitMonCommon * TrackMon_ckf * dqmInfoTracking
0438 #TrackMon_cosmicTk*TrackMon_ckf*TrackEffMon_ckf*TrackSplitMonitor*dqmInfoTracking#TrackMon_ckf*TrackEffMon_ckf 
0439 #    * lumiProducer
0440 # monitor track collections
0441 for tracks in selectedTracks :
0442     if tracks != 'generalTracks':
0443         TrackingDQMSourceTier0MinBias += cms.ignore(sequenceName[tracks])
0444 
0445     for topology in [ 'MB', 'ZBnoHIPnoOOT', 'ZBHIPnoOOT', 'ZBHIPOOT']:
0446         label = 'TrackerCollisionSelectedTrackMon' + str(topology) + str(tracks)
0447         TrackingDQMSourceTier0MinBias += cms.ignore(locals()[label])
0448 # seeding monitoring
0449 TrackingDQMSourceTier0MinBias += TrackSeedMonSequence
0450 # MessageLog
0451 for module in selectedModules :
0452     label = str(module)+'LogMessageMonMB'
0453     TrackingDQMSourceTier0MinBias += locals()[label]
0454 # V0 monitoring
0455 TrackingDQMSourceTier0MinBias += voMonitoringMBSequence
0456 TrackingDQMSourceTier0MinBias += voMonitoringZBnoHIPnoOOTSequence
0457 TrackingDQMSourceTier0MinBias += voMonitoringZBHIPnoOOTSequence
0458 TrackingDQMSourceTier0MinBias += voMonitoringZBHIPOOTSequence
0459 TrackingDQMSourceTier0MinBias += voWcutMonitoringMBSequence
0460 TrackingDQMSourceTier0MinBias += voWcutMonitoringZBnoHIPnoOOTSequence
0461 TrackingDQMSourceTier0MinBias += voWcutMonitoringZBHIPnoOOTSequence
0462 TrackingDQMSourceTier0MinBias += voWcutMonitoringZBHIPOOTSequence
0463 # PV resolution
0464 TrackingDQMSourceTier0MinBias += primaryVertexResolution
0465 
0466 TrackingDQMSourceTier0MinBias += dqmInfoTracking