Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-23 02:25:32

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