CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ecalUncalibRecHitPhase2_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 
6 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitPhase2_cfi import ecalUncalibRecHitPhase2 as _ecalUncalibRecHitPhase2
7 ecalUncalibRecHitPhase2 = SwitchProducerCUDA(
8  cpu = _ecalUncalibRecHitPhase2.clone()
9 )
10 
11 # cpu weights
12 ecalUncalibRecHitPhase2Task = cms.Task(ecalUncalibRecHitPhase2)
13 
14 # conditions used on gpu
15 
16 
17 from RecoLocalCalo.EcalRecProducers.ecalPhase2DigiToGPUProducer_cfi import ecalPhase2DigiToGPUProducer as _ecalPhase2DigiToGPUProducer
18 ecalPhase2DigiToGPUProducer = _ecalPhase2DigiToGPUProducer.clone()
19 
20 # gpu weights
21 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitPhase2GPU_cfi import ecalUncalibRecHitPhase2GPU as _ecalUncalibRecHitPhase2GPU
22 ecalUncalibRecHitPhase2GPU = _ecalUncalibRecHitPhase2GPU.clone(
23  digisLabelEB = ('ecalPhase2DigiToGPUProducer', 'ebDigis')
24 )
25 
26 # copy the uncalibrated rechits from GPU to CPU
27 from RecoLocalCalo.EcalRecProducers.ecalCPUUncalibRecHitProducer_cfi import ecalCPUUncalibRecHitProducer as _ecalCPUUncalibRecHitProducer
28 ecalUncalibRecHitSoA = _ecalCPUUncalibRecHitProducer.clone(
29  recHitsInLabelEB = ('ecalUncalibRecHitPhase2GPU', 'EcalUncalibRecHitsEB'),
30  isPhase2 = True,
31  recHitsInLabelEE = None, # remove unneeded Phase1 parameters
32  recHitsOutLabelEE = None
33 )
34 
35 
36 from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitConvertGPU2CPUFormat_cfi import ecalUncalibRecHitConvertGPU2CPUFormat as _ecalUncalibRecHitConvertGPU2CPUFormat
37 gpu.toModify(ecalUncalibRecHitPhase2,
38  cuda = _ecalUncalibRecHitConvertGPU2CPUFormat.clone(
39  isPhase2 = True,
40  recHitsLabelGPUEB = ('ecalUncalibRecHitSoA', 'EcalUncalibRecHitsEB'),
41  recHitsLabelGPUEE = None, # remove unneeded Phase1 parameters
42  recHitsLabelCPUEE = None
43  )
44 )
45 
46 gpu.toReplaceWith(ecalUncalibRecHitPhase2Task, cms.Task(
47  # convert phase2 digis to GPU SoA
48  ecalPhase2DigiToGPUProducer,
49  # ECAL weights running on GPU
50  ecalUncalibRecHitPhase2GPU,
51  # copy the uncalibrated rechits from GPU to CPU
52  ecalUncalibRecHitSoA,
53  # ECAL multifit running on CPU, or convert the uncalibrated rechits from SoA to legacy format
54  ecalUncalibRecHitPhase2,
55 ))