CMS 3D CMS Logo

hcalGlobalReco_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA
3 
4 #--- for Run 1 and Run 2
5 from RecoLocalCalo.HcalRecProducers.HBHEIsolatedNoiseReflagger_cfi import hbhereco as _phase0_hbhereco
6 hbhereco = SwitchProducerCUDA(
7  cpu = _phase0_hbhereco.clone()
8 )
9 hbherecoLegacy = _phase0_hbhereco.clone()
10 
11 
12 hcalGlobalRecoTask = cms.Task(hbhereco)
13 hcalGlobalRecoSequence = cms.Sequence(hcalGlobalRecoTask)
14 
15 hcalOnlyGlobalRecoTask = cms.Task()
16 hcalOnlyGlobalRecoSequence = cms.Sequence(hcalOnlyGlobalRecoTask)
17 
18 #-- Legacy HCAL Only Task
19 hcalOnlyLegacyGlobalRecoTask = cms.Task()
20 
21 #--- for Run 3 and later
22 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
23 
24 from RecoLocalCalo.HcalRecProducers.HBHEPhase1Reconstructor_cfi import hbheprereco as _phase1_hbheprereco
25 run3_HB.toReplaceWith(hbhereco.cpu, _phase1_hbheprereco)
26 run3_HB.toReplaceWith(hcalOnlyGlobalRecoTask, cms.Task(hbhereco))
27 run3_HB.toReplaceWith(hbherecoLegacy, _phase1_hbheprereco)
28 run3_HB.toReplaceWith(hcalOnlyLegacyGlobalRecoTask, cms.Task(hbherecoLegacy))
29 
30 
31 #--- for Run 3 on GPU
34 
35 from RecoLocalCalo.HcalRecProducers.hcalCPURecHitsProducer_cfi import hcalCPURecHitsProducer as _hbherecoFromCUDA
36 (run3_HB & gpu).toModify(hbhereco,
37  cuda = _hbherecoFromCUDA.clone(
38  produceSoA = False
39  )
40 )
41 
42 from RecoLocalCalo.HcalRecProducers.hcalRecHitSoAToLegacy_cfi import hcalRecHitSoAToLegacy
43 (alpaka & run3_HB).toModify(hbhereco,
44  cpu = hcalRecHitSoAToLegacy.clone(
45  src = ("hbheRecHitProducerPortable","")
46  )
47 )
48 
49 hbherecoSerial = hcalRecHitSoAToLegacy.clone(
50  src = ("hbheRecHitProducerSerial","")
51 )
52 alpaka.toReplaceWith(hcalGlobalRecoTask, hcalGlobalRecoTask.copyAndAdd(hbherecoSerial))
53 alpaka.toReplaceWith(hcalOnlyGlobalRecoTask, hcalOnlyGlobalRecoTask.copyAndAdd(hbherecoSerial))