Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:08:52

0001 import FWCore.ParameterSet.Config as cms
0002 from Configuration.AlCa.GlobalTag import GlobalTag
0003 
0004 process = cms.Process('SPYFEDEMULATOR')
0005 
0006 ##source of normal event data
0007 process.source = cms.Source(
0008     'PoolSource',
0009     fileNames = cms.untracked.vstring(
0010 #        'file:/eos/cms/store/user/jblee/SpyRawToDigis234824.root',
0011         'file:SpyMatchedEvents234824_TEST1.root'
0012 #'file:/eos/cms/store/user/jblee/SpyRawToDigis234824_TEST.root'
0013         )
0014     )
0015 
0016 ## ---- Services ----
0017 process.load("DQM.SiStripCommon.MessageLogger_cfi")
0018 
0019 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100))
0020 
0021 ## Global tag - see http://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0022 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0023 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data', '')
0024 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0025 
0026 # --- The unpacking configuration ---
0027 process.load('DQM.SiStripMonitorHardware.SiStripSpyUnpacker_cfi')
0028 process.load('DQM.SiStripMonitorHardware.SiStripSpyDigiConverter_cfi')
0029 
0030 ## * Scope digi settings
0031 process.SiStripSpyUnpacker.FEDIDs = cms.vuint32()                   #use a subset of FEDs or leave empty for all.
0032 #process.SiStripSpy.FEDIDs = cms.vuint32(50, 187, 260, 356) #one from each partition
0033 process.SiStripSpyUnpacker.InputProductLabel = cms.InputTag('rawDataCollector')
0034 process.SiStripSpyUnpacker.AllowIncompleteEvents = True
0035 process.SiStripSpyUnpacker.StoreCounters = True
0036 process.SiStripSpyUnpacker.StoreScopeRawDigis = cms.bool(True)      # Note - needs to be True for use in other modules.
0037 ## * Module digi settings
0038 process.SiStripSpyDigiConverter.InputProductLabel = cms.InputTag('SiStripSpyUnpacker','ScopeRawDigis')
0039 process.SiStripSpyDigiConverter.StorePayloadDigis = True
0040 process.SiStripSpyDigiConverter.StoreReorderedDigis = True
0041 process.SiStripSpyDigiConverter.StoreModuleDigis = True
0042 process.SiStripSpyDigiConverter.StoreAPVAddress = True
0043 process.SiStripSpyDigiConverter.MinDigiRange = 100
0044 process.SiStripSpyDigiConverter.MaxDigiRange = 1024
0045 process.SiStripSpyDigiConverter.MinZeroLight = 0
0046 process.SiStripSpyDigiConverter.MaxZeroLight = 1024
0047 process.SiStripSpyDigiConverter.MinTickHeight = 0
0048 process.SiStripSpyDigiConverter.MaxTickHeight = 1024
0049 process.SiStripSpyDigiConverter.ExpectedPositionOfFirstHeaderBit = 6
0050 process.SiStripSpyDigiConverter.DiscardDigisWithWrongAPVAddress = True
0051 
0052 ## ---- FED Emulation ----
0053 process.load('DQM.SiStripMonitorHardware.SiStripFEDEmulator_cfi')
0054 process.SiStripFEDEmulator.SpyReorderedDigisTag = cms.InputTag('SiStripSpyEventMatcher','SpyReordered')
0055 process.SiStripFEDEmulator.SpyVirginRawDigisTag = cms.InputTag('SiStripSpyEventMatcher','SpyVirginRaw')
0056 process.SiStripFEDEmulator.ByModule = cms.bool(True) #use the digis stored by module (i.e. detId)
0057 
0058 #process.load('PerfTools.Callgrind.callgrindSwitch_cff')
0059 
0060 process.p = cms.Path(
0061 #     process.SiStripSpyUnpacker
0062 #     *process.SiStripSpyDigiConverter
0063     #*process.profilerStart*
0064     process.SiStripFEDEmulator
0065     #*process.profilerStop 
0066     )
0067 
0068 ## --- What to output ---
0069 process.output = cms.OutputModule(
0070     "PoolOutputModule",
0071     fileName = cms.untracked.string("SpyMatched_FEDemulated234824_TEST.root"),
0072     outputCommands = cms.untracked.vstring(
0073        'keep *',
0074        #drop whatever collections from the above here - to save disk space!
0075        #'drop *_*_*_SPYEVENTMATCHING',
0076        #'drop *_SiStripSpyUnpacker_*_*',
0077        #'drop *_SiStripSpyDigiConverter_*_*',
0078        #'keep *_*_VirginRaw_*',
0079        #'drop *_TriggerResults_*_*',
0080        #'drop *_*_*_HLT'
0081        )
0082     )
0083 
0084 process.e = cms.EndPath( process.output )