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 = cms.InputTag('ecalDigisGPU', 'ebDigis'),
30  digisLabelEE = cms.InputTag('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 = cms.InputTag('ecalMultiFitUncalibRecHitGPU', 'EcalUncalibRecHitsEB'),
37  recHitsInLabelEE = cms.InputTag('ecalMultiFitUncalibRecHitGPU', 'EcalUncalibRecHitsEE'),
38 )
39 
40 # convert the uncalibrated rechits from SoA to legacy format
41 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitConvertGPU2CPUFormat_cfi import ecalUncalibRecHitConvertGPU2CPUFormat as _ecalUncalibRecHitConvertGPU2CPUFormat
42 gpu.toModify(ecalMultiFitUncalibRecHit,
43  cuda = _ecalUncalibRecHitConvertGPU2CPUFormat.clone(
44  recHitsLabelGPUEB = cms.InputTag('ecalMultiFitUncalibRecHitSoA', 'EcalUncalibRecHitsEB'),
45  recHitsLabelGPUEE = cms.InputTag('ecalMultiFitUncalibRecHitSoA', 'EcalUncalibRecHitsEE'),
46  )
47 )
48 
49 gpu.toReplaceWith(ecalMultiFitUncalibRecHitTask, cms.Task(
50  # ECAL conditions used by the multifit running on GPU
51  ecalPedestalsGPUESProducer,
52  ecalGainRatiosGPUESProducer,
53  ecalPulseShapesGPUESProducer,
54  ecalPulseCovariancesGPUESProducer,
55  ecalSamplesCorrelationGPUESProducer,
56  ecalTimeBiasCorrectionsGPUESProducer,
57  ecalTimeCalibConstantsGPUESProducer,
58  ecalMultifitParametersGPUESProducer,
59  # ECAL multifit running on GPU
60  ecalMultiFitUncalibRecHitGPU,
61  # copy the uncalibrated rechits from GPU to CPU
62  ecalMultiFitUncalibRecHitSoA,
63  # ECAL multifit running on CPU, or convert the uncalibrated rechits from SoA to legacy format
64  ecalMultiFitUncalibRecHit,
65 ))