Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:09:25

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("DQM")
0004 process.load("DQMServices.Core.DQM_cfg")
0005 
0006 process.load("DQM.BeamMonitor.BeamMonitor_cff")
0007 process.load("DQM.BeamMonitor.BeamMonitorBx_cff")
0008 process.load("DQM.BeamMonitor.BeamConditionsMonitor_cff")
0009 
0010 process.load('Configuration/StandardSequences/GeometryExtended_cff')
0011 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
0012 process.load("Configuration.StandardSequences.RawToDigi_Data_cff") ## For Data
0013 #process.load("Configuration.StandardSequences.RawToDigi_cff")     ## For MC
0014 process.load("Configuration.StandardSequences.ReconstructionHeavyIons_cff") ## HI sequences
0015 process.load("DQMServices.Components.DQMEnvironment_cfi")
0016 
0017 process.maxEvents = cms.untracked.PSet(
0018     input = cms.untracked.int32(-1)
0019 )
0020 
0021 process.load('FWCore.MessageService.MessageLogger_cfi')
0022 process.MessageLogger.debugModules = ['dqmBeamMonitor']
0023 process.MessageLogger.BeamMonitor = dict()
0024 process.MessageLogger.cerr.threshold = "INFO"
0025 
0026 #--------------------------
0027 # Input files (heavy-ion MC)
0028 #--------------------------
0029 
0030 process.source = cms.Source(
0031     "PoolSource",
0032     fileNames = cms.untracked.vstring(
0033         # Virgin raw
0034         '/store/data/Run2010B/HeavyIonTest/RAW/v1/000/146/421/FAD966AE-64C6-DF11-9649-0019B9F72BFF.root',
0035         '/store/data/Run2010B/HeavyIonTest/RAW/v1/000/146/421/F6C87AAF-69C6-DF11-A9D0-001D09F23944.root',
0036     )
0037 )
0038 
0039 #--------------------------
0040 # Filters
0041 #--------------------------
0042 
0043 # HLT Filter
0044 process.load("HLTrigger.special.HLTTriggerTypeFilter_cfi")
0045 # 0=random, 1=physics, 2=calibration, 3=technical
0046 process.hltTriggerTypeFilter.SelectedTriggerType = 1
0047 
0048 # L1 Trigger Bit Selection (bit 40 and 41 for BSC trigger)
0049 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
0050 process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
0051 process.hltLevel1GTSeed.L1TechTriggerSeeding = cms.bool(True)
0052 process.hltLevel1GTSeed.L1SeedsLogicalExpression = cms.string('40 OR 41')
0053 
0054 # Select events based on the pixel cluster multiplicity
0055 import  HLTrigger.special.hltPixelActivityFilter_cfi
0056 process.multFilter = HLTrigger.special.hltPixelActivityFilter_cfi.hltPixelActivityFilter.clone(
0057     inputTag  = cms.InputTag('siPixelClusters'),
0058     minClusters = cms.uint32(150),
0059     maxClusters = cms.uint32(50000)
0060     )
0061 
0062 process.phystrigger = cms.Sequence(
0063                                    process.hltTriggerTypeFilter*
0064                                    process.gtDigis*
0065                                    process.hltLevel1GTSeed)
0066 
0067 process.filter_step = cms.Sequence( process.siPixelDigis
0068                                    *process.siPixelClusters
0069                                    #*process.multFilter
0070                                   )
0071 
0072 
0073 process.RecoForDQM = cms.Sequence(*process.siPixelDigis
0074                                   *process.siPixelClusters
0075                                   *process.siPixelRecHits
0076                                   *process.offlineBeamSpot
0077                                   *process.hiPixelVertices
0078                                   *process.hiPixel3PrimTracksSequence
0079                                  )
0080 
0081 
0082 # make pixel vertexing less sensitive to incorrect beamspot
0083 process.hiPixel3ProtoTracks.RegionFactoryPSet.RegionPSet.originRadius = 0.2
0084 process.hiPixel3ProtoTracks.RegionFactoryPSet.RegionPSet.fixedError = 0.5
0085 process.hiSelectedProtoTracks.maxD0Significance = 100
0086 process.hiPixelAdaptiveVertex.TkFilterParameters.maxD0Significance = 100
0087 process.hiPixelAdaptiveVertex.useBeamConstraint = False
0088 process.hiPixelAdaptiveVertex.PVSelParameters.maxDistanceToBeam = 1.0
0089 
0090 
0091 # use HI pixel tracking and vertexing
0092 process.dqmBeamMonitor.BeamFitter.TrackCollection = cms.untracked.InputTag('hiPixel3PrimTracks')
0093 process.dqmBeamMonitor.primaryVertex = cms.untracked.InputTag('hiSelectedVertex')
0094 process.dqmBeamMonitor.PVFitter.VertexCollection = cms.untracked.InputTag('hiSelectedVertex')
0095 
0096 
0097 # Change Beam Monitor variables
0098 if process.dqmSaver.producer.value() is "Playback":
0099   process.dqmBeamMonitor.BeamFitter.WriteAscii = False
0100   process.dqmBeamMonitor.BeamFitter.AsciiFileName = 'BeamFitResults.txt'
0101   process.dqmBeamMonitor.BeamFitter.WriteDIPAscii = True
0102   process.dqmBeamMonitor.BeamFitter.DIPFileName = 'DIP_BeamFitResults.txt'
0103 else:
0104   process.dqmBeamMonitor.BeamFitter.WriteAscii = True
0105   process.dqmBeamMonitor.BeamFitter.AsciiFileName = 'BeamFitResults.txt'
0106   process.dqmBeamMonitor.BeamFitter.WriteDIPAscii = True
0107   process.dqmBeamMonitor.BeamFitter.DIPFileName = 'DIP_BeamFitResults.txt'
0108 #process.dqmBeamMonitor.BeamFitter.SaveFitResults = False
0109 #process.dqmBeamMonitor.BeamFitter.OutputFileName = '/nfshome0/yumiceva/BeamMonitorDQM/BeamFitResults.root'
0110   process.dqmBeamMonitorBx.BeamFitter.WriteAscii = True
0111   process.dqmBeamMonitorBx.BeamFitter.AsciiFileName = 'BeamFitResults_Bx.txt'
0112  
0113 # Lower for HI
0114 process.dqmBeamMonitor.PVFitter.minNrVerticesForFit   = 20
0115 process.dqmBeamMonitorBx.PVFitter.minNrVerticesForFit = 20
0116  
0117  
0118 ## TKStatus
0119 process.dqmTKStatus = cms.EDAnalyzer("TKStatus",
0120         BeamFitter = cms.PSet(
0121         DIPFileName = process.dqmBeamMonitor.BeamFitter.DIPFileName
0122         )
0123 )
0124  
0125 process.dqmBeamMonitor.OnlineMode = True                  ## in MC the LS are not ordered??
0126 process.dqmBeamMonitor.BeamFitter.MinimumTotalLayers = 3   ## using pixel triplets
0127 process.dqmBeamMonitor.resetEveryNLumi = 10                ## default is 20
0128 process.dqmBeamMonitor.resetPVEveryNLumi = 10               ## default is 5
0129 
0130 process.load("FWCore.Modules.preScaler_cfi")
0131 process.preScaler.prescaleFactor = 300
0132 
0133 #--------------------------
0134 # DQM output
0135 #--------------------------
0136 
0137 # Setup DQM store parameters.
0138 process.DQMStore.verbose = 0
0139 process.DQM.collectorHost = 'lxplus438.cern.ch'
0140 process.DQM.collectorPort = 9190
0141 process.dqmSaver.dirName = '.'
0142 process.dqmSaver.producer = 'Playback'
0143 process.dqmSaver.convention = 'Online'
0144 process.dqmEnv.subSystemFolder = 'BeamMonitor'
0145 process.dqmSaver.saveByRun = 1
0146 process.dqmSaver.saveAtJobEnd = True
0147 
0148 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0149 process.GlobalTag.globaltag = 'MC_44_V4::All' ## 'realistic' offline beamspot, unlike 36x sample
0150 
0151 process.options = cms.untracked.PSet(
0152     wantSummary = cms.untracked.bool(True)
0153     )
0154 
0155 
0156 process.hi = cms.Path(*process.preScaler
0157                       *process.hltTriggerTypeFilter
0158                       *process.RawToDigi
0159                       *process.filter_step
0160                       *process.RecoForDQM
0161                       *process.dqmBeamMonitor
0162                       +process.dqmEnv
0163                       +process.dqmSaver)
0164 
0165 
0166 process.schedule = cms.Schedule(process.hi)
0167