Skip to content

Commit 7331b97

Browse files
authored
Fix application of signal filtering when enabled (#14763)
1 parent be614d2 commit 7331b97

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Detectors/AOD/include/AODProducerWorkflow/AODMcProducerHelpers.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ uint32_t updateParticles(const ParticleCursor& cursor,
315315
bool background = false,
316316
uint32_t weightMask = 0xFFFFFFF0,
317317
uint32_t momentumMask = 0xFFFFFFF0,
318-
uint32_t positionMask = 0xFFFFFFF0);
318+
uint32_t positionMask = 0xFFFFFFF0,
319+
bool signalFilter = false);
319320
} // namespace o2::aodmchelpers
320321

321322
#endif /* O2_AODMCPRODUCER_HELPERS */

Detectors/AOD/src/AODMcProducerHelpers.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ uint32_t updateParticles(const ParticleCursor& cursor,
305305
bool background,
306306
uint32_t weightMask,
307307
uint32_t momentumMask,
308-
uint32_t positionMask)
308+
uint32_t positionMask,
309+
bool signalFilter)
309310
{
310311
using o2::mcutils::MCTrackNavigator;
311312
using namespace o2::aod::mcparticle::enums;
@@ -354,6 +355,9 @@ uint32_t updateParticles(const ParticleCursor& cursor,
354355
continue;
355356
}
356357
}
358+
if (background && signalFilter) {
359+
continue;
360+
}
357361

358362
// Store this particle. We mark that putting a 1 in the
359363
// `toStore` mapping. This will later on be updated with the

Detectors/AOD/src/AODProducerWorkflowSpec.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,8 @@ void AODProducerWorkflowDPL::fillMCParticlesTable(o2::steer::MCKinematicsReader&
10631063
source == 0, // background
10641064
mMcParticleW,
10651065
mMcParticleMom,
1066-
mMcParticlePos);
1066+
mMcParticlePos,
1067+
mUseSigFiltMC);
10671068

10681069
mcReader.releaseTracksForSourceAndEvent(source, event);
10691070
}

0 commit comments

Comments
 (0)