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 multifit running on CPU
0006 from RecoLocalCalo.EcalRecProducers.ecalMultiFitUncalibRecHit_cfi import ecalMultiFitUncalibRecHit as _ecalMultiFitUncalibRecHit
0007 ecalMultiFitUncalibRecHit = SwitchProducerCUDA(
0008   cpu = _ecalMultiFitUncalibRecHit.clone()
0009 )
0010 
0011 ecalMultiFitUncalibRecHitTask = cms.Task(
0012   # ECAL multifit running on CPU
0013   ecalMultiFitUncalibRecHit
0014 )
0015 
0016 # ECAL conditions used by the multifit running on GPU
0017 from RecoLocalCalo.EcalRecProducers.ecalPedestalsGPUESProducer_cfi import ecalPedestalsGPUESProducer
0018 from RecoLocalCalo.EcalRecProducers.ecalGainRatiosGPUESProducer_cfi import ecalGainRatiosGPUESProducer
0019 from RecoLocalCalo.EcalRecProducers.ecalPulseShapesGPUESProducer_cfi import ecalPulseShapesGPUESProducer
0020 from RecoLocalCalo.EcalRecProducers.ecalPulseCovariancesGPUESProducer_cfi import ecalPulseCovariancesGPUESProducer
0021 from RecoLocalCalo.EcalRecProducers.ecalSamplesCorrelationGPUESProducer_cfi import ecalSamplesCorrelationGPUESProducer
0022 from RecoLocalCalo.EcalRecProducers.ecalTimeBiasCorrectionsGPUESProducer_cfi import ecalTimeBiasCorrectionsGPUESProducer
0023 from RecoLocalCalo.EcalRecProducers.ecalTimeCalibConstantsGPUESProducer_cfi import ecalTimeCalibConstantsGPUESProducer
0024 from RecoLocalCalo.EcalRecProducers.ecalMultifitParametersGPUESProducer_cfi import ecalMultifitParametersGPUESProducer
0025 
0026 # ECAL multifit running on GPU
0027 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitProducerGPU_cfi import ecalUncalibRecHitProducerGPU as _ecalUncalibRecHitProducerGPU
0028 ecalMultiFitUncalibRecHitGPU = _ecalUncalibRecHitProducerGPU.clone(
0029   digisLabelEB = cms.InputTag('ecalDigisGPU', 'ebDigis'),
0030   digisLabelEE = cms.InputTag('ecalDigisGPU', 'eeDigis'),
0031 )
0032 
0033 # copy the uncalibrated rechits from GPU to CPU
0034 from RecoLocalCalo.EcalRecProducers.ecalCPUUncalibRecHitProducer_cfi import ecalCPUUncalibRecHitProducer as _ecalCPUUncalibRecHitProducer
0035 ecalMultiFitUncalibRecHitSoA = _ecalCPUUncalibRecHitProducer.clone(
0036   recHitsInLabelEB = cms.InputTag('ecalMultiFitUncalibRecHitGPU', 'EcalUncalibRecHitsEB'),
0037   recHitsInLabelEE = cms.InputTag('ecalMultiFitUncalibRecHitGPU', 'EcalUncalibRecHitsEE'),
0038 )
0039 
0040 # convert the uncalibrated rechits from SoA to legacy format
0041 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitConvertGPU2CPUFormat_cfi import ecalUncalibRecHitConvertGPU2CPUFormat as _ecalUncalibRecHitConvertGPU2CPUFormat
0042 gpu.toModify(ecalMultiFitUncalibRecHit,
0043   cuda = _ecalUncalibRecHitConvertGPU2CPUFormat.clone(
0044     recHitsLabelGPUEB = cms.InputTag('ecalMultiFitUncalibRecHitSoA', 'EcalUncalibRecHitsEB'),
0045     recHitsLabelGPUEE = cms.InputTag('ecalMultiFitUncalibRecHitSoA', 'EcalUncalibRecHitsEE'),
0046   )
0047 )
0048 
0049 gpu.toReplaceWith(ecalMultiFitUncalibRecHitTask, cms.Task(
0050   # ECAL conditions used by the multifit running on GPU
0051   ecalPedestalsGPUESProducer,
0052   ecalGainRatiosGPUESProducer,
0053   ecalPulseShapesGPUESProducer,
0054   ecalPulseCovariancesGPUESProducer,
0055   ecalSamplesCorrelationGPUESProducer,
0056   ecalTimeBiasCorrectionsGPUESProducer,
0057   ecalTimeCalibConstantsGPUESProducer,
0058   ecalMultifitParametersGPUESProducer,
0059   # ECAL multifit running on GPU
0060   ecalMultiFitUncalibRecHitGPU,
0061   # copy the uncalibrated rechits from GPU to CPU
0062   ecalMultiFitUncalibRecHitSoA,
0063   # ECAL multifit running on CPU, or convert the uncalibrated rechits from SoA to legacy format
0064   ecalMultiFitUncalibRecHit,
0065 ))