Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:30:19

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