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
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
EfficiencyCorrection effCorrection{&effCorConfGroup};

static constexpr unsigned int V0ChildTable[][2] = {{0, 1}, {1, 0}, {1, 1}}; // Table to select the V0 children
static constexpr double v0InvMass[] = {1.115, 1.115, 0.497}; // Table to select invariant mass of V0s

Check failure on line 188 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-mass]

Avoid hard-coded particle masses. Use o2::constants::physics::Mass... instead.

FemtoUniverseContainer<femto_universe_container::EventType::same, femto_universe_container::Observable::kstar> sameEventCont;
FemtoUniverseContainer<femto_universe_container::EventType::mixed, femto_universe_container::Observable::kstar> mixedEventCont;
Expand All @@ -210,10 +210,24 @@

bool isNSigmaCombined(float mom, float nsigmaTPCParticle, float nsigmaTOFParticle, bool hasTOF)
{
if (mom <= confmom || hasTOF == 0) {
if (mom <= confmom) {
return (std::abs(nsigmaTPCParticle) < confNsigmaTPCParticle);
} else {
} else if (hasTOF == 1) {
return (std::hypot(nsigmaTOFParticle, nsigmaTPCParticle) < confNsigmaCombinedParticle);
} else {
return false;
}
}

template <typename T>
bool isNSigmaCombinedBitmask(float mom, const T& part)
{
if (mom <= confmom) {
return ((part.pidCut() & (1u << ConfTrkSelection.confTrackChoicePartOne)) != 0);
} else if ((part.pidCut() & 512u) != 0) {
return ((part.pidCut() & (64u << ConfTrkSelection.confTrackChoicePartOne)) != 0);
} else {
return false;
}
}

Expand Down Expand Up @@ -458,7 +472,7 @@
continue;

if (ConfV0Selection.confUseStrangenessTOF) {
if (((ConfV0Selection.confV0Type1 == 0) && (part.pidCut() & 3) != 3) || ((ConfV0Selection.confV0Type1 == 1) && (part.pidCut() & 12) != 12) || ((ConfV0Selection.confV0Type1 == 2) && (part.pidCut() & 48) != 48))

Check failure on line 475 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.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;
} else {
if ((posChild.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][0])) == 0 || (negChild.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][1])) == 0)
Expand Down Expand Up @@ -488,12 +502,8 @@
trackHistoPartOneNeg.fillQA<false, false>(part);
}
} else {
if ((part.pidCut() & 512u) != 0) {
if ((part.pidCut() & (64u << ConfTrkSelection.confTrackChoicePartOne)) == 0)
continue;
} else if ((part.pidCut() & (1u << ConfTrkSelection.confTrackChoicePartOne)) == 0) {
if (!isNSigmaCombinedBitmask(part.p(), part))
continue;
}
if (ConfTrkSelection.confChargePart1 > 0)
trackHistoPartOnePos.fillQA<false, false>(part);
if (ConfTrkSelection.confChargePart1 < 0)
Expand All @@ -511,12 +521,8 @@
if (!isParticleCombined(p1, ConfTrkSelection.confTrackChoicePartOne))
continue;
} else {
if ((p1.pidCut() & 512u) != 0) {
if ((p1.pidCut() & (64u << ConfTrkSelection.confTrackChoicePartOne)) == 0)
continue;
} else if ((p1.pidCut() & (1u << ConfTrkSelection.confTrackChoicePartOne)) == 0) {
if (!isNSigmaCombinedBitmask(p1.p(), p1))
continue;
}
}
// track cleaning
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
Expand All @@ -542,7 +548,7 @@
continue;

if (ConfV0Selection.confUseStrangenessTOF) {
if (((ConfV0Selection.confV0Type1 == 0) && (p2.pidCut() & 3) != 3) || ((ConfV0Selection.confV0Type1 == 1) && (p2.pidCut() & 12) != 12) || ((ConfV0Selection.confV0Type1 == 2) && (p2.pidCut() & 48) != 48))

Check failure on line 551 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.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;
} else {
if ((posChild.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][0])) == 0 || (negChild.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][1])) == 0)
Expand Down Expand Up @@ -604,7 +610,7 @@
if ((posChild.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type1][0])) == 0 || (negChild.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type1][1])) == 0)
continue;
if (ConfV0Selection.confUseStrangenessTOF) {
if (((ConfV0Selection.confV0Type1 == 0) && (part.pidCut() & 3) != 3) || ((ConfV0Selection.confV0Type1 == 1) && (part.pidCut() & 12) != 12) || ((ConfV0Selection.confV0Type1 == 2) && (part.pidCut() & 48) != 48))

Check failure on line 613 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.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;
} else {
if ((posChild.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][0])) == 0 || (negChild.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][1])) == 0)
Expand Down Expand Up @@ -645,7 +651,7 @@
if ((posChild.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type2][0])) == 0 || (negChild.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type2][1])) == 0)
continue;
if (ConfV0Selection.confUseStrangenessTOF) {
if (((ConfV0Selection.confV0Type2 == 0) && (part.pidCut() & 3) != 3) || ((ConfV0Selection.confV0Type1 == 1) && (part.pidCut() & 12) != 12) || ((ConfV0Selection.confV0Type2 == 2) && (part.pidCut() & 48) != 48))

Check failure on line 654 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.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;
} else {
if ((posChild.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type2][0])) == 0 || (negChild.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type2][1])) == 0)
Expand Down Expand Up @@ -713,7 +719,7 @@
if ((posChild1.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type1][0])) == 0 || (negChild1.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type1][1])) == 0)
return false;
if (ConfV0Selection.confUseStrangenessTOF) {
if (((ConfV0Selection.confV0Type1 == 0) && (p1.pidCut() & 3) != 3) || ((ConfV0Selection.confV0Type1 == 1) && (p1.pidCut() & 12) != 12) || ((ConfV0Selection.confV0Type1 == 2) && (p1.pidCut() & 48) != 48))

Check failure on line 722 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.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.
return false;
} else {
if ((posChild1.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][0])) == 0 || (negChild1.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][1])) == 0)
Expand All @@ -737,7 +743,7 @@
if ((posChild2.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type2][0])) == 0 || (negChild2.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type2][1])) == 0)
return false;
if (ConfV0Selection.confUseStrangenessTOF) {
if (((ConfV0Selection.confV0Type2 == 0) && (p2.pidCut() & 3) != 3) || ((ConfV0Selection.confV0Type2 == 1) && (p2.pidCut() & 12) != 12) || ((ConfV0Selection.confV0Type2 == 2) && (p2.pidCut() & 48) != 48))

Check failure on line 746 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.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.
return false;
} else {
if ((posChild2.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type2][0])) == 0 || (negChild2.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type2][1])) == 0)
Expand All @@ -754,7 +760,7 @@
randgen = new TRandom2(0);
rand = randgen->Rndm();

if (rand > 0.5) {

Check failure on line 763 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.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.
part1 = p2;
part2 = p1;
}
Expand Down Expand Up @@ -986,12 +992,8 @@
if (!isParticleCombined(p1, ConfTrkSelection.confTrackChoicePartOne))
continue;
} else {
if ((p1.pidCut() & 512u) != 0) {
if ((p1.pidCut() & (64u << ConfTrkSelection.confTrackChoicePartOne)) == 0)
continue;
} else if ((p1.pidCut() & (1u << ConfTrkSelection.confTrackChoicePartOne)) == 0) {
if (!isNSigmaCombinedBitmask(p1.p(), p1))
continue;
}
}

const auto& posChild = parts.iteratorAt(p2.globalIndex() - 2 - parts.begin().globalIndex());
Expand All @@ -1010,7 +1012,7 @@
if ((posChild.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type1][0])) == 0 || (negChild.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type1][1])) == 0)
continue;
if (ConfV0Selection.confUseStrangenessTOF) {
if (((ConfV0Selection.confV0Type1 == 0) && (p2.pidCut() & 3) != 3) || ((ConfV0Selection.confV0Type1 == 1) && (p2.pidCut() & 12) != 12) || ((ConfV0Selection.confV0Type1 == 2) && (p2.pidCut() & 48) != 48))

Check failure on line 1015 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.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;
} else {
if ((posChild.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][0])) == 0 || (negChild.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][1])) == 0)
Expand Down Expand Up @@ -1101,7 +1103,7 @@
if ((posChild1.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type1][0])) == 0 || (negChild1.pidCut() & (1u << V0ChildTable[ConfV0Selection.confV0Type1][1])) == 0)
continue;
if (ConfV0Selection.confUseStrangenessTOF) {
if (((ConfV0Selection.confV0Type1 == 0) && (p1.pidCut() & 3) != 3) || ((ConfV0Selection.confV0Type1 == 1) && (p1.pidCut() & 12) != 12) || ((ConfV0Selection.confV0Type1 == 2) && (p1.pidCut() & 48) != 48))

Check failure on line 1106 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.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;
} else {
if ((posChild1.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][0])) == 0 || (negChild1.pidCut() & (8u << V0ChildTable[ConfV0Selection.confV0Type1][1])) == 0)
Expand Down Expand Up @@ -1684,12 +1686,8 @@
if (!isNSigmaCombined(part.p(), aod::pidtpc_tiny::binning::unPackInTable(part.tpcNSigmaStorePr()), aod::pidtof_tiny::binning::unPackInTable(part.tofNSigmaStorePr()), (part.pidCut() & 512u) != 0))
continue;
} else {
if ((part.pidCut() & 512u) != 0) {
if ((part.pidCut() & 64u) == 0) // 64 for proton combined
continue;
} else if ((part.pidCut() & 1u) == 0) {
if (!isNSigmaCombinedBitmask(part.p(), part))
continue;
}
}
registryMCreco.fill(HIST("plus/MCrecoPr"), mcpart.pt(), mcpart.eta());
registryMCreco.fill(HIST("plus/MCrecoPrPt"), mcpart.pt());
Expand All @@ -1715,12 +1713,8 @@
if (!isNSigmaCombined(part.p(), aod::pidtpc_tiny::binning::unPackInTable(part.tpcNSigmaStorePr()), aod::pidtof_tiny::binning::unPackInTable(part.tofNSigmaStorePr()), (part.pidCut() & 512u) != 0))
continue;
} else {
if ((part.pidCut() & 512u) != 0) {
if ((part.pidCut() & 64u) == 0) // 64 for proton combined
continue;
} else if ((part.pidCut() & 1u) == 0) {
if (!isNSigmaCombinedBitmask(part.p(), part))
continue;
}
}
registryMCreco.fill(HIST("minus/MCrecoPr"), mcpart.pt(), mcpart.eta());
registryMCreco.fill(HIST("minus/MCrecoPrPt"), mcpart.pt());
Expand Down
Loading