Skip to content

Commit

Permalink
Merge pull request #45313 from fwyzard/fix_EcalUncalibRecHitMultiFitA…
Browse files Browse the repository at this point in the history
…lgo_empty_EB_140x

Protect ECAL time reconstruction for events without EB [14.0.x]
  • Loading branch information
cmsbuild authored Jun 27, 2024
2 parents 1bf356a + fef0757 commit dde08e6
Showing 1 changed file with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,22 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit {
// TODO: small kernel only for EB. It needs to be checked if
/// fusing such small kernels is beneficial in here
//
// we are running only over EB digis
// therefore we need to create threads/blocks only for that
auto const threadsFixMGPA = threads_1d;
auto const blocksFixMGPA = cms::alpakatools::divide_up_by(kMaxSamples * ebSize, threadsFixMGPA);
auto workDivTimeFixMGPAslew1D = cms::alpakatools::make_workdiv<Acc1D>(blocksFixMGPA, threadsFixMGPA);
alpaka::exec<Acc1D>(queue,
workDivTimeFixMGPAslew1D,
Kernel_time_compute_fixMGPAslew{},
digisDevEB.const_view(),
digisDevEE.const_view(),
conditionsDev.const_view(),
scratch.sample_valuesDevBuf.value().data(),
scratch.sample_value_errorsDevBuf.value().data(),
scratch.useless_sample_valuesDevBuf.value().data());
if (ebSize > 0) {
// we are running only over EB digis
// therefore we need to create threads/blocks only for that
auto const threadsFixMGPA = threads_1d;
auto const blocksFixMGPA = cms::alpakatools::divide_up_by(kMaxSamples * ebSize, threadsFixMGPA);
auto workDivTimeFixMGPAslew1D = cms::alpakatools::make_workdiv<Acc1D>(blocksFixMGPA, threadsFixMGPA);
alpaka::exec<Acc1D>(queue,
workDivTimeFixMGPAslew1D,
Kernel_time_compute_fixMGPAslew{},
digisDevEB.const_view(),
digisDevEE.const_view(),
conditionsDev.const_view(),
scratch.sample_valuesDevBuf.value().data(),
scratch.sample_value_errorsDevBuf.value().data(),
scratch.useless_sample_valuesDevBuf.value().data());
}

auto const threads_nullhypot = threads_1d;
auto const blocks_nullhypot = blocks_1d;
Expand Down

0 comments on commit dde08e6

Please sign in to comment.