Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip bad channels in PFRecHitProducerKernelConstruct<T>::applyCuts #45604

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::particleFlowRecHitProducer {
if (subdet == HcalEndcap)
return detId2denseIdHE(detId);

printf("invalid detId: %u\n", detId);
printf("invalid Hcal detId: %u\n", detId);
return kInvalidDenseId;
}
};
Expand Down Expand Up @@ -197,7 +197,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::particleFlowRecHitProducer {
if (subdet == EcalEndcap)
return Barrel::kSize + Endcap::denseIndex(detId);

printf("invalid detId: %u\n", detId);
printf("invalid Ecal detId: %u\n", detId);
return kInvalidDenseId;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,19 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
const uint32_t detId = rh.detId();
const uint32_t depth = HCAL::getDepth(detId);
const uint32_t subdet = getSubdet(detId);

// skip bad channels
if (rh.chi2() < 0)
return false;

if (topology.cutsFromDB()) {
threshold = topology.noiseThreshold()[HCAL::detId2denseId(detId)];
const auto& denseId = HCAL::detId2denseId(detId);
if (denseId != HCAL::kInvalidDenseId) {
threshold = topology.noiseThreshold()[denseId];
} else {
printf("Encountered invalid denseId for detId %u (subdetector %u)!", detId, subdet);
return false;
}
} else {
if (subdet == HcalBarrel) {
threshold = params.energyThresholds()[depth - 1];
Expand Down