Skip to content

Commit

Permalink
Merge pull request cms-sw#24 from missirol/updateHLTCustomisation
Browse files Browse the repository at this point in the history
update of HLT customisation for Alpaka pixel reco up to PixelRecHits (can't write RecHits to file)
  • Loading branch information
borzari authored Jun 29, 2023
2 parents f1c7226 + f79fa92 commit cca52e1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 55 deletions.
80 changes: 26 additions & 54 deletions HLTrigger/Configuration/python/customizeHLTforPatatrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,10 @@ def customiseHLTforTestingDQMGPUvsCPUPixelOnlyUpToLocal(process):
if not hasattr(process, 'HLTDoLocalPixelTask'):
return process

# process.HLTDoLocalPixelTask = cms.ConditionalTask(
# process.hltSiPixelClustersCPU,
# process.hltSiPixelClustersGPU,
#
# # process.hltSiPixelDigiErrorsSoA,
# # process.hltSiPixelDigiErrorsSoALegacy,
# process.hltSiPixelDigisSoA,
#
# process.hltSiPixelDigisFromSoALegacy,
# process.hltSiPixelDigisFromSoA,
# process.hltSiPixelClustersFromSoA,
# process.hltSiPixelClustersLegacy,
#
# ### process.hltSiPixelDigisLegacy,
# ### process.hltSiPixelDigis,
# ### process.hltSiPixelClusters,
# ### process.hltSiPixelClustersCache,
# ###
# ### process.hltOnlineBeamSpotToGPU,
# ### process.hltSiPixelRecHitsFromLegacy,
# ### process.hltSiPixelRecHitsGPU,
# ### process.hltSiPixelRecHitsFromGPU,
# ### process.hltSiPixelRecHits,
# ### process.hltSiPixelRecHitsSoAFromGPU,
# ### process.hltSiPixelRecHitsSoA
# )

process.hltPixelConsumerCPU.eventProducts = [
'hltSiPixelClustersCPUSerial',
'hltSiPixelDigiErrorsCPUSerial',
# 'hltSiPixelRecHitsCPUSerial', # leads to exception
# 'hltSiPixelRecHitsCPUSerial',
]

process.hltPixelConsumerGPU.eventProducts = [
Expand All @@ -68,13 +41,13 @@ def customiseHLTforTestingDQMGPUvsCPUPixelOnlyUpToLocal(process):
# modify EventContent of DQMGPUvsCPU stream
if hasattr(process, 'hltOutputDQMGPUvsCPU'):
process.hltOutputDQMGPUvsCPU.outputCommands = [
'drop *',
'keep *Cluster*_hltSiPixelClusters_*_*',
'keep *Cluster*_hltSiPixelClustersCPUSerial_*_*',
'keep *_hltSiPixelDigiErrors_*_*',
'keep *_hltSiPixelDigiErrorsCPUSerial_*_*',
# 'keep *RecHit*_hltSiPixelRecHits_*_*',
# 'keep *RecHit*_hltSiPixelRecHitsCPUSerial_*_*',
'drop *',
'keep *Cluster*_hltSiPixelClusters_*_*',
'keep *Cluster*_hltSiPixelClustersCPUSerial_*_*',
'keep *_hltSiPixelDigiErrors_*_*',
'keep *_hltSiPixelDigiErrorsCPUSerial_*_*',
# 'keep *RecHit*_hltSiPixelRecHits_*_*',
# 'keep *RecHit*_hltSiPixelRecHitsCPUSerial_*_*',
]

# empty HLTRecopixelvertexingSequence until we add tracks and vertices
Expand Down Expand Up @@ -116,6 +89,22 @@ def customiseHLTforAlpakaPixelRecoLocal(process):

###

# alpaka EDProducer
# consumes
# - reco::BeamSpot
# produces
# - BeamSpotDeviceProduct
process.hltOnlineBeamSpotDevice = cms.EDProducer("BeamSpotDeviceProducer@alpaka",
src = cms.InputTag("hltOnlineBeamSpot"),
alpaka = cms.untracked.PSet(
backend = cms.untracked.string('')
)
)

process.hltOnlineBeamSpotDeviceCPUSerial = process.hltOnlineBeamSpotDevice.clone(
alpaka = dict( backend = 'serial_sync' )
)

# alpaka EDProducer
# consumes
# - FEDRawDataCollection
Expand Down Expand Up @@ -171,22 +160,6 @@ def customiseHLTforAlpakaPixelRecoLocal(process):
fmtErrorsSoASrc = "hltSiPixelClustersCPUSerial",
)

# alpaka EDProducer
# consumes
# - reco::BeamSpot
# produces
# - BeamSpotDeviceProduct
process.hltOnlineBeamSpotDevice = cms.EDProducer("BeamSpotDeviceProducer@alpaka",
src = cms.InputTag("hltOnlineBeamSpot"),
alpaka = cms.untracked.PSet(
backend = cms.untracked.string('')
)
)

process.hltOnlineBeamSpotDeviceCPUSerial = process.hltOnlineBeamSpotDevice.clone(
alpaka = dict( backend = 'serial_sync' )
)

# alpaka EDProducer
# consumes
# - BeamSpotDeviceProduct
Expand Down Expand Up @@ -216,7 +189,6 @@ def customiseHLTforAlpakaPixelRecoLocal(process):
# # produces
# # - TkSoADevice
# process.hltPixelTracks = cms.EDProducer("CAHitNtupletAlpakaPhase1@alpaka",
# onGPU = cms.bool(True),
# pixelRecHitSrc = cms.InputTag('hltSiPixelRecHits'),
# ptmin = cms.double(0.89999997615814209),
# CAThetaCutBarrel = cms.double(0.0020000000949949026),
Expand Down Expand Up @@ -282,16 +254,16 @@ def customiseHLTforAlpakaPixelRecoLocal(process):
# )

process.HLTDoLocalPixelTask = cms.ConditionalTask(
process.hltOnlineBeamSpotDevice,
process.hltSiPixelClusters,
process.hltSiPixelDigiErrors,
process.hltOnlineBeamSpotDevice,
process.hltSiPixelRecHits,
)

process.HLTDoLocalPixelTaskCPUSerial = cms.ConditionalTask(
process.hltOnlineBeamSpotDeviceCPUSerial,
process.hltSiPixelClustersCPUSerial,
process.hltSiPixelDigiErrorsCPUSerial,
process.hltOnlineBeamSpotDeviceCPUSerial,
process.hltSiPixelRecHitsCPUSerial,
)

Expand Down
4 changes: 3 additions & 1 deletion HLTrigger/Configuration/test/testHLTWithAlpakaPixelReco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ hltGetConfiguration /frozen/2023/2e34/v1.2/HLT \
--output all \
--max-events 100 \
--paths DQM_PixelReco*,*DQMGPUvsCPU* \
--input /store/data/Run2023C/EphemeralHLTPhysics0/RAW/v1/000/368/822/00000/6e1268da-f96a-49f6-a5f0-89933142dd89.root \
--input file:/cmsnfsgpu_data/gpu_data/store/data/Run2023C/EphemeralHLTPhysics0/RAW/v1/000/368/822/00000/6e1268da-f96a-49f6-a5f0-89933142dd89.root \
--customise \
HLTrigger/Configuration/customizeHLTforPatatrack.customiseHLTforAlpakaPixelReco,\
HLTrigger/Configuration/customizeHLTforPatatrack.customiseHLTforTestingDQMGPUvsCPUPixelOnlyUpToLocal \
> hlt.py

cat <<EOF >> hlt.py
process.options.numberOfThreads = 1
process.options.numberOfStreams = 0
process.hltOutputDQMGPUvsCPU.fileName = '___JOBNAME___.root'
EOF

Expand Down

0 comments on commit cca52e1

Please sign in to comment.