CMS 3D CMS Logo

hcalLocalReco_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA
3 
6 hcalOOTPileupESProducer = cms.ESProducer('OOTPileupDBCompatibilityESProducer')
7 
8 from RecoLocalCalo.HcalRecProducers.HBHEPhase1Reconstructor_cfi import hbheprereco as _phase1_hbheprereco
9 hbheprereco = SwitchProducerCUDA(
10  cpu = _phase1_hbheprereco.clone(
11  processQIE11 = False,
12  tsFromDB = True,
13  pulseShapeParametersQIE8 = dict(
14  TrianglePeakTS = 4,
15  )
16  )
17 )
18 
22 hcalLocalRecoTask = cms.Task(hbheprereco, hfreco, horeco, zdcreco)
23 hcalLocalRecoSequence = cms.Sequence(hcalLocalRecoTask)
24 
25 from RecoLocalCalo.HcalRecProducers.hfprereco_cfi import hfprereco
26 from RecoLocalCalo.HcalRecProducers.HFPhase1Reconstructor_cfi import hfreco as _phase1_hfreco
27 from RecoLocalCalo.HcalRecProducers.hbheplan1_cfi import hbheplan1
28 
29 #--- for cosmics
30 _default_hfreco = hfreco.clone()
31 
32 #--- for Phase 1
33 _phase1_hcalLocalRecoTask = hcalLocalRecoTask.copy()
34 _phase1_hcalLocalRecoTask.add(hfprereco)
35 
36 from Configuration.Eras.Modifier_run2_HF_2017_cff import run2_HF_2017
37 run2_HF_2017.toReplaceWith(hcalLocalRecoTask, _phase1_hcalLocalRecoTask)
38 run2_HF_2017.toReplaceWith(hfreco, _phase1_hfreco)
39 from Configuration.Eras.Modifier_run2_HCAL_2017_cff import run2_HCAL_2017
40 run2_HCAL_2017.toModify(hbheprereco,
41  cpu = _phase1_hbheprereco.clone()
42 )
43 
44 _plan1_hcalLocalRecoTask = _phase1_hcalLocalRecoTask.copy()
45 _plan1_hcalLocalRecoTask.add(hbheplan1)
46 from Configuration.Eras.Modifier_run2_HEPlan1_2017_cff import run2_HEPlan1_2017
47 run2_HEPlan1_2017.toReplaceWith(hcalLocalRecoTask, _plan1_hcalLocalRecoTask)
48 
49 hbhecollapse = hbheplan1.clone()
50 _collapse_hcalLocalRecoTask = _phase1_hcalLocalRecoTask.copy()
51 _collapse_hcalLocalRecoTask.add(hbhecollapse)
52 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
53 run2_HECollapse_2018.toReplaceWith(hcalLocalRecoTask, _collapse_hcalLocalRecoTask)
54 
55 #--- Legacy HCAL Only Task
56 hbheprerecoLegacy = hbheprereco.cpu.clone()
57 hcalOnlyLegacyLocalRecoTask = hcalLocalRecoTask.copyAndExclude([zdcreco,hbheprereco])
58 hcalOnlyLegacyLocalRecoTask.add(hbheprerecoLegacy)
59 
60 #--- for Run 3 and later
61 _run3_hcalLocalRecoTask = _phase1_hcalLocalRecoTask.copy()
62 _run3_hcalLocalRecoTask.remove(hbheprereco)
63 
64 from RecoLocalCalo.HcalRecProducers.zdcrecoRun3_cfi import zdcrecoRun3
65 _run3_hcalLocalRecoTask.remove(zdcreco)
66 _run3_hcalLocalRecoTask.add(zdcrecoRun3)
67 from Configuration.Eras.Modifier_run3_common_cff import run3_common
68 run3_common.toReplaceWith(hcalLocalRecoTask, _run3_hcalLocalRecoTask)
69 
70 #--- for Run 3 on GPU
72 
74 _run3_hcalLocalRecoGPUTask = hcalLocalRecoTask.copy()
75 _run3_hcalLocalRecoGPUTask.add(hbheRecHitProducerGPUTask)
76 gpu.toReplaceWith(hcalLocalRecoTask, _run3_hcalLocalRecoGPUTask)
77 
78 #--- for alpaka
81 _run3_hcalLocalRecoPortableTask = hcalLocalRecoTask.copy()
82 _run3_hcalLocalRecoPortableTask.add(hbheRecHitProducerPortableTask)
83 alpaka.toReplaceWith(hcalLocalRecoTask, _run3_hcalLocalRecoPortableTask)
84 
85 #--- HCAL-only workflow
86 hcalOnlyLocalRecoTask = hcalLocalRecoTask.copyAndExclude([zdcreco,zdcrecoRun3])
87 
88 #--- HCAL-only workflow for Run 2 on GPU
89 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
90 from RecoLocalCalo.HcalRecProducers.hcalCPURecHitsProducer_cfi import hcalCPURecHitsProducer as _hbheprerecoFromCUDA
91 (gpu & ~run3_HB).toModify(hbheprereco,
92  cuda = _hbheprerecoFromCUDA.clone(
93  produceSoA = False
94  )
95 )
96 #--- HCAL-only workflow for Run 2 on GPU
97 from RecoLocalCalo.HcalRecProducers.hcalRecHitSoAToLegacy_cfi import hcalRecHitSoAToLegacy
98 (alpaka & ~run3_HB).toModify(hbheprereco,
99  cpu = hcalRecHitSoAToLegacy.clone()
100 )
101 
102 #--- for FastSim
103 _fastSim_hcalLocalRecoTask = hcalLocalRecoTask.copyAndExclude([zdcreco,zdcrecoRun3])
104 from Configuration.Eras.Modifier_fastSim_cff import fastSim
105 fastSim.toReplaceWith( hcalLocalRecoTask, _fastSim_hcalLocalRecoTask )