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 @@ -148,7 +148,7 @@
FemtoUniverseDetaDphiStar<aod::femtouniverseparticle::ParticleType::kTrack, aod::femtouniverseparticle::ParticleType::kCascade> pairCloseRejection;
FemtoUniverseDetaDphiStar<aod::femtouniverseparticle::ParticleType::kCascade, aod::femtouniverseparticle::ParticleType::kCascade> pairCloseRejectionCasc;

HistogramRegistry rXiQA{"xi", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
HistogramRegistry CascQAExtra{"CascQAExtra", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject};
HistogramRegistry resultRegistry{"Correlations", {}, OutputObjHandlingPolicy::AnalysisObject};
HistogramRegistry registryMCgen{"MCgenHistos", {}, OutputObjHandlingPolicy::AnalysisObject, false, true};
Expand All @@ -173,7 +173,7 @@

bool isNSigmaTPC(float nsigmaTPCParticle)
{
if (std::abs(nsigmaTPCParticle) < confNsigmaTPCParticleChild) {

Check failure on line 176 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.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 true;
} else {
return false;
Expand Down Expand Up @@ -259,23 +259,23 @@
AxisSpec multAxis = {multBinning, "Multiplicity"};

// Histograms
rXiQA.add("hMassXi", "hMassXi", {HistType::kTH1F, {aXiMassAxis}});
rXiQA.add("hMassXiSelected", "hMassXiSelected", {HistType::kTH1F, {aXiMassAxis}});
rXiQA.add("hPtXi", "hPtXi", {HistType::kTH1F, {{ptAxis}}});
rXiQA.add("hEtaXi", "hEtaXi", {HistType::kTH1F, {{etaAxis}}});
rXiQA.add("hPhiXi", "hPhiXi", {HistType::kTH1F, {{phiAxis}}});
rXiQA.add("hDCAV0Daughters", "hDCAV0Daughters", {HistType::kTH1F, {aDCADaughAxis}});
rXiQA.add("hV0CosPA", "hV0CosPA", {HistType::kTH1F, {aCPAAxis}});
rXiQA.add("hV0TranRad", "hV0TranRad", {HistType::kTH1F, {tranRadAxis}});
rXiQA.add("hDCACascDaughters", "hDCACascDaughters", {HistType::kTH1F, {aDCADaughAxis}});
rXiQA.add("hCascCosPA", "hCascCosPA", {HistType::kTH1F, {aCPAAxis}});
rXiQA.add("hCascTranRad", "hCascTranRad", {HistType::kTH1F, {tranRadAxis}});
rXiQA.add("hDcaPostoPV", "hDcaPostoPV", {HistType::kTH1F, {aDCAToPVAxis}});
rXiQA.add("hDcaNegtoPV", "hDcaNegtoPV", {HistType::kTH1F, {aDCAToPVAxis}});
rXiQA.add("hDcaBachtoPV", "hDcaBachtoPV", {HistType::kTH1F, {aDCAToPVAxis}});
rXiQA.add("hDcaV0toPV", "hDcaV0toPV", {HistType::kTH1F, {aDCAToPVAxis}});
rXiQA.add("hInvMpT", "hInvMpT", kTH2F, {{ptAxis}, {aXiMassAxis}});
rXiQA.add("hInvMpTmult", "hInvMpTmult", kTH3F, {{ptAxis}, {aXiMassAxis}, {multAxis}});
CascQAExtra.add("hMassXi", "hMassXi", {HistType::kTH1F, {aXiMassAxis}});
CascQAExtra.add("hMassXiSelected", "hMassXiSelected", {HistType::kTH1F, {aXiMassAxis}});
CascQAExtra.add("hPtXi", "hPtXi", {HistType::kTH1F, {{ptAxis}}});
CascQAExtra.add("hEtaXi", "hEtaXi", {HistType::kTH1F, {{etaAxis}}});
CascQAExtra.add("hPhiXi", "hPhiXi", {HistType::kTH1F, {{phiAxis}}});
CascQAExtra.add("hDCAV0Daughters", "hDCAV0Daughters", {HistType::kTH1F, {aDCADaughAxis}});
CascQAExtra.add("hV0CosPA", "hV0CosPA", {HistType::kTH1F, {aCPAAxis}});
CascQAExtra.add("hV0TranRad", "hV0TranRad", {HistType::kTH1F, {tranRadAxis}});
CascQAExtra.add("hDCACascDaughters", "hDCACascDaughters", {HistType::kTH1F, {aDCADaughAxis}});
CascQAExtra.add("hCascCosPA", "hCascCosPA", {HistType::kTH1F, {aCPAAxis}});
CascQAExtra.add("hCascTranRad", "hCascTranRad", {HistType::kTH1F, {tranRadAxis}});
CascQAExtra.add("hDcaPostoPV", "hDcaPostoPV", {HistType::kTH1F, {aDCAToPVAxis}});
CascQAExtra.add("hDcaNegtoPV", "hDcaNegtoPV", {HistType::kTH1F, {aDCAToPVAxis}});
CascQAExtra.add("hDcaBachtoPV", "hDcaBachtoPV", {HistType::kTH1F, {aDCAToPVAxis}});
CascQAExtra.add("hDcaV0toPV", "hDcaV0toPV", {HistType::kTH1F, {aDCAToPVAxis}});
CascQAExtra.add("hInvMpT", "hInvMpT", kTH2F, {{ptAxis}, {aXiMassAxis}});
CascQAExtra.add("hInvMpTmult", "hInvMpTmult", kTH3F, {{ptAxis}, {aXiMassAxis}, {multAxis}});

eventHisto.init(&qaRegistry);
/// nSigma debug histograms for the selected particle species only i.e. not sigmas of all particles mixed together
Expand Down Expand Up @@ -371,44 +371,68 @@
}
}

void processCascadeQA([[maybe_unused]] const FilteredFDCollision& col, const FemtoFullParticles& parts, const aod::FDCascParticles& fdcascs)
template <class T>
using hasSigma = decltype(std::declval<T&>().tpcNSigmaStorePr());

// Additional cascade QA plots
template <class TableType, typename PartitionType>
void doCascadeQA([[maybe_unused]] const FilteredFDCollision& col, const TableType& parts, PartitionType& partsTwo, const aod::FDCascParticles& fdcascs)
{
for (const auto& casc : fdcascs) {
const auto& part = casc.fdParticle_as<FemtoFullParticles>();
rXiQA.fill(HIST("hMassXi"), part.mLambda());
auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache);

// Basic particle loop
for (const auto& part : groupPartsTwo) {
CascQAExtra.fill(HIST("hMassXi"), part.mLambda());

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());

float posChildTPC, negChildTPC, bachelorTPC, posChildTOF, negChildTOF, bachelorTOF;
if (!isParticleTPC(posChild, CascChildTable[confCascType1][0], &posChildTPC) || !isParticleTPC(negChild, CascChildTable[confCascType1][1], &negChildTPC) || !isParticleTPC(bachelor, CascChildTable[confCascType1][2], &bachelorTPC))
continue;
if constexpr (std::experimental::is_detected<hasSigma, typename TableType::iterator>::value) {
float posChildTPC, negChildTPC, bachelorTPC, posChildTOF, negChildTOF, bachelorTOF;
if (!isParticleTPC(posChild, CascChildTable[confCascType1][0], &posChildTPC) || !isParticleTPC(negChild, CascChildTable[confCascType1][1], &negChildTPC) || !isParticleTPC(bachelor, CascChildTable[confCascType1][2], &bachelorTPC))
continue;

if (!isParticleTOF(posChild, CascChildTable[confCascType1][0], &posChildTOF) || !isParticleTOF(negChild, CascChildTable[confCascType1][1], &negChildTOF) || !isParticleTOF(bachelor, CascChildTable[confCascType1][2], &bachelorTOF))
continue;
if (!isParticleTOF(posChild, CascChildTable[confCascType1][0], &posChildTOF) || !isParticleTOF(negChild, CascChildTable[confCascType1][1], &negChildTOF) || !isParticleTOF(bachelor, CascChildTable[confCascType1][2], &bachelorTOF))
continue;

CascQAExtra.fill(HIST("hPtXi"), part.pt());
CascQAExtra.fill(HIST("hEtaXi"), part.eta());
CascQAExtra.fill(HIST("hPhiXi"), part.phi());
CascQAExtra.fill(HIST("hMassXiSelected"), part.mLambda());
CascQAExtra.fill(HIST("hInvMpT"), part.pt(), part.mLambda());
}
}

// Cascade extended table loop
for (const auto& casc : fdcascs) {
const auto& part = casc.fdParticle_as<FemtoFullParticles>();

rXiQA.fill(HIST("hPtXi"), part.pt());
rXiQA.fill(HIST("hEtaXi"), part.eta());
rXiQA.fill(HIST("hPhiXi"), part.phi());
rXiQA.fill(HIST("hMassXiSelected"), part.mLambda());
rXiQA.fill(HIST("hDCAV0Daughters"), casc.dcaV0daughters());
rXiQA.fill(HIST("hV0CosPA"), casc.cpav0());
rXiQA.fill(HIST("hV0TranRad"), casc.v0radius());
rXiQA.fill(HIST("hCascCosPA"), casc.cpaCasc());
rXiQA.fill(HIST("hDCACascDaughters"), casc.dcacascdaughters());
rXiQA.fill(HIST("hCascTranRad"), casc.cascradius());
rXiQA.fill(HIST("hDcaPostoPV"), casc.dcapostopv());
rXiQA.fill(HIST("hDcaNegtoPV"), casc.dcanegtopv());
rXiQA.fill(HIST("hDcaBachtoPV"), casc.dcabachtopv());
rXiQA.fill(HIST("hDcaV0toPV"), casc.dcav0topv());
rXiQA.fill(HIST("hInvMpT"), part.pt(), part.mLambda());
const auto& posChildExt = parts.iteratorAt(part.globalIndex() - 3 - parts.begin().globalIndex());
const auto& negChildExt = parts.iteratorAt(part.globalIndex() - 2 - parts.begin().globalIndex());
const auto& bachelorExt = parts.iteratorAt(part.globalIndex() - 1 - parts.begin().globalIndex());

if constexpr (std::experimental::is_detected<hasSigma, typename TableType::iterator>::value) {
float posChildTPCExt, negChildTPCExt, bachelorTPCExt, posChildTOFExt, negChildTOFExt, bachelorTOFExt;
if (!isParticleTPC(posChildExt, CascChildTable[confCascType1][0], &posChildTPCExt) || !isParticleTPC(negChildExt, CascChildTable[confCascType1][1], &negChildTPCExt) || !isParticleTPC(bachelorExt, CascChildTable[confCascType1][2], &bachelorTPCExt))
continue;

if (!isParticleTOF(posChildExt, CascChildTable[confCascType1][0], &posChildTOFExt) || !isParticleTOF(negChildExt, CascChildTable[confCascType1][1], &negChildTOFExt) || !isParticleTOF(bachelorExt, CascChildTable[confCascType1][2], &bachelorTOFExt))
continue;

CascQAExtra.fill(HIST("hDCAV0Daughters"), casc.dcaV0daughters());
CascQAExtra.fill(HIST("hV0CosPA"), casc.cpav0());
CascQAExtra.fill(HIST("hV0TranRad"), casc.v0radius());
CascQAExtra.fill(HIST("hCascCosPA"), casc.cpaCasc());
CascQAExtra.fill(HIST("hDCACascDaughters"), casc.dcacascdaughters());
CascQAExtra.fill(HIST("hCascTranRad"), casc.cascradius());
CascQAExtra.fill(HIST("hDcaPostoPV"), casc.dcapostopv());
CascQAExtra.fill(HIST("hDcaNegtoPV"), casc.dcanegtopv());
CascQAExtra.fill(HIST("hDcaBachtoPV"), casc.dcabachtopv());
CascQAExtra.fill(HIST("hDcaV0toPV"), casc.dcav0topv());
}
}
}
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processCascadeQA, "Enable processing cascades", false);

template <class T>
using hasSigma = decltype(std::declval<T&>().tpcNSigmaStorePr());

/// track - cascade correlations
template <class TableType, typename PartitionType>
Expand Down Expand Up @@ -462,14 +486,14 @@
} else {
if ((posChild.pidCut() & (8u << CascChildTable[confCascType1][0])) == 0 || (negChild.pidCut() & (8u << CascChildTable[confCascType1][1])) == 0 || (bachelor.pidCut() & (8u << CascChildTable[confCascType1][2])) == 0)
continue;
}

Check failure on line 489 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.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.

posChildHistos.fillQA<false, false>(posChild);
negChildHistos.fillQA<false, false>(negChild);
bachHistos.fillQABase<false, false>(bachelor, HIST("hBachelor"));
cascQAHistos.fillQA<false, false>(part);
}
rXiQA.fill(HIST("hInvMpTmult"), part.pt(), part.mLambda(), multCol);
CascQAExtra.fill(HIST("hInvMpTmult"), part.pt(), part.mLambda(), multCol);
}

for (const auto& part : groupPartsOne) {
Expand Down Expand Up @@ -552,6 +576,12 @@
}
}

void processCascadeQA([[maybe_unused]] const FilteredFDCollision& col, const FemtoFullParticles& parts, const aod::FDCascParticles& fdcascs)
{
doCascadeQA(col, parts, partsTwoFull, fdcascs);
}
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processCascadeQA, "Enable additional QA for cascades", false);

void processSameEvent(const FilteredFDCollision& col, const FemtoFullParticles& parts)
{
doSameEvent(col, parts, partsOneFull, partsTwoFull);
Expand Down Expand Up @@ -937,7 +967,7 @@

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

for (const auto& part : groupPartsOne) {

Check failure on line 970 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.
int pdgCode = static_cast<int>(part.pidCut());
if (pdgCode != confTrkPDGCodePartOne)
continue;
Expand All @@ -962,7 +992,7 @@
sameEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);
}
}
}

Check failure on line 995 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.
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processSameEventMCgen, "Enable processing same event MC truth for track - cascade", false);

// MC truth for cascade - cascade
Expand All @@ -981,17 +1011,17 @@

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

auto pairProcessFunc = [&](auto& p1, auto& p2) -> void {

Check failure on line 1014 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.
int pdgCodeCasc1 = static_cast<int>(p1.pidCut());
if ((confCascType1 == 0 && pdgCodeCasc1 != kOmegaMinus) || (confCascType1 == 2 && pdgCodeCasc1 != kOmegaPlusBar) || (confCascType1 == 1 && pdgCodeCasc1 != kXiMinus) || (confCascType1 == 3 && pdgCodeCasc1 != kXiPlusBar))
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))
return;
sameEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);

Check failure on line 1021 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.
};

if (confCascType1 == confCascType2) {

Check failure on line 1024 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.
for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsTwo, groupPartsTwo)))
pairProcessFunc(p1, p2);
} else {
Expand Down Expand Up @@ -1028,7 +1058,7 @@
mixedEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);
}
}
}

Check failure on line 1061 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.
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processMixedEventMCgen, "Enable processing mixed event MC truth for track - cascade", false);

// MC truth for cascade - cascade
Expand All @@ -1055,10 +1085,10 @@
int pdgCodeCasc2 = static_cast<int>(p2.pidCut());
if ((confCascType2 == 0 && pdgCodeCasc2 != kOmegaMinus) || (confCascType2 == 2 && pdgCodeCasc2 != kOmegaPlusBar) || (confCascType2 == 1 && pdgCodeCasc2 != kXiMinus) || (confCascType2 == 3 && pdgCodeCasc2 != kXiPlusBar))
continue;
mixedEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);

Check failure on line 1088 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.
}
}
}

Check failure on line 1091 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.
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processMixedEventCascMCgen, "Enable processing mixed event MC truth for cascade - cascade", false);

/// This function fills MC truth particles from derived MC table
Expand Down
Loading