Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-15 23:34:02

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