Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-03 04:18:10

0001 import FWCore.ParameterSet.Config as cms
0002 from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA
0003 
0004 from RecoLocalCalo.HcalRecAlgos.hcalRecAlgoESProd_cfi import *
0005 from RecoLocalCalo.HcalRecAlgos.hcalChannelPropertiesESProd_cfi import *
0006 hcalOOTPileupESProducer = cms.ESProducer('OOTPileupDBCompatibilityESProducer')
0007 
0008 from RecoLocalCalo.HcalRecProducers.HBHEPhase1Reconstructor_cfi import hbheprereco as _phase1_hbheprereco
0009 hbheprereco = SwitchProducerCUDA(
0010     cpu = _phase1_hbheprereco.clone(
0011         processQIE11 = False,
0012         tsFromDB = True,
0013         pulseShapeParametersQIE8 = dict(
0014             TrianglePeakTS = 4,
0015         )
0016     )
0017 )
0018 
0019 from RecoLocalCalo.HcalRecProducers.HcalHitReconstructor_ho_cfi import *
0020 from RecoLocalCalo.HcalRecProducers.HcalHitReconstructor_hf_cfi import *
0021 from RecoLocalCalo.HcalRecProducers.HcalHitReconstructor_zdc_cfi import *
0022 hcalLocalRecoTask = cms.Task(hbheprereco, hfreco, horeco, zdcreco)
0023 hcalLocalRecoSequence = cms.Sequence(hcalLocalRecoTask)
0024 
0025 from RecoLocalCalo.HcalRecProducers.hfprereco_cfi import hfprereco
0026 from RecoLocalCalo.HcalRecProducers.HFPhase1Reconstructor_cfi import hfreco as _phase1_hfreco
0027 from RecoLocalCalo.HcalRecProducers.hbheplan1_cfi import hbheplan1
0028 
0029 #--- for cosmics
0030 _default_hfreco = hfreco.clone()
0031 
0032 #--- for Phase 1
0033 _phase1_hcalLocalRecoTask = hcalLocalRecoTask.copy()
0034 _phase1_hcalLocalRecoTask.add(hfprereco)
0035 
0036 from Configuration.Eras.Modifier_run2_HF_2017_cff import run2_HF_2017
0037 run2_HF_2017.toReplaceWith(hcalLocalRecoTask, _phase1_hcalLocalRecoTask)
0038 run2_HF_2017.toReplaceWith(hfreco, _phase1_hfreco)
0039 from Configuration.Eras.Modifier_run2_HCAL_2017_cff import run2_HCAL_2017
0040 run2_HCAL_2017.toModify(hbheprereco,
0041     cpu = _phase1_hbheprereco.clone()
0042 )
0043 
0044 _plan1_hcalLocalRecoTask = _phase1_hcalLocalRecoTask.copy()
0045 _plan1_hcalLocalRecoTask.add(hbheplan1)
0046 from Configuration.Eras.Modifier_run2_HEPlan1_2017_cff import run2_HEPlan1_2017
0047 run2_HEPlan1_2017.toReplaceWith(hcalLocalRecoTask, _plan1_hcalLocalRecoTask)
0048 
0049 hbhecollapse = hbheplan1.clone()
0050 _collapse_hcalLocalRecoTask = _phase1_hcalLocalRecoTask.copy()
0051 _collapse_hcalLocalRecoTask.add(hbhecollapse)
0052 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
0053 run2_HECollapse_2018.toReplaceWith(hcalLocalRecoTask, _collapse_hcalLocalRecoTask)
0054 
0055 #--- Legacy HCAL Only Task
0056 hbheprerecoLegacy = hbheprereco.cpu.clone()
0057 hcalOnlyLegacyLocalRecoTask = hcalLocalRecoTask.copyAndExclude([zdcreco,hbheprereco])
0058 hcalOnlyLegacyLocalRecoTask.add(hbheprerecoLegacy)
0059 
0060 #--- for Run 3 and later
0061 _run3_hcalLocalRecoTask = _phase1_hcalLocalRecoTask.copy()
0062 _run3_hcalLocalRecoTask.remove(hbheprereco)
0063 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
0064 run3_HB.toReplaceWith(hcalLocalRecoTask, _run3_hcalLocalRecoTask)
0065 
0066 #--- for Run 3 on GPU
0067 from Configuration.ProcessModifiers.gpu_cff import gpu
0068 
0069 from RecoLocalCalo.HcalRecProducers.hbheRecHitProducerGPUTask_cff import *
0070 _run3_hcalLocalRecoGPUTask = hcalLocalRecoTask.copy()
0071 _run3_hcalLocalRecoGPUTask.add(hbheRecHitProducerGPUTask)
0072 gpu.toReplaceWith(hcalLocalRecoTask, _run3_hcalLocalRecoGPUTask)
0073 
0074 #--- for alpaka
0075 from Configuration.ProcessModifiers.alpaka_cff import alpaka
0076 from RecoLocalCalo.HcalRecProducers.hbheRecHitProducerPortableTask_cff import *
0077 _run3_hcalLocalRecoPortableTask = hcalLocalRecoTask.copy()
0078 _run3_hcalLocalRecoPortableTask.add(hbheRecHitProducerPortableTask)
0079 alpaka.toReplaceWith(hcalLocalRecoTask, _run3_hcalLocalRecoPortableTask)
0080 
0081 #--- HCAL-only workflow
0082 hcalOnlyLocalRecoTask = hcalLocalRecoTask.copyAndExclude([zdcreco])
0083 
0084 #--- HCAL-only workflow for Run 2 on GPU
0085 from RecoLocalCalo.HcalRecProducers.hcalCPURecHitsProducer_cfi import hcalCPURecHitsProducer as _hbheprerecoFromCUDA
0086 (gpu & ~run3_HB).toModify(hbheprereco,
0087     cuda = _hbheprerecoFromCUDA.clone(
0088         produceSoA = False
0089     )
0090 )
0091 #--- HCAL-only workflow for Run 2 on GPU
0092 from RecoLocalCalo.HcalRecProducers.hcalRecHitSoAToLegacy_cfi import  hcalRecHitSoAToLegacy 
0093 (alpaka & ~run3_HB).toModify(hbheprereco,
0094     cpu = hcalRecHitSoAToLegacy.clone()
0095 )
0096 
0097 #--- for FastSim
0098 _fastSim_hcalLocalRecoTask = hcalLocalRecoTask.copyAndExclude([zdcreco])
0099 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0100 fastSim.toReplaceWith( hcalLocalRecoTask, _fastSim_hcalLocalRecoTask )