Skip to content

Commit

Permalink
ECAL unpacker and ECAL multifit algorithm migration to alpaka.
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Reis <thomas.reis@cern.ch>
Co-authored-by: Davide Valsecchi <davide.valsecchi@cern.ch>
Co-authored-by: Jakub Andrzej Gajownik <jakub.gajownik@cern.ch>
  • Loading branch information
3 people committed Jan 23, 2024
1 parent 9fca027 commit dd2b6a3
Show file tree
Hide file tree
Showing 62 changed files with 4,603 additions and 143 deletions.
1 change: 1 addition & 0 deletions CUDADataFormats/EcalRecHitSoA/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<use name="CUDADataFormats/CaloCommon"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/EcalDigi"/>
<use name="DataFormats/EcalRecHit"/>
<use name="HeterogeneousCore/CUDAUtilities"/>

<export>
Expand Down
2 changes: 1 addition & 1 deletion CUDADataFormats/EcalRecHitSoA/interface/EcalRecHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <vector>

#include "CUDADataFormats/CaloCommon/interface/Common.h"
#include "CUDADataFormats/EcalRecHitSoA/interface/RecoTypes.h"
#include "DataFormats/EcalRecHit/interface/RecoTypes.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HostAllocator.h"

namespace ecal {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#ifndef CUDADataFormats_EcalRecHitSoA_interface_EcalUncalibratedRecHit_h
#define CUDADataFormats_EcalRecHitSoA_interface_EcalUncalibratedRecHit_h

#include <array>
#include <vector>

#include "CUDADataFormats/CaloCommon/interface/Common.h"
#include "CUDADataFormats/EcalRecHitSoA/interface/RecoTypes.h"
#include "DataFormats/EcalDigi/interface/EcalDataFrame.h"
#include "DataFormats/EcalRecHit/interface/RecoTypes.h"

namespace ecal {

Expand Down
13 changes: 0 additions & 13 deletions CUDADataFormats/EcalRecHitSoA/interface/RecoTypes.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def customise(process):
"""

# Change input collection for the /AlCaPhiSym/*/RAW stream dataformat
process.ecalMultiFitUncalibRecHit.cpu.EBdigiCollection = cms.InputTag("hltEcalPhiSymFilter", "phiSymEcalDigisEB")
process.ecalMultiFitUncalibRecHit.cpu.EEdigiCollection = cms.InputTag("hltEcalPhiSymFilter", "phiSymEcalDigisEE")
process.ecalMultiFitUncalibRecHitCPU.EBdigiCollection = "hltEcalPhiSymFilter:phiSymEcalDigisEB"
process.ecalMultiFitUncalibRecHitCPU.EEdigiCollection = "hltEcalPhiSymFilter:phiSymEcalDigisEE"
process.ecalRecHit.cpu.killDeadChannels = cms.bool( False )
process.ecalRecHit.cpu.recoverEBVFE = cms.bool( False )
process.ecalRecHit.cpu.recoverEEVFE = cms.bool( False )
Expand Down
1 change: 1 addition & 0 deletions Configuration/PyReleaseValidation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The offsets currently in use are:
* 0.2: Tracking Run-2 era, `Run2_2017_trackingRun2`
* 0.3: 0.1 + 0.2
* 0.4: LowPU tracking era, `Run2_2017_trackingLowPU`
* 0.411: Patatrack, ECAL only, Alpaka
* 0.5: Pixel tracking only + 0.1
* 0.501: Patatrack, pixel only quadruplets, on CPU
* 0.502: Patatrack, pixel only quadruplets, with automatic offload to GPU if available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,27 @@ def setup_(self, step, stepName, stepDict, k, properties):
offset = 0.508,
)

# ECAL-only workflow running on CPU or GPU with Alpaka code
# - HLT with Alpaka
# - ECAL-only reconstruction with Alpaka, with DQM and validation
# - harvesting
upgradeWFs['PatatrackECALOnlyAlpaka'] = PatatrackWorkflow(
digi = {
# customize the ECAL Local Reco part of the HLT menu for Alpaka
'--procModifiers': 'alpaka',
'--customise' : 'HLTrigger/Configuration/customizeHLTforAlpaka.customizeHLTforAlpakaEcalLocalReco'
},
reco = {
'-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
'--procModifiers': 'alpaka'
},
harvest = {
'-s': 'HARVESTING:@ecalOnlyValidation+@ecal'
},
suffix = 'Patatrack_ECALOnlyAlpaka',
offset = 0.411,
)

# ECAL-only workflow running on CPU
# - HLT on CPU
# - ECAL-only reconstruction on CPU, with DQM and validation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

from Configuration.StandardSequences.RawToDigi_cff import *

from Configuration.ProcessModifiers.gpu_cff import gpu
from Configuration.ProcessModifiers.alpaka_cff import alpaka

scalersRawToDigi.scalersInputTag = 'rawDataRepacker'
csctfDigis.producer = 'rawDataRepacker'
dttfDigis.DTTF_FED_Source = 'rawDataRepacker'
Expand All @@ -10,7 +13,9 @@
gtEvmDigis.EvmGtInputTag = 'rawDataRepacker'
siPixelDigis.cpu.InputLabel = 'rawDataRepacker'
siStripDigis.ProductLabel = 'rawDataRepacker'
ecalDigis.cpu.InputLabel = 'rawDataRepacker'
ecalDigisCPU.InputLabel = 'rawDataRepacker'
gpu.toModify(ecalDigisGPU, InputLabel = 'rawDataRepacker')
alpaka.toModify(ecalDigisPortable, InputLabel = 'rawDataRepacker')
ecalPreshowerDigis.sourceTag = 'rawDataRepacker'
hcalDigis.InputLabel = 'rawDataRepacker'
muonCSCDigis.InputObjects = 'rawDataRepacker'
Expand Down
7 changes: 6 additions & 1 deletion Configuration/StandardSequences/python/RawToDigi_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@
RawToDigiTask_hcalOnly = cms.Task(hcalDigis)
RawToDigi_hcalOnly = cms.Sequence(RawToDigiTask_hcalOnly)

from Configuration.ProcessModifiers.gpu_cff import gpu
from Configuration.ProcessModifiers.alpaka_cff import alpaka

scalersRawToDigi.scalersInputTag = 'rawDataCollector'
siPixelDigis.cpu.InputLabel = 'rawDataCollector'
ecalDigis.cpu.InputLabel = 'rawDataCollector'
ecalDigisCPU.InputLabel = 'rawDataCollector'
gpu.toModify(ecalDigisGPU, InputLabel = 'rawDataCollector')
alpaka.toModify(ecalDigisPortable, InputLabel = 'rawDataCollector')
ecalPreshowerDigis.sourceTag = 'rawDataCollector'
hcalDigis.InputLabel = 'rawDataCollector'
muonCSCDigis.InputObjects = 'rawDataCollector'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@
## run the L1 emulator
##

from Configuration.ProcessModifiers.gpu_cff import gpu
from Configuration.ProcessModifiers.alpaka_cff import alpaka

from L1Trigger.L1TCalorimeter.L1TCaloStage1_PPFromRaw_cff import *
ecalDigis.cpu.InputLabel = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess())
from EventFilter.EcalRawToDigi.ecalDigis_cff import ecalDigisCPU, ecalDigisGPU, ecalDigisPortable
ecalDigisCPU.InputLabel = cms.InputTag('rawDataCollector', processName=cms.InputTag.skipCurrentProcess())
gpu.toModify(ecalDigisGPU, InputLabel = cms.InputTag('rawDataCollector', processName=cms.InputTag.skipCurrentProcess()))
alpaka.toModify(ecalDigisPortable, InputLabel = cms.InputTag('rawDataCollector', processName=cms.InputTag.skipCurrentProcess()))
hcalDigis.InputLabel = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess())
simHcalTriggerPrimitiveDigis.InputTagFEDRaw = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess())

Expand Down
12 changes: 5 additions & 7 deletions DQM/Integration/python/clients/beam_dqm_sourceclient-live_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
from Configuration.Eras.Era_Run3_cff import Run3
process = cms.Process("BeamMonitorLegacy", Run3)

process.MessageLogger = cms.Service("MessageLogger",
debugModules = cms.untracked.vstring('*'),
cerr = cms.untracked.PSet(
threshold = cms.untracked.string('WARNING')
),
destinations = cms.untracked.vstring('cerr')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.MessageLogger.debugModules = cms.untracked.vstring('*')
process.MessageLogger.cerr = cms.untracked.PSet(
threshold = cms.untracked.string('WARNING')
)

# switch
Expand Down Expand Up @@ -309,7 +307,7 @@
process.castorDigis.InputLabel = rawDataInputTag
process.csctfDigis.producer = rawDataInputTag
process.dttfDigis.DTTF_FED_Source = rawDataInputTag
process.ecalDigis.cpu.InputLabel = rawDataInputTag
process.ecalDigisCPU.InputLabel = rawDataInputTag
process.ecalPreshowerDigis.sourceTag = rawDataInputTag
process.gctDigis.inputLabel = rawDataInputTag
process.gtDigis.DaqGtInputTag = rawDataInputTag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
""" process.castorDigis.InputLabel = rawDataInputTag
process.csctfDigis.producer = rawDataInputTag
process.dttfDigis.DTTF_FED_Source = rawDataInputTag
process.ecalDigis.cpu.InputLabel = rawDataInputTag
process.ecalDigisCPU.InputLabel = rawDataInputTag
process.ecalPreshowerDigis.sourceTag = rawDataInputTag
process.gctDigis.inputLabel = rawDataInputTag
process.gtDigis.DaqGtInputTag = rawDataInputTag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
process.castorDigis.InputLabel = "rawDataCollector"
process.csctfDigis.producer = "rawDataCollector"
process.dttfDigis.DTTF_FED_Source = "rawDataCollector"
process.ecalDigis.cpu.InputLabel = "rawDataCollector"
process.ecalDigisCPU.InputLabel = "rawDataCollector"
process.ecalPreshowerDigis.sourceTag = "rawDataCollector"
process.gctDigis.inputLabel = "rawDataCollector"
process.gtDigis.DaqGtInputTag = "rawDataCollector"
Expand Down Expand Up @@ -174,7 +174,7 @@
process.castorDigis.InputLabel = "rawDataRepacker"
process.csctfDigis.producer = "rawDataRepacker"
process.dttfDigis.DTTF_FED_Source = "rawDataRepacker"
process.ecalDigis.cpu.InputLabel = "rawDataRepacker"
process.ecalDigisCPU.InputLabel = "rawDataRepacker"
process.ecalPreshowerDigis.sourceTag = "rawDataRepacker"
process.gctDigis.inputLabel = "rawDataRepacker"
process.gtDigis.DaqGtInputTag = "rawDataRepacker"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
process.castorDigis.InputLabel = "rawDataCollector"
process.csctfDigis.producer = "rawDataCollector"
process.dttfDigis.DTTF_FED_Source = "rawDataCollector"
process.ecalDigis.cpu.InputLabel = "rawDataCollector"
process.ecalDigisCPU.InputLabel = "rawDataCollector"
process.ecalPreshowerDigis.sourceTag = "rawDataCollector"
process.gctDigis.inputLabel = "rawDataCollector"
process.gtDigis.DaqGtInputTag = "rawDataCollector"
Expand All @@ -205,7 +205,7 @@
process.castorDigis.InputLabel = "rawDataRepacker"
process.csctfDigis.producer = "rawDataRepacker"
process.dttfDigis.DTTF_FED_Source = "rawDataRepacker"
process.ecalDigis.cpu.InputLabel = "rawDataRepacker"
process.ecalDigisCPU.InputLabel = "rawDataRepacker"
process.ecalPreshowerDigis.sourceTag = "rawDataRepacker"
process.gctDigis.inputLabel = "rawDataRepacker"
process.gtDigis.DaqGtInputTag = "rawDataRepacker"
Expand Down
57 changes: 26 additions & 31 deletions DQM/Integration/python/clients/ecal_dqm_sourceclient-live_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,45 +53,40 @@
### Individual module setups ###

# Use the ratio timing method for the online DQM
process.ecalMultiFitUncalibRecHit.cpu.algoPSet.timealgo = "RatioMethod"
process.ecalMultiFitUncalibRecHit.cpu.algoPSet.outOfTimeThresholdGain12pEB = 5.
process.ecalMultiFitUncalibRecHit.cpu.algoPSet.outOfTimeThresholdGain12mEB = 5.
process.ecalMultiFitUncalibRecHit.cpu.algoPSet.outOfTimeThresholdGain61pEB = 5.
process.ecalMultiFitUncalibRecHit.cpu.algoPSet.outOfTimeThresholdGain61mEB = 5.
process.ecalMultiFitUncalibRecHit.cpu.algoPSet.timeCalibTag = ':'
process.ecalMultiFitUncalibRecHit.cpu.algoPSet.timeOffsetTag = ':'
process.ecalMultiFitUncalibRecHitCPU.algoPSet.timealgo = "RatioMethod"
process.ecalMultiFitUncalibRecHitCPU.algoPSet.outOfTimeThresholdGain12pEB = 5.
process.ecalMultiFitUncalibRecHitCPU.algoPSet.outOfTimeThresholdGain12mEB = 5.
process.ecalMultiFitUncalibRecHitCPU.algoPSet.outOfTimeThresholdGain61pEB = 5.
process.ecalMultiFitUncalibRecHitCPU.algoPSet.outOfTimeThresholdGain61mEB = 5.
process.ecalMultiFitUncalibRecHitCPU.algoPSet.timeCalibTag = ':'
process.ecalMultiFitUncalibRecHitCPU.algoPSet.timeOffsetTag = ':'

process.ecalPhysicsFilter = cms.EDFilter("EcalMonitorPrescaler",
cosmics = cms.untracked.uint32(1),
physics = cms.untracked.uint32(1),
EcalRawDataCollection = cms.InputTag("ecalDigis")
)

process.MessageLogger = cms.Service("MessageLogger",
cerr = cms.untracked.PSet(
default = cms.untracked.PSet(
limit = cms.untracked.int32(-1)
),
EcalLaserDbService = cms.untracked.PSet(
limit = cms.untracked.int32(10)
),
noTimeStamps = cms.untracked.bool(True),
threshold = cms.untracked.string('WARNING'),
noLineBreaks = cms.untracked.bool(True)
process.load('FWCore.MessageService.MessageLogger_cfi')
process.MessageLogger.cerr = cms.untracked.PSet(
default = cms.untracked.PSet(
limit = cms.untracked.int32(-1)
),
cout = cms.untracked.PSet(
default = cms.untracked.PSet(
limit = cms.untracked.int32(0)
),
EcalDQM = cms.untracked.PSet(
limit = cms.untracked.int32(-1)
),
threshold = cms.untracked.string('INFO')
EcalLaserDbService = cms.untracked.PSet(
limit = cms.untracked.int32(10)
),
categories = cms.untracked.vstring('EcalDQM',
'EcalLaserDbService'),
destinations = cms.untracked.vstring('cerr',
'cout')
noTimeStamps = cms.untracked.bool(True),
threshold = cms.untracked.string('WARNING'),
noLineBreaks = cms.untracked.bool(True)
)
process.MessageLogger.cout = cms.untracked.PSet(
default = cms.untracked.PSet(
limit = cms.untracked.int32(0)
),
EcalDQM = cms.untracked.PSet(
limit = cms.untracked.int32(-1)
),
threshold = cms.untracked.string('INFO')
)

process.maxEvents = cms.untracked.PSet(
Expand Down Expand Up @@ -196,7 +191,7 @@
process.ecalMonitorTask.workerParameters.PresampleTask.params.doPulseMaxCheck = False
elif runTypeName == 'hi_run':
process.ecalMonitorTask.collectionTags.Source = "rawDataRepacker"
process.ecalDigis.cpu.InputLabel = 'rawDataRepacker'
process.ecalDigisCPU.InputLabel = 'rawDataRepacker'
elif runTypeName == 'hpu_run':
if not unitTest:
process.source.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('*'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
process.castorDigis.InputLabel = "rawDataCollector"
process.csctfDigis.producer = "rawDataCollector"
process.dttfDigis.DTTF_FED_Source = "rawDataCollector"
process.ecalDigis.cpu.InputLabel = "rawDataCollector"
process.ecalDigisCPU.InputLabel = "rawDataCollector"
process.ecalPreshowerDigis.sourceTag = "rawDataCollector"
process.gctDigis.inputLabel = "rawDataCollector"
process.gtDigis.DaqGtInputTag = "rawDataCollector"
Expand All @@ -192,7 +192,7 @@
process.castorDigis.InputLabel = "rawDataRepacker"
process.csctfDigis.producer = "rawDataRepacker"
process.dttfDigis.DTTF_FED_Source = "rawDataRepacker"
process.ecalDigis.cpu.InputLabel = "rawDataRepacker"
process.ecalDigisCPU.InputLabel = "rawDataRepacker"
process.ecalPreshowerDigis.sourceTag = "rawDataRepacker"
process.gctDigis.inputLabel = "rawDataRepacker"
process.gtDigis.DaqGtInputTag = "rawDataRepacker"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
process.castorDigis.InputLabel = "rawDataCollector"
process.csctfDigis.producer = "rawDataCollector"
process.dttfDigis.DTTF_FED_Source = "rawDataCollector"
process.ecalDigis.cpu.InputLabel = "rawDataCollector"
process.ecalDigisCPU.InputLabel = "rawDataCollector"
process.ecalPreshowerDigis.sourceTag = "rawDataCollector"
process.gctDigis.inputLabel = "rawDataCollector"
process.gtDigis.DaqGtInputTag = "rawDataCollector"
Expand All @@ -208,7 +208,7 @@
process.castorDigis.InputLabel = "rawDataRepacker"
process.csctfDigis.producer = "rawDataRepacker"
process.dttfDigis.DTTF_FED_Source = "rawDataRepacker"
process.ecalDigis.cpu.InputLabel = "rawDataRepacker"
process.ecalDigisCPU.InputLabel = "rawDataRepacker"
process.ecalPreshowerDigis.sourceTag = "rawDataRepacker"
process.gctDigis.inputLabel = "rawDataRepacker"
process.gtDigis.DaqGtInputTag = "rawDataRepacker"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
process.castorDigis.InputLabel = "rawDataCollector"
process.csctfDigis.producer = "rawDataCollector"
process.dttfDigis.DTTF_FED_Source = "rawDataCollector"
process.ecalDigis.cpu.InputLabel = "rawDataCollector"
process.ecalDigisCPU.InputLabel = "rawDataCollector"
process.ecalPreshowerDigis.sourceTag = "rawDataCollector"
process.gctDigis.inputLabel = "rawDataCollector"
process.gtDigis.DaqGtInputTag = "rawDataCollector"
Expand All @@ -202,7 +202,7 @@
process.castorDigis.InputLabel = "rawDataRepacker"
process.csctfDigis.producer = "rawDataRepacker"
process.dttfDigis.DTTF_FED_Source = "rawDataRepacker"
process.ecalDigis.cpu.InputLabel = "rawDataRepacker"
process.ecalDigisCPU.InputLabel = "rawDataRepacker"
process.ecalPreshowerDigis.sourceTag = "rawDataRepacker"
process.gctDigis.inputLabel = "rawDataRepacker"
process.gtDigis.DaqGtInputTag = "rawDataRepacker"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
process.castorDigis.InputLabel = "rawDataCollector"
process.csctfDigis.producer = "rawDataCollector"
process.dttfDigis.DTTF_FED_Source = "rawDataCollector"
process.ecalDigis.cpu.InputLabel = "rawDataCollector"
process.ecalDigisCPU.InputLabel = "rawDataCollector"
process.ecalPreshowerDigis.sourceTag = "rawDataCollector"
process.gctDigis.inputLabel = "rawDataCollector"
process.gtDigis.DaqGtInputTag = "rawDataCollector"
Expand All @@ -217,7 +217,7 @@
process.castorDigis.InputLabel = "rawDataRepacker"
process.csctfDigis.producer = "rawDataRepacker"
process.dttfDigis.DTTF_FED_Source = "rawDataRepacker"
process.ecalDigis.cpu.InputLabel = "rawDataRepacker"
process.ecalDigisCPU.InputLabel = "rawDataRepacker"
process.ecalPreshowerDigis.sourceTag = "rawDataRepacker"
process.gctDigis.inputLabel = "rawDataRepacker"
process.gtDigis.DaqGtInputTag = "rawDataRepacker"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
process.castorDigis.InputLabel = rawDataRepackerLabel
process.ctppsDiamondRawToDigi.rawDataTag = rawDataRepackerLabel
process.ctppsPixelDigis.inputLabel = rawDataRepackerLabel
process.ecalDigis.cpu.InputLabel = rawDataRepackerLabel
process.ecalDigisCPU.InputLabel = rawDataRepackerLabel
process.ecalPreshowerDigis.sourceTag = rawDataRepackerLabel
process.hcalDigis.InputLabel = rawDataRepackerLabel
process.muonCSCDigis.InputObjects = rawDataRepackerLabel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
process.castorDigis.InputLabel = rawDataRepackerLabel
process.ctppsDiamondRawToDigi.rawDataTag = rawDataRepackerLabel
process.ctppsPixelDigis.inputLabel = rawDataRepackerLabel
process.ecalDigis.cpu.InputLabel = rawDataRepackerLabel
process.ecalDigisCPU.InputLabel = rawDataRepackerLabel
process.ecalPreshowerDigis.sourceTag = rawDataRepackerLabel
process.hcalDigis.InputLabel = rawDataRepackerLabel
process.muonCSCDigis.InputObjects = rawDataRepackerLabel
Expand Down
Loading

0 comments on commit dd2b6a3

Please sign in to comment.