hcalConvertedEffectivePedestalWidthsGPUESProducer.label1 = "withTopoEff" from RecoLocalCalo.HcalRecProducers.hcalQIECodersGPUESProducer_cfi import hcalQIECodersGPUESProducer from RecoLocalCalo.HcalRecProducers.hcalRecoParamsWithPulseShapesGPUESProducer_cfi import hcalRecoParamsWithPulseShapesGPUESProducer from RecoLocalCalo.HcalRecProducers.hcalRespCorrsGPUESProducer_cfi import hcalRespCorrsGPUESProducer from RecoLocalCalo.HcalRecProducers.hcalTimeCorrsGPUESProducer_cfi import hcalTimeCorrsGPUESProducer from RecoLocalCalo.HcalRecProducers.hcalQIETypesGPUESProducer_cfi import hcalQIETypesGPUESProducer from RecoLocalCalo.HcalRecProducers.hcalSiPMParametersGPUESProducer_cfi import hcalSiPMParametersGPUESProducer from RecoLocalCalo.HcalRecProducers.hcalSiPMCharacteristicsGPUESProducer_cfi import hcalSiPMCharacteristicsGPUESProducer from RecoLocalCalo.HcalRecProducers.hcalMahiPulseOffsetsGPUESProducer_cfi import hcalMahiPulseOffsetsGPUESProducer # convert the HBHE digis into SoA format, and copy them from CPU to GPU from EventFilter.HcalRawToDigi.hcalDigisProducerGPU_cfi import hcalDigisProducerGPU as _hcalDigisProducerGPU hcalDigisGPU = _hcalDigisProducerGPU.clone( digisLabelF01HE = "", digisLabelF5HB = "", digisLabelF3HB = "" ) # run the HCAL local reconstruction (MAHI) on GPU from RecoLocalCalo.HcalRecProducers.hbheRecHitProducerGPU_cfi import hbheRecHitProducerGPU as _hbheRecHitProducerGPU hbheRecHitProducerGPU = _hbheRecHitProducerGPU.clone( digisLabelF01HE = "hcalDigisGPU", digisLabelF5HB = "hcalDigisGPU", digisLabelF3HB = "hcalDigisGPU", recHitsLabelM0HBHE = "" ) # Tasks and Sequences hbheRecHitProducerGPUTask = cms.Task( hcalGainsGPUESProducer,
def customiseHcalLocalReconstruction(process): hasHLTDoLocalHcalSeq = 'HLTDoLocalHcalSequence' in process.__dict__ if not (hasHLTDoLocalHcalSeq or 'HLTStoppedHSCPLocalHcalReco' in process.__dict__): return process # FIXME replace the Sequences with empty ones to avoid expanding them during the (re)definition of Modules and EDAliases if hasHLTDoLocalHcalSeq: process.HLTDoLocalHcalSequence = cms.Sequence() process.HLTStoppedHSCPLocalHcalReco = cms.Sequence() # Event Setup process.load( "EventFilter.HcalRawToDigi.hcalElectronicsMappingGPUESProducer_cfi") process.load("RecoLocalCalo.HcalRecProducers.hcalGainsGPUESProducer_cfi") process.load( "RecoLocalCalo.HcalRecProducers.hcalGainWidthsGPUESProducer_cfi") process.load( "RecoLocalCalo.HcalRecProducers.hcalLUTCorrsGPUESProducer_cfi") process.load( "RecoLocalCalo.HcalRecProducers.hcalConvertedPedestalsGPUESProducer_cfi" ) process.load( "RecoLocalCalo.HcalRecProducers.hcalConvertedEffectivePedestalsGPUESProducer_cfi" ) process.hcalConvertedEffectivePedestalsGPUESProducer.label0 = "withTopoEff" process.load( "RecoLocalCalo.HcalRecProducers.hcalConvertedPedestalWidthsGPUESProducer_cfi" ) process.load( "RecoLocalCalo.HcalRecProducers.hcalConvertedEffectivePedestalWidthsGPUESProducer_cfi" ) process.hcalConvertedEffectivePedestalWidthsGPUESProducer.label0 = "withTopoEff" process.hcalConvertedEffectivePedestalWidthsGPUESProducer.label1 = "withTopoEff" process.load( "RecoLocalCalo.HcalRecProducers.hcalQIECodersGPUESProducer_cfi") process.load( "RecoLocalCalo.HcalRecProducers.hcalRecoParamsWithPulseShapesGPUESProducer_cfi" ) process.load( "RecoLocalCalo.HcalRecProducers.hcalRespCorrsGPUESProducer_cfi") process.load( "RecoLocalCalo.HcalRecProducers.hcalTimeCorrsGPUESProducer_cfi") process.load( "RecoLocalCalo.HcalRecProducers.hcalQIETypesGPUESProducer_cfi") process.load( "RecoLocalCalo.HcalRecProducers.hcalSiPMParametersGPUESProducer_cfi") process.load( "RecoLocalCalo.HcalRecProducers.hcalSiPMCharacteristicsGPUESProducer_cfi" ) process.load( "RecoLocalCalo.HcalRecProducers.hcalMahiPulseOffsetsGPUESProducer_cfi") # Modules and EDAliases # The HCAL unpacker running on the gpu supports only the HB and HE digis. # So, run the legacy unacker on the cpu, then convert the HB and HE digis # to SoA format and copy them to the gpu. from EventFilter.HcalRawToDigi.hcalDigisProducerGPU_cfi import hcalDigisProducerGPU as _hcalDigisProducerGPU process.hltHcalDigisGPU = _hcalDigisProducerGPU.clone( hbheDigisLabel="hltHcalDigis", qie11DigiLabel="hltHcalDigis", digisLabelF01HE="", digisLabelF5HB="", digisLabelF3HB="") # run the HCAL local reconstruction (including Method 0 and MAHI) on gpu from RecoLocalCalo.HcalRecProducers.hbheRecHitProducerGPU_cfi import hbheRecHitProducerGPU as _hbheRecHitProducerGPU process.hltHbherecoGPU = _hbheRecHitProducerGPU.clone( digisLabelF01HE="hltHcalDigisGPU", digisLabelF5HB="hltHcalDigisGPU", digisLabelF3HB="hltHcalDigisGPU", recHitsLabelM0HBHE="") # transfer the HCAL rechits to the cpu, and convert them to the legacy format from RecoLocalCalo.HcalRecProducers.hcalCPURecHitsProducer_cfi import hcalCPURecHitsProducer as _hcalCPURecHitsProducer process.hltHbherecoFromGPU = _hcalCPURecHitsProducer.clone( recHitsM0LabelIn="hltHbherecoGPU", recHitsM0LabelOut="", recHitsLegacyLabelOut="") # SwitchProducer between the legacy producer and the copy from gpu with conversion process.hltHbhereco = SwitchProducerCUDA( # legacy producer cpu=process.hltHbhereco.clone(), # alias to the rechits converted to legacy format cuda=cms.EDAlias(hltHbherecoFromGPU=cms.VPSet( cms.PSet(type=cms.string("HBHERecHitsSorted"))))) # Tasks and Sequences if hasHLTDoLocalHcalSeq: process.HLTDoLocalHcalTask = cms.Task( process.hltHcalDigis, # legacy producer, unpack HCAL digis on cpu process.hltHcalDigisGPU, # copy to gpu and convert to SoA format process. hltHbherecoGPU, # run the HCAL local reconstruction (including Method 0 and MAHI) on gpu process. hltHbherecoFromGPU, # transfer the HCAL rechits to the cpu, and convert them to the legacy format process. hltHbhereco, # SwitchProducer between the legacy producer and the copy from gpu with conversion process.hltHfprereco, # legacy producer process.hltHfreco, # legacy producer process.hltHoreco) # legacy producer process.HLTDoLocalHcalSequence = cms.Sequence( process.HLTDoLocalHcalTask) process.HLTStoppedHSCPLocalHcalRecoTask = cms.Task( process.hltHcalDigis, # legacy producer, unpack HCAL digis on cpu process.hltHcalDigisGPU, # copy to gpu and convert to SoA format process. hltHbherecoGPU, # run the HCAL local reconstruction (including Method 0 and MAHI) on gpu process. hltHbherecoFromGPU, # transfer the HCAL rechits to the cpu, and convert them to the legacy format process.hltHbhereco ) # SwitchProducer between the legacy producer and the copy from gpu with conversion process.HLTStoppedHSCPLocalHcalReco = cms.Sequence( process.HLTStoppedHSCPLocalHcalRecoTask) # done return process