File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
RecoParticleFlow/PFRecHitProducer/plugins/alpaka Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,19 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
5959 const uint32_t detId = rh.detId ();
6060 const uint32_t depth = HCAL::getDepth (detId);
6161 const uint32_t subdet = getSubdet (detId);
62+
63+ // skip bad channels
64+ if (rh.chi2 () < 0 )
65+ return false ;
66+
6267 if (topology.cutsFromDB ()) {
63- threshold = topology.noiseThreshold ()[HCAL::detId2denseId (detId)];
68+ const auto & denseId = HCAL::detId2denseId (detId);
69+ if (denseId != HCAL::kInvalidDenseId ) {
70+ threshold = topology.noiseThreshold ()[denseId];
71+ } else {
72+ printf (" Encountered invalid denseId for detId %u (subdetector %u)!" , detId, subdet);
73+ return false ;
74+ }
6475 } else {
6576 if (subdet == HcalBarrel) {
6677 threshold = params.energyThresholds ()[depth - 1 ];
You can’t perform that action at this time.
0 commit comments