Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-24 23:46:00

0001 import FWCore.ParameterSet.Config as cms
0002 from FWCore.ParameterSet.VarParsing import VarParsing
0003 
0004 # Cmd line options
0005 options = VarParsing ('analysis')
0006 options.register('produceByRun',
0007                  True,
0008                  VarParsing.multiplicity.singleton,
0009                  VarParsing.varType.bool,
0010                  "Accumulate EcalPhiSym RecHits by Run or by LuminosityBlock")
0011 options.register('saveFlatNano',
0012                  True,
0013                  VarParsing.multiplicity.singleton,
0014                  VarParsing.varType.bool,
0015                  "Produce FlatNanoAOD output")
0016 options.register('saveEDMNano',
0017                  False,
0018                  VarParsing.multiplicity.singleton,
0019                  VarParsing.varType.bool,
0020                  "Produce EDMNanoAOD output")
0021 options.register('saveEDM',
0022                  False,
0023                  VarParsing.multiplicity.singleton,
0024                  VarParsing.varType.bool,
0025                  "Produce stadard EDM output")
0026 options.inputFiles=[""]
0027 options.parseArguments()
0028 
0029 process = cms.Process("ECALPHISYM")
0030 process.load("FWCore.MessageService.MessageLogger_cfi")
0031 
0032 # Multi-threading
0033 process.options.numberOfStreams = cms.untracked.uint32(4)
0034 process.options.numberOfThreads = cms.untracked.uint32(4)
0035 
0036 # Conditions
0037 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0038 process.load('Configuration.Geometry.GeometryExtended2018Reco_cff')
0039 process.load('Configuration.Geometry.GeometryExtended2018Reco_cff')
0040 
0041 # use auto:run2_data to be able to test on run2 data for the time being.
0042 from Configuration.AlCa.GlobalTag import GlobalTag
0043 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data', '')
0044 
0045 # Source data
0046 # skip bad events
0047 process.options = cms.untracked.PSet(
0048     SkipEvent = cms.untracked.vstring('ProductNotFound'),
0049 )
0050 process.maxEvents = cms.untracked.PSet(
0051     input = cms.untracked.int32(-1)
0052 )
0053 process.source = cms.Source("PoolSource",
0054                             fileNames = cms.untracked.vstring(options.inputFiles)
0055                         )
0056 
0057 # Load EcalPhiSym workflow
0058 from Calibration.EcalCalibAlgos.EcalPhiSymRecoSequence_cff import ecal_phisym_workflow
0059 ecal_phisym_workflow(process, 
0060                      produce_by_run=options.produceByRun,
0061                      save_flatnano=options.saveFlatNano,
0062                      save_edmnano=options.saveEDMNano,
0063                      save_edm=options.saveEDM)
0064 
0065 process.MessageLogger.cout.FwkSummary = cms.untracked.PSet(
0066     reportEvery = cms.untracked.int32(100000))
0067 process.MessageLogger.cout.FwkReport = cms.untracked.PSet(
0068     reportEvery = cms.untracked.int32(100000))
0069 process.MessageLogger.cerr.FwkSummary.reportEvery = 100000
0070 process.MessageLogger.cerr.FwkReport.reportEvery = 100000