Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-12 02:41:28

0001 import FWCore.ParameterSet.Config as cms
0002 from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA
0003 from Configuration.ProcessModifiers.gpu_cff import gpu
0004 
0005 # ECAL calibrated rechit reconstruction on CPU
0006 from RecoLocalCalo.EcalRecProducers.ecalRecHit_cfi import ecalRecHit as _ecalRecHit
0007 ecalRecHit = SwitchProducerCUDA(
0008     cpu = _ecalRecHit.clone()
0009 )
0010 
0011 ecalCalibratedRecHitTask = cms.Task(
0012     ecalRecHit
0013 )
0014 
0015 # ECAL rechit calibrations on GPU
0016 from RecoLocalCalo.EcalRecProducers.ecalRechitADCToGeVConstantGPUESProducer_cfi import ecalRechitADCToGeVConstantGPUESProducer
0017 from RecoLocalCalo.EcalRecProducers.ecalRechitChannelStatusGPUESProducer_cfi import ecalRechitChannelStatusGPUESProducer
0018 from RecoLocalCalo.EcalRecProducers.ecalIntercalibConstantsGPUESProducer_cfi import ecalIntercalibConstantsGPUESProducer
0019 from RecoLocalCalo.EcalRecProducers.ecalLaserAPDPNRatiosGPUESProducer_cfi import ecalLaserAPDPNRatiosGPUESProducer
0020 from RecoLocalCalo.EcalRecProducers.ecalLaserAPDPNRatiosRefGPUESProducer_cfi import ecalLaserAPDPNRatiosRefGPUESProducer
0021 from RecoLocalCalo.EcalRecProducers.ecalLaserAlphasGPUESProducer_cfi import ecalLaserAlphasGPUESProducer
0022 from RecoLocalCalo.EcalRecProducers.ecalLinearCorrectionsGPUESProducer_cfi import ecalLinearCorrectionsGPUESProducer
0023 from RecoLocalCalo.EcalRecProducers.ecalRecHitParametersGPUESProducer_cfi import ecalRecHitParametersGPUESProducer
0024 
0025 # ECAL rechits running on GPU
0026 from RecoLocalCalo.EcalRecProducers.ecalRecHitGPU_cfi import ecalRecHitGPU as _ecalRecHitGPU
0027 ecalRecHitGPU = _ecalRecHitGPU.clone(
0028     uncalibrecHitsInLabelEB = cms.InputTag('ecalMultiFitUncalibRecHitGPU', 'EcalUncalibRecHitsEB'),
0029     uncalibrecHitsInLabelEE = cms.InputTag('ecalMultiFitUncalibRecHitGPU', 'EcalUncalibRecHitsEE')
0030 )
0031 
0032 # copy the rechits from GPU to CPU
0033 from RecoLocalCalo.EcalRecProducers.ecalCPURecHitProducer_cfi import ecalCPURecHitProducer as _ecalCPURecHitProducer
0034 ecalRecHitSoA = _ecalCPURecHitProducer.clone(
0035     recHitsInLabelEB = cms.InputTag('ecalRecHitGPU', 'EcalRecHitsEB'),
0036     recHitsInLabelEE = cms.InputTag('ecalRecHitGPU', 'EcalRecHitsEE')
0037 )
0038 
0039 # TODO: the ECAL calibrated rechits produced on the GPU are not correct, yet.
0040 # When they are working and validated, remove this comment and uncomment the next lines:
0041 # convert the rechits from SoA to legacy format
0042 #from RecoLocalCalo.EcalRecProducers.ecalRecHitConvertGPU2CPUFormat_cfi import ecalRecHitConvertGPU2CPUFormat as _ecalRecHitFromSoA
0043 #gpu.toModify(ecalRecHit,
0044 #    cuda = _ecalRecHitFromSoA.clone(
0045 #        recHitsLabelGPUEB = cms.InputTag('ecalRecHitSoA', 'EcalRecHitsEB'),
0046 #        recHitsLabelGPUEE = cms.InputTag('ecalRecHitSoA', 'EcalRecHitsEE')
0047 #    )
0048 #)
0049 
0050 # ECAL calibrated rechit reconstruction on GPU
0051 gpu.toReplaceWith(ecalCalibratedRecHitTask, cms.Task(
0052   # ECAL rechit calibrations on GPU
0053   ecalRechitADCToGeVConstantGPUESProducer,
0054   ecalRechitChannelStatusGPUESProducer,
0055   ecalIntercalibConstantsGPUESProducer,
0056   ecalLaserAPDPNRatiosGPUESProducer,
0057   ecalLaserAPDPNRatiosRefGPUESProducer,
0058   ecalLaserAlphasGPUESProducer,
0059   ecalLinearCorrectionsGPUESProducer,
0060   ecalRecHitParametersGPUESProducer,
0061   # ECAL rechits running on GPU
0062   ecalRecHitGPU,
0063   # copy the rechits from GPU to CPU
0064   ecalRecHitSoA,
0065   # convert the rechits from SoA to legacy format
0066   ecalRecHit
0067 ))