Skip to content
Merged
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
11 changes: 11 additions & 0 deletions PWGCF/Tasks/correlations.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGCF/Tasks/correlations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -391,7 +391,7 @@

if (cfgCorrelationMethod == 1 && track1.decay() != track2.decay())
continue;
if (cfgCorrelationMethod == 2 && track1.decay() == track2.decay())

Check failure on line 394 in PWGCF/Tasks/correlations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
registry.fill(HIST("invMassTwoPart"), track1.invMass(), track2.invMass(), track1.pt(), track2.pt(), multiplicity);
registry.fill(HIST("invMassTwoPartDPhi"), track1.invMass(), track2.invMass(), track1.pt(), track2.pt(), TVector2::Phi_0_2pi(track1.phi() - track2.phi() + TMath::Pi() / 2.0) - TMath::Pi() / 2.0);
Expand Down Expand Up @@ -430,6 +430,17 @@
bool checkObject(TTrack& track)
{
if constexpr (step <= CorrelationContainer::kCFStepAnaTopology) {
// If using MC trigger PDGs, allow ONLY those PDGs to bypass isPhysicalPrimary
if (!cfgMcTriggerPDGs->empty()) {
// track has pdgCode in this compilation branch (you only call checkObject where that is true)
const bool isWantedTrigger =
std::find(cfgMcTriggerPDGs->begin(), cfgMcTriggerPDGs->end(), track.pdgCode()) != cfgMcTriggerPDGs->end();
if (isWantedTrigger) {
return true; // allow phi, K*, etc. even if not physical primary
}
// For everything else keep original definition
return track.isPhysicalPrimary();
}
return track.isPhysicalPrimary();
} else if constexpr (step == CorrelationContainer::kCFStepTrackedOnlyPrim) {
return track.isPhysicalPrimary() && (track.flags() & aod::cfmcparticle::kReconstructed);
Expand Down Expand Up @@ -649,7 +660,7 @@
if constexpr (std::experimental::is_detected<HasDecay, typename TTracks1::iterator>::value && std::experimental::is_detected<HasDecay, typename TTracks2::iterator>::value) {
if (cfgCorrelationMethod == 1 && track1.decay() != track2.decay())
continue;
if (cfgCorrelationMethod == 2 && track1.decay() == track2.decay())

Check failure on line 663 in PWGCF/Tasks/correlations.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}

Expand Down
Loading