Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-04-24 01:30:29

0001 import FWCore.ParameterSet.Config as cms
0002 from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA
0003 
0004 # ECAL Phase 2 weights running on CPU
0005 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitPhase2_cfi import ecalUncalibRecHitPhase2 as _ecalUncalibRecHitPhase2
0006 ecalUncalibRecHitPhase2CPU = _ecalUncalibRecHitPhase2.clone() 
0007 ecalUncalibRecHitPhase2 = SwitchProducerCUDA(
0008   cpu = ecalUncalibRecHitPhase2CPU
0009 )
0010 
0011 ecalUncalibRecHitPhase2Task = cms.Task(
0012         # ECAL weights running on CPU
0013         ecalUncalibRecHitPhase2
0014 )
0015 
0016 
0017 from Configuration.StandardSequences.Accelerators_cff import *
0018 
0019 # process modifier to run alpaka implementation
0020 from Configuration.ProcessModifiers.alpaka_cff import alpaka
0021 
0022 #ECAL Phase 2 Digis Producer running on the accelerator
0023 from RecoLocalCalo.EcalRecProducers.ecalPhase2DigiToPortableProducer_cfi import ecalPhase2DigiToPortableProducer as _ecalPhase2DigiToPortableProducer
0024 simEcalUnsuppressedDigisSoA = _ecalPhase2DigiToPortableProducer.clone()
0025 
0026 # ECAL Phase 2 weights portable running
0027 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitPhase2WeightsProducerPortable_cfi import ecalUncalibRecHitPhase2WeightsProducerPortable as _ecalUncalibRecHitPhase2Portable
0028 ecalUncalibRecHitPhase2SoA = _ecalUncalibRecHitPhase2Portable.clone(
0029         digisLabelEB = 'simEcalUnsuppressedDigisSoA:ebDigis'
0030 )
0031 
0032 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitSoAToLegacy_cfi import ecalUncalibRecHitSoAToLegacy as _ecalUncalibRecHitSoAToLegacy
0033 alpaka.toModify(ecalUncalibRecHitPhase2,
0034     cpu = _ecalUncalibRecHitSoAToLegacy.clone(
0035     isPhase2 = True,
0036     inputCollectionEB = 'ecalUncalibRecHitPhase2SoA:EcalUncalibRecHitsEB',
0037     inputCollectionEE = None,
0038     outputLabelEE = None
0039     )
0040 )
0041 
0042 
0043 alpaka.toReplaceWith(ecalUncalibRecHitPhase2Task, cms.Task(
0044   # convert phase2 digis to Portable Collection
0045   simEcalUnsuppressedDigisSoA, 
0046   # ECAL weights running on Device
0047   ecalUncalibRecHitPhase2SoA,
0048   # Convert the uncalibrated rechits from Portable Collection to legacy format
0049   ecalUncalibRecHitPhase2
0050 ))