Skip to content

Commit 14c92a8

Browse files
fgrosaalcaliva
authored andcommitted
Fix application of signal filtering when enabled (#14763)
1 parent 0c08155 commit 14c92a8

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
@@ -1008,7 +1008,8 @@ void AODProducerWorkflowDPL::fillMCParticlesTable(o2::steer::MCKinematicsReader&
10081008
source == 0, // background
10091009
mMcParticleW,
10101010
mMcParticleMom,
1011-
mMcParticlePos);
1011+
mMcParticlePos,
1012+
mUseSigFiltMC);
10121013

10131014
mcReader.releaseTracksForSourceAndEvent(source, event);
10141015
}

0 commit comments

Comments
 (0)