Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-01-08 23:50:23

0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 import sys
0005 if 'runkey=hi_run' in sys.argv:
0006   from Configuration.Eras.Era_Run3_pp_on_PbPb_approxSiStripClusters_cff import Run3_pp_on_PbPb_approxSiStripClusters
0007   process = cms.Process("SiStripMonitor", Run3_pp_on_PbPb_approxSiStripClusters)
0008 else:
0009   from Configuration.Eras.Era_Run3_cff import Run3
0010   process = cms.Process("SiStripMonitor", Run3)
0011 
0012 process.MessageLogger = cms.Service("MessageLogger",
0013     debugModules = cms.untracked.vstring('siStripDigis',
0014                                          'siStripClusters',
0015                                          'siStripZeroSuppression',
0016                                          'SiStripClusterizer'),
0017     cout = cms.untracked.PSet(threshold = cms.untracked.string('ERROR')),
0018     destinations = cms.untracked.vstring('cout')
0019 )
0020 
0021 live=True
0022 unitTest=False
0023 
0024 if 'unitTest=True' in sys.argv:
0025     live=False
0026     unitTest=True
0027 
0028 # uncomment for running on lxplus
0029 #live=False
0030 offlineTesting=not live
0031 #print "live: "+str(live)+" ==> offlineTesting: "+str(offlineTesting)
0032 
0033 #----------------------------
0034 # Event Source
0035 #-----------------------------
0036 # for live online DQM in P5
0037 if (unitTest):
0038     process.load("DQM.Integration.config.unittestinputsource_cfi")
0039     from DQM.Integration.config.unittestinputsource_cfi import options
0040 elif (live):
0041     process.load("DQM.Integration.config.inputsource_cfi")
0042     from DQM.Integration.config.inputsource_cfi import options
0043 # for testing in lxplus
0044 elif(offlineTesting):
0045     process.load("DQM.Integration.config.fileinputsource_cfi")
0046     from DQM.Integration.config.fileinputsource_cfi import options
0047 
0048 #----------------------------
0049 # DQM Live Environment
0050 #-----------------------------
0051 #from DQM.Integration.config.environment_cfi import HEAVYION
0052 
0053 #process.runType.setRunType('cosmic_run')
0054 #process.runType.setRunType('pp_run')
0055 
0056 process.load("DQM.Integration.config.environment_cfi")
0057 process.DQM.filter = '^(SiStrip|Tracking)(/[^/]+){0,5}$'
0058 
0059 process.dqmEnv.subSystemFolder    = "SiStrip"
0060 process.dqmSaver.tag = "SiStrip"
0061 process.dqmSaver.backupLumiCount = 30
0062 process.dqmSaver.runNumber = options.runNumber
0063 process.dqmSaverPB.tag = "SiStrip"
0064 process.dqmSaverPB.runNumber = options.runNumber
0065 
0066 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0067 process.dqmEnvTr = DQMEDAnalyzer('DQMEventInfo',
0068                  subSystemFolder = cms.untracked.string('Tracking'),
0069                  eventRateWindow = cms.untracked.double(0.5),
0070                  eventInfoFolder = cms.untracked.string('EventInfo')
0071 )
0072 
0073 
0074 #-----------------------------
0075 # Magnetic Field
0076 #-----------------------------
0077 process.load('Configuration.StandardSequences.MagneticField_cff')
0078 
0079 #-------------------------------------------------
0080 # GEOMETRY
0081 #-------------------------------------------------
0082 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0083 
0084 #--------------------------
0085 # Calibration
0086 #--------------------------
0087 # Condition for P5 cluster
0088 if (live):
0089     process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
0090 # Condition for lxplus: change and possibly customise the GT
0091 elif(offlineTesting):
0092     process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0093     from Configuration.AlCa.GlobalTag import GlobalTag as gtCustomise
0094     #you may need to set manually the GT in the line below
0095     process.GlobalTag = gtCustomise(process.GlobalTag, 'auto:run3_data', '')
0096 
0097 #--------------------------------------------
0098 ## Patch to avoid using Run Info information in reconstruction
0099 #
0100 
0101 process.siStripQualityESProducer.ListOfRecordToMerge = cms.VPSet(
0102    cms.PSet( record = cms.string("SiStripDetVOffRcd"),    tag    = cms.string("") ),
0103    cms.PSet( record = cms.string("SiStripDetCablingRcd"), tag    = cms.string("") ),
0104    cms.PSet( record = cms.string("SiStripBadChannelRcd"), tag    = cms.string("") ),
0105    cms.PSet( record = cms.string("SiStripBadFiberRcd"),   tag    = cms.string("") ),
0106    cms.PSet( record = cms.string("SiStripBadModuleRcd"),  tag    = cms.string("") )
0107    )
0108 #-------------------------------------------
0109 
0110 #-----------------------
0111 #  Reconstruction Modules
0112 #-----------------------
0113 ## Collision Reconstruction
0114 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
0115 
0116 ## Cosmic Track Reconstruction
0117 if (process.runType.getRunType() == process.runType.cosmic_run or process.runType.getRunType() == process.runType.cosmic_run_stage1):
0118     process.load("RecoTracker.Configuration.RecoTrackerP5_cff")
0119     process.load("Configuration.StandardSequences.ReconstructionCosmics_cff")
0120 else:
0121     process.load("Configuration.StandardSequences.Reconstruction_cff")
0122 
0123 import RecoVertex.BeamSpotProducer.onlineBeamSpotESProducer_cfi as _mod
0124 process.BeamSpotESProducer = _mod.onlineBeamSpotESProducer.clone()
0125 
0126 import RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi
0127 process.offlineBeamSpot = RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi.onlineBeamSpotProducer.clone()
0128 
0129 #
0130 # Strip FED check
0131 #
0132 process.load("DQM.SiStripMonitorHardware.siStripFEDCheck_cfi")
0133 process.siStripFEDCheck.RawDataTag = "rawDataCollector"
0134 process.siStripFEDCheck.DirName    = 'SiStrip/FEDIntegrity_SM/'
0135 process.siStripFEDCheck.doPLOTfedsPresent       = False # already produced by fedtest
0136 process.siStripFEDCheck.doPLOTfedFatalErrors    = False # already produced by fedtest
0137 process.siStripFEDCheck.doPLOTfedNonFatalErrors = False # already produced by fedtest
0138 process.siStripFEDCheck.doPLOTnFEDinVsLS        = True
0139 process.siStripFEDCheck.doPLOTnFEDinWdataVsLS   = True
0140 
0141 #------------------------------
0142 # Strip and Tracking DQM Source
0143 #------------------------------
0144 process.load("DQM.SiStripMonitorClient.SiStripSourceConfigP5_cff")
0145 process.load("DQM.TrackingMonitorSource.TrackingSourceConfigP5_cff")
0146 process.TrackMon_gentk.doLumiAnalysis = False
0147 process.TrackMon_ckf.doLumiAnalysis = False
0148 process.TrackMon_hi.doLumiAnalysis = False
0149 process.TrackMon_ckf.AlgoName = 'CKFTk'
0150 
0151 #--------------------------
0152 # Quality Test
0153 #--------------------------
0154 from DQMServices.Core.DQMQualityTester import DQMQualityTester
0155 process.stripQTester = DQMQualityTester(
0156     qtList = cms.untracked.FileInPath('DQM/SiStripMonitorClient/data/sistrip_qualitytest_config.xml'),
0157     prescaleFactor = cms.untracked.int32(3),
0158     getQualityTestsFromFile = cms.untracked.bool(True),
0159     qtestOnEndLumi = cms.untracked.bool(True),
0160     qtestOnEndRun = cms.untracked.bool(True)
0161 )
0162 
0163 process.trackingQTester = DQMQualityTester(
0164     qtList = cms.untracked.FileInPath('DQM/TrackingMonitorClient/data/tracking_qualitytest_config.xml'),
0165     prescaleFactor = cms.untracked.int32(3),
0166     getQualityTestsFromFile = cms.untracked.bool(True),
0167     qtestOnEndLumi = cms.untracked.bool(True),
0168     qtestOnEndRun = cms.untracked.bool(True)
0169 )
0170 
0171 
0172 #--------------------------
0173 # Service
0174 #--------------------------
0175 process.AdaptorConfig = cms.Service("AdaptorConfig")
0176 
0177 # Simple filter for event
0178 process.eventFilter = cms.EDFilter("SimpleEventFilter",
0179 #                   EventsToSkip = cms.untracked.int32(3)
0180                    EventsToSkip = cms.untracked.int32(100)
0181 )
0182 
0183 #--------------------------
0184 # Producers
0185 #--------------------------
0186 # Event History Producer
0187 process.load("DPGAnalysis.SiStripTools.eventwithhistoryproducerfroml1abc_cfi")
0188 
0189 # APV Phase Producer
0190 process.load("DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi")
0191 
0192 #--------------------------
0193 # Filters
0194 #--------------------------
0195 # HLT Filter
0196 # 0=random, 1=physics, 2=calibration, 3=technical
0197 process.hltTriggerTypeFilter = cms.EDFilter("HLTTriggerTypeFilter",
0198     SelectedTriggerType = cms.int32(1)
0199 )
0200 
0201 # L1 Trigger Bit Selection (bit 40 and 41 for BSC trigger)
0202 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
0203 process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
0204 process.hltLevel1GTSeed.L1TechTriggerSeeding = True
0205 process.hltLevel1GTSeed.L1SeedsLogicalExpression = 'NOT (36 OR 37 OR 38 OR 39)'
0206 
0207 # HLT trigger selection (HLT_ZeroBias)
0208 # modified for 0 Tesla HLT menu (no ZeroBias_*)
0209 process.load('HLTrigger.HLTfilters.hltHighLevel_cfi')
0210 if (process.runType.getRunType() == process.runType.hi_run):
0211     #--------------------------
0212     # HI Runs HLT path
0213     #--------------------------
0214     process.hltHighLevel.HLTPaths = ['HLT_ZeroBias_*' , 'HLT_HIZeroBias*' , 'HLT_ZeroBias1_*' , 'HLT_PAZeroBias_*' , 'HLT_PAZeroBias1_*', 'HLT_PAL1MinimumBiasHF_OR_SinglePixelTrack_*' , 'HLT_HICentralityVeto*','HLT_HIMinimumBias*', 'HLT_HIPhysics*']
0215 else:
0216     process.hltHighLevel.HLTPaths = ['HLT_ZeroBias_*' , 'HLT_ZeroBias1_*' , 'HLT_PAZeroBias_*' , 'HLT_PAZeroBias1_*', 'HLT_PAL1MinimumBiasHF_OR_SinglePixelTrack_*']
0217 process.hltHighLevel.andOr = True
0218 process.hltHighLevel.throw =  False
0219 
0220 #--------------------------
0221 # Scheduling
0222 #--------------------------
0223 process.SiStripSources_LocalReco = cms.Sequence(process.siStripFEDMonitor*process.SiStripMonitorDigi*process.SiStripMonitorClusterReal)
0224 if (process.runType.getRunType() == process.runType.commissioning_run):
0225     process.DQMCommon                = cms.Sequence(process.dqmEnv*process.dqmEnvTr*process.dqmSaver*process.dqmSaverPB)
0226 else:
0227     process.DQMCommon                = cms.Sequence(process.stripQTester*process.trackingQTester*process.dqmEnv*process.dqmEnvTr*process.dqmSaver*process.dqmSaverPB)
0228 if (process.runType.getRunType() == process.runType.hi_run):
0229     process.RecoForDQM_LocalReco     = cms.Sequence(process.siPixelDigis*process.siStripDigis*process.trackerlocalreco)
0230 else :
0231     process.RecoForDQM_LocalReco     = cms.Sequence(process.siPixelDigis*process.siStripDigis*process.gtDigis*process.trackerlocalreco)
0232 #------------------------------------------------------
0233 # Switch for channel errors per FED ID trend plots.
0234 #------------------------------------------------------
0235 process.siStripFEDMonitor.fedErrorsVsIdVsLumiHistogramConfig.globalswitchon = True
0236 
0237 #--------------------------
0238 # Global Plot Switches
0239 #--------------------------
0240 process.SiStripMonitorDigi.TotalNumberOfDigisFailure.subdetswitchon = False
0241 
0242 ### COSMIC RUN SETTING
0243 if (process.runType.getRunType() == process.runType.cosmic_run or process.runType.getRunType() == process.runType.cosmic_run_stage1):
0244     # event selection for cosmic data
0245     if ((process.runType.getRunType() == process.runType.cosmic_run) and live): process.source.SelectEvents = ['HLT*SingleMu*','HLT_L1*']
0246     # Reference run for cosmic
0247     # Source config for cosmic data
0248     process.SiStripSources_TrkReco_cosmic = cms.Sequence(process.SiStripMonitorTrack_ckf*process.TrackMon_ckf)
0249     # Client config for cosmic data
0250     ### STRIP
0251     process.load("DQM.SiStripMonitorClient.SiStripClientConfigP5_Cosmic_cff")
0252     process.SiStripAnalyserCosmic.RawDataTag = "rawDataCollector"
0253     process.SiStripAnalyserCosmic.TkMapCreationFrequency  = -1
0254     process.SiStripAnalyserCosmic.ShiftReportFrequency = -1
0255     process.SiStripAnalyserCosmic.StaticUpdateFrequency = 5
0256     process.SiStripAnalyserCosmic.MonitorSiStrip_PSet.MonitorSiStripBackPlaneCorrection = False
0257     process.SiStripClients           = cms.Sequence(process.SiStripAnalyserCosmic)
0258     ### TRACKING
0259     process.load("DQM.TrackingMonitorClient.TrackingClientConfigP5_Cosmic_cff")
0260     process.TrackingAnalyserCosmic.RawDataTag           = "rawDataCollector"
0261     process.TrackingAnalyserCosmic.ShiftReportFrequency = -1
0262     process.TrackingAnalyserCosmic.StaticUpdateFrequency = 5
0263     process.TrackingClient = cms.Sequence( process.TrackingAnalyserCosmic )
0264 
0265     # Reco for cosmic data
0266     process.load('RecoTracker.SpecialSeedGenerators.SimpleCosmicBONSeeder_cfi')
0267     process.simpleCosmicBONSeeds.ClusterCheckPSet.MaxNumberOfCosmicClusters = 450
0268     process.combinatorialcosmicseedfinderP5.MaxNumberOfCosmicClusters = 450
0269 
0270     process.RecoForDQM_TrkReco_cosmic = cms.Sequence(process.offlineBeamSpot*process.MeasurementTrackerEvent*process.ctftracksP5)
0271 
0272     process.stripQTester.qtList = cms.untracked.FileInPath('DQM/SiStripMonitorClient/data/sistrip_qualitytest_config_cosmic.xml')
0273     process.stripQTester.prescaleFactor          = 2
0274     process.stripQTester.getQualityTestsFromFile = True
0275     process.stripQTester.qtestOnEndLumi          = True
0276     process.stripQTester.qtestOnEndRun           = True
0277 
0278     process.trackingQTester.qtList                  = 'DQM/TrackingMonitorClient/data/tracking_qualitytest_config_cosmic.xml'
0279     process.trackingQTester.prescaleFactor          = 1
0280     process.trackingQTester.getQualityTestsFromFile = True
0281     process.trackingQTester.qtestOnEndLumi          = True
0282     process.trackingQTester.qtestOnEndRun           = True
0283 
0284     process.p = cms.Path(process.scalersRawToDigi*
0285                          process.tcdsDigis*
0286                          process.onlineMetaDataDigis*
0287                          process.APVPhases*
0288                          process.consecutiveHEs*
0289                          process.hltTriggerTypeFilter*
0290                          process.siStripFEDCheck *
0291                          process.RecoForDQM_LocalReco*
0292                          process.DQMCommon*
0293                          process.SiStripClients*
0294                          process.SiStripSources_LocalReco*
0295                          process.RecoForDQM_TrkReco_cosmic*
0296                          process.SiStripSources_TrkReco_cosmic*
0297                          process.TrackingClient
0298                          )
0299 
0300 
0301 ### COMMISSIONING RUN SETTINGS
0302 if (process.runType.getRunType() == process.runType.commissioning_run):
0303     #event selection for commissioning runs
0304     if ((process.runType.getRunType() == process.runType.commissioning_run) and live):
0305         process.source.SelectEvents = ['HLT_*']
0306 
0307     process.SiStripFedMonitor = cms.Sequence(process.siStripFEDMonitor)
0308     process.p = cms.Path(
0309         process.siStripFEDCheck *
0310         process.SiStripFedMonitor *
0311         process.DQMCommon
0312     )
0313 
0314 #else :
0315 ### pp COLLISION SETTING
0316 if (process.runType.getRunType() == process.runType.pp_run or process.runType.getRunType() == process.runType.pp_run_stage1):
0317     #event selection for pp collisions
0318     if ((process.runType.getRunType() == process.runType.pp_run) and live):
0319         process.source.SelectEvents = [
0320             'HLT_L1*',
0321             'HLT_Jet*',
0322             'HLT_Physics*',
0323             'HLT_ZeroBias*',
0324             'HLT_PAL1*',
0325             'HLT_PAZeroBias*',
0326             'HLT_PAAK*'
0327             ]
0328 
0329     # Source and Client config for pp collisions
0330 
0331     process.SiStripMonitorDigi.UseDCSFiltering = False
0332     process.SiStripMonitorClusterReal.UseDCSFiltering = False
0333 
0334     process.MonitorTrackResiduals_gentk.Tracks                 = 'initialStepTracksPreSplitting'
0335     process.MonitorTrackResiduals_gentk.trajectoryInput        = 'initialStepTracksPreSplitting'
0336     process.TrackMon_gentk.TrackProducer    = 'initialStepTracksPreSplitting'
0337     process.TrackMon_gentk.allTrackProducer = 'initialStepTracksPreSplitting'
0338     process.SiStripMonitorTrack_gentk.TrackProducer = 'initialStepTracksPreSplitting'
0339 
0340     process.SiStripSources_TrkReco   = cms.Sequence(process.SiStripMonitorTrack_gentk*process.MonitorTrackResiduals_gentk*process.TrackMon_gentk)
0341 
0342     ### STRIP
0343     process.load("DQM.SiStripMonitorClient.SiStripClientConfigP5_cff")
0344     process.SiStripAnalyser.TkMapCreationFrequency  = -1
0345     process.SiStripAnalyser.ShiftReportFrequency = -1
0346     process.SiStripAnalyser.StaticUpdateFrequency = 5
0347     process.SiStripAnalyser.RawDataTag = "rawDataCollector"
0348     process.SiStripAnalyser.MonitorSiStrip_PSet.MonitorSiStripBackPlaneCorrection = False
0349     process.SiStripClients           = cms.Sequence(process.SiStripAnalyser)
0350 
0351     process.SiStripMonitorDigi.TotalNumberOfDigisFailure.integrateNLumisections = 25
0352     ### TRACKING
0353     process.load("DQM.TrackingMonitorClient.TrackingClientConfigP5_cff")
0354     process.TrackingAnalyser.ShiftReportFrequency = -1
0355     process.TrackingAnalyser.StaticUpdateFrequency = 5
0356     process.TrackingAnalyser.RawDataTag = "rawDataCollector"
0357     if offlineTesting :
0358         process.TrackingAnalyser.verbose = True
0359     process.TrackingClient = cms.Sequence( process.TrackingAnalyser )
0360 
0361     process.trackingQTester.qtList                  = 'DQM/TrackingMonitorClient/data/tracking_qualitytest_config.xml'
0362     process.trackingQTester.prescaleFactor          = 1
0363     process.trackingQTester.getQualityTestsFromFile = True
0364     process.trackingQTester.qtestOnEndLumi          = True
0365     process.trackingQTester.qtestOnEndRun           = True
0366 
0367     # Reco for pp collisions
0368 
0369     process.load('RecoTracker.IterativeTracking.InitialStepPreSplitting_cff')
0370     '''process.InitialStepPreSplitting.remove(process.initialStepTrackRefsForJetsPreSplitting)
0371     process.InitialStepPreSplitting.remove(process.caloTowerForTrkPreSplitting)
0372     process.InitialStepPreSplitting.remove(process.ak4CaloJetsForTrkPreSplitting)
0373     process.InitialStepPreSplitting.remove(process.jetsForCoreTrackingPreSplitting)
0374     process.InitialStepPreSplitting.remove(process.siPixelClusters)
0375     process.InitialStepPreSplitting.remove(process.siPixelRecHits)
0376     process.InitialStepPreSplitting.remove(process.MeasurementTrackerEvent)
0377     process.InitialStepPreSplitting.remove(process.siPixelClusterShapeCache)'''
0378 
0379     process.InitialStepPreSplittingTask.remove(process.initialStepTrackRefsForJetsPreSplitting)
0380     process.InitialStepPreSplittingTask.remove(process.caloTowerForTrkPreSplitting)
0381     process.InitialStepPreSplittingTask.remove(process.ak4CaloJetsForTrkPreSplitting)
0382     process.InitialStepPreSplittingTask.remove(process.jetsForCoreTrackingPreSplitting)
0383     process.InitialStepPreSplittingTask.remove(process.siPixelClusters)
0384     process.InitialStepPreSplittingTask.remove(process.siPixelRecHits)
0385     process.InitialStepPreSplittingTask.remove(process.MeasurementTrackerEvent)
0386 
0387     # Redefinition of siPixelClusters: has to be after RecoTracker.IterativeTracking.InitialStepPreSplitting_cff
0388     process.load("RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi")
0389 
0390     from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import *
0391     process.PixelLayerTriplets.BPix.HitProducer = cms.string('siPixelRecHitsPreSplitting')
0392     process.PixelLayerTriplets.FPix.HitProducer = cms.string('siPixelRecHitsPreSplitting')
0393     from RecoPixelVertexing.PixelTrackFitting.PixelTracks_cff import *
0394     process.pixelTracksHitTriplets.SeedComparitorPSet.clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting'
0395 
0396     process.RecoForDQM_TrkReco = cms.Sequence(process.offlineBeamSpot*process.MeasurementTrackerEventPreSplitting*process.siPixelClusterShapeCachePreSplitting*process.recopixelvertexing*process.InitialStepPreSplitting)
0397 
0398     process.p = cms.Path(
0399         process.scalersRawToDigi*
0400         process.tcdsDigis*
0401         process.onlineMetaDataDigis*
0402         process.APVPhases*
0403         process.consecutiveHEs*
0404         process.hltTriggerTypeFilter*
0405         process.siStripFEDCheck *
0406         process.RecoForDQM_LocalReco*
0407         process.siPixelClusters*
0408         process.DQMCommon*
0409         process.SiStripClients*
0410         process.SiStripSources_LocalReco*
0411         ##### TRIGGER SELECTION #####
0412         process.hltHighLevel*
0413         process.RecoForDQM_TrkReco*
0414         process.SiStripSources_TrkReco*
0415         process.TrackingClient
0416         )
0417 
0418 #--------------------------------------------------
0419 # For high PU run - no tracking in cmssw42x
0420 #--------------------------------------------------
0421 if (process.runType.getRunType() == process.runType.hpu_run):
0422 
0423     # Simple filter for event
0424     # 2012.07.09 highPU fill should have /cdaq/special/HighPUFill/July2012/HLT/V6 as trigger table
0425     # where HLT_ZeroBias in the DQM stream has ~50Hz
0426     # the expected reconstruction time should be ~ several seconds
0427     # => PRESCALE = 50
0428     # but try firstly w/ 30, maybe it is enough
0429     process.eventFilter.EventsToSkip = 30
0430 
0431     # change the HLT trigger path selection
0432     # it should already be ok, but the name could be changed
0433     process.hltHighLevel.HLTPaths = ['HLT_ZeroBias*'] 
0434 
0435  #        process.DQMEventStreamerReader.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('HLT_600Tower*','HLT_L1*','HLT_Jet*','HLT_HT*','HLT_MinBias_*','HLT_Physics*', 'HLT_ZeroBias*'))
0436 #
0437 
0438     process.SiStripMonitorDigi.UseDCSFiltering = False
0439     process.SiStripMonitorClusterReal.UseDCSFiltering = False
0440 
0441     process.MonitorTrackResiduals_gentk.Tracks                 = 'earlyGeneralTracks'
0442     process.MonitorTrackResiduals_gentk.trajectoryInput        = 'earlyGeneralTracks'
0443     process.TrackMon_gentk.TrackProducer          = "earlyGeneralTracks"
0444     process.TrackMon_gentk.allTrackProducer = "earlyGeneralTracks"
0445     process.SiStripMonitorTrack_gentk.TrackProducer    = 'earlyGeneralTracks'
0446 
0447     process.SiStripSources_TrkReco   = cms.Sequence(process.SiStripMonitorTrack_gentk*process.MonitorTrackResiduals_gentk*process.TrackMon_gentk)
0448     process.load("DQM.SiStripMonitorClient.SiStripClientConfigP5_cff")
0449     process.SiStripAnalyser.TkMapCreationFrequency  = -1
0450     process.SiStripAnalyser.ShiftReportFrequency = -1
0451     process.SiStripAnalyser.StaticUpdateFrequency = 5
0452     process.SiStripAnalyser.RawDataTag = "rawDataCollector"
0453     process.SiStripAnalyser.MonitorSiStrip_PSet.MonitorSiStripBackPlaneCorrection = False
0454     process.SiStripClients           = cms.Sequence(process.SiStripAnalyser)
0455     ### TRACKING
0456     process.load("DQM.TrackingMonitorClient.TrackingClientConfigP5_cff")
0457     process.TrackingAnalyser.ShiftReportFrequency = -1
0458     process.TrackingAnalyser.StaticUpdateFrequency = 5
0459     process.TrackingAnalyser.RawDataTag = cms.untracked.InputTag("rawDataCollector")
0460     process.TrackingClient = cms.Sequence( process.TrackingAnalyser )
0461 
0462     # Reco for pp collisions
0463 
0464     process.load('RecoTracker.Configuration.RecoTracker_cff')
0465 
0466     #process.newCombinedSeeds.seedCollections = cms.VInputTag(
0467     #    cms.InputTag('initialStepSeeds'),
0468     #    )
0469 
0470     process.load('RecoTracker.FinalTrackSelectors.MergeTrackCollections_cff')
0471     import RecoTracker.FinalTrackSelectors.earlyGeneralTracks_cfi
0472     process.load('RecoTracker.FinalTrackSelectors.earlyGeneralTracks_cfi')
0473     process.earlyGeneralTracks.TrackProducers = (
0474         cms.InputTag('initialStepTracks'),
0475         )
0476 
0477     process.earlyGeneralTracks.hasSelector=cms.vint32(1)
0478     process.earlyGeneralTracks.selectedTrackQuals = cms.VInputTag(
0479 #        cms.InputTag("initialStepSelector","initialStep"),
0480         cms.InputTag("initialStep"),
0481         )
0482     process.earlyGeneralTracks.setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0), pQual=cms.bool(True) ) )
0483 
0484     process.load("RecoTracker.IterativeTracking.iterativeTk_cff")
0485 
0486     process.iterTracking_FirstStep =cms.Sequence(
0487         process.InitialStep
0488         *process.earlyGeneralTracks
0489         )
0490 
0491     process.RecoForDQM_TrkReco       = cms.Sequence(process.offlineBeamSpot*process.MeasurementTrackerEvent*process.siPixelClusterShapeCache*process.recopixelvertexing*process.iterTracking_FirstStep)
0492 
0493     process.p = cms.Path(process.scalersRawToDigi*
0494                          process.tcdsDigis*
0495                          process.onlineMetaDataDigis*
0496                          process.APVPhases*
0497                          process.consecutiveHEs*
0498                          process.hltTriggerTypeFilter*
0499                          process.siStripFEDCheck *
0500                          process.RecoForDQM_LocalReco*
0501                          process.DQMCommon*
0502                          process.SiStripClients*
0503                          process.SiStripSources_LocalReco*
0504                          process.hltHighLevel*
0505                          process.eventFilter*
0506                          process.RecoForDQM_TrkReco*
0507                          process.SiStripSources_TrkReco*
0508                          process.TrackingClient
0509                          )
0510 
0511 process.castorDigis.InputLabel = "rawDataCollector"
0512 process.csctfDigis.producer = "rawDataCollector"
0513 process.dttfDigis.DTTF_FED_Source = "rawDataCollector"
0514 process.ecalDigis.cpu.InputLabel = "rawDataCollector"
0515 process.ecalPreshowerDigis.sourceTag = "rawDataCollector"
0516 process.gctDigis.inputLabel = "rawDataCollector"
0517 process.gtDigis.DaqGtInputTag = "rawDataCollector"
0518 process.hcalDigis.InputLabel = "rawDataCollector"
0519 process.muonCSCDigis.InputObjects = "rawDataCollector"
0520 process.muonDTDigis.inputLabel = "rawDataCollector"
0521 process.muonRPCDigis.InputLabel = "rawDataCollector"
0522 process.scalersRawToDigi.scalersInputTag = "rawDataCollector"
0523 process.siPixelDigis.cpu.InputLabel = "rawDataCollector"
0524 process.siStripDigis.ProductLabel = "rawDataCollector"
0525 process.siStripFEDMonitor.RawDataTag = "rawDataCollector"
0526 #--------------------------------------------------
0527 # Heavy Ion Specific Fed Raw Data Collection Label
0528 #--------------------------------------------------
0529 
0530 print("Running with run type = ", process.runType.getRunType())
0531 ### HEAVY ION SETTING
0532 if (process.runType.getRunType() == process.runType.hi_run):
0533     process.castorDigis.InputLabel = "rawDataRepacker"
0534     process.csctfDigis.producer = "rawDataRepacker"
0535     process.dttfDigis.DTTF_FED_Source = "rawDataRepacker"
0536     process.ecalDigis.cpu.InputLabel = "rawDataRepacker"
0537     process.ecalPreshowerDigis.sourceTag = "rawDataRepacker"
0538     process.gctDigis.inputLabel = "rawDataRepacker"
0539     process.hcalDigis.InputLabel = "rawDataRepacker"
0540     process.muonCSCDigis.InputObjects = "rawDataRepacker"
0541     process.muonDTDigis.inputLabel = "rawDataRepacker"
0542     process.muonRPCDigis.InputLabel = "rawDataRepacker"
0543     process.scalersRawToDigi.scalersInputTag = "rawDataRepacker"
0544     process.siPixelDigis.cpu.InputLabel = "rawDataRepacker"
0545     process.siStripDigis.ProductLabel = "rawDataRepacker"
0546     process.siStripFEDMonitor.RawDataTag = "rawDataRepacker"
0547 
0548     if ((process.runType.getRunType() == process.runType.hi_run) and live):
0549         process.source.SelectEvents = [
0550             'HLT_HICentralityVeto*',
0551 #            'HLT_HIMinimumBias*',
0552 #            'HLT_HIZeroBias*'
0553             'HLT_HIPhysics*'
0554             ]
0555 
0556     process.SiStripMonitorDigi.UseDCSFiltering = False
0557     process.SiStripMonitorClusterReal.UseDCSFiltering = False
0558 
0559     process.MonitorTrackResiduals_gentk.Tracks                 = 'initialStepTracksPreSplitting'
0560     process.MonitorTrackResiduals_gentk.trajectoryInput        = 'initialStepTracksPreSplitting'
0561     process.TrackMon_gentk.TrackProducer    = 'initialStepTracksPreSplitting'
0562     process.TrackMon_gentk.allTrackProducer = 'initialStepTracksPreSplitting'
0563     process.SiStripMonitorTrack_gentk.TrackProducer = 'initialStepTracksPreSplitting'
0564 
0565     process.SiStripSources_TrkReco   = cms.Sequence(process.SiStripMonitorTrack_gentk*process.MonitorTrackResiduals_gentk*process.TrackMon_gentk)
0566 
0567     ### STRIP
0568     process.load("DQM.SiStripMonitorClient.SiStripClientConfigP5_cff")
0569     process.SiStripAnalyser.TkMapCreationFrequency  = -1
0570     process.SiStripAnalyser.ShiftReportFrequency = -1
0571     process.SiStripAnalyser.StaticUpdateFrequency = 5
0572     process.SiStripAnalyser.RawDataTag = "rawDataRepacker"
0573     process.SiStripAnalyser.MonitorSiStrip_PSet.MonitorSiStripBackPlaneCorrection = False
0574     process.SiStripClients           = cms.Sequence(process.SiStripAnalyser)
0575 
0576     process.SiStripMonitorDigi.TotalNumberOfDigisFailure.integrateNLumisections = 25
0577     ### TRACKING
0578     process.load("DQM.TrackingMonitorClient.TrackingClientConfigP5_cff")
0579     process.TrackingAnalyser.ShiftReportFrequency = -1
0580     process.TrackingAnalyser.StaticUpdateFrequency = 5
0581     process.TrackingAnalyser.RawDataTag = "rawDataRepacker"
0582     if offlineTesting :
0583         process.TrackingAnalyser.verbose = True
0584     process.TrackingClient = cms.Sequence( process.TrackingAnalyser )
0585 
0586     process.stripQTester.qtList = 'DQM/SiStripMonitorClient/data/sistrip_qualitytest_config_heavyion.xml'
0587     process.stripQTester.prescaleFactor          = 2
0588     process.stripQTester.getQualityTestsFromFile = True
0589     process.stripQTester.qtestOnEndLumi          = True
0590     process.stripQTester.qtestOnEndRun           = True
0591 
0592     process.trackingQTester.qtList                  = 'DQM/TrackingMonitorClient/data/tracking_qualitytest_config_heavyion.xml'
0593     process.trackingQTester.prescaleFactor          = 1
0594     process.trackingQTester.getQualityTestsFromFile = True
0595     process.trackingQTester.qtestOnEndLumi          = True
0596     process.trackingQTester.qtestOnEndRun           = True
0597 
0598     # Reco for pp collisions
0599 
0600     process.load('RecoTracker.IterativeTracking.InitialStepPreSplitting_cff')
0601     '''process.InitialStepPreSplitting.remove(process.initialStepTrackRefsForJetsPreSplitting)
0602     process.InitialStepPreSplitting.remove(process.caloTowerForTrkPreSplitting)
0603     process.InitialStepPreSplitting.remove(process.ak4CaloJetsForTrkPreSplitting)
0604     process.InitialStepPreSplitting.remove(process.jetsForCoreTrackingPreSplitting)
0605     process.InitialStepPreSplitting.remove(process.siPixelClusters)
0606     process.InitialStepPreSplitting.remove(process.siPixelRecHits)
0607     process.InitialStepPreSplitting.remove(process.MeasurementTrackerEvent)
0608     process.InitialStepPreSplitting.remove(process.siPixelClusterShapeCache)'''
0609 
0610     process.InitialStepPreSplittingTask.remove(process.initialStepTrackRefsForJetsPreSplitting)
0611     process.InitialStepPreSplittingTask.remove(process.caloTowerForTrkPreSplitting)
0612     process.InitialStepPreSplittingTask.remove(process.ak4CaloJetsForTrkPreSplitting)
0613     process.InitialStepPreSplittingTask.remove(process.jetsForCoreTrackingPreSplitting)
0614     process.InitialStepPreSplittingTask.remove(process.siPixelClusters)
0615     process.InitialStepPreSplittingTask.remove(process.siPixelRecHits)
0616     process.InitialStepPreSplittingTask.remove(process.MeasurementTrackerEvent)
0617 
0618     # Redefinition of siPixelClusters: has to be after RecoTracker.IterativeTracking.InitialStepPreSplitting_cff
0619     process.load("RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi")
0620 
0621     # Select events based on the pixel cluster multiplicity
0622     import  HLTrigger.special.hltPixelActivityFilter_cfi
0623     process.multFilter = HLTrigger.special.hltPixelActivityFilter_cfi.hltPixelActivityFilter.clone(
0624         inputTag  = 'siPixelClusters',
0625         minClusters = 1,
0626         maxClusters = 50000
0627         )
0628 
0629     # BaselineValidator Module
0630     from EventFilter.SiStripRawToDigi.SiStripDigis_cfi import siStripDigis as _siStripDigis
0631     process.siStripDigisNoZS=_siStripDigis.clone(
0632         ProductLabel = "rawDataCollector")
0633     process.SiStripBaselineValidator.srcProcessedRawDigi =  'siStripDigisNoZS:ZeroSuppressed'
0634 
0635 
0636     from RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi import *
0637     process.PixelLayerTriplets.BPix.HitProducer = 'siPixelRecHitsPreSplitting'
0638     process.PixelLayerTriplets.FPix.HitProducer = 'siPixelRecHitsPreSplitting'
0639     from RecoPixelVertexing.PixelTrackFitting.PixelTracks_cff import *
0640     process.pixelTracksHitTriplets.SeedComparitorPSet.clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting'
0641 
0642     process.RecoForDQM_TrkReco = cms.Sequence(process.offlineBeamSpot*process.MeasurementTrackerEventPreSplitting*process.siPixelClusterShapeCachePreSplitting*process.recopixelvertexing*process.InitialStepPreSplitting)
0643 
0644     process.p = cms.Path(
0645         process.scalersRawToDigi*
0646         process.tcdsDigis*
0647         process.onlineMetaDataDigis*
0648         process.APVPhases*
0649         process.consecutiveHEs*
0650         process.hltTriggerTypeFilter*
0651         process.siStripFEDCheck *
0652         process.siStripDigisNoZS*
0653         process.SiStripBaselineValidator*
0654         process.RecoForDQM_LocalReco*
0655         process.siPixelClusters*
0656         process.DQMCommon*
0657         process.SiStripClients*
0658         process.SiStripSources_LocalReco*
0659         process.multFilter*
0660         ##### TRIGGER SELECTION #####
0661         process.hltHighLevel*
0662         process.RecoForDQM_TrkReco*
0663         process.SiStripSources_TrkReco*
0664         process.TrackingClient
0665     )
0666 
0667     # append the approximate clusters monitoring for the HI run case
0668     from DQM.SiStripMonitorApproximateCluster.SiStripMonitorApproximateCluster_cfi import SiStripMonitorApproximateCluster
0669     process.siStripApproximateClusterComparator = SiStripMonitorApproximateCluster.clone(compareClusters = True,
0670                                                                                          ClustersProducer = "hltSiStripClusterizerForRawPrime")
0671     process.p.insert(process.p.index(process.TrackingClient)+1,process.siStripApproximateClusterComparator)
0672 
0673 ### process customizations included here
0674 from DQM.Integration.config.online_customizations_cfi import *
0675 process = customise(process)
0676 print("Final Source settings:", process.source)