Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:15

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Configuration.Eras.Era_Run3_cff import Run3
0004 
0005 process = cms.Process('reRECO',Run3)
0006 
0007 import FWCore.ParameterSet.VarParsing as VarParsing
0008 
0009 options = VarParsing.VarParsing()
0010 options.register('maxEvents',
0011                  -1,
0012                  VarParsing.VarParsing.multiplicity.singleton,
0013                  VarParsing.VarParsing.varType.int,
0014                  "maximum events")
0015 options.register('globalTag',
0016                  'auto:phase1_2022_realistic',
0017                  VarParsing.VarParsing.multiplicity.singleton,
0018                  VarParsing.VarParsing.varType.string,
0019                  "conditions")
0020 options.register('resonance',
0021                  'Z',
0022                  VarParsing.VarParsing.multiplicity.singleton,
0023                  VarParsing.VarParsing.varType.string,
0024                  "resonance type")
0025 options.parseArguments()
0026 
0027 # import of standard configurations
0028 process.load('Configuration.StandardSequences.Services_cff')
0029 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0030 
0031 process.load("FWCore.MessageService.MessageLogger_cfi")
0032 process.MessageLogger.cerr.FwkReport.reportEvery = 200
0033 
0034 process.load('Configuration.EventContent.EventContent_cff')
0035 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0036 process.load('Configuration.StandardSequences.MagneticField_cff')
0037 process.load('DQMServices.Core.DQMStoreNonLegacy_cff')
0038 process.load('DQMOffline.Configuration.DQMOffline_cff')
0039 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0040 
0041 process.maxEvents = cms.untracked.PSet(
0042     input = cms.untracked.int32(options.maxEvents),
0043     output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
0044 )
0045 
0046 process.load("DQMOffline.Configuration.AlCaRecoDQM_cff")
0047 
0048 if (options.resonance == 'Z'):
0049     # Z
0050     print('',30*"#",'\n # will process Z->mm data\n',30*"#")
0051     readFiles = ['/store/relval/CMSSW_12_5_0_pre2/RelValZMM_14/ALCARECO/TkAlDiMuonAndVertex-124X_mcRun3_2022_realistic_v3-v1/2580000/4f9aee02-35a2-49b7-93f5-831214cf32d8.root']
0052     process.seqALCARECOTkAlDQM = cms.Sequence(process.ALCARECOTkAlDiMuonAndVertexVtxDQM + process.ALCARECOTkAlDiMuonMassBiasDQM)
0053 elif (options.resonance == 'Jpsi'):
0054     # J/psi
0055     print('',30*"#",'\n # will process Jpsi->mm data\n',30*"#")
0056     readFiles = ['/store/relval/CMSSW_12_5_0_pre2/RelValEtaBToJpsiJpsi_14TeV/ALCARECO/TkAlJpsiMuMu-124X_mcRun3_2022_realistic_v3-v1/2580000/fc77aaed-b0f5-4446-87f5-f7341099bd73.root']
0057     process.seqALCARECOTkAlDQM = cms.Sequence(process.ALCARECOTkAlJpsiMuMuVtxDQM + process.ALCARECOTkAlJpsiMassBiasDQM)
0058 elif (options.resonance == 'Upsilon'):
0059     # upsilon
0060     print('',30*"#",'\n # will process Upsilon->mm data\n',30*"#")
0061     readFiles = ['/store/relval/CMSSW_12_5_0_pre2/RelValUpsilon1SToMuMu_14/ALCARECO/TkAlUpsilonMuMu-124X_mcRun3_2022_realistic_v3-v1/2580000/fca73916-5076-4c9f-a460-2481588825ab.root']
0062     process.seqALCARECOTkAlDQM = cms.Sequence(process.ALCARECOTkAlUpsilonMuMuVtxDQM + process.ALCARECOTkAlUpsilonMassBiasDQM)
0063 else:
0064     print('unrecongnized %s resonance',options.resonance)
0065     exit(1)
0066 
0067 # Input source
0068 process.source = cms.Source("PoolSource",
0069                             fileNames = cms.untracked.vstring(readFiles),
0070                             secondaryFileNames = cms.untracked.vstring()
0071                             )
0072 
0073 process.options = cms.untracked.PSet(
0074     IgnoreCompletely = cms.untracked.vstring(),
0075     Rethrow = cms.untracked.vstring(),
0076     accelerators = cms.untracked.vstring('*'),
0077     allowUnscheduled = cms.obsolete.untracked.bool,
0078     canDeleteEarly = cms.untracked.vstring(),
0079     deleteNonConsumedUnscheduledModules = cms.untracked.bool(True),
0080     dumpOptions = cms.untracked.bool(False),
0081     emptyRunLumiMode = cms.obsolete.untracked.string,
0082     eventSetup = cms.untracked.PSet(
0083         forceNumberOfConcurrentIOVs = cms.untracked.PSet(
0084             allowAnyLabel_=cms.required.untracked.uint32
0085         ),
0086         numberOfConcurrentIOVs = cms.untracked.uint32(0)
0087     ),
0088     fileMode = cms.untracked.string('FULLMERGE'),
0089     forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
0090     makeTriggerResults = cms.obsolete.untracked.bool,
0091     numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(0),
0092     numberOfConcurrentRuns = cms.untracked.uint32(1),
0093     numberOfStreams = cms.untracked.uint32(0),
0094     numberOfThreads = cms.untracked.uint32(1),
0095     printDependencies = cms.untracked.bool(False),
0096     sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
0097     throwIfIllegalParameter = cms.untracked.bool(True),
0098     wantSummary = cms.untracked.bool(False)
0099 )
0100 
0101 process.DQMoutput = cms.OutputModule("DQMRootOutputModule",
0102     dataset = cms.untracked.PSet(
0103         dataTier = cms.untracked.string('DQMIO'),
0104         filterName = cms.untracked.string('')
0105     ),
0106     fileName = cms.untracked.string('file:step3_inDQM_'+options.resonance+'.root'),
0107     outputCommands = process.DQMEventContent.outputCommands,
0108     splitLevel = cms.untracked.int32(0)
0109 )
0110 
0111 from Configuration.AlCa.GlobalTag import GlobalTag
0112 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0113 
0114 process.dqmoffline_step = cms.EndPath(process.seqALCARECOTkAlDQM)
0115 process.DQMoutput_step = cms.EndPath(process.DQMoutput)
0116 
0117 process.schedule = cms.Schedule(process.dqmoffline_step,process.DQMoutput_step)