diff --git a/L1Trigger/L1THGCal/python/customNewProcessors.py b/L1Trigger/L1THGCal/python/customNewProcessors.py new file mode 100644 index 0000000000000..20d893c269154 --- /dev/null +++ b/L1Trigger/L1THGCal/python/customNewProcessors.py @@ -0,0 +1,10 @@ +import FWCore.ParameterSet.Config as cms + +def custom_clustering_standalone(process): + process.hgcalBackEndLayer2Producer.ProcessorParameters.ProcessorName = cms.string('HGCalBackendLayer2Processor3DClusteringSA') + return process + +def custom_tower_standalone(process): + process.hgcalTowerProducer.ProcessorParameters.ProcessorName = cms.string('HGCalTowerProcessorSA') + return process + diff --git a/L1Trigger/L1THGCalUtilities/python/customNtuples.py b/L1Trigger/L1THGCalUtilities/python/customNtuples.py index 92c3399a4d661..e4e82e645750b 100644 --- a/L1Trigger/L1THGCalUtilities/python/customNtuples.py +++ b/L1Trigger/L1THGCalUtilities/python/customNtuples.py @@ -8,6 +8,22 @@ def custom_ntuples_V9(process): ntuple.bhSimHits = cms.InputTag('g4SimHits:HGCHitsHEback') return process +def custom_ntuples_standalone_clustering(process): + ntuples = process.hgcalTriggerNtuplizer.Ntuples + for ntuple in ntuples: + if ntuple.NtupleName=='HGCalTriggerNtupleHGCTriggerCells' or \ + ntuple.NtupleName=='HGCalTriggerNtupleHGCClusters' or \ + ntuple.NtupleName=='HGCalTriggerNtupleHGCMulticlusters': + ntuple.Multiclusters = cms.InputTag('hgcalBackEndLayer2Producer:HGCalBackendLayer2Processor3DClusteringSA') + return process + + +def custom_ntuples_standalone_tower(process): + ntuples = process.hgcalTriggerNtuplizer.Ntuples + for ntuple in ntuples: + if ntuple.NtupleName=='HGCalTriggerNtupleHGCTowers': + ntuple.Towers = cms.InputTag('hgcalTowerProducer:HGCalTowerProcessorSA') + return process def create_ntuple(process, inputs, diff --git a/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_newProcessors_V11_cfg.py b/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_newProcessors_V11_cfg.py new file mode 100644 index 0000000000000..da5e5e2a85c17 --- /dev/null +++ b/L1Trigger/L1THGCalUtilities/test/testHGCalL1T_newProcessors_V11_cfg.py @@ -0,0 +1,94 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Phase2C9_cff import Phase2C9 +process = cms.Process('DIGI',Phase2C9) + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff') +process.load('Configuration.Geometry.GeometryExtended2026D49_cff') +process.load('Configuration.StandardSequences.MagneticField_cff') +process.load('Configuration.StandardSequences.Generator_cff') +process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi') +process.load('GeneratorInterface.Core.genFilterSummary_cff') +process.load('Configuration.StandardSequences.SimIdeal_cff') +process.load('Configuration.StandardSequences.Digi_cff') +process.load('Configuration.StandardSequences.SimL1Emulator_cff') +process.load('Configuration.StandardSequences.DigiToRaw_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(50) +) + +# Input source +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring('/store/mc/Phase2HLTTDRWinter20DIGI/SingleElectron_PT2to200/GEN-SIM-DIGI-RAW/PU200_110X_mcRun4_realistic_v3_ext2-v2/40000/00582F93-5A2A-5847-8162-D81EE503500F.root'), + inputCommands=cms.untracked.vstring( + 'keep *', + 'drop l1tEMTFHit2016Extras_simEmtfDigis_CSC_HLT', + 'drop l1tEMTFHit2016Extras_simEmtfDigis_RPC_HLT', + 'drop l1tEMTFHit2016s_simEmtfDigis__HLT', + 'drop l1tEMTFTrack2016Extras_simEmtfDigis__HLT', + 'drop l1tEMTFTrack2016s_simEmtfDigis__HLT', + 'drop FTLClusteredmNewDetSetVector_mtdClusters_FTLBarrel_RECO', + 'drop FTLClusteredmNewDetSetVector_mtdClusters_FTLEndcap_RECO', + 'drop MTDTrackingRecHitedmNewDetSetVector_mtdTrackingRecHits__RECO', + 'drop BTLDetIdBTLSampleFTLDataFrameTsSorted_mix_FTLBarrel_HLT', + 'drop ETLDetIdETLSampleFTLDataFrameTsSorted_mix_FTLEndcap_HLT', + ) + ) + +process.options = cms.untracked.PSet( + +) + +# Production Info +process.configurationMetadata = cms.untracked.PSet( + version = cms.untracked.string('$Revision: 1.20 $'), + annotation = cms.untracked.string('SingleElectronPt10_cfi nevts:10'), + name = cms.untracked.string('Applications') +) + +# Output definition +process.TFileService = cms.Service( + "TFileService", + fileName = cms.string("ntuple.root") + ) + +# Other statements +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T15', '') + +# load HGCAL TPG simulation +process.load('L1Trigger.L1THGCal.hgcalTriggerPrimitives_cff') + +# Use new processors and standalone algorithms +from L1Trigger.L1THGCal.customNewProcessors import custom_clustering_standalone, custom_tower_standalone +process = custom_clustering_standalone(process) +process = custom_tower_standalone(process) + +process.hgcl1tpg_step = cms.Path(process.hgcalTriggerPrimitives) + + +# load ntuplizer +process.load('L1Trigger.L1THGCalUtilities.hgcalTriggerNtuples_cff') +from L1Trigger.L1THGCalUtilities.customNtuples import custom_ntuples_standalone_clustering, custom_ntuples_standalone_tower +process = custom_ntuples_standalone_clustering(process) +process = custom_ntuples_standalone_tower(process) +process.ntuple_step = cms.Path(process.hgcalTriggerNtuples) + +# Schedule definition +process.schedule = cms.Schedule(process.hgcl1tpg_step, process.ntuple_step) + +# Add early deletion of temporary data products to reduce peak memory need +from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete +process = customiseEarlyDelete(process) +# End adding early deletion +