Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:21

0001 #
0002 # customization fragment to run L1 Pattern Generator starting from a RAW file
0003 #
0004 #  - run ECAL and HCAL TPG
0005 #  - run the L1 emulator with a different L1 configuration
0006 #  - run the L1 trigger report
0007 #  - run the pattern generator
0008 #  
0009 # V.M. Ghete 2011-02-10
0010 
0011 import FWCore.ParameterSet.Config as cms
0012 
0013 def customise(process):
0014     
0015     #
0016     # (re-)run the  L1 emulator starting from a RAW file
0017     #
0018     from L1Trigger.Configuration.L1Trigger_custom import customiseL1EmulatorFromRaw
0019     process=customiseL1EmulatorFromRaw(process)
0020    
0021     #
0022     # special configuration cases (change to desired configuration in customize_l1TriggerConfiguration)
0023     #
0024     from L1Trigger.Configuration.customise_l1TriggerConfiguration import customiseL1TriggerConfiguration
0025     process=customiseL1TriggerConfiguration(process)
0026  
0027     #
0028     # customization of output commands
0029     #
0030     from L1Trigger.Configuration.L1Trigger_custom import customiseOutputCommands
0031     process=customiseOutputCommands(process)
0032  
0033     #
0034     # load and configure the pattern test generator
0035     #
0036     process.load("L1Trigger.GlobalTriggerAnalyzer.l1GtPatternGenerator_cfi")
0037 
0038     # take GCT and GMT data from emulators, not from unpackers
0039     gctLabel = 'simGctDigis'
0040     gmtLabel = 'simGmtDigis'
0041     process.l1GtPatternGenerator.GctInputTag = gctLabel
0042     process.l1GtPatternGenerator.GmtInputTag = gmtLabel
0043 
0044     process.l1GtPatternGenerator.CscInputTag = cms.InputTag("simDttfDigis","DT")
0045     process.l1GtPatternGenerator.DtInputTag = cms.InputTag("simCsctfDigis","CSC")
0046     process.l1GtPatternGenerator.RpcbInputTag = cms.InputTag("simRpcTriggerDigis","RPCb")
0047     process.l1GtPatternGenerator.RpcfInputTag = cms.InputTag("simRpcTriggerDigis","RPCf")
0048 
0049     ## enable detailed output (event no/bx per line, item tracing)
0050     #process.l1GtPatternGenerator.DebugOutput = cms.bool(True)
0051 
0052     #
0053     # Global Trigger emulator configuration 
0054     # input data from the same sources as the pattern writer
0055     #
0056     process.simGtDigis.ProduceL1GtEvmRecord = False
0057     process.simGtDigis.ProduceL1GtObjectMapRecord = False
0058     process.simGtDigis.WritePsbL1GtDaqRecord = False
0059     process.simGtDigis.EmulateBxInEvent = -1
0060          
0061     #     
0062     # L1 trigger report
0063     #
0064     from L1Trigger.Configuration.L1Trigger_custom import customiseL1TriggerReport
0065     process=customiseL1TriggerReport(process)
0066     process.l1GtTrigReport.L1GtRecordInputTag = "simGtDigis"
0067 
0068     #     
0069     # full sequence pattern generator from raw data
0070     #
0071         
0072     process.LGtPatternGeneratorFromRaw= cms.Sequence(
0073                         process.CaloTPG_SimL1Emulator*process.l1GtTrigReport*process.l1GtPatternGenerator)
0074     process.L1simulation_step.replace(
0075                         process.CaloTPG_SimL1Emulator,process.LGtPatternGeneratorFromRaw)
0076 
0077 
0078 
0079     #
0080     return (process)