Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-25 04:55:06

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", # default value
0011                  VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0012                  VarParsing.VarParsing.varType.string, # string, int, or float
0013                  "input file name")                
0014 options.register('isStrip',
0015                  True, # default value
0016                  VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0017                  VarParsing.VarParsing.varType.bool, # string, int, or float
0018                  "true filters on Strips, false filters on Pixels")
0019 options.parseArguments()
0020 
0021 # import of standard configurations
0022 process.load('Configuration.StandardSequences.Services_cff')
0023 
0024 process.load('FWCore.MessageService.MessageLogger_cfi')   
0025 process.MessageLogger.cerr.enable = False
0026 process.MessageLogger.DetectorStatusFilter=dict()  
0027 process.MessageLogger.cout = cms.untracked.PSet(
0028     enable = cms.untracked.bool(True),
0029     threshold = cms.untracked.string("INFO"),
0030     default   = cms.untracked.PSet(limit = cms.untracked.int32(0)),                       
0031     FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(-1),
0032                                    reportEvery = cms.untracked.int32(1)
0033                                    ),                                                      
0034     DetectorStatusFilter = cms.untracked.PSet( limit = cms.untracked.int32(-1)),
0035     enableStatistics = cms.untracked.bool(True)
0036     )
0037 
0038 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0039 process.load('Configuration.StandardSequences.MagneticField_cff')
0040 process.load('Configuration.StandardSequences.RawToDigi_Data_cff')
0041 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0042 
0043 process.maxEvents = cms.untracked.PSet(
0044     input = cms.untracked.int32(options.maxEvents),
0045     output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
0046 )
0047 
0048 # Input source
0049 process.source = cms.Source("PoolSource",
0050                             #fileNames = cms.untracked.vstring("/store/express/Commissioning2021/ExpressCosmics/FEVT/Express-v1/000/343/498/00000/004179ae-ac29-438a-bd2d-ea98139c21a7.root") # default value
0051                             fileNames = cms.untracked.vstring(options.inputFiles)
0052                             )
0053 # Other statements
0054 from Configuration.AlCa.GlobalTag import GlobalTag
0055 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0056 
0057 # Path and EndPath definitions
0058 process.raw2digi_step = cms.Path(process.RawToDigi)
0059 
0060 process.OUT = cms.OutputModule("PoolOutputModule",
0061                                outputCommands = cms.untracked.vstring('drop *',
0062                                                                       'keep *_onlineMetaDataDigis_*_*',
0063                                                                       'keep *_scalersRawToDigi_*_*'),
0064                                SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('analysis_step')),
0065                                fileName = cms.untracked.string(options.outputFile)
0066                                )
0067 
0068 # the module to be tested
0069 from DQM.TrackerCommon.TrackerFilterConfiguration_cfi import detectorStateFilter
0070 process.SiPixelFilter = detectorStateFilter.clone(DetectorType = 'pixel',
0071                                                   DebugOn = True)
0072 
0073 process.SiStripFilter = detectorStateFilter.clone(DetectorType = 'sistrip',
0074                                                   DebugOn = True)
0075 
0076 #process.analysis_step = cms.Path(process.detectorStateFilter)
0077 if(options.isStrip) :
0078     process.analysis_step = cms.Path(process.SiStripFilter)
0079 else:
0080     process.analysis_step = cms.Path(process.SiPixelFilter)
0081 
0082 # end path
0083 process.printEventNumber = cms.OutputModule("AsciiOutputModule")
0084 process.this_is_the_end = cms.EndPath(process.OUT*process.printEventNumber)
0085 
0086 process.schedule = cms.Schedule(process.raw2digi_step,process.analysis_step,process.this_is_the_end)