File indexing completed on 2024-06-28 02:36:14
0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003
0004 from Configuration.Eras.Era_Run3_cff import Run3
0005
0006 process = cms.Process('reRECO',Run3)
0007
0008 options = VarParsing.VarParsing('analysis')
0009 options.register('globalTag',
0010 "auto:run3_data_prompt",
0011 VarParsing.VarParsing.multiplicity.singleton,
0012 VarParsing.VarParsing.varType.string,
0013 "input file name")
0014 options.register('isStrip',
0015 True,
0016 VarParsing.VarParsing.multiplicity.singleton,
0017 VarParsing.VarParsing.varType.bool,
0018 "true filters on Strips, false filters on Pixels")
0019
0020 options.register('testCombinations',
0021 '',
0022 VarParsing.VarParsing.multiplicity.list,
0023 VarParsing.VarParsing.varType.string,
0024 "List of combinations of partitions to test")
0025 options.parseArguments()
0026
0027
0028 process.load('Configuration.StandardSequences.Services_cff')
0029
0030 process.load('FWCore.MessageService.MessageLogger_cfi')
0031 process.MessageLogger.cerr.enable = False
0032 process.MessageLogger.DetectorStatusFilter=dict()
0033 process.MessageLogger.cout = cms.untracked.PSet(
0034 enable = cms.untracked.bool(True),
0035 threshold = cms.untracked.string("INFO"),
0036 default = cms.untracked.PSet(limit = cms.untracked.int32(0)),
0037 FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(-1),
0038 reportEvery = cms.untracked.int32(1)
0039 ),
0040 DetectorStatusFilter = cms.untracked.PSet( limit = cms.untracked.int32(-1)),
0041 enableStatistics = cms.untracked.bool(True)
0042 )
0043
0044 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0045 process.load('Configuration.StandardSequences.MagneticField_cff')
0046 process.load('Configuration.StandardSequences.RawToDigi_Data_cff')
0047 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0048
0049 process.maxEvents = cms.untracked.PSet(
0050 input = cms.untracked.int32(options.maxEvents),
0051 output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
0052 )
0053
0054
0055 process.source = cms.Source("PoolSource",
0056
0057 fileNames = cms.untracked.vstring(options.inputFiles)
0058 )
0059
0060 from Configuration.AlCa.GlobalTag import GlobalTag
0061 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0062
0063
0064 process.raw2digi_step = cms.Path(process.RawToDigi)
0065
0066 process.OUT = cms.OutputModule("PoolOutputModule",
0067 outputCommands = cms.untracked.vstring('drop *',
0068 'keep *_onlineMetaDataDigis_*_*',
0069 'keep *_scalersRawToDigi_*_*'),
0070 SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('analysis_step')),
0071 fileName = cms.untracked.string(options.outputFile)
0072 )
0073
0074
0075 from DQM.TrackerCommon.TrackerFilterConfiguration_cfi import detectorStateFilter
0076 process.SiPixelFilter = detectorStateFilter.clone(DetectorType = 'pixel',
0077 DebugOn = True)
0078
0079 process.SiStripFilter = detectorStateFilter.clone(DetectorType = 'sistrip',
0080 DebugOn = True,
0081 acceptedCombinations = options.testCombinations)
0082
0083
0084 if(options.isStrip) :
0085 process.analysis_step = cms.Path(process.SiStripFilter)
0086 else:
0087 process.analysis_step = cms.Path(process.SiPixelFilter)
0088
0089
0090 process.printEventNumber = cms.OutputModule("AsciiOutputModule")
0091 process.this_is_the_end = cms.EndPath(process.OUT*process.printEventNumber)
0092
0093 process.schedule = cms.Schedule(process.raw2digi_step,process.analysis_step,process.this_is_the_end)