Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-07 22:22:45

0001 import FWCore.ParameterSet.Config as cms
0002 from FWCore.ParameterSet.VarParsing import VarParsing
0003 from Configuration.Eras.Era_Run3_cff import Run3
0004 from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
0005 
0006 options = VarParsing('analysis')
0007 options.register("run3", True, VarParsing.multiplicity.singleton, VarParsing.varType.bool,
0008                  "Set to True when using Run-3 data.")
0009 options.register("mc", False, VarParsing.multiplicity.singleton, VarParsing.varType.bool,
0010                  "Set to True when running on MC.")
0011 options.register("useB904ME11", False, VarParsing.multiplicity.singleton, VarParsing.varType.bool,
0012                  "Set to True when using B904 ME1/1 data.")
0013 options.register("useB904ME21", False, VarParsing.multiplicity.singleton, VarParsing.varType.bool,
0014                  "Set to True when using B904 ME2/1 data (also works for ME3/1 and ME4/1).")
0015 options.register("useB904ME234s2", False, VarParsing.multiplicity.singleton, VarParsing.varType.bool,
0016                  "Set to True when using B904 ME1/1 data (also works for MEX/2 and ME1/3).")
0017 options.register ("useGEMs", False, VarParsing.multiplicity.singleton, VarParsing.varType.bool)
0018 options.parseArguments()
0019 options.inputFiles = "file:step_DQM.root"
0020 
0021 process_era = Run3
0022 if not options.run3:
0023       process_era = Run2_2018
0024 
0025 process = cms.Process("DQMClient", process_era)
0026 process.load("Configuration/StandardSequences/GeometryRecoDB_cff")
0027 process.load("Configuration/StandardSequences/MagneticField_cff")
0028 process.load("Configuration/StandardSequences/FrontierConditions_GlobalTag_cff")
0029 process.load('Configuration.StandardSequences.DQMSaverAtRunEnd_cff')
0030 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0031 process.load('Configuration.EventContent.EventContent_cff')
0032 process.load("DQM.L1TMonitorClient.L1TdeCSCTPGClient_cfi")
0033 process.load("DQM.L1TMonitorClient.L1TdeGEMTPGClient_cfi")
0034 process.load('DQMOffline.Configuration.DQMOfflineMC_cff')
0035 
0036 process.maxEvents = cms.untracked.PSet(
0037       input = cms.untracked.int32(1)
0038 )
0039 
0040 process.options = cms.untracked.PSet(
0041       SkipEvent = cms.untracked.vstring('ProductNotFound')
0042 )
0043 
0044 process.source = cms.Source(
0045     "DQMRootSource",
0046     fileNames = cms.untracked.vstring("file:step_DQM.root")
0047 )
0048 
0049 process.MessageLogger = cms.Service("MessageLogger")
0050 
0051 ## global tag (data or MC, Run-2 or Run-3)
0052 from Configuration.AlCa.GlobalTag import GlobalTag
0053 if options.mc:
0054       process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0055       if options.run3:
0056             process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic', '')
0057 else:
0058       process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data', '')
0059       if options.run3:
0060             process.GlobalTag = GlobalTag(process.GlobalTag, '112X_dataRun3_Prompt_v5', '')
0061 
0062 process.l1tdeCSCTPGClient.useB904ME11 = options.useB904ME11
0063 process.l1tdeCSCTPGClient.useB904ME21 = options.useB904ME21
0064 process.l1tdeCSCTPGClient.useB904ME234s2 = options.useB904ME234s2
0065 
0066 ## schedule and path definition
0067 process.dqmsequence = cms.Sequence(process.l1tdeCSCTPGClient)
0068 if options.useGEMs:
0069       process.dqmsequence += process.l1tdeGEMTPGClient
0070 process.dqm_step = cms.Path(process.dqmsequence)
0071 process.dqmsave_step = cms.Path(process.DQMSaver)
0072 process.endjob_step = cms.EndPath(process.endOfProcess)
0073 
0074 process.schedule = cms.Schedule(
0075       process.dqm_step,
0076       process.endjob_step,
0077       process.dqmsave_step
0078 )