Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-14 23:57:21

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("DQM")
0004 ###DQM Envirionment####################
0005 process.load("DQMServices.Core.DQM_cfg")
0006 
0007 process.load("DQM.BeamMonitor.BeamMonitor_cff")
0008 process.load("DQM.BeamMonitor.BeamMonitorBx_cff")
0009 process.load("DQM.BeamMonitor.BeamConditionsMonitor_cff")
0010 
0011 process.load("DQMServices.Components.DQMEnvironment_cfi")
0012 
0013 #######----Event to Analyze----########
0014 process.maxEvents = cms.untracked.PSet(
0015     input = cms.untracked.int32(-1)
0016 )
0017 
0018 ####---Massage logger Services----####
0019 process.load('FWCore.MessageService.MessageLogger_cfi')
0020 process.MessageLogger.debugModules = ['dqmBeamMonitor']
0021 process.MessageLogger.BeamMonitor = dict()
0022 process.MessageLogger.cerr.threshold = "INFO"
0023 
0024 
0025 #----------------------------
0026 # DQM Live Environment
0027 #-----------------------------
0028 process.load("DQM.Integration.test.environment_cfi")
0029 process.dqmEnv.subSystemFolder = 'BeamMonitor'
0030 
0031 import DQMServices.Components.DQMEnvironment_cfi
0032 process.dqmEnvPixelLess = DQMServices.Components.DQMEnvironment_cfi.dqmEnv.clone()
0033 process.dqmEnvPixelLess.subSystemFolder = 'BeamMonitor_PixelLess'
0034 
0035 
0036 process.load("DQM.Integration.test.inputsource_cfi")
0037 process.EventStreamHttpReader.SelectEvents = cms.untracked.PSet(
0038     SelectEvents = cms.vstring('HLT_L1*','HLT_TrackerCosmics','HLT_Jet*'))
0039 
0040 
0041 process.source = cms.Source(
0042     "PoolSource",
0043     fileNames = cms.untracked.vstring(
0044    'file:/tmp/schauhan/BACB7413-12FE-DF11-B0FB-003048678A6C.root'
0045 
0046  ),
0047   skipBadFiles = cms.untracked.bool(True),  
0048 )
0049 
0050 
0051 #--------------------------
0052 # Filters
0053 #--------------------------
0054 # HLT Filter
0055 process.load("HLTrigger.special.HLTTriggerTypeFilter_cfi")
0056 # 0=random, 1=physics, 2=calibration, 3=technical
0057 process.hltTriggerTypeFilter.SelectedTriggerType = 1
0058 
0059 #----------------------------
0060 # BeamMonitor
0061 #-----------------------------
0062 process.dqmBeamMonitor.OnlineMode        = True
0063 process.dqmBeamMonitor.resetEveryNLumi   = 5
0064 process.dqmBeamMonitor.resetPVEveryNLumi = 5
0065 #process.dqmBeamMonitor.BeamFitter.MinimumInputTracks = 150
0066 
0067 # Set Lower if the bunches are low
0068 process.dqmBeamMonitorBx.fitEveryNLumi   = 30
0069 process.dqmBeamMonitorBx.resetEveryNLumi = 30
0070 
0071 #TriggerName for selecting pv for DIP
0072 process.dqmBeamMonitor.jetTrigger  = cms.untracked.vstring("HLT_L1",
0073                                                            "HLT_Act")
0074 
0075 process.dqmBeamMonitor.hltResults = cms.InputTag("TriggerResults","","HLT")
0076 #-------------------------------------------------
0077 # GEOMETRY
0078 #-------------------------------------------------
0079 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0080 
0081 #-----------------------------
0082 # Magnetic Field
0083 #-----------------------------
0084 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0085 
0086 
0087 
0088 #-----------------------
0089 #  Reconstruction Modules
0090 #-----------------------
0091 ## Collision Reconstruction
0092 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
0093 process.load("Configuration.StandardSequences.Reconstruction_cff")
0094 process.load("RecoTracker.IterativeTracking.iterativeTk_cff")
0095 
0096 ## Pixelless Tracking
0097 process.load('RecoTracker/Configuration/RecoTrackerNotStandard_cff')
0098 process.MeasurementTracker.pixelClusterProducer = cms.string("")
0099 
0100 # Offline Beam Spot
0101 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cff")
0102 
0103 ## Offline PrimaryVertices
0104 import RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi
0105 process.offlinePrimaryVertices = RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi.offlinePrimaryVertices.clone()
0106 
0107 ## Input track for PrimaryVertex reconstruction, uncomment the following line to use pixelLess tracks
0108 #process.offlinePrimaryVertices.TrackLabel = cms.InputTag("ctfPixelLess")
0109 
0110 process.dqmBeamMonitor.BeamFitter.TrackCollection = cms.untracked.InputTag('generalTracks')
0111 process.dqmBeamMonitorBx.BeamFitter.TrackCollection = cms.untracked.InputTag('generalTracks')
0112 process.offlinePrimaryVertices.TrackLabel = cms.InputTag("generalTracks")
0113 
0114 
0115 
0116 #---- replaces ----
0117 process.initialStepSeeds.RegionFactoryPSet.ComponentName = 'GlobalRegionProducerFromBeamSpot' # was GlobalRegionProducer
0118 #---- new parameters ----
0119 process.initialStepSeeds.RegionFactoryPSet.RegionPSet.beamSpot = cms.InputTag("offlineBeamSpot")
0120 
0121 
0122 
0123 #process.tracking = cms.Sequence(process.siPixelDigis
0124 #                                 *process.siStripDigis
0125 #                                 *process.trackerlocalreco
0126 #                                 *process.offlineBeamSpot
0127 #                                 *process.recopixelvertexing
0128 #                                 *process.ckftracks)
0129 
0130 ##For Pixel Less tracking
0131 #process.tracking_pixelless = cms.Sequence(process.siPixelDigis
0132 #                                          *process.siStripDigis
0133 #                                          *process.trackerlocalreco
0134 #                                          *process.offlineBeamSpot
0135 #                                          *process.ctfTracksPixelLess)
0136 
0137 
0138 
0139 #fast general track reco
0140 process.iterTracking =cms.Sequence(process.InitialStep
0141                                   *process.LowPtTripletStep
0142                                   *process.PixelPairStep
0143                                   *process.DetachedTripletStep
0144                                   *process.MixedTripletStep
0145                                   *process.PixelLessStep
0146                                   *process.TobTecStep
0147                                   *process.generalTracks) 
0148 
0149 process.tracking_FirstStep = cms.Sequence(process.siPixelDigis
0150                                          *process.siStripDigis
0151                                          *process.trackerlocalreco
0152                                          *process.offlineBeamSpot
0153                                          *process.recopixelvertexing
0154                                          *process.iterTracking)
0155 
0156 #### END OF TRACKING RECONSTRUCTION ####
0157 
0158 
0159 # Change Beam Monitor variables
0160 if process.dqmSaver.producer.value() is "Playback":
0161   process.dqmBeamMonitor.BeamFitter.WriteAscii = False
0162   process.dqmBeamMonitor.BeamFitter.AsciiFileName = 'BeamFitResults.txt'
0163   process.dqmBeamMonitor.BeamFitter.WriteDIPAscii = True
0164   process.dqmBeamMonitor.BeamFitter.DIPFileName = 'DIP_BeamFitResults.txt'
0165 else:
0166   process.dqmBeamMonitor.BeamFitter.WriteAscii = True
0167   process.dqmBeamMonitor.BeamFitter.AsciiFileName = 'BeamFitResults.txt'
0168   process.dqmBeamMonitor.BeamFitter.WriteDIPAscii = True
0169   process.dqmBeamMonitor.BeamFitter.DIPFileName = 'DIP_BeamFitResults.txt'
0170 #process.dqmBeamMonitor.BeamFitter.SaveFitResults = False
0171 #process.dqmBeamMonitor.BeamFitter.OutputFileName = '/nfshome0/yumiceva/BeamMonitorDQM/BeamFitResults.root'
0172   process.dqmBeamMonitorBx.BeamFitter.WriteAscii = True
0173   process.dqmBeamMonitorBx.BeamFitter.AsciiFileName = 'BeamFitResults_Bx.txt'
0174 
0175 # Lower for HI
0176 process.dqmBeamMonitor.PVFitter.minNrVerticesForFit   = 20
0177 process.dqmBeamMonitorBx.PVFitter.minNrVerticesForFit = 20
0178 
0179 
0180 ## TKStatus
0181 process.dqmTKStatus = cms.EDAnalyzer("TKStatus",
0182         BeamFitter = cms.PSet(
0183         DIPFileName = process.dqmBeamMonitor.BeamFitter.DIPFileName
0184         )
0185 )
0186 
0187 
0188 
0189 #--------------------------
0190 #process.phystrigger = cms.Sequence(process.hltTriggerTypeFilter*process.gtDigis*process.hltLevel1GTSeed)
0191 process.dqmcommon = cms.Sequence(process.dqmEnv
0192                                  *process.dqmSaver)
0193 
0194 process.monitor = cms.Sequence(process.dqmBeamMonitor
0195                                )
0196 
0197 #process.monitor_pixelless = cms.Sequence(process.dqmBeamMonitor_pixelless
0198 #                                          *process.dqmEnvPixelLess)
0199 
0200 
0201 # Setup DQM store parameters.
0202 process.DQMStore.verbose = 1
0203 #process.DQM.collectorHost = 'cmslpc17.fnal.gov'  ## at cmslpc
0204 process.DQM.collectorHost   = 'lxplus438.cern.ch'
0205 process.DQM.collectorPort   = 9190
0206 process.dqmSaver.dirName    = '.'
0207 process.dqmSaver.producer   = 'Playback'
0208 process.dqmSaver.convention = 'Online'
0209 process.dqmEnv.subSystemFolder = 'BeamMonitor'
0210 process.dqmSaver.saveByRun     = 1
0211 process.dqmSaver.saveAtJobEnd  = True
0212 
0213 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0214 process.GlobalTag.globaltag = 'GR_R_44_V4::All'
0215 
0216 
0217 process.options = cms.untracked.PSet(
0218     wantSummary = cms.untracked.bool(True)
0219 )
0220 
0221 process.pp = cms.Path( process.scalersRawToDigi
0222                       *process.onlineMetaDataDigis
0223                       *process.dqmTKStatus
0224                       *process.hltTriggerTypeFilter
0225                       *process.dqmcommon
0226                       *process.tracking_FirstStep
0227                       *process.offlinePrimaryVertices
0228                       *process.monitor
0229                      )
0230 
0231  
0232 #print process.dumpPython()