File indexing completed on 2024-04-06 12:20:04
0001 from __future__ import print_function
0002
0003
0004
0005
0006
0007
0008
0009
0010 import FWCore.ParameterSet.Config as cms
0011 import sys
0012
0013 process = cms.Process("L1GtEmulTrigReport")
0014
0015
0016 print('\n')
0017 from L1Trigger.GlobalTriggerAnalyzer.UserOptions_cff import *
0018 if errorUserOptions == True :
0019 print('\nError returned by UserOptions_cff\n')
0020 sys.exit()
0021
0022
0023
0024
0025 customL1Menu = True
0026 customL1Menu = False
0027
0028 if customL1Menu == True :
0029 from L1Trigger.Configuration.L1Trigger_custom import customiseL1Menu
0030 process=customiseL1Menu(process)
0031
0032
0033 from L1Trigger.Configuration.L1Trigger_custom import customiseResetPrescalesAndMasks
0034 process = customiseResetPrescalesAndMasks(process)
0035
0036
0037 if dataType == 'StreamFile' :
0038 process.source = cms.Source("NewEventStreamFileReader", fileNames=readFiles)
0039 else :
0040 process.source = cms.Source ('PoolSource',
0041 fileNames=readFiles,
0042 secondaryFileNames=secFiles,
0043 lumisToProcess = selectedLumis,
0044 eventsToProcess = selectedEvents
0045 )
0046
0047
0048
0049 process.maxEvents = cms.untracked.PSet(
0050 input=cms.untracked.int32(maxNumberEvents)
0051 )
0052
0053
0054
0055
0056
0057 process.load('Configuration.StandardSequences.GeometryDB_cff')
0058 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0059
0060 process.GlobalTag.globaltag = useGlobalTag
0061
0062
0063
0064
0065 import L1Trigger.GlobalTrigger.gtDigis_cfi
0066 process.l1GtEmulDigis = L1Trigger.GlobalTrigger.gtDigis_cfi.gtDigis.clone()
0067
0068
0069
0070
0071
0072 if useRelValSample == True :
0073 process.l1GtEmulDigis.GmtInputTag = 'simGmtDigis'
0074 else :
0075 process.l1GtEmulDigis.GmtInputTag = 'gtDigis'
0076
0077
0078
0079
0080 if useRelValSample == True :
0081 process.l1GtEmulDigis.GctInputTag = 'simGctDigis'
0082 else :
0083 process.l1GtEmulDigis.GctInputTag = 'gctDigis'
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097 if useRelValSample == True :
0098 process.l1GtEmulDigis.TechnicalTriggersInputTags = cms.VInputTag(
0099 cms.InputTag( 'simBscDigis' ),
0100 cms.InputTag( 'simRpcTechTrigDigis' ),
0101 cms.InputTag( 'simHcalTechTrigDigis' )
0102 )
0103 else :
0104 process.l1GtEmulDigis.TechnicalTriggersInputTags = cms.VInputTag()
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132 process.l1GtEmulDigis.EmulateBxInEvent = 1
0133
0134
0135
0136
0137 process.l1GtEmulDigis.RecordLength = cms.vint32(3, 5)
0138
0139
0140
0141 process.l1GtEmulDigis.AlternativeNrBxBoardDaq = 0x101
0142
0143
0144
0145 process.l1GtEmulDigis.AlternativeNrBxBoardEvm = 0x2
0146
0147
0148
0149
0150
0151
0152
0153
0154 process.l1GtEmulDigis.AlgorithmTriggersUnprescaled = True
0155
0156
0157
0158 process.l1GtEmulDigis.AlgorithmTriggersUnmasked = True
0159
0160
0161
0162
0163 process.l1GtEmulDigis.TechnicalTriggersUnprescaled = True
0164
0165
0166
0167 process.l1GtEmulDigis.TechnicalTriggersUnmasked = True
0168
0169
0170
0171 process.l1GtEmulDigis.TechnicalTriggersVetoUnmasked = True
0172
0173
0174
0175 process.l1GtEmulDigis.Verbosity = cms.untracked.int32(1)
0176
0177
0178
0179
0180
0181 process.load("L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi")
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191 process.l1GtTrigReport.L1GtRecordInputTag = "l1GtEmulDigis"
0192
0193
0194
0195
0196
0197
0198
0199 if (dataType == 'RAW') and not (useRelValSample) :
0200 process.load('Configuration/StandardSequences/RawToDigi_Data_cff')
0201
0202 process.gctDigis.numberOfGctSamplesToUnpack = cms.uint32(5)
0203
0204 process.p = cms.Path(process.RawToDigi+process.l1GtEmulDigis*process.l1GtTrigReport)
0205 elif (dataType == 'RAW') and (useRelValSample) :
0206 process.load('Configuration/StandardSequences/RawToDigi_cff')
0207 process.p = cms.Path(process.RawToDigi+process.l1GtEmulDigis*process.l1GtTrigReport)
0208 else :
0209
0210 process.p = cms.Path(process.l1GtEmulDigis*process.l1GtTrigReport)
0211
0212
0213
0214 process.load('FWCore.MessageService.MessageLogger_cfi')
0215 process.MessageLogger.debugModules = ['l1GtEmulDigis', 'l1GtTrigReport']
0216 process.MessageLogger.cerr.enable = False
0217
0218 process.MessageLogger.files.L1GtEmulTrigReport_errors = cms.untracked.PSet(
0219 threshold = cms.untracked.string('ERROR'),
0220 ERROR = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0221 L1GlobalTrigger = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0222 )
0223
0224 process.MessageLogger.files.L1GtEmulTrigReport_warnings = cms.untracked.PSet(
0225 threshold = cms.untracked.string('WARNING'),
0226 WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0227 ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0228 L1GlobalTrigger = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0229 )
0230
0231 process.MessageLogger.files.L1GtEmulTrigReport_info = cms.untracked.PSet(
0232 threshold = cms.untracked.string('INFO'),
0233 INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0234 WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0235 ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0236 L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0237 )
0238
0239 process.MessageLogger.files.L1GtEmulTrigReport = cms.untracked.PSet(
0240 threshold = cms.untracked.string('DEBUG'),
0241 DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0242 INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0243 WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0244 ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0245 L1GlobalTrigger = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0246 )
0247
0248
0249
0250
0251
0252
0253 process.outputL1GlobalTrigger = cms.OutputModule("PoolOutputModule",
0254 fileName = cms.untracked.string('testGt_Emulator_GctGmtFile_output.root'),
0255 outputCommands = cms.untracked.vstring('drop *',
0256 'keep *_simGmtDigis_*_*',
0257 'keep *_simGctDigis_*_*',
0258 'keep *_l1GtEmulDigis_*_*')
0259 )
0260
0261 process.outpath = cms.EndPath(process.outputL1GlobalTrigger)