Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:35

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from FWCore.ParameterSet.VarParsing import VarParsing
0004 
0005 options = VarParsing()
0006 options.register('setupString', "captures:/data/dasu/Layer1ZeroBiasCaptureData/r260490_1", VarParsing.multiplicity.singleton, VarParsing.varType.string, 'L1TCaloLayer1Spy setupString')
0007 options.register('maxEvents', 162, VarParsing.multiplicity.singleton, VarParsing.varType.int, 'Maximum number of evnets')
0008 options.parseArguments()
0009 
0010 from Configuration.Eras.Era_Run2_2016_cff import Run2_2016
0011 process = cms.Process("Layer1EmulatorWithSpy", Run2_2016)
0012 
0013 # import of standard configurations
0014 process.load('Configuration.StandardSequences.Services_cff')
0015 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0016 process.load('FWCore.MessageService.MessageLogger_cfi')
0017 process.load('Configuration.EventContent.EventContent_cff')
0018 process.load('Configuration.Geometry.GeometryExtended2016Reco_cff')
0019 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0020 process.load('Configuration.StandardSequences.RawToDigi_Data_cff')
0021 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0022 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0023 from Configuration.AlCa.GlobalTag import GlobalTag
0024 #process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data', '')
0025 process.GlobalTag = GlobalTag(process.GlobalTag, '80X_dataRun2_HLT_v6', '')
0026 
0027 process.load('L1Trigger.Configuration.SimL1Emulator_cff')
0028 process.load('L1Trigger.Configuration.CaloTriggerPrimitives_cff')
0029 
0030 process.load('L1Trigger.L1TCaloLayer1Spy.l1tCaloLayer1SpyDigis_cfi')
0031 process.l1tCaloLayer1SpyDigis.setupString = cms.untracked.string(options.setupString)
0032 
0033 process.load('L1Trigger.L1TCaloLayer1.simCaloStage2Layer1Digis_cfi')
0034 process.simCaloStage2Layer1Digis.ecalToken = cms.InputTag("l1tCaloLayer1SpyDigis")
0035 process.simCaloStage2Layer1Digis.hcalToken = cms.InputTag("l1tCaloLayer1SpyDigis")
0036 process.simCaloStage2Layer1Digis.useECALLUT = cms.bool(True)
0037 process.simCaloStage2Layer1Digis.useHCALLUT = cms.bool(True)
0038 process.simCaloStage2Layer1Digis.useHFLUT = cms.bool(False)
0039 process.simCaloStage2Layer1Digis.useLSB = cms.bool(True)
0040 process.simCaloStage2Layer1Digis.verbose = cms.bool(False)
0041 
0042 process.load('L1Trigger.L1TCaloLayer1.layer1Validator_cfi')
0043 process.layer1Validator.testSource = cms.InputTag("l1tCaloLayer1SpyDigis")
0044 process.layer1Validator.emulSource = cms.InputTag("simCaloStage2Layer1Digis")
0045 process.layer1Validator.verbose = cms.bool(True)
0046 
0047 # Put multiples of 162 - output data for eighteen BXs are available for each capture
0048 # One event is created for each capture.  Putting non-multiples of 162 just means
0049 # that some of the events captured are "wasted".
0050 
0051 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
0052 
0053 process.source = cms.Source("EmptySource")
0054 
0055 process.out = cms.OutputModule("PoolOutputModule",
0056     fileName = cms.untracked.string('/data/dasu/l1tCaloLayer1Spy+Emulator.root'),
0057     outputCommands = cms.untracked.vstring('keep *')
0058 )
0059 
0060 process.p = cms.Path(process.l1tCaloLayer1SpyDigis*process.simCaloStage2Layer1Digis*process.layer1Validator)
0061 
0062 process.schedule = cms.Schedule(process.p)
0063 
0064 #from L1Trigger.Configuration.customiseReEmul import L1TReEmulFromRAW,L1TEventSetupForHF1x1TPs 
0065 
0066 #call to customisation function L1TReEmulFromRAW imported from L1Trigger.Configuration.customiseReEmul
0067 #process = L1TReEmulFromRAW(process)
0068 
0069 #call to customisation function L1TEventSetupForHF1x1TPs imported from L1Trigger.Configuration.customiseReEmul
0070 #process = L1TEventSetupForHF1x1TPs(process)
0071 
0072 process.e = cms.EndPath(process.out)
0073