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("BeamMonitor")
0004 
0005 #----------------------------
0006 # Event Source
0007 #-----------------------------
0008 process.load("DQM.Integration.test.inputsource_cfi")
0009 process.EventStreamHttpReader.SelectEvents =  cms.untracked.PSet(
0010     SelectEvents = cms.vstring(
0011         'HLT_HI*',
0012         #'HLT_HICentralityVeto',
0013         #'HLT_HIJet35U_Core',
0014         #'HLT_HIL1DoubleMuOpen_Core',
0015         #'HLT_HIMinBiasBSC_Core',
0016         #'HLT_HIPhoton15_Core',
0017     )
0018 )
0019 
0020 #--------------------------
0021 # Filters
0022 #--------------------------
0023 # HLT Filter
0024 process.load("HLTrigger.special.HLTTriggerTypeFilter_cfi")
0025 # 0=random, 1=physics, 2=calibration, 3=technical
0026 process.hltTriggerTypeFilter.SelectedTriggerType = 1
0027 
0028 # L1 Trigger Bit Selection
0029 #process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
0030 #process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
0031 #process.hltLevel1GTSeed.L1TechTriggerSeeding = cms.bool(True)
0032 #process.hltLevel1GTSeed.L1SeedsLogicalExpression = cms.string('NOT (36 OR 37 OR 38 OR 39)')
0033 
0034 #----------------------------
0035 # DQM Live Environment
0036 #-----------------------------
0037 process.load("DQM.Integration.test.environment_cfi")
0038 process.dqmEnv.subSystemFolder = 'BeamMonitor'
0039 
0040 import DQMServices.Components.DQMEnvironment_cfi
0041 process.dqmEnvPixelLess = DQMServices.Components.DQMEnvironment_cfi.dqmEnv.clone()
0042 process.dqmEnvPixelLess.subSystemFolder = 'BeamMonitor_PixelLess'
0043 
0044 #----------------------------
0045 # BeamMonitor
0046 #-----------------------------
0047 process.load("DQM.BeamMonitor.BeamMonitor_cff")
0048 process.load("DQM.BeamMonitor.BeamMonitorBx_cff")
0049 process.load("DQM.BeamMonitor.BeamConditionsMonitor_cff")
0050 
0051 process.dqmBeamMonitor.resetEveryNLumi = 5
0052 process.dqmBeamMonitor.resetPVEveryNLumi = 5
0053 
0054 # HI only has one bunch
0055 process.dqmBeamMonitorBx.fitEveryNLumi = 50
0056 process.dqmBeamMonitorBx.resetEveryNLumi = 50
0057 
0058 #-------------------------------------------------
0059 # GEOMETRY
0060 #-------------------------------------------------
0061 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0062 
0063 #-----------------------------
0064 # Magnetic Field
0065 #-----------------------------
0066 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0067 
0068 #--------------------------
0069 # Calibration
0070 #--------------------------
0071 process.load("DQM.Integration.test.FrontierCondition_GT_cfi")
0072 
0073 # Using offline alignments
0074 #import commands
0075 #from os import environ
0076 #environ["http_proxy"]="http://cmsproxy.cms:3128"
0077 #dasinfo = eval(commands.getoutput("wget -qO- 'http://vocms115.cern.ch:8304/tier0/express_config?run=&stream=Express'"))
0078 #process.GlobalTag.globaltag=dasinfo[0]['global_tag']
0079 #del environ["http_proxy"]
0080 
0081 #-----------------------
0082 #  Reconstruction Modules
0083 #-----------------------
0084 ## Collision Reconstruction
0085 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
0086 
0087 ## Load Heavy Ion Sequence
0088 process.load("Configuration.StandardSequences.ReconstructionHeavyIons_cff") ## HI sequences
0089 
0090 # Select events based on the pixel cluster multiplicity
0091 import  HLTrigger.special.hltPixelActivityFilter_cfi
0092 process.multFilter = HLTrigger.special.hltPixelActivityFilter_cfi.hltPixelActivityFilter.clone(
0093     inputTag  = cms.InputTag('siPixelClusters'),
0094     minClusters = cms.uint32(150),
0095     maxClusters = cms.uint32(50000)
0096     )
0097 
0098 process.filter_step = cms.Sequence( process.siPixelDigis
0099                                    *process.siPixelClusters
0100                                    #*process.multFilter
0101                                   )
0102 
0103 process.HIRecoForDQM = cms.Sequence( process.siPixelDigis
0104                                     *process.siPixelClusters
0105                                     *process.siPixelRecHits
0106                                     *process.offlineBeamSpot
0107                                     *process.hiPixelVertices
0108                                     *process.hiPixel3PrimTracks
0109                                    )
0110 
0111 # use HI pixel tracking and vertexing
0112 process.dqmBeamMonitor.BeamFitter.TrackCollection = cms.untracked.InputTag('hiPixel3PrimTracks')
0113 process.dqmBeamMonitorBx.BeamFitter.TrackCollection = cms.untracked.InputTag('hiPixel3PrimTracks')
0114 process.dqmBeamMonitor.primaryVertex = cms.untracked.InputTag('hiSelectedVertex')
0115 process.dqmBeamMonitor.PVFitter.VertexCollection = cms.untracked.InputTag('hiSelectedVertex')
0116 
0117 # Beamspot DQM options
0118 process.dqmBeamMonitor.OnlineMode = True                  ## in MC the LS are not ordered??
0119 process.dqmBeamMonitor.BeamFitter.MinimumTotalLayers = 3   ## using pixel triplets
0120 process.dqmBeamMonitorBx.BeamFitter.MinimumTotalLayers = 3   ## using pixel triplets
0121 
0122 # make pixel vertexing less sensitive to incorrect beamspot
0123 process.hiPixel3ProtoTracks.RegionFactoryPSet.RegionPSet.originRadius = 0.2
0124 process.hiPixel3ProtoTracks.RegionFactoryPSet.RegionPSet.fixedError = 0.5
0125 process.hiSelectedProtoTracks.maxD0Significance = 100
0126 process.hiPixelAdaptiveVertex.TkFilterParameters.maxD0Significance = 100
0127 process.hiPixelAdaptiveVertex.useBeamConstraint = False
0128 process.hiPixelAdaptiveVertex.PVSelParameters.maxDistanceToBeam = 1.0
0129 
0130 # Change Beam Monitor variables
0131 if process.dqmSaver.producer.value() is "Playback":
0132   process.dqmBeamMonitor.BeamFitter.WriteAscii = False
0133   process.dqmBeamMonitor.BeamFitter.AsciiFileName = '/nfshome0/yumiceva/BeamMonitorDQM/BeamFitResults.txt'
0134   process.dqmBeamMonitor.BeamFitter.WriteDIPAscii = True
0135   process.dqmBeamMonitor.BeamFitter.DIPFileName = '/nfshome0/dqmdev/BeamMonitorDQM/BeamFitResults.txt'
0136 else:
0137   process.dqmBeamMonitor.BeamFitter.WriteAscii = True
0138   process.dqmBeamMonitor.BeamFitter.AsciiFileName = '/nfshome0/yumiceva/BeamMonitorDQM/BeamFitResults.txt'
0139   process.dqmBeamMonitor.BeamFitter.WriteDIPAscii = True
0140   process.dqmBeamMonitor.BeamFitter.DIPFileName = '/nfshome0/dqmpro/BeamMonitorDQM/BeamFitResults.txt'
0141 #process.dqmBeamMonitor.BeamFitter.SaveFitResults = False
0142 #process.dqmBeamMonitor.BeamFitter.OutputFileName = '/nfshome0/yumiceva/BeamMonitorDQM/BeamFitResults.root'
0143   process.dqmBeamMonitorBx.BeamFitter.WriteAscii = True
0144   process.dqmBeamMonitorBx.BeamFitter.AsciiFileName = '/nfshome0/yumiceva/BeamMonitorDQM/BeamFitResults_Bx.txt'
0145 
0146 #process.dqmBeamMonitor.BeamFitter.InputBeamWidth = 0.006
0147 # Lower for HI
0148 process.dqmBeamMonitor.PVFitter.minNrVerticesForFit = 20
0149 process.dqmBeamMonitorBx.PVFitter.minNrVerticesForFit = 20
0150 
0151 ## TKStatus
0152 process.dqmTKStatus = cms.EDAnalyzer("TKStatus",
0153         BeamFitter = cms.PSet(
0154         DIPFileName = process.dqmBeamMonitor.BeamFitter.DIPFileName
0155         )
0156 )
0157 
0158 
0159 #--------------------------
0160 # Scheduling
0161 #--------------------------
0162 #process.phystrigger = cms.Sequence(process.hltTriggerTypeFilter*process.gtDigis*process.hltLevel1GTSeed)
0163 process.dqmcommon = cms.Sequence(process.dqmEnv
0164                                  *process.dqmSaver)
0165 
0166 
0167 process.monitor = cms.Sequence(process.dqmBeamMonitor
0168                                #+process.dqmBeamMonitorBx
0169                                )
0170 
0171 process.hi = cms.Path(process.scalersRawToDigi
0172                      *process.onlineMetaDataDigis
0173                      *process.dqmTKStatus
0174                      *process.hltTriggerTypeFilter
0175                      *process.filter_step
0176                      *process.HIRecoForDQM
0177                      *process.dqmcommon
0178                      *process.monitor)