File indexing completed on 2024-04-06 12:20:44
0001 import FWCore.ParameterSet.Config as cms
0002
0003 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0004 process = cms.Process('SIM',Phase2C17I13M9)
0005
0006
0007 process.load('Configuration.StandardSequences.Services_cff')
0008 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0009 process.load('FWCore.MessageService.MessageLogger_cfi')
0010 process.load('Configuration.EventContent.EventContent_cff')
0011 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0012 process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
0013 process.load('Configuration.Geometry.GeometryExtended2026D88_cff')
0014 process.load('Configuration.StandardSequences.MagneticField_cff')
0015 process.load('Configuration.StandardSequences.Generator_cff')
0016 process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi')
0017 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0018 process.load('Configuration.StandardSequences.SimIdeal_cff')
0019 process.load('Configuration.StandardSequences.Digi_cff')
0020 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0021 process.load('Configuration.StandardSequences.DigiToRaw_cff')
0022 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0023 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0024
0025 process.maxEvents = cms.untracked.PSet(
0026 input = cms.untracked.int32(1)
0027 )
0028
0029
0030 process.source = cms.Source("EmptySource")
0031
0032 process.options = cms.untracked.PSet(
0033 )
0034
0035
0036 process.configurationMetadata = cms.untracked.PSet(
0037 version = cms.untracked.string('$Revision: 1.20 $'),
0038 annotation = cms.untracked.string('SingleElectronPt10_cfi nevts:10'),
0039 name = cms.untracked.string('Applications')
0040 )
0041
0042
0043
0044
0045 process.load('L1Trigger.L1THGCal.hgcalTriggerPrimitives_cff')
0046
0047
0048 from L1Trigger.L1THGCal.customTriggerGeometry import custom_geometry_V11_Imp3
0049 process = custom_geometry_V11_Imp3(process)
0050
0051
0052 from L1Trigger.L1THGCal.l1tHGCalBackEndLayer1Producer_cfi import stage1truncation_proc
0053
0054
0055
0056 import FWCore.ParameterSet.VarParsing as VarParsing
0057 opt = VarParsing.VarParsing('analysis')
0058 opt.register('outputJSON','geometryConfig_backendStage1.json',
0059 VarParsing.VarParsing.multiplicity.singleton,
0060 VarParsing.VarParsing.varType.string,
0061 'output JSON configuration'
0062 )
0063 opt.register('fpgaId',0,
0064 VarParsing.VarParsing.multiplicity.singleton,
0065 VarParsing.VarParsing.varType.int,
0066 'FPGA ID'
0067 )
0068 opt.parseArguments()
0069
0070
0071 ordered_tcu = [4, 5, 4, 3, 6, 7, 6, 5, 4, 5, 4, 3, 2, 3, 2, 1, 7, 6, 6, 7, 5, 4, 4, 5, 5, 4, 4, 5, 7, 6, 6, 7, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3]
0072 ordered_tcv = [0, 1, 1, 0, 2, 3, 3, 2, 2, 3, 3, 2, 0, 1, 1, 0, 7, 7, 6, 6, 7, 7, 6, 6, 5, 5, 4, 4, 5, 5, 4, 4, 3, 2, 3, 4, 1, 0, 1, 2, 3, 2, 3, 4, 5, 4, 5, 6]
0073
0074
0075 from re import match
0076 geomXMLcontent = process.XMLIdealGeometryESSource.geomXMLFiles.value()
0077 hgcal_xml = 'Geometry/HGCalCommonData/data/hgcal/v.*/hgcal.xml'
0078 geometry_version = list(filter(lambda v: match(hgcal_xml,v), geomXMLcontent))
0079 if len(geometry_version) != 1:
0080 raise ValueError('Can\'t find geometry version - expected one xml file, but got {}'.format(len(geometry_version)))
0081
0082 geometry_version = geometry_version[0].split('/')[4]
0083
0084 process.hgcalbackendstage1parameterextractor = cms.EDAnalyzer(
0085 "HGCalBackendStage1ParameterExtractor",
0086 outJSONname = cms.string(opt.outputJSON),
0087 testedFpga = cms.int32(opt.fpgaId),
0088 BackendStage1Params = stage1truncation_proc.truncation_parameters,
0089 TriggerGeometryParam = process.l1tHGCalTriggerGeometryESProducer.TriggerGeometry,
0090 TCcoord_UV = cms.PSet(
0091 TCu = cms.vuint32(ordered_tcu),
0092 TCv = cms.vuint32(ordered_tcv)
0093 ),
0094 MetaData = cms.PSet(
0095 geometryVersion = cms.string(geometry_version)
0096 ),
0097 )
0098
0099
0100 process.test_step = cms.Path(process.hgcalbackendstage1parameterextractor)
0101 process.endjob_step = cms.EndPath(process.endOfProcess)
0102
0103
0104 process.schedule = cms.Schedule(process.test_step,process.endjob_step)
0105
0106
0107 from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
0108 process = customiseEarlyDelete(process)