Skip to content

Commit 4453ee5

Browse files
prottayCMTProttay Das
andauthored
[PWGCF] removed physical primary condition in MC for phi meson (AliceO2Group#14413)
Co-authored-by: Prottay Das <[email protected]>
1 parent fa4ed1a commit 4453ee5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

PWGCF/Tasks/correlations.cxx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,17 @@ struct CorrelationTask {
434434
bool checkObject(TTrack& track)
435435
{
436436
if constexpr (step <= CorrelationContainer::kCFStepAnaTopology) {
437+
// If using MC trigger PDGs, allow ONLY those PDGs to bypass isPhysicalPrimary
438+
if (!cfgMcTriggerPDGs->empty()) {
439+
// track has pdgCode in this compilation branch (you only call checkObject where that is true)
440+
const bool isWantedTrigger =
441+
std::find(cfgMcTriggerPDGs->begin(), cfgMcTriggerPDGs->end(), track.pdgCode()) != cfgMcTriggerPDGs->end();
442+
if (isWantedTrigger) {
443+
return true; // allow phi, K*, etc. even if not physical primary
444+
}
445+
// For everything else keep original definition
446+
return track.isPhysicalPrimary();
447+
}
437448
return track.isPhysicalPrimary();
438449
} else if constexpr (step == CorrelationContainer::kCFStepTrackedOnlyPrim) {
439450
return track.isPhysicalPrimary() && (track.flags() & aod::cfmcparticle::kReconstructed);

0 commit comments

Comments
 (0)