Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@
femto_universe_selection::kLowerLimit, // cascade tran rad min
femto_universe_selection::kUpperLimit, // cascade tran rad max
femto_universe_selection::kUpperLimit, // cascade maximum distance of decay vertex to PV
femto_universe_selection::kLowerLimit, // DCA pos to PV max
femto_universe_selection::kLowerLimit, // DCA neg to PV max
femto_universe_selection::kLowerLimit, // DCA bach to PV max
femto_universe_selection::kLowerLimit, // DCA pos to PV min
femto_universe_selection::kLowerLimit, // DCA neg to PV min
femto_universe_selection::kLowerLimit, // DCA bach to PV min
femto_universe_selection::kLowerLimit, // DCA v0 to PV max
femto_universe_selection::kLowerLimit, // v0 mass min
femto_universe_selection::kUpperLimit, // v0 mass max
Expand All @@ -276,10 +276,10 @@
"Minimum cascade transverse radius (cm)",
"Maximum cascade transverse radius (cm)",
"Maximum distance of cascade from primary vertex",
"Maximum DCA of positive track form primary vertex",
"Maximum DCA of negative track form primary vertex",
"Maximum DCA of bachelor track form primary vertex",
"Maximum DCA of v0 form primary vertex",
"Minimum DCA of positive track form primary vertex",
"Minimum DCA of negative track form primary vertex",
"Minimum DCA of bachelor track form primary vertex",
"Minimum DCA of v0 form primary vertex",
"Minimum V0 mass",
"Maximum V0 mass"}; ///< Helper information for the
///< different selections
Expand Down Expand Up @@ -309,7 +309,7 @@
/// \todo this should be an automatic check in the parent class, and the
/// return type should be templated
size_t nSelections = getNSelections();
if (nSelections > 17 * sizeof(CutContainerType)) {

Check failure on line 312 in PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h

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.
LOG(fatal) << "FemtoUniverseCascadeCuts: Number of selections to large for your "
"container - quitting!";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
ConfigurableAxis confChildTempFitVarBins{"confChildTempFitVarBins", {300, -0.15, 0.15}, "V0 child: binning of the TempFitVar in the pT vs. TempFitVar plot"};
Configurable<float> confCascInvMassLowLimit{"confCascInvMassLowLimit", 1.315, "Lower limit of the Casc invariant mass"};
Configurable<float> confCascInvMassUpLimit{"confCascInvMassUpLimit", 1.325, "Upper limit of the Casc invariant mass"};
Configurable<float> confCascTranRad{"confCascTranRad", 0.5, "Cascade transverse radius"};

Configurable<float> confNSigmaTPCPion{"confNSigmaTPCPion", 4, "NSigmaTPCPion"};
Configurable<float> confNSigmaTPCProton{"confNSigmaTPCProton", 4, "NSigmaTPCProton"};
Expand Down Expand Up @@ -188,7 +187,7 @@
if (mom <= confmom) {
return (std::abs(nsigmaTPCParticle) < confNsigmaTPCParticle);
} else {
return (TMath::Hypot(nsigmaTOFParticle, nsigmaTPCParticle) < confNsigmaCombinedParticle);

Check failure on line 190 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
}
}

Expand Down Expand Up @@ -299,29 +298,17 @@
}
}

void processCascades([[maybe_unused]] const FilteredFDCollision& col, const FemtoFullParticles& parts, const aod::FDCascParticles& fdcascs)
void processCascadeQA([[maybe_unused]] const FilteredFDCollision& col, const FemtoFullParticles& parts, const aod::FDCascParticles& fdcascs)
{
// auto groupCascs = cascs->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache);
// const int multCol = col.multNtr();

for (const auto& casc : fdcascs) {
const auto& part = casc.fdParticle_as<FemtoFullParticles>();
rXiQA.fill(HIST("hMassXi"), part.mLambda());

// if (!invMCascade(casc.mLambda(), casc.mAntiLambda()))
// continue;

const auto& posChild = parts.iteratorAt(part.globalIndex() - 3 - parts.begin().globalIndex());
const auto& negChild = parts.iteratorAt(part.globalIndex() - 2 - parts.begin().globalIndex());
const auto& bachelor = parts.iteratorAt(part.globalIndex() - 1 - parts.begin().globalIndex());

// if (casc.transRadius() < confCascTranRad)
// continue;
// std::cout<<std::endl;
// std::cout<<"TYPE:"<<std::endl;
// std::cout<<casc.partType()<<std::endl;
// nSigma selection for daughter and bachelor tracks

if (part.sign() < 0) {
if (std::abs(posChild.tpcNSigmaPr()) > confNSigmaTPCProton) {
continue;
Expand Down Expand Up @@ -356,13 +343,9 @@
rXiQA.fill(HIST("hDcaBachtoPV"), casc.dcabachtopv());
rXiQA.fill(HIST("hDcaV0toPV"), casc.dcav0topv());
rXiQA.fill(HIST("hInvMpT"), part.pt(), part.mLambda());

posChildHistos.fillQA<false, true>(posChild);
negChildHistos.fillQA<false, true>(negChild);
bachHistos.fillQABase<false, true>(bachelor, HIST("hBachelor"));
}
}
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processCascades, "Enable processing cascades", false);
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processCascadeQA, "Enable processing cascades", false);

template <class T>
using hasSigma = decltype(std::declval<T&>().tpcNSigmaStorePr());
Expand All @@ -383,11 +366,6 @@
if (!invMCascade(part.mLambda(), part.mAntiLambda(), confCascType1)) /// mLambda stores Xi mass, mAntiLambda stores Omega mass
continue;

if constexpr (std::experimental::is_detected<hasSigma, typename TableType::iterator>::value)
cascQAHistos.fillQA<false, true>(part);
else
cascQAHistos.fillQA<false, false>(part);

const auto& posChild = parts.iteratorAt(part.globalIndex() - 3 - parts.begin().globalIndex());
const auto& negChild = parts.iteratorAt(part.globalIndex() - 2 - parts.begin().globalIndex());
const auto& bachelor = parts.iteratorAt(part.globalIndex() - 1 - parts.begin().globalIndex());
Expand All @@ -409,6 +387,11 @@
if ((!confCheckTOFBachelorOnly && ((posChild.pidCut() & (8u << CascChildTable[confCascType1][0])) == 0 || (negChild.pidCut() & (8u << CascChildTable[confCascType1][1])) == 0)) || (bachelor.pidCut() & (8u << CascChildTable[confCascType1][2])) == 0)
continue;

if constexpr (std::experimental::is_detected<hasSigma, typename TableType::iterator>::value)
cascQAHistos.fillQA<false, true>(part);
else
cascQAHistos.fillQA<false, false>(part);

posChildHistos.fillQA<false, false>(posChild);
negChildHistos.fillQA<false, false>(negChild);
bachHistos.fillQABase<false, false>(bachelor, HIST("hBachelor"));
Expand Down Expand Up @@ -802,7 +785,7 @@

for (const auto& part : groupPartsTwo) {
int pdgCode = static_cast<int>(part.pidCut());
if ((confCascType1 == 0 && pdgCode != kOmegaMinus) || (confCascType1 == 2 && pdgCode != kOmegaPlusBar) || (confCascType1 == 1 && pdgCode != kXiMinus) || (confCascType1 == 3 && pdgCode != kXiPlusBar))

Check failure on line 788 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;

cascQAHistos.fillQA<false, false>(part);
Expand All @@ -827,7 +810,7 @@
if (static_cast<int>(p1.pidCut()) != confTrkPDGCodePartOne)
continue;
int pdgCodeCasc = static_cast<int>(p2.pidCut());
if ((confCascType1 == 0 && pdgCodeCasc != kOmegaMinus) || (confCascType1 == 2 && pdgCodeCasc != kOmegaPlusBar) || (confCascType1 == 1 && pdgCodeCasc != kXiMinus) || (confCascType1 == 3 && pdgCodeCasc != kXiPlusBar))

Check failure on line 813 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
sameEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);
}
Expand All @@ -846,17 +829,17 @@

for (const auto& part : groupPartsTwo) {
int pdgCode = static_cast<int>(part.pidCut());
if ((confCascType1 == 0 && pdgCode != kOmegaMinus) || (confCascType1 == 2 && pdgCode != kOmegaPlusBar) || (confCascType1 == 1 && pdgCode != kXiMinus) || (confCascType1 == 3 && pdgCode != kXiPlusBar))

Check failure on line 832 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;

cascQAHistos.fillQA<false, false>(part);

auto pairProcessFunc = [&](auto& p1, auto& p2) -> void {
int pdgCodeCasc1 = static_cast<int>(p1.pidCut());
if ((confCascType1 == 0 && pdgCodeCasc1 != kOmegaMinus) || (confCascType1 == 2 && pdgCodeCasc1 != kOmegaPlusBar) || (confCascType1 == 1 && pdgCodeCasc1 != kXiMinus) || (confCascType1 == 3 && pdgCodeCasc1 != kXiPlusBar))

Check failure on line 839 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
return;
int pdgCodeCasc2 = static_cast<int>(p2.pidCut());
if ((confCascType2 == 0 && pdgCodeCasc2 != kOmegaMinus) || (confCascType2 == 2 && pdgCodeCasc2 != kOmegaPlusBar) || (confCascType2 == 1 && pdgCodeCasc2 != kXiMinus) || (confCascType2 == 3 && pdgCodeCasc2 != kXiPlusBar))

Check failure on line 842 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
return;
sameEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);
};
Expand Down Expand Up @@ -893,7 +876,7 @@
if (static_cast<int>(p1.pidCut()) != confTrkPDGCodePartOne)
continue;
int pdgCodeCasc = static_cast<int>(p2.pidCut());
if ((confCascType1 == 0 && pdgCodeCasc != kOmegaMinus) || (confCascType1 == 2 && pdgCodeCasc != kOmegaPlusBar) || (confCascType1 == 1 && pdgCodeCasc != kXiMinus) || (confCascType1 == 3 && pdgCodeCasc != kXiPlusBar))

Check failure on line 879 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
mixedEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);
}
Expand All @@ -920,10 +903,10 @@
}
for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) {
int pdgCodeCasc1 = static_cast<int>(p1.pidCut());
if ((confCascType1 == 0 && pdgCodeCasc1 != kOmegaMinus) || (confCascType1 == 2 && pdgCodeCasc1 != kOmegaPlusBar) || (confCascType1 == 1 && pdgCodeCasc1 != kXiMinus) || (confCascType1 == 3 && pdgCodeCasc1 != kXiPlusBar))

Check failure on line 906 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
int pdgCodeCasc2 = static_cast<int>(p2.pidCut());
if ((confCascType2 == 0 && pdgCodeCasc2 != kOmegaMinus) || (confCascType2 == 2 && pdgCodeCasc2 != kOmegaPlusBar) || (confCascType2 == 1 && pdgCodeCasc2 != kXiMinus) || (confCascType2 == 3 && pdgCodeCasc2 != kXiPlusBar))

Check failure on line 909 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
mixedEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);
}
Expand Down
Loading