Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-27 03:17:54

0001 #
0002 # cfg file to run the L1 GT test analyzer according to 
0003 #   the options set in "user choices"
0004 #
0005 
0006 import FWCore.ParameterSet.Config as cms
0007 import sys
0008 
0009 process = cms.Process("L1GtAnalyzer")
0010 
0011 print('\n')
0012 from L1Trigger.GlobalTriggerAnalyzer.UserOptions_cff import *
0013 if errorUserOptions == True :
0014     print('\nError returned by UserOptions_cff. Script stops here.\n')
0015     sys.exit()
0016 
0017 
0018 # source according to data type
0019 if dataType == 'StreamFile' :
0020     process.source = cms.Source("NewEventStreamFileReader", 
0021                                 fileNames=readFiles,
0022                                 lumisToProcess = selectedLumis,
0023                                 eventsToProcess = selectedEvents
0024                                 )
0025 else :        
0026     process.source = cms.Source ('PoolSource', 
0027                                  fileNames=readFiles, 
0028                                  secondaryFileNames=secFiles,
0029                                  lumisToProcess = selectedLumis,
0030                                  eventsToProcess = selectedEvents
0031                                  )
0032 
0033 
0034 # number of events to be processed and source file
0035 process.maxEvents = cms.untracked.PSet(
0036     input=cms.untracked.int32(maxNumberEvents)
0037 )
0038 
0039 #
0040 # load and configure modules via Global Tag
0041 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0042 
0043 process.load('Configuration.StandardSequences.GeometryDB_cff')
0044 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0045 
0046 process.GlobalTag.globaltag = useGlobalTag
0047 
0048 # processes to be run
0049 
0050 
0051 process.load("L1Trigger.GlobalTriggerAnalyzer.L1GtAnalyzer_cff")
0052 
0053 # print output: 0 = std::cout; 1 = LogTrace; 2 = LogVerbatim; 3 = LogInfo
0054 process.l1GtAnalyzer.PrintOutput = 3
0055 
0056 # enable / disable various analysis methods
0057 #process.l1GtAnalyzer.analyzeDecisionReadoutRecordEnable = True
0058 #
0059 #process.l1GtAnalyzer.analyzeL1GtUtilsMenuLiteEnable = True
0060 process.l1GtAnalyzer.analyzeL1GtUtilsEventSetupEnable = True
0061 #process.l1GtAnalyzer.analyzeL1GtUtilsEnable = True
0062 #process.l1GtAnalyzer.analyzeTriggerEnable = True
0063 #
0064 #process.l1GtAnalyzer.analyzeObjectMapEnable = True
0065 #
0066 #process.l1GtAnalyzer.analyzeL1GtTriggerMenuLiteEnable = True
0067 #
0068 #process.l1GtAnalyzer.analyzeConditionsInRunBlockEnable = True
0069 #process.l1GtAnalyzer.analyzeConditionsInLumiBlockEnable = True
0070 #process.l1GtAnalyzer.analyzeConditionsInEventBlockEnable = True
0071 
0072 # 
0073 #
0074 # input tag for GT readout collection: 
0075 #process.l1GtAnalyzer.L1GtDaqInputTag = 'gtDigis' 
0076  
0077 # input tags for GT lite record
0078 #process.l1GtAnalyzer.L1GtRecordInputTag = 'l1GtRecord'
0079 
0080 # input tag for GT object map collection
0081 #process.l1GtAnalyzer.L1GtObjectMapTag = 'hltL1GtObjectMap'
0082 
0083 # input tag for L1GtTriggerMenuLite
0084 #process.l1GtAnalyzer.L1GtTmLInputTag = 'l1GtTriggerMenuLite'
0085 
0086 # input tag for ConditionInEdm products
0087 #process.l1GtAnalyzer.CondInEdmInputTag = 'conditionsInEdm'
0088 
0089 # physics algorithm name or alias, technical trigger name 
0090 #process.l1GtAnalyzer.AlgorithmName = 'L1_SingleEG20'
0091 #process.l1GtAnalyzer.AlgorithmName = 'L1_DoubleMu0er_HighQ'
0092 process.l1GtAnalyzer.AlgorithmName = 'L1_SingleMu14er'
0093 #process.l1GtAnalyzer.AlgorithmName = 'L1_BscMinBiasOR_BptxPlusORMinus'
0094 #process.l1GtAnalyzer.AlgorithmName = 'L1Tech_BPTX_plus_AND_minus_instance1.v0'
0095 #process.l1GtAnalyzer.AlgorithmName = 'L1Tech_BPTX_quiet.v0'
0096 #process.l1GtAnalyzer.AlgorithmName = 'L1Tech_BPTX_plus_AND_minus.v0'
0097 
0098 # condition in the above algorithm to test the object maps
0099 #process.l1GtAnalyzer.ConditionName = 'SingleIsoEG_0x14'
0100 #process.l1GtAnalyzer.ConditionName = 'DoubleMu_0x01_HighQ_EtaCuts'
0101 process.l1GtAnalyzer.ConditionName = 'DoubleMu_0x01_HighQ_EtaCuts'
0102 
0103 # a bit number
0104 process.l1GtAnalyzer.BitNumber = 10
0105 
0106 # select the L1 configuration use: 0 (default), 100000, 200000
0107 #process.l1GtAnalyzer.L1GtUtilsConfiguration = 0
0108 #process.l1GtAnalyzer.L1GtUtilsConfiguration = 100000
0109 process.l1GtAnalyzer.L1GtUtilsConfiguration = 200000
0110  
0111 # if true, use methods in L1GtUtils with the input tag for L1GtTriggerMenuLite
0112 # from provenance (default: True)
0113 #process.l1GtAnalyzer.L1GtTmLInputTagProv = False
0114 
0115 # if true, configure (partially) L1GtUtils in beginRun using getL1GtRunCache
0116 # (default: True)
0117 process.l1GtAnalyzer.L1GtUtilsConfigureBeginRun = True
0118 
0119 
0120 process.load("L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi")
0121 
0122 # boolean flag to select the input record
0123 #process.l1GtTrigReport.UseL1GlobalTriggerRecord = True
0124 
0125 # input tag for the GT record requested: 
0126 #   GT emulator:    gtDigis (DAQ record)
0127 #   GT unpacker:    gtDigis (DAQ record)
0128 #   GT lite record: l1GtRecord 
0129 #process.l1GtTrigReport.L1GtRecordInputTag = "gtDigis"
0130 
0131 process.l1GtTrigReport.PrintVerbosity = 10
0132 
0133 # print output: 0 = std::cout; 1 = LogTrace; 2 = LogVerbatim; 3 = LogInfo
0134 process.l1GtTrigReport.PrintOutput = 3
0135 
0136 
0137 # for RAW data, run first the RAWTODIGI and then L1Reco
0138 if ((dataType == 'RAW') or (dataType == 'StreamFile')) and not (useRelValSample) :
0139     process.load('Configuration/StandardSequences/RawToDigi_Data_cff')
0140     process.load('L1Trigger/Configuration/L1Reco_cff')
0141     process.l1GtTrigReport.L1GtRecordInputTag = "gtDigis"
0142     process.p = cms.Path(process.RawToDigi+process.L1Reco+process.l1GtTrigReport+process.l1GtAnalyzer)
0143 
0144 elif (dataType == 'RAW') and (useRelValSample) :
0145     process.load('Configuration/StandardSequences/RawToDigi_cff')
0146     process.load('L1Trigger/Configuration/L1Reco_cff')
0147     process.l1GtTrigReport.L1GtRecordInputTag = "gtDigis"
0148     process.p = cms.Path(process.RawToDigi+process.L1Reco+process.l1GtTrigReport+process.l1GtAnalyzer)
0149     
0150 else :        
0151     # path to be run for RECO and AOD
0152     process.p = cms.Path(process.l1GtTrigReport+process.l1GtAnalyzer)
0153 
0154 
0155 # Message Logger
0156 process.load('FWCore.MessageService.MessageLogger_cfi')
0157 process.MessageLogger.debugModules = ['l1GtAnalyzer']
0158 
0159 process.MessageLogger.cerr.enable = False
0160 process.MessageLogger.cerr.default.limit = 0
0161 process.MessageLogger.cerr.FwkReport.limit = 0
0162 process.MessageLogger.cerr.FwkSummary.limit = 0
0163 
0164 process.MessageLogger.files.L1GtAnalyzer_debug = cms.untracked.PSet( 
0165         threshold = cms.untracked.string('DEBUG'),
0166         DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0167         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0168         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0169         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0170         L1GtAnalyzer = cms.untracked.PSet( limit = cms.untracked.int32(0) ), 
0171         L1GtUtils = cms.untracked.PSet( limit = cms.untracked.int32(-1) ), 
0172         L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(0) ) 
0173         )
0174 
0175 process.MessageLogger.files.L1GtAnalyzer_info = cms.untracked.PSet( 
0176         threshold = cms.untracked.string('INFO'),
0177         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0178         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0179         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0180         L1GtAnalyzer = cms.untracked.PSet( limit = cms.untracked.int32(-1) ), 
0181         L1GtUtils = cms.untracked.PSet( limit = cms.untracked.int32(-1) ), 
0182         L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0183         )
0184 
0185 process.MessageLogger.files.L1GtAnalyzer_warning = cms.untracked.PSet( 
0186         threshold = cms.untracked.string('WARNING'),
0187         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0188         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0189         L1GtAnalyzer = cms.untracked.PSet( limit = cms.untracked.int32(-1) ), 
0190         L1GtUtils = cms.untracked.PSet( limit = cms.untracked.int32(-1) ), 
0191         L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0192         )
0193 
0194 process.MessageLogger.files.L1GtAnalyzer_error = cms.untracked.PSet( 
0195         threshold = cms.untracked.string('ERROR'),
0196         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0197         L1GtAnalyzer = cms.untracked.PSet( limit = cms.untracked.int32(-1) ), 
0198         L1GtUtils = cms.untracked.PSet( limit = cms.untracked.int32(-1) ), 
0199         L1GtTrigReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0200        )