def customisePixelLocalReconstruction(process): if not 'HLTDoLocalPixelSequence' in process.__dict__: return process # FIXME replace the Sequences with empty ones to avoid exanding them during the (re)definition of Modules and EDAliases process.HLTDoLocalPixelSequence = cms.Sequence() # Event Setup process.load( "CalibTracker.SiPixelESProducers.siPixelGainCalibrationForHLTGPU_cfi" ) # this should be used only on GPUs, will crash otherwise process.load( "CalibTracker.SiPixelESProducers.siPixelROCsStatusAndMappingWrapperESProducer_cfi" ) # this should be used only on GPUs, will crash otherwise process.load("RecoLocalTracker.SiPixelRecHits.PixelCPEFastESProducer_cfi") # Modules and EDAliases # referenced in HLTDoLocalPixelTask # transfer the beamspot to the gpu from RecoVertex.BeamSpotProducer.offlineBeamSpotToCUDA_cfi import offlineBeamSpotToCUDA as _offlineBeamSpotToCUDA process.hltOnlineBeamSpotToCUDA = _offlineBeamSpotToCUDA.clone( src="hltOnlineBeamSpot") # reconstruct the pixel digis and clusters on the gpu from RecoLocalTracker.SiPixelClusterizer.siPixelRawToClusterCUDA_cfi import siPixelRawToClusterCUDA as _siPixelRawToClusterCUDA process.hltSiPixelClustersCUDA = _siPixelRawToClusterCUDA.clone() # use the pixel channel calibrations scheme for Run 3 run3_common.toModify(process.hltSiPixelClustersCUDA, isRun2=False) # copy the pixel digis errors to the host from EventFilter.SiPixelRawToDigi.siPixelDigiErrorsSoAFromCUDA_cfi import siPixelDigiErrorsSoAFromCUDA as _siPixelDigiErrorsSoAFromCUDA process.hltSiPixelDigiErrorsSoA = _siPixelDigiErrorsSoAFromCUDA.clone( src="hltSiPixelClustersCUDA") # convert the pixel digis errors to the legacy format from EventFilter.SiPixelRawToDigi.siPixelDigiErrorsFromSoA_cfi import siPixelDigiErrorsFromSoA as _siPixelDigiErrorsFromSoA process.hltSiPixelDigiErrors = _siPixelDigiErrorsFromSoA.clone( digiErrorSoASrc="hltSiPixelDigiErrorsSoA", UsePhase1=True) # copy the pixel digis (except errors) and clusters to the host from EventFilter.SiPixelRawToDigi.siPixelDigisSoAFromCUDA_cfi import siPixelDigisSoAFromCUDA as _siPixelDigisSoAFromCUDA process.hltSiPixelDigisSoA = _siPixelDigisSoAFromCUDA.clone( src="hltSiPixelClustersCUDA") # convert the pixel digis (except errors) and clusters to the legacy format from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoA_cfi import siPixelDigisClustersFromSoA as _siPixelDigisClustersFromSoA process.hltSiPixelDigisClusters = _siPixelDigisClustersFromSoA.clone( src="hltSiPixelDigisSoA") # SwitchProducer wrapping the legacy pixel digis producer or an alias combining the pixel digis information converted from SoA process.hltSiPixelDigis = SwitchProducerCUDA( # legacy producer cpu=process.hltSiPixelDigis, # alias used to access products from multiple conversion modules cuda=cms.EDAlias( hltSiPixelDigisClusters=cms.VPSet( cms.PSet(type=cms.string("PixelDigiedmDetSetVector"))), hltSiPixelDigiErrors=cms.VPSet( cms.PSet(type=cms.string("DetIdedmEDCollection")), cms.PSet( type=cms.string("SiPixelRawDataErroredmDetSetVector")), cms.PSet( type=cms.string("PixelFEDChanneledmNewDetSetVector"))))) # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA process.hltSiPixelClusters = SwitchProducerCUDA( # legacy producer cpu=process.hltSiPixelClusters, # alias used to access products from multiple conversion modules cuda=cms.EDAlias(hltSiPixelDigisClusters=cms.VPSet( cms.PSet(type=cms.string("SiPixelClusteredmNewDetSetVector"))))) # reconstruct the pixel rechits on the gpu from RecoLocalTracker.SiPixelRecHits.siPixelRecHitCUDA_cfi import siPixelRecHitCUDA as _siPixelRecHitCUDA process.hltSiPixelRecHitsCUDA = _siPixelRecHitCUDA.clone( src="hltSiPixelClustersCUDA", beamSpot="hltOnlineBeamSpotToCUDA") # SwitchProducer wrapping the legacy pixel rechit producer or the transfer of the pixel rechits to the host and the conversion from SoA from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromCUDA_cfi import siPixelRecHitFromCUDA as _siPixelRecHitFromCUDA process.hltSiPixelRecHits = SwitchProducerCUDA( # legacy producer cpu=process.hltSiPixelRecHits, # converter to legacy format cuda=_siPixelRecHitFromCUDA.clone( pixelRecHitSrc="hltSiPixelRecHitsCUDA", src="hltSiPixelClusters")) # Tasks and Sequences process.HLTDoLocalPixelTask = cms.Task( process.hltOnlineBeamSpotToCUDA, # transfer the beamspot to the gpu process. hltSiPixelClustersCUDA, # reconstruct the pixel digis and clusters on the gpu process. hltSiPixelRecHitsCUDA, # reconstruct the pixel rechits on the gpu process. hltSiPixelDigisSoA, # copy the pixel digis (except errors) and clusters to the host process. hltSiPixelDigisClusters, # convert the pixel digis (except errors) and clusters to the legacy format process. hltSiPixelDigiErrorsSoA, # copy the pixel digis errors to the host process. hltSiPixelDigiErrors, # convert the pixel digis errors to the legacy format process. hltSiPixelDigis, # SwitchProducer wrapping the legacy pixel digis producer or an alias combining the pixel digis information converted from SoA process. hltSiPixelClusters, # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA process. hltSiPixelClustersCache, # legacy module, used by the legacy pixel quadruplet producer process.hltSiPixelRecHits ) # SwitchProducer wrapping the legacy pixel rechit producer or the transfer of the pixel rechits to the host and the conversion from SoA process.HLTDoLocalPixelSequence = cms.Sequence(process.HLTDoLocalPixelTask) # done return process
def customisePixelLocalReconstruction(process): if not 'HLTDoLocalPixelSequence' in process.__dict__: return process # FIXME replace the Sequences with empty ones to avoid expanding them during the (re)definition of Modules and EDAliases process.HLTDoLocalPixelSequence = cms.Sequence() # Event Setup process.load( "CalibTracker.SiPixelESProducers.siPixelGainCalibrationForHLTGPU_cfi" ) # this should be used only on GPUs, will crash otherwise process.load( "CalibTracker.SiPixelESProducers.siPixelROCsStatusAndMappingWrapperESProducer_cfi" ) # this should be used only on GPUs, will crash otherwise process.load("RecoLocalTracker.SiPixelRecHits.PixelCPEFastESProducer_cfi") # Modules and EDAliases # referenced in HLTDoLocalPixelTask # transfer the beamspot to the gpu from RecoVertex.BeamSpotProducer.offlineBeamSpotToCUDA_cfi import offlineBeamSpotToCUDA as _offlineBeamSpotToCUDA process.hltOnlineBeamSpotToCUDA = _offlineBeamSpotToCUDA.clone( src="hltOnlineBeamSpot") # reconstruct the pixel digis and clusters on the gpu from RecoLocalTracker.SiPixelClusterizer.siPixelRawToClusterCUDA_cfi import siPixelRawToClusterCUDA as _siPixelRawToClusterCUDA process.hltSiPixelClustersCUDA = _siPixelRawToClusterCUDA.clone( # use the same thresholds as the legacy module clusterThreshold_layer1=process.hltSiPixelClusters.ClusterThreshold_L1, clusterThreshold_otherLayers=process.hltSiPixelClusters. ClusterThreshold) # use the pixel channel calibrations scheme for Run 3 run3_common.toModify(process.hltSiPixelClustersCUDA, isRun2=False) # copy the pixel digis errors to the host from EventFilter.SiPixelRawToDigi.siPixelDigiErrorsSoAFromCUDA_cfi import siPixelDigiErrorsSoAFromCUDA as _siPixelDigiErrorsSoAFromCUDA process.hltSiPixelDigiErrorsSoA = _siPixelDigiErrorsSoAFromCUDA.clone( src="hltSiPixelClustersCUDA") # copy the pixel digis (except errors) and clusters to the host from EventFilter.SiPixelRawToDigi.siPixelDigisSoAFromCUDA_cfi import siPixelDigisSoAFromCUDA as _siPixelDigisSoAFromCUDA process.hltSiPixelDigisSoA = _siPixelDigisSoAFromCUDA.clone( src="hltSiPixelClustersCUDA") # reconstruct the pixel digis on the cpu process.hltSiPixelDigisLegacy = process.hltSiPixelDigis.clone() # SwitchProducer wrapping a subset of the legacy pixel digis producer, or the conversion of the pixel digis errors to the legacy format from EventFilter.SiPixelRawToDigi.siPixelDigiErrorsFromSoA_cfi import siPixelDigiErrorsFromSoA as _siPixelDigiErrorsFromSoA process.hltSiPixelDigis = SwitchProducerCUDA( # legacy producer cpu=cms.EDAlias(hltSiPixelDigisLegacy=cms.VPSet( cms.PSet(type=cms.string("DetIdedmEDCollection")), cms.PSet(type=cms.string("SiPixelRawDataErroredmDetSetVector")), cms.PSet(type=cms.string("PixelFEDChanneledmNewDetSetVector")))), # conversion from SoA to legacy format cuda=_siPixelDigiErrorsFromSoA.clone( digiErrorSoASrc="hltSiPixelDigiErrorsSoA", UsePhase1=True)) # reconstruct the pixel clusters on the cpu process.hltSiPixelClustersLegacy = process.hltSiPixelClusters.clone( src="hltSiPixelDigisLegacy") # SwitchProducer wrapping a subset of the legacy pixel cluster producer, or the conversion of the pixel digis (except errors) and clusters to the legacy format from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoA_cfi import siPixelDigisClustersFromSoA as _siPixelDigisClustersFromSoA process.hltSiPixelClusters = SwitchProducerCUDA( # legacy producer cpu=cms.EDAlias(hltSiPixelClustersLegacy=cms.VPSet( cms.PSet(type=cms.string("SiPixelClusteredmNewDetSetVector")))), # conversion from SoA to legacy format cuda=_siPixelDigisClustersFromSoA.clone( src="hltSiPixelDigisSoA", produceDigis=False, storeDigis=False, # use the same thresholds as the legacy module clusterThreshold_layer1=process.hltSiPixelClusters. ClusterThreshold_L1, clusterThreshold_otherLayers=process.hltSiPixelClusters. ClusterThreshold)) # reconstruct the pixel rechits on the gpu from RecoLocalTracker.SiPixelRecHits.siPixelRecHitCUDA_cfi import siPixelRecHitCUDA as _siPixelRecHitCUDA process.hltSiPixelRecHitsCUDA = _siPixelRecHitCUDA.clone( src="hltSiPixelClustersCUDA", beamSpot="hltOnlineBeamSpotToCUDA") # SwitchProducer wrapping the legacy pixel rechit producer or the transfer of the pixel rechits to the host and the conversion from SoA from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromCUDA_cfi import siPixelRecHitFromCUDA as _siPixelRecHitFromCUDA process.hltSiPixelRecHits = SwitchProducerCUDA( # legacy producer cpu=process.hltSiPixelRecHits, # conversion from SoA to legacy format cuda=_siPixelRecHitFromCUDA.clone( pixelRecHitSrc="hltSiPixelRecHitsCUDA", src="hltSiPixelClusters")) # Tasks and Sequences process.HLTDoLocalPixelTask = cms.Task( process.hltOnlineBeamSpotToCUDA, # transfer the beamspot to the gpu process. hltSiPixelClustersCUDA, # reconstruct the pixel digis and clusters on the gpu process. hltSiPixelRecHitsCUDA, # reconstruct the pixel rechits on the gpu process. hltSiPixelDigisSoA, # copy the pixel digis (except errors) and clusters to the host process. hltSiPixelDigiErrorsSoA, # copy the pixel digis errors to the host process.hltSiPixelDigisLegacy, # legacy pixel digis producer process. hltSiPixelDigis, # SwitchProducer wrapping a subset of the legacy pixel digis producer, or the conversion of the pixel digis errors from SoA process.hltSiPixelClustersLegacy, # legacy pixel cluster producer process. hltSiPixelClusters, # SwitchProducer wrapping a subset of the legacy pixel cluster producer, or the conversion of the pixel digis (except errors) and clusters from SoA process. hltSiPixelClustersCache, # legacy module, used by the legacy pixel quadruplet producer process.hltSiPixelRecHits ) # SwitchProducer wrapping the legacy pixel rechit producer or the transfer of the pixel rechits to the host and the conversion from SoA process.HLTDoLocalPixelSequence = cms.Sequence(process.HLTDoLocalPixelTask) # workaround for AlCa paths if 'AlCa_LumiPixelsCounts_Random_v1' in process.__dict__: if "HLTSchedule" in process.__dict__: ind = process.HLTSchedule.index( process.AlCa_LumiPixelsCounts_Random_v1) process.HLTSchedule.remove(process.AlCa_LumiPixelsCounts_Random_v1) # redefine the path to use the HLTDoLocalPixelSequence process.AlCa_LumiPixelsCounts_Random_v1 = cms.Path( process.HLTBeginSequenceRandom + process.hltScalersRawToDigi + process.hltPreAlCaLumiPixelsCountsRandom + process.hltPixelTrackerHVOn + process.HLTDoLocalPixelSequence + process.hltAlcaPixelClusterCounts + process.HLTEndSequence) if "HLTSchedule" in process.__dict__: process.HLTSchedule.insert(ind, process.AlCa_LumiPixelsCounts_Random_v1) if 'AlCa_LumiPixelsCounts_ZeroBias_v1' in process.__dict__: if "HLTSchedule" in process.__dict__: ind = process.HLTSchedule.index( process.AlCa_LumiPixelsCounts_ZeroBias_v1) process.HLTSchedule.remove( process.AlCa_LumiPixelsCounts_ZeroBias_v1) # redefine the path to use the HLTDoLocalPixelSequence process.AlCa_LumiPixelsCounts_ZeroBias_v1 = cms.Path( process.HLTBeginSequence + process.hltScalersRawToDigi + process.hltL1sZeroBias + process.hltPreAlCaLumiPixelsCountsZeroBias + process.hltPixelTrackerHVOn + process.HLTDoLocalPixelSequence + process.hltAlcaPixelClusterCounts + process.HLTEndSequence) if "HLTSchedule" in process.__dict__: process.HLTSchedule.insert( ind, process.AlCa_LumiPixelsCounts_ZeroBias_v1) # done return process
from Configuration.ProcessModifiers.gpu_cff import gpu # conditions used *only* by the modules running on GPU from CalibTracker.SiPixelESProducers.siPixelROCsStatusAndMappingWrapperESProducer_cfi import siPixelROCsStatusAndMappingWrapperESProducer from CalibTracker.SiPixelESProducers.siPixelGainCalibrationForHLTGPU_cfi import siPixelGainCalibrationForHLTGPU # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA from RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizerPreSplitting_cfi import siPixelClustersPreSplitting siPixelClustersPreSplittingTask = cms.Task( # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA siPixelClustersPreSplitting) # reconstruct the pixel digis and clusters on the gpu from RecoLocalTracker.SiPixelClusterizer.siPixelRawToClusterCUDA_cfi import siPixelRawToClusterCUDA as _siPixelRawToClusterCUDA siPixelClustersPreSplittingCUDA = _siPixelRawToClusterCUDA.clone() run3_common.toModify( siPixelClustersPreSplittingCUDA, # use the pixel channel calibrations scheme for Run 3 isRun2=False, clusterThreshold_layer1=4000) # convert the pixel digis (except errors) and clusters to the legacy format from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoA_cfi import siPixelDigisClustersFromSoA as _siPixelDigisClustersFromSoA siPixelDigisClustersPreSplitting = _siPixelDigisClustersFromSoA.clone() run3_common.toModify(siPixelDigisClustersPreSplitting, clusterThreshold_layer1=4000) from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
def customisePixelLocalReconstruction(process): if not 'HLTDoLocalPixelSequence' in process.__dict__: return process # FIXME replace the Sequences with empty ones to avoid expanding them during the (re)definition of Modules and EDAliases process.HLTDoLocalPixelSequence = cms.Sequence() # Event Setup process.load( "CalibTracker.SiPixelESProducers.siPixelGainCalibrationForHLTGPU_cfi" ) # this should be used only on GPUs, will crash otherwise process.load( "CalibTracker.SiPixelESProducers.siPixelROCsStatusAndMappingWrapperESProducer_cfi" ) # this should be used only on GPUs, will crash otherwise process.load("RecoLocalTracker.SiPixelRecHits.PixelCPEFastESProducer_cfi") # Modules and EDAliases # referenced in HLTDoLocalPixelTask # transfer the beamspot to the gpu from RecoVertex.BeamSpotProducer.offlineBeamSpotToCUDA_cfi import offlineBeamSpotToCUDA as _offlineBeamSpotToCUDA process.hltOnlineBeamSpotToCUDA = _offlineBeamSpotToCUDA.clone( src="hltOnlineBeamSpot") # reconstruct the pixel digis and clusters on the gpu from RecoLocalTracker.SiPixelClusterizer.siPixelRawToClusterCUDA_cfi import siPixelRawToClusterCUDA as _siPixelRawToClusterCUDA if 'hltSiPixelClustersLegacy' in process.__dict__: process.hltSiPixelClustersCUDA = _siPixelRawToClusterCUDA.clone( # use the same thresholds as the legacy module clusterThreshold_layer1=process.hltSiPixelClustersLegacy. ClusterThreshold_L1, clusterThreshold_otherLayers=process.hltSiPixelClustersLegacy. ClusterThreshold) else: process.hltSiPixelClustersCUDA = _siPixelRawToClusterCUDA.clone( # use the same thresholds as the legacy module clusterThreshold_layer1=process.hltSiPixelClusters. ClusterThreshold_L1, clusterThreshold_otherLayers=process.hltSiPixelClusters. ClusterThreshold) # use the pixel channel calibrations scheme for Run 3 run3_common.toModify(process.hltSiPixelClustersCUDA, isRun2=False) # copy the pixel digis errors to the host from EventFilter.SiPixelRawToDigi.siPixelDigiErrorsSoAFromCUDA_cfi import siPixelDigiErrorsSoAFromCUDA as _siPixelDigiErrorsSoAFromCUDA process.hltSiPixelDigiErrorsSoA = _siPixelDigiErrorsSoAFromCUDA.clone( src="hltSiPixelClustersCUDA") # copy the pixel digis (except errors) and clusters to the host from EventFilter.SiPixelRawToDigi.siPixelDigisSoAFromCUDA_cfi import siPixelDigisSoAFromCUDA as _siPixelDigisSoAFromCUDA process.hltSiPixelDigisSoA = _siPixelDigisSoAFromCUDA.clone( src="hltSiPixelClustersCUDA") # SwitchProducer wrapping a subset of the legacy pixel digis producer, or the conversion of the pixel digis errors to the legacy format if not isinstance(process.hltSiPixelDigis, SwitchProducerCUDA): if 'hltSiPixelDigisLegacy' in process.__dict__: raise Exception( 'unsupported configuration: "process.hltSiPixelDigis" is not a SwitchProducerCUDA, but "process.hltSiPixelDigisLegacy" already exists' ) # reconstruct the pixel digis on the cpu process.hltSiPixelDigisLegacy = process.hltSiPixelDigis.clone() # SwitchProducer wrapping a subset of the legacy pixel digis producer, or the conversion of the pixel digis errors to the legacy format process.hltSiPixelDigis = SwitchProducerCUDA( # legacy producer cpu=cms.EDAlias(hltSiPixelDigisLegacy=cms.VPSet( cms.PSet(type=cms.string("DetIdedmEDCollection")), cms.PSet( type=cms.string("SiPixelRawDataErroredmDetSetVector")), cms.PSet( type=cms.string("PixelFEDChanneledmNewDetSetVector"))))) # conversion from SoA to legacy format from EventFilter.SiPixelRawToDigi.siPixelDigiErrorsFromSoA_cfi import siPixelDigiErrorsFromSoA as _siPixelDigiErrorsFromSoA process.hltSiPixelDigis.cuda = _siPixelDigiErrorsFromSoA.clone( digiErrorSoASrc="hltSiPixelDigiErrorsSoA", UsePhase1=True) # SwitchProducer wrapping a subset of the legacy pixel cluster producer, or the conversion of the pixel digis (except errors) and clusters to the legacy format if not isinstance(process.hltSiPixelClusters, SwitchProducerCUDA): if 'hltSiPixelClustersLegacy' in process.__dict__: raise Exception( 'unsupported configuration: "process.hltSiPixelClusters" is not a SwitchProducerCUDA, but "process.hltSiPixelClustersLegacy" already exists' ) # reconstruct the pixel clusters on the cpu process.hltSiPixelClustersLegacy = process.hltSiPixelClusters.clone( src="hltSiPixelDigisLegacy") process.hltSiPixelClusters = SwitchProducerCUDA( # legacy producer cpu=cms.EDAlias(hltSiPixelClustersLegacy=cms.VPSet( cms.PSet( type=cms.string("SiPixelClusteredmNewDetSetVector"))))) # conversion from SoA to legacy format from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoA_cfi import siPixelDigisClustersFromSoA as _siPixelDigisClustersFromSoA process.hltSiPixelClusters.cuda = _siPixelDigisClustersFromSoA.clone( src="hltSiPixelDigisSoA", produceDigis=False, storeDigis=False, # use the same thresholds as the legacy module clusterThreshold_layer1=process.hltSiPixelClustersLegacy. ClusterThreshold_L1, clusterThreshold_otherLayers=process.hltSiPixelClustersLegacy. ClusterThreshold) # reconstruct the pixel rechits on the gpu from RecoLocalTracker.SiPixelRecHits.siPixelRecHitCUDA_cfi import siPixelRecHitCUDA as _siPixelRecHitCUDA process.hltSiPixelRecHitsCUDA = _siPixelRecHitCUDA.clone( src="hltSiPixelClustersCUDA", beamSpot="hltOnlineBeamSpotToCUDA") # cpu only: produce the pixel rechits in SoA and legacy format, from the legacy clusters from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromLegacy_cfi import siPixelRecHitSoAFromLegacy as _siPixelRecHitSoAFromLegacy process.hltSiPixelRecHitSoA = _siPixelRecHitSoAFromLegacy.clone( src="hltSiPixelClusters", beamSpot="hltOnlineBeamSpot", convertToLegacy=True) # SwitchProducer wrapping the legacy pixel rechit producer or the transfer of the pixel rechits to the host and the conversion from SoA from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromCUDA_cfi import siPixelRecHitFromCUDA as _siPixelRecHitFromCUDA process.hltSiPixelRecHits = SwitchProducerCUDA( # legacy producer cpu=cms.EDAlias(hltSiPixelRecHitSoA=cms.VPSet( cms.PSet(type=cms.string("SiPixelRecHitedmNewDetSetVector")), cms.PSet(type=cms.string("uintAsHostProduct")))), # conversion from SoA to legacy format cuda=_siPixelRecHitFromCUDA.clone( pixelRecHitSrc="hltSiPixelRecHitsCUDA", src="hltSiPixelClusters")) # Tasks and Sequences if 'HLTDoLocalPixelTask' in process.__dict__ and not isinstance( process.HLTDoLocalPixelTask, cms.Task): raise Exception( 'unsupported configuration: "process.HLTDoLocalPixelTask" already exists, but it is not a Task' ) process.HLTDoLocalPixelTask = cms.Task( process.hltOnlineBeamSpotToCUDA, # transfer the beamspot to the gpu process. hltSiPixelClustersCUDA, # reconstruct the pixel digis and clusters on the gpu process. hltSiPixelRecHitsCUDA, # reconstruct the pixel rechits on the gpu process. hltSiPixelDigisSoA, # copy the pixel digis (except errors) and clusters to the host process. hltSiPixelDigiErrorsSoA, # copy the pixel digis errors to the host process.hltSiPixelDigisLegacy, # legacy pixel digis producer process. hltSiPixelDigis, # SwitchProducer wrapping a subset of the legacy pixel digis producer, or the conversion of the pixel digis errors from SoA process.hltSiPixelClustersLegacy, # legacy pixel cluster producer process. hltSiPixelClusters, # SwitchProducer wrapping a subset of the legacy pixel cluster producer, or the conversion of the pixel digis (except errors) and clusters from SoA process. hltSiPixelClustersCache, # legacy module, used by the legacy pixel quadruplet producer process. hltSiPixelRecHitSoA, # pixel rechits on cpu, in SoA & legacy format process.hltSiPixelRecHits ) # SwitchProducer wrapping the legacy pixel rechit producer or the transfer of the pixel rechits to the host and the conversion from SoA process.HLTDoLocalPixelSequence = cms.Sequence(process.HLTDoLocalPixelTask) # workaround for old version of AlCa_LumiPixelsCounts paths for AlCaPathName in [ 'AlCa_LumiPixelsCounts_Random_v1', 'AlCa_LumiPixelsCounts_ZeroBias_v1' ]: if AlCaPathName in process.__dict__: AlCaPath = getattr(process, AlCaPathName) # replace hltSiPixelDigis+hltSiPixelClusters with HLTDoLocalPixelSequence hasSiPixelDigis, hasSiPixelClusters = False, False for (itemLabel, itemName) in AlCaPath.directDependencies(): if itemLabel != 'modules': continue if itemName == 'hltSiPixelDigis': hasSiPixelDigis = True elif itemName == 'hltSiPixelClusters': hasSiPixelClusters = True if hasSiPixelDigis and hasSiPixelClusters: AlCaPath.remove(process.hltSiPixelClusters) AlCaPath.replace(process.hltSiPixelDigis, process.HLTDoLocalPixelSequence) # done return process
import FWCore.ParameterSet.Config as cms from RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizerPreSplitting_cfi import siPixelClustersPreSplitting from RecoLocalTracker.SiPixelClusterizer.siPixelRawToClusterCUDA_cfi import siPixelRawToClusterCUDA as _siPixelRawToClusterCUDA from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoA_cfi import siPixelDigisClustersFromSoA as _siPixelDigisClustersFromSoA from RecoLocalTracker.SiPixelClusterizer.siPixelFedCablingMapGPUWrapper_cfi import * from CalibTracker.SiPixelESProducers.siPixelGainCalibrationForHLTGPU_cfi import * siPixelClustersPreSplittingTask = cms.Task(siPixelClustersPreSplitting) siPixelClustersCUDAPreSplitting = _siPixelRawToClusterCUDA.clone() from Configuration.Eras.Modifier_run3_common_cff import run3_common run3_common.toModify(siPixelClustersCUDAPreSplitting, isRun2=False) siPixelDigisClustersPreSplitting = _siPixelDigisClustersFromSoA.clone() siPixelClustersPreSplittingTaskCUDA = cms.Task( siPixelClustersCUDAPreSplitting, siPixelDigisClustersPreSplitting, ) from Configuration.ProcessModifiers.gpu_cff import gpu _siPixelClustersPreSplittingTask_gpu = siPixelClustersPreSplittingTask.copy() _siPixelClustersPreSplittingTask_gpu.add(siPixelClustersPreSplittingTaskCUDA) gpu.toReplaceWith(siPixelClustersPreSplittingTask, _siPixelClustersPreSplittingTask_gpu)
def customise_gpu_pixel(process): # FIXME replace the Sequences with empty ones to avoid exanding them during the (re)definition of Modules and EDAliases process.HLTDoLocalPixelSequencePPOnAA = cms.Sequence() process.HLTRecoPixelTracksPPOnAASequence = cms.Sequence() process.HLTRecopixelvertexingSequencePPOnAA = cms.Sequence() process.HLTDoLocalPixelSequencePPOnAAForLowPt = cms.Sequence() # Event Setup process.load( "CalibTracker.SiPixelESProducers.siPixelGainCalibrationForHLTGPU_cfi") process.load( "RecoLocalTracker.SiPixelClusterizer.siPixelFedCablingMapGPUWrapper_cfi" ) process.load("RecoLocalTracker.SiPixelRecHits.PixelCPEFastESProducer_cfi") process.PixelCPEFastESProducer.DoLorentz = True # Modules and EDAliases # referenced in process.HLTDoLocalPixelSequence process.hltOnlineBeamSpotCUDA = cms.EDProducer( "BeamSpotToCUDA", src=cms.InputTag("hltOnlineBeamSpot")) from RecoLocalTracker.SiPixelClusterizer.siPixelRawToClusterCUDA_cfi import siPixelRawToClusterCUDA as _siPixelRawToClusterCUDA process.hltSiPixelClustersCUDA = _siPixelRawToClusterCUDA.clone() process.hltSiPixelRecHitsCUDA = cms.EDProducer( "SiPixelRecHitCUDA", CPE=cms.string("PixelCPEFast"), beamSpot=cms.InputTag("hltOnlineBeamSpotCUDA"), src=cms.InputTag("hltSiPixelClustersCUDA")) process.hltSiPixelDigisSoA = cms.EDProducer( "SiPixelDigisSoAFromCUDA", src=cms.InputTag("hltSiPixelClustersCUDA")) process.hltSiPixelDigisClusters = cms.EDProducer( "SiPixelDigisClustersFromSoA", src=cms.InputTag("hltSiPixelDigisSoA")) process.hltSiPixelDigiErrorsSoA = cms.EDProducer( "SiPixelDigiErrorsSoAFromCUDA", src=cms.InputTag("hltSiPixelClustersCUDA")) from EventFilter.SiPixelRawToDigi.siPixelDigiErrorsFromSoA_cfi import siPixelDigiErrorsFromSoA as _siPixelDigiErrorsFromSoA process.hltSiPixelDigiErrors = _siPixelDigiErrorsFromSoA.clone( UsePhase1=True, digiErrorSoASrc="hltSiPixelDigiErrorsSoA") process.hltSiPixelRecHitsPPOnAA = cms.EDProducer( "SiPixelRecHitFromSOA", pixelRecHitSrc=cms.InputTag("hltSiPixelRecHitsCUDA"), src=cms.InputTag("hltSiPixelDigisClusters")) process.hltSiPixelRecHitsPPOnAAForLowPt = process.hltSiPixelRecHitsPPOnAA.clone( ) process.hltSiPixelDigis = cms.EDAlias( hltSiPixelDigisClusters=cms.VPSet( cms.PSet(type=cms.string("PixelDigiedmDetSetVector"))), hltSiPixelDigiErrors=cms.VPSet( cms.PSet(type=cms.string("DetIdedmEDCollection")), cms.PSet(type=cms.string("SiPixelRawDataErroredmDetSetVector")), cms.PSet(type=cms.string("PixelFEDChanneledmNewDetSetVector")))) process.hltSiPixelClustersPPOnAA = cms.EDAlias( hltSiPixelDigisClusters=cms.VPSet( cms.PSet(type=cms.string("SiPixelClusteredmNewDetSetVector")))) process.hltSiPixelClustersPPOnAAForLowPt = process.hltSiPixelClustersPPOnAA.clone( ) # referenced in process.HLTRecoPixelTracksSequence from RecoPixelVertexing.PixelTriplets.caHitNtupletCUDA_cfi import caHitNtupletCUDA as _caHitNtupletCUDA process.hltPixelTracksHitQuadrupletsPPOnAA = _caHitNtupletCUDA.clone( idealConditions=False, pixelRecHitSrc="hltSiPixelRecHitsCUDA", onGPU=True) process.hltPixelTracksSoAPPOnAA = cms.EDProducer( "PixelTrackSoAFromCUDA", src=cms.InputTag("hltPixelTracksHitQuadrupletsPPOnAA")) process.hltPixelTracksPPOnAA = cms.EDProducer( "PixelTrackProducerFromSoA", beamSpot=cms.InputTag("hltOnlineBeamSpot"), minNumberOfHits=cms.int32(0), pixelRecHitLegacySrc=cms.InputTag("hltSiPixelRecHitsPPOnAA"), trackSrc=cms.InputTag("hltPixelTracksSoAPPOnAA")) # referenced in process.HLTRecopixelvertexingSequence from RecoPixelVertexing.PixelVertexFinding.pixelVertexCUDA_cfi import pixelVertexCUDA as _pixelVertexCUDA process.hltPixelVerticesCUDAPPOnAA = _pixelVertexCUDA.clone( pixelTrackSrc="hltPixelTracksHitQuadrupletsPPOnAA", onGPU=True) process.hltPixelVerticesSoAPPOnAA = cms.EDProducer( "PixelVertexSoAFromCUDA", src=cms.InputTag("hltPixelVerticesCUDAPPOnAA")) process.hltPixelVerticesPPOnAA = cms.EDProducer( "PixelVertexProducerFromSoA", src=cms.InputTag("hltPixelVerticesSoAPPOnAA"), beamSpot=cms.InputTag("hltOnlineBeamSpot"), TrackCollection=cms.InputTag("hltPixelTracksPPOnAA")) # Sequences HLTLocalPixelGPUSequence = cms.Sequence( process.hltOnlineBeamSpotCUDA # transfer the beamspot to the gpu + process.hltSiPixelClustersCUDA # digis and clusters on gpu + process.hltSiPixelRecHitsCUDA # rechits on gpu + process.hltSiPixelDigisSoA # copy to host + process.hltSiPixelDigisClusters # convert to legacy + process.hltSiPixelDigiErrorsSoA # copy to host + process.hltSiPixelDigiErrors) # convert to legacy process.HLTDoLocalPixelSequencePPOnAA = cms.Sequence( HLTLocalPixelGPUSequence # process.hltSiPixelDigis # replaced by an alias # process.hltSiPixelClustersPPOnAA # replaced by an alias + process. hltSiPixelClustersCachePPOnAA # not used here, kept for compatibility with legacy sequences + process.hltSiPixelRecHitsPPOnAA) # convert to legacy process.HLTDoLocalPixelSequencePPOnAAForLowPt = cms.Sequence( HLTLocalPixelGPUSequence # process.hltSiPixelDigis # replaced by an alias # process.hltSiPixelClustersPPOnAAForLowPt # replaced by an alias + process. hltSiPixelClustersCachePPOnAAForLowPt # not used here, kept for compatibility with legacy sequences + process.hltSiPixelRecHitsPPOnAAForLowPt) process.HLTRecoPixelTracksSequencePPOnAA = cms.Sequence( process. hltPixelTracksFitter # not used here, kept for compatibility with legacy sequences + process. hltPixelTracksFilter # not used here, kept for compatibility with legacy sequences + process. hltPixelTracksTrackingRegionsPPOnAA # from the original sequence + process. hltPixelTracksHitQuadrupletsPPOnAA # pixel ntuplets on gpu, in SoA format + process.hltPixelTracksSoAPPOnAA # pixel ntuplets on cpu, in SoA format + process.hltPixelTracksPPOnAA ) # pixel tracks on gpu, with transfer and conversion to legacy process.HLTRecoPixelTracksPPOnAASequence = cms.Sequence( process.HLTRecoPixelTracksSequencePPOnAA) process.HLTRecopixelvertexingSequencePPOnAA = cms.Sequence( process.HLTRecoPixelTracksSequencePPOnAA + process. hltPixelVerticesCUDAPPOnAA # pixel vertices on gpu, in SoA format + process. hltPixelVerticesSoAPPOnAA # pixel vertices on cpu, in SoA format + process. hltPixelVerticesPPOnAA # pixel vertices on cpu, in legacy format + process.hltTrimmedPixelVerticesPPOnAA) # from the original sequence process.HLTPixelVertexingPPOnAASequence = cms.Sequence( process.HLTRecopixelvertexingSequencePPOnAA) process.HLTPixelVertexingSequencePPOnAA = cms.Sequence( process.HLTRecopixelvertexingSequencePPOnAA) # done return process