Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-10-26 02:21:36

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 import FWCore.ParameterSet.VarParsing as vpo
0004 opts = vpo.VarParsing('standard')
0005 
0006 opts.setDefault('maxEvents', 1000)
0007 
0008 opts.register('resetPSCountersEachLumiSec', False,
0009               vpo.VarParsing.multiplicity.singleton,
0010               vpo.VarParsing.varType.bool,
0011               'reset prescale counters at the start of every luminosity section')
0012 
0013 opts.register('semiRandomInitialPSCounters', False,
0014               vpo.VarParsing.multiplicity.singleton,
0015               vpo.VarParsing.varType.bool,
0016               'use semi-random initialisation of prescale counters')
0017 
0018 opts.register('prescaleSet', 2,
0019               vpo.VarParsing.multiplicity.singleton,
0020               vpo.VarParsing.varType.int,
0021               'index of prescale column (starts from zero)')
0022 
0023 opts.parseArguments()
0024 
0025 process = cms.Process('TEST')
0026 
0027 process.options.numberOfThreads = 1
0028 process.options.numberOfStreams = 0
0029 process.options.wantSummary = False
0030 process.maxEvents.input = opts.maxEvents
0031 
0032 # Global Tag
0033 from Configuration.AlCa.GlobalTag import GlobalTag
0034 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0035 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic', '')
0036 
0037 # Input source
0038 process.source = cms.Source('PoolSource',
0039     fileNames = cms.untracked.vstring(
0040         '/store/relval/CMSSW_12_6_0_pre2/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/125X_mcRun3_2022_realistic_v3-v1/2580000/2d96539c-b321-401f-b7b2-51884a5d421f.root',
0041     )
0042 )
0043 
0044 # EventSetup modules
0045 process.GlobalParametersRcdSource = cms.ESSource('EmptyESSource',
0046     recordName = cms.string('L1TGlobalParametersRcd'),
0047     iovIsRunNotTime = cms.bool(True),
0048     firstValid = cms.vuint32(1)
0049 )
0050 
0051 process.GlobalParameters = cms.ESProducer('StableParametersTrivialProducer',
0052     # trigger decision
0053     NumberPhysTriggers = cms.uint32(512), # number of physics trigger algorithms
0054     # trigger objects
0055     NumberL1Muon = cms.uint32(8),    # muons
0056     NumberL1EGamma = cms.uint32(12), # e/gamma and isolated e/gamma objects
0057     NumberL1Jet = cms.uint32(12),    # jets
0058     NumberL1Tau = cms.uint32(12),    # taus
0059     # hardware
0060     NumberChips = cms.uint32(1),  # number of maximum chips defined in the xml file
0061     PinsOnChip = cms.uint32(512), # number of pins on the GTL condition chips
0062     # correspondence 'condition chip - GTL algorithm word' in the hardware
0063     # e.g.: chip 2: 0 - 95;  chip 1: 96 - 128 (191)
0064     OrderOfChip = cms.vint32(1),
0065 )
0066 
0067 process.L1TUtmTriggerMenuRcdSource = cms.ESSource('EmptyESSource',
0068     recordName = cms.string('L1TUtmTriggerMenuRcd'),
0069     iovIsRunNotTime = cms.bool(True),
0070     firstValid = cms.vuint32(1)
0071 )
0072 
0073 process.L1TriggerMenu = cms.ESProducer('L1TUtmTriggerMenuESProducer',
0074     L1TriggerMenuFile = cms.string('test/L1Menu_L1TGlobalUnitTests_v1_0_0.xml'),
0075 )
0076 
0077 process.L1TGlobalPrescalesVetosFractRcdSource = cms.ESSource('EmptyESSource',
0078     recordName = cms.string('L1TGlobalPrescalesVetosFractRcd'),
0079     iovIsRunNotTime = cms.bool(True),
0080     firstValid = cms.vuint32(1)
0081 )
0082 
0083 process.L1TGlobalPrescalesVetosFract = cms.ESProducer('L1TGlobalPrescalesVetosFractESProducer',
0084     TriggerMenuLuminosity = cms.string('startup'),
0085     Verbosity = cms.int32(0),
0086     AlgoBxMaskDefault = cms.int32(1),
0087     PrescaleXMLFile   = cms.string('test/UGT_BASE_RS_PRESCALES_L1MenuL1TGlobalUnitTests_v1_0_0.xml'),
0088     AlgoBxMaskXMLFile = cms.string('test/UGT_BASE_RS_ALGOBX_MASK_L1MenuL1TGlobalUnitTests_v1_0_0.xml'),
0089     FinOrMaskXMLFile  = cms.string('test/UGT_BASE_RS_FINOR_MASK_L1MenuL1TGlobalUnitTests_v1_0_0.xml'),
0090     VetoMaskXMLFile   = cms.string('test/UGT_BASE_RS_VETO_MASK_L1MenuL1TGlobalUnitTests_v1_0_0.xml'),
0091 )
0092 
0093 # EventData modules
0094 process.simGtExtFakeStage2Digis = cms.EDProducer('L1TExtCondProducer',
0095     bxFirst = cms.int32(-2),
0096     bxLast = cms.int32(2),
0097     setBptxAND = cms.bool(True),
0098     setBptxMinus = cms.bool(True),
0099     setBptxOR = cms.bool(True),
0100     setBptxPlus = cms.bool(True),
0101     tcdsRecordLabel = cms.InputTag('')
0102 )
0103 
0104 process.simGtStage2Digis = cms.EDProducer('L1TGlobalProducer',
0105     AlgoBlkInputTag = cms.InputTag(''),
0106     AlgorithmTriggersUnmasked = cms.bool(False),
0107     AlgorithmTriggersUnprescaled = cms.bool(False),
0108     EGammaInputTag = cms.InputTag('simCaloStage2Digis'),
0109     EtSumInputTag = cms.InputTag('simCaloStage2Digis'),
0110     ExtInputTag = cms.InputTag('simGtExtFakeStage2Digis'),
0111     GetPrescaleColumnFromData = cms.bool(False),
0112     JetInputTag = cms.InputTag('simCaloStage2Digis'),
0113     MuonInputTag = cms.InputTag('simGmtStage2Digis'),
0114     MuonShowerInputTag = cms.InputTag('simGmtShowerDigis'),
0115     TauInputTag = cms.InputTag('simCaloStage2Digis'),
0116     useMuonShowers = cms.bool(True),
0117     RequireMenuToMatchAlgoBlkInput = cms.bool(False),
0118     resetPSCountersEachLumiSec = cms.bool(opts.resetPSCountersEachLumiSec),
0119     semiRandomInitialPSCounters = cms.bool(opts.semiRandomInitialPSCounters),
0120     PrescaleSet = cms.uint32(opts.prescaleSet)
0121 )
0122 
0123 # Task definition
0124 process.l1tTask = cms.Task( process.simGtExtFakeStage2Digis, process.simGtStage2Digis )
0125 
0126 # Path definition
0127 process.l1tPath = cms.Path( process.l1tTask )
0128 
0129 # Analyser of L1T-menu results
0130 process.l1tGlobalSummary = cms.EDAnalyzer( 'L1TGlobalSummary',
0131     AlgInputTag = cms.InputTag( 'simGtStage2Digis' ),
0132     ExtInputTag = cms.InputTag( 'simGtStage2Digis' ),
0133     MinBx = cms.int32( 0 ),
0134     MaxBx = cms.int32( 0 ),
0135     DumpTrigResults = cms.bool( False ),
0136     DumpRecord = cms.bool( False ),
0137     DumpTrigSummary = cms.bool( True ),
0138     ReadPrescalesFromFile = cms.bool( False ),
0139     psFileName = cms.string( '' ),
0140     psColumn = cms.int32( 0 )
0141 )
0142 
0143 # EndPath definition
0144 process.l1tEndPath = cms.EndPath( process.l1tGlobalSummary )
0145 
0146 # MessageLogger
0147 process.load('FWCore.MessageService.MessageLogger_cfi')
0148 process.MessageLogger.cerr.FwkReport.reportEvery = 100 # only report every 100th event start
0149 process.MessageLogger.L1TGlobalSummary = cms.untracked.PSet()