Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:14

0001 # from https://twiki.cern.ch/twiki/bin/viewauth/CMS/L1O2OOperations
0002 # to test the emulator from the .cms cluster retrieving the global tag
0003 #
0004 # The reference is L1Trigger/Configuration/test/L1EmulatorFromRaw_cfg.py
0005 #
0006 # test.py starts here
0007 # 
0008 #
0009 import FWCore.ParameterSet.Config as cms
0010 process = cms.Process('L1')
0011 
0012 process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(50))
0013 
0014 readFiles = cms.untracked.vstring('file:Raw.root')
0015 secFiles = cms.untracked.vstring() 
0016 process.source = cms.Source('PoolSource',
0017                             fileNames=readFiles,
0018                             secondaryFileNames=secFiles
0019                             )
0020 
0021 # import of standard configurations
0022 process.load('Configuration/StandardSequences/Services_cff')
0023 process.load('Configuration/StandardSequences/GeometryIdeal_cff')
0024 process.load('Configuration/StandardSequences/MagneticField_38T_cff')
0025 process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
0026 process.load('Configuration/EventContent/EventContent_cff')
0027 
0028 # load and configure modules via Global Tag
0029 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0030 process.GlobalTag.globaltag = 'GR10_H_V4::All'
0031 
0032 # Message Logger
0033 process.load('FWCore.MessageService.MessageLogger_cfi')
0034 process.MessageLogger.debugModules = ['*']
0035 
0036 process.MessageLogger.cerr.enable = False
0037 process.MessageLogger.cout = cms.untracked.PSet(
0038     enable = cms.untracked.bool(True),
0039     threshold = cms.untracked.string('INFO'),
0040     DEBUG=cms.untracked.PSet(
0041         limit=cms.untracked.int32(-1)
0042     ),
0043     INFO=cms.untracked.PSet(
0044         limit=cms.untracked.int32(-1)
0045     ),
0046     WARNING=cms.untracked.PSet(
0047         limit=cms.untracked.int32(-1)
0048     ),
0049     ERROR=cms.untracked.PSet(
0050         limit=cms.untracked.int32(-1)
0051     )
0052 )
0053 
0054 # Output definition
0055 process.output = cms.OutputModule("PoolOutputModule",
0056                                   outputCommands = process.FEVTDEBUGHLTEventContent.outputCommands,
0057                                   fileName = cms.untracked.string('L1EmulatorFromRaw.root'),
0058                                   dataset = cms.untracked.PSet(dataTier = cms.untracked.string("\'GEN-SIM-DIGI-RAW-HLTDEBUG\'"),
0059                                                                filterName = cms.untracked.string('')
0060                                                                )
0061                                   )
0062 
0063 process.out_step = cms.EndPath(process.output)
0064 #
0065 # test.py ends here
0066 #
0067 
0068 # Unpackers
0069 process.load("EventFilter.CSCTFRawToDigi.csctfunpacker_cfi")
0070 process.load("EventFilter.DTTFRawToDigi.dttfunpacker_cfi")
0071 
0072 
0073 # ------------------------------------------------------------------------------------------------
0074 # IMPORTANT:
0075 # ---------
0076 #
0077 # IF YOU WANT TO CONFIGURE THE EMULATOR VIA EventSetup (O2O mechanism or fake producer) the
0078 # option initializeFromPSet in L1Trigger/CSCTrackFinder/python/csctfTrackDigis_cfi.py
0079 # has to be set to False: initializeFromPSet = cms.bool(False)
0080 import L1Trigger.CSCTrackFinder.csctfTrackDigis_cfi
0081 process.simCsctfTrackDigis = L1Trigger.CSCTrackFinder.csctfTrackDigis_cfi.csctfTrackDigis.clone()
0082 process.simCsctfTrackDigis.SectorReceiverInput = cms.untracked.InputTag("csctfunpacker")
0083 process.simCsctfTrackDigis.DTproducer = cms.untracked.InputTag("dttfunpacker")
0084 process.simCsctfTrackDigis.SectorProcessor.initializeFromPSet = cms.bool(False)
0085 
0086 # if you want to read the DT stubs unpacked by CSCTF
0087 # process.simCsctfTrackDigis.readDtDirect = cms.bool(True)
0088 # process.simCsctfTrackDigis.mbProducer = cms.untracked.InputTag("csctfunpacker","DT")
0089 # ------------------------------------------------------------------------------------------------
0090 
0091 process.p = cms.Path( process.csctfunpacker
0092                      *process.dttfunpacker
0093                      *process.simCsctfTrackDigis)