CMS 3D CMS Logo

ecalMultiFitUncalibRecHit_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA
4 
5 # ECAL multifit running on CPU
6 from RecoLocalCalo.EcalRecProducers.ecalMultiFitUncalibRecHit_cfi import ecalMultiFitUncalibRecHit as _ecalMultiFitUncalibRecHit
7 ecalMultiFitUncalibRecHit = SwitchProducerCUDA(
8  cpu = _ecalMultiFitUncalibRecHit.clone()
9 )
10 
11 ecalMultiFitUncalibRecHitTask = cms.Task(
12  # ECAL multifit running on CPU
13  ecalMultiFitUncalibRecHit
14 )
15 
16 # ECAL conditions used by the multifit running on GPU
17 from RecoLocalCalo.EcalRecProducers.ecalPedestalsGPUESProducer_cfi import ecalPedestalsGPUESProducer
18 from RecoLocalCalo.EcalRecProducers.ecalGainRatiosGPUESProducer_cfi import ecalGainRatiosGPUESProducer
19 from RecoLocalCalo.EcalRecProducers.ecalPulseShapesGPUESProducer_cfi import ecalPulseShapesGPUESProducer
20 from RecoLocalCalo.EcalRecProducers.ecalPulseCovariancesGPUESProducer_cfi import ecalPulseCovariancesGPUESProducer
21 from RecoLocalCalo.EcalRecProducers.ecalSamplesCorrelationGPUESProducer_cfi import ecalSamplesCorrelationGPUESProducer
22 from RecoLocalCalo.EcalRecProducers.ecalTimeBiasCorrectionsGPUESProducer_cfi import ecalTimeBiasCorrectionsGPUESProducer
23 from RecoLocalCalo.EcalRecProducers.ecalTimeCalibConstantsGPUESProducer_cfi import ecalTimeCalibConstantsGPUESProducer
24 from RecoLocalCalo.EcalRecProducers.ecalMultifitParametersGPUESProducer_cfi import ecalMultifitParametersGPUESProducer
25 
26 # ECAL multifit running on GPU
27 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitProducerGPU_cfi import ecalUncalibRecHitProducerGPU as _ecalUncalibRecHitProducerGPU
28 ecalMultiFitUncalibRecHitGPU = _ecalUncalibRecHitProducerGPU.clone(
29  digisLabelEB = 'ecalDigisGPU:ebDigis',
30  digisLabelEE = 'ecalDigisGPU:eeDigis',
31 )
32 
33 # copy the uncalibrated rechits from GPU to CPU
34 from RecoLocalCalo.EcalRecProducers.ecalCPUUncalibRecHitProducer_cfi import ecalCPUUncalibRecHitProducer as _ecalCPUUncalibRecHitProducer
35 ecalMultiFitUncalibRecHitSoA = _ecalCPUUncalibRecHitProducer.clone(
36  recHitsInLabelEB = 'ecalMultiFitUncalibRecHitGPU:EcalUncalibRecHitsEB',
37  recHitsInLabelEE = 'ecalMultiFitUncalibRecHitGPU:EcalUncalibRecHitsEE',
38  containsTimingInformation = True
39 )
40 
41 # convert the uncalibrated rechits from SoA to legacy format
42 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitConvertGPU2CPUFormat_cfi import ecalUncalibRecHitConvertGPU2CPUFormat as _ecalUncalibRecHitConvertGPU2CPUFormat
43 gpu.toModify(ecalMultiFitUncalibRecHit,
44  cuda = _ecalUncalibRecHitConvertGPU2CPUFormat.clone(
45  recHitsLabelGPUEB = 'ecalMultiFitUncalibRecHitSoA:EcalUncalibRecHitsEB',
46  recHitsLabelGPUEE = 'ecalMultiFitUncalibRecHitSoA:EcalUncalibRecHitsEE',
47  )
48 )
49 
50 gpu.toReplaceWith(ecalMultiFitUncalibRecHitTask, cms.Task(
51  # ECAL conditions used by the multifit running on GPU
52  ecalPedestalsGPUESProducer,
53  ecalGainRatiosGPUESProducer,
54  ecalPulseShapesGPUESProducer,
55  ecalPulseCovariancesGPUESProducer,
56  ecalSamplesCorrelationGPUESProducer,
57  ecalTimeBiasCorrectionsGPUESProducer,
58  ecalTimeCalibConstantsGPUESProducer,
59  ecalMultifitParametersGPUESProducer,
60  # ECAL multifit running on GPU
61  ecalMultiFitUncalibRecHitGPU,
62  # copy the uncalibrated rechits from GPU to CPU
63  ecalMultiFitUncalibRecHitSoA,
64  # ECAL multifit running on CPU, or convert the uncalibrated rechits from SoA to legacy format
65  ecalMultiFitUncalibRecHit,
66 ))