Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:03

0001 # to test the chain producer->emulator without using the global tag
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 process = cms.Process("analyzer")
0005 
0006 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0007 
0008 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0009 process.MessageLogger.cout.enable = cms.untracked.bool(True)
0010 process.MessageLogger.cout.threshold = cms.untracked.string('INFO')
0011 process.MessageLogger.debugModules = cms.untracked.vstring('*')
0012 
0013 # Local RAW file
0014 ## process.source = cms.Source("DaqSource",
0015 ##     readerPluginName = cms.untracked.string('CSCFileReader'),
0016 ##     readerPset = cms.untracked.PSet(
0017 ##         firstEvent  = cms.untracked.int32(0),
0018 ##         tfDDUnumber = cms.untracked.int32(0),
0019 ##         FED760 = cms.untracked.vstring('RUI01'),
0020 ##         RUI01  = cms.untracked.vstring('/tmp/kkotov/rawfile')
0021 ##   )
0022 ## )
0023 
0024 
0025 # GP's technique to test at P5 on cmsusr server: copy a file over and
0026 # read it
0027 readFiles = cms.untracked.vstring()
0028 process.source = cms.Source ("PoolSource", fileNames = readFiles)
0029 readFiles.extend((
0030         'file:Raw.root',
0031 ))
0032 
0033 # read the streamer directly. Be careful: it WON'T work if your cmssw version
0034 # if different from the one used to generate the file!
0035 ## readFiles = cms.untracked.vstring()
0036 ## process.source = cms.Source("NewEventStreamFileReader", fileNames=readFiles)
0037 ## ## data dat
0038 ## readFiles.extend( [
0039 ##     'file:/lookarea_SM/Data.00128960.0001.A.storageManager.00.0000.dat'
0040 ##  ] )
0041 
0042 
0043 
0044 # CSC Track Finder emulator (copy-paste from L1Trigger/Configuration/python/SimL1Emulator_cff.py + little modifications)
0045 # Little pieces of configuration, taken here and there
0046 process.load("Alignment.CommonAlignmentProducer.GlobalPosition_Fake_cff")
0047 process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi")
0048 process.load("Geometry.MuonCommonData.muonIdealGeometryXML_cfi")
0049 process.load("Geometry.CSCGeometry.cscGeometry_cfi")
0050 process.load("L1TriggerConfig.CSCTFConfigProducers.L1CSCTFConfig_cff")
0051 process.load("L1TriggerConfig.L1ScalesProducers.L1MuTriggerScalesConfig_cff")
0052 process.load("L1TriggerConfig.L1ScalesProducers.L1MuTriggerPtScaleConfig_cff")
0053 
0054 
0055 # CSC TF (copy-paste L1Trigger/Configuration/python/L1RawToDigi_cff.py + little modifications)
0056 import EventFilter.CSCTFRawToDigi.csctfunpacker_cfi
0057 process.csctfDigis = EventFilter.CSCTFRawToDigi.csctfunpacker_cfi.csctfunpacker.clone()
0058 process.csctfDigis.producer = 'source'
0059 #
0060 
0061 import L1Trigger.CSCTrackFinder.csctfDigis_cfi
0062 
0063 # ------------------------------------------------------------------------------------------------
0064 # IMPORTANT:
0065 # ---------
0066 #
0067 # IF YOU WANT TO CONFIGURE THE EMULATOR VIA EventSetup (O2O mechanism or fake producer) the
0068 # option initializeFromPSet in L1Trigger/CSCTrackFinder/python/csctfTrackDigis_cfi.py
0069 # has to be set to False: initializeFromPSet = cms.bool(False)
0070 import L1Trigger.CSCTrackFinder.csctfTrackDigis_cfi
0071 process.simCsctfTrackDigis = L1Trigger.CSCTrackFinder.csctfTrackDigis_cfi.csctfTrackDigis.clone()
0072 process.simCsctfTrackDigis.SectorReceiverInput = cms.untracked.InputTag("csctfDigis")
0073 process.simCsctfTrackDigis.SectorProcessor.initializeFromPSet = cms.bool(False)
0074 process.simCsctfTrackDigis.useDT = cms.bool(False)
0075 
0076 # ------------------------------------------------------------------------------------------------
0077 ## # Following important parameters have to be set for singles by hand
0078 ## process.simCsctfTrackDigis.SectorProcessor.trigger_on_ME1a = cms.bool(True)
0079 ## process.simCsctfTrackDigis.SectorProcessor.trigger_on_ME1b = cms.bool(True)
0080 ## process.simCsctfTrackDigis.SectorProcessor.trigger_on_ME2  = cms.bool(True)
0081 ## process.simCsctfTrackDigis.SectorProcessor.trigger_on_ME3  = cms.bool(True)
0082 ## process.simCsctfTrackDigis.SectorProcessor.trigger_on_ME4  = cms.bool(True)
0083 ## process.simCsctfTrackDigis.SectorProcessor.trigger_on_MB1a = cms.bool(False)
0084 ## process.simCsctfTrackDigis.SectorProcessor.trigger_on_MB1d = cms.bool(False)
0085 ## process.simCsctfTrackDigis.SectorProcessor.singlesTrackPt     = cms.uint32(255)
0086 ## process.simCsctfTrackDigis.SectorProcessor.singlesTrackOutput = cms.uint32(1)
0087 
0088 process.p = cms.Path(process.csctfDigis*process.simCsctfTrackDigis)
0089