Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:22

0001 #
0002 # cfg file to print the L1 GT trigger menu using L1Trigger_custom 
0003 #     options to choose the source of L1 Menu are to be given in customiseL1Menu method 
0004 #     from L1Trigger_custom
0005 #
0006 # V M Ghete  2008 - 2010 - 2012
0007 
0008 
0009 import FWCore.ParameterSet.Config as cms
0010 
0011 # choose a valid global tag for the release you are using 
0012 #
0013 # 5_3_X
0014 useGlobalTag='GR_P_V42B'
0015 
0016 # run number to retrieve the menu - irrelevant if menu is overwritten or
0017 # the global tag is a MC global tag, with infinite IoV
0018 useRunNumber = 194251
0019 
0020 # options to retrieve a HLT menu from HLTrigger.Configuration.HLT_GRun_cff
0021 # and to print the HLT paths using the L1 triggers as seeds
0022 
0023 # use the HLT menu given in this configuration 
0024 #useHltMenuOption = True
0025 useHltMenuOption = False
0026 
0027 ##########################################################################################
0028 
0029 # process
0030 
0031 processName = "L1GtTriggerMenuTester"
0032 process = cms.Process(processName)
0033 
0034 process.load("L1TriggerConfig.L1GtConfigProducers.l1GtTriggerMenuTester_cfi")
0035 process.l1GtTriggerMenuTester.OverwriteHtmlFile = True
0036 process.l1GtTriggerMenuTester.HtmlFile = "L1Menu_Collisions2015_25ns_v1_L1T_Scales_20101224_Imp0_0x102f.html"
0037 process.l1GtTriggerMenuTester.UseHltMenu = useHltMenuOption
0038 process.l1GtTriggerMenuTester.HltProcessName = processName
0039 #process.l1GtTriggerMenuTester.NoThrowIncompatibleMenu = False
0040 #process.l1GtTriggerMenuTester.PrintPfsRates = True
0041 #process.l1GtTriggerMenuTester.IndexPfSet = 1
0042 
0043 
0044 from L1Trigger.Configuration.L1Trigger_custom import customiseL1Menu
0045 process=customiseL1Menu(process)
0046 
0047 # number of events and source
0048 process.maxEvents = cms.untracked.PSet(
0049     input = cms.untracked.int32(1)
0050 )
0051 
0052 if useHltMenuOption == True :
0053     readFiles = cms.untracked.vstring()
0054     secFiles = cms.untracked.vstring() 
0055     selectedLumis= cms.untracked.VLuminosityBlockRange()
0056     selectedEvents = cms.untracked.VEventRange()
0057 
0058     # files are used only to run HLT on an event - the HLT menu is overwritten with the menu from HLT_GRun_cff
0059     readFiles.extend( [
0060                  'file:/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/DQMTest/MinimumBias__RAW__v1__165633__1CC420EE-B686-E011-A788-0030487CD6E8.root'
0061                 ] );
0062 
0063     process.source = cms.Source ('PoolSource', 
0064                                  fileNames=readFiles, 
0065                                  secondaryFileNames=secFiles,
0066                                  lumisToProcess = selectedLumis,
0067                                  eventsToProcess = selectedEvents
0068                                  )
0069 else :
0070     process.source = cms.Source("EmptyIOVSource",
0071                         timetype = cms.string('runnumber'),
0072                         firstValue = cms.uint64(useRunNumber),
0073                         lastValue = cms.uint64(useRunNumber),
0074                         interval = cms.uint64(1)
0075                         )
0076 
0077 
0078 # import standard configurations, load and configure modules via Global Tag
0079 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0080 # retrieve also the HLT menu
0081 
0082 process.load('Configuration.StandardSequences.Services_cff')
0083 process.load('FWCore.MessageService.MessageLogger_cfi')
0084 process.load('Configuration.EventContent.EventContent_cff')
0085 process.load('Configuration.StandardSequences.GeometryDB_cff')
0086 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0087 process.load('Configuration.StandardSequences.RawToDigi_Data_cff')
0088 
0089 if useHltMenuOption == True :
0090     process.load('HLTrigger.Configuration.HLT_GRun_cff')
0091 
0092 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0093 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0094 
0095 
0096 process.GlobalTag.globaltag = useGlobalTag+'::All'
0097 # for GR_H_
0098 #process.GlobalTag.connect = 'frontier://FrontierProd/CMS_COND_31X_GLOBALTAG' 
0099 #process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://FrontierProd/') 
0100 
0101 # path to be run
0102 
0103 if useHltMenuOption == True :
0104     process.p = cms.Path(process.RawToDigi*process.l1GtTriggerMenuTester)
0105 else :
0106     process.p = cms.Path(process.l1GtTriggerMenuTester)
0107     
0108 
0109 # services
0110 
0111 # Message Logger
0112 process.MessageLogger.debugModules = ['l1GtTriggerMenuTester']
0113 process.MessageLogger.cerr.enable = False
0114 
0115 process.MessageLogger.files.L1GtTriggerMenuTester_errors = cms.untracked.PSet( 
0116         threshold = cms.untracked.string('ERROR'),
0117         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0118         L1GtTriggerMenuTester = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0119        )
0120 
0121 process.MessageLogger.files.L1GtTriggerMenuTester_warnings = cms.untracked.PSet( 
0122         threshold = cms.untracked.string('WARNING'),
0123         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0124         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0125         L1GtTriggerMenuTester = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0126         )
0127 
0128 process.MessageLogger.files.L1GtTriggerMenuTester_info = cms.untracked.PSet( 
0129         threshold = cms.untracked.string('INFO'),
0130         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0131         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0132         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0133         L1GtTriggerMenuTester = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0134         )
0135 
0136 process.MessageLogger.files.L1GtTriggerMenuTester_wiki = cms.untracked.PSet( 
0137         threshold = cms.untracked.string('INFO'),
0138         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0139         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0140         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0141         L1GtTriggerMenuTesterWiki = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0142         )
0143 
0144 process.MessageLogger.files.L1GtTriggerMenuTester_debug = cms.untracked.PSet( 
0145         threshold = cms.untracked.string('DEBUG'),
0146         DEBUG = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0147         INFO = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0148         WARNING = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0149         ERROR = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0150         L1GtTriggerMenuTester = cms.untracked.PSet( limit = cms.untracked.int32(-1) ) 
0151         )