Skip to content

Commit dbb91a1

Browse files
basiachBarbara Chytlaalibuild
authored
[PWGCF] FemtoUniverse: Fixing cascade QA plots to match true selection (#15661)
Co-authored-by: Barbara Chytla <barbara.chytla@cern.ch> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent a9ea146 commit dbb91a1

File tree

1 file changed

+77
-47
lines changed

1 file changed

+77
-47
lines changed

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

Lines changed: 77 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ struct femtoUniversePairTaskTrackCascadeExtended {
153153
FemtoUniverseDetaDphiStar<aod::femtouniverseparticle::ParticleType::kTrack, aod::femtouniverseparticle::ParticleType::kCascade> pairCloseRejection;
154154
FemtoUniverseDetaDphiStar<aod::femtouniverseparticle::ParticleType::kCascade, aod::femtouniverseparticle::ParticleType::kCascade> pairCloseRejectionCasc;
155155

156-
HistogramRegistry rXiQA{"xi", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
156+
HistogramRegistry CascQAExtra{"CascQAExtra", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
157157
HistogramRegistry qaRegistry{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject};
158158
HistogramRegistry resultRegistry{"Correlations", {}, OutputObjHandlingPolicy::AnalysisObject};
159159
HistogramRegistry registryMCgen{"MCgenHistos", {}, OutputObjHandlingPolicy::AnalysisObject, false, true};
@@ -264,23 +264,23 @@ struct femtoUniversePairTaskTrackCascadeExtended {
264264
AxisSpec multAxis = {multBinning, "Multiplicity"};
265265

266266
// Histograms
267-
rXiQA.add("hMassXi", "hMassXi", {HistType::kTH1F, {aXiMassAxis}});
268-
rXiQA.add("hMassXiSelected", "hMassXiSelected", {HistType::kTH1F, {aXiMassAxis}});
269-
rXiQA.add("hPtXi", "hPtXi", {HistType::kTH1F, {{ptAxis}}});
270-
rXiQA.add("hEtaXi", "hEtaXi", {HistType::kTH1F, {{etaAxis}}});
271-
rXiQA.add("hPhiXi", "hPhiXi", {HistType::kTH1F, {{phiAxis}}});
272-
rXiQA.add("hDCAV0Daughters", "hDCAV0Daughters", {HistType::kTH1F, {aDCADaughAxis}});
273-
rXiQA.add("hV0CosPA", "hV0CosPA", {HistType::kTH1F, {aCPAAxis}});
274-
rXiQA.add("hV0TranRad", "hV0TranRad", {HistType::kTH1F, {tranRadAxis}});
275-
rXiQA.add("hDCACascDaughters", "hDCACascDaughters", {HistType::kTH1F, {aDCADaughAxis}});
276-
rXiQA.add("hCascCosPA", "hCascCosPA", {HistType::kTH1F, {aCPAAxis}});
277-
rXiQA.add("hCascTranRad", "hCascTranRad", {HistType::kTH1F, {tranRadAxis}});
278-
rXiQA.add("hDcaPostoPV", "hDcaPostoPV", {HistType::kTH1F, {aDCAToPVAxis}});
279-
rXiQA.add("hDcaNegtoPV", "hDcaNegtoPV", {HistType::kTH1F, {aDCAToPVAxis}});
280-
rXiQA.add("hDcaBachtoPV", "hDcaBachtoPV", {HistType::kTH1F, {aDCAToPVAxis}});
281-
rXiQA.add("hDcaV0toPV", "hDcaV0toPV", {HistType::kTH1F, {aDCAToPVAxis}});
282-
rXiQA.add("hInvMpT", "hInvMpT", kTH2F, {{ptAxis}, {aXiMassAxis}});
283-
rXiQA.add("hInvMpTmult", "hInvMpTmult", kTH3F, {{ptAxis}, {aXiMassAxis}, {multAxis}});
267+
CascQAExtra.add("hMassXi", "hMassXi", {HistType::kTH1F, {aXiMassAxis}});
268+
CascQAExtra.add("hMassXiSelected", "hMassXiSelected", {HistType::kTH1F, {aXiMassAxis}});
269+
CascQAExtra.add("hPtXi", "hPtXi", {HistType::kTH1F, {{ptAxis}}});
270+
CascQAExtra.add("hEtaXi", "hEtaXi", {HistType::kTH1F, {{etaAxis}}});
271+
CascQAExtra.add("hPhiXi", "hPhiXi", {HistType::kTH1F, {{phiAxis}}});
272+
CascQAExtra.add("hDCAV0Daughters", "hDCAV0Daughters", {HistType::kTH1F, {aDCADaughAxis}});
273+
CascQAExtra.add("hV0CosPA", "hV0CosPA", {HistType::kTH1F, {aCPAAxis}});
274+
CascQAExtra.add("hV0TranRad", "hV0TranRad", {HistType::kTH1F, {tranRadAxis}});
275+
CascQAExtra.add("hDCACascDaughters", "hDCACascDaughters", {HistType::kTH1F, {aDCADaughAxis}});
276+
CascQAExtra.add("hCascCosPA", "hCascCosPA", {HistType::kTH1F, {aCPAAxis}});
277+
CascQAExtra.add("hCascTranRad", "hCascTranRad", {HistType::kTH1F, {tranRadAxis}});
278+
CascQAExtra.add("hDcaPostoPV", "hDcaPostoPV", {HistType::kTH1F, {aDCAToPVAxis}});
279+
CascQAExtra.add("hDcaNegtoPV", "hDcaNegtoPV", {HistType::kTH1F, {aDCAToPVAxis}});
280+
CascQAExtra.add("hDcaBachtoPV", "hDcaBachtoPV", {HistType::kTH1F, {aDCAToPVAxis}});
281+
CascQAExtra.add("hDcaV0toPV", "hDcaV0toPV", {HistType::kTH1F, {aDCAToPVAxis}});
282+
CascQAExtra.add("hInvMpT", "hInvMpT", kTH2F, {{ptAxis}, {aXiMassAxis}});
283+
CascQAExtra.add("hInvMpTmult", "hInvMpTmult", kTH3F, {{ptAxis}, {aXiMassAxis}, {multAxis}});
284284

285285
eventHisto.init(&qaRegistry);
286286
/// nSigma debug histograms for the selected particle species only i.e. not sigmas of all particles mixed together
@@ -376,44 +376,68 @@ struct femtoUniversePairTaskTrackCascadeExtended {
376376
}
377377
}
378378

379-
void processCascadeQA([[maybe_unused]] const FilteredFDCollision& col, const FemtoFullParticles& parts, const aod::FDCascParticles& fdcascs)
379+
template <class T>
380+
using hasSigma = decltype(std::declval<T&>().tpcNSigmaStorePr());
381+
382+
// Additional cascade QA plots
383+
template <class TableType, typename PartitionType>
384+
void doCascadeQA([[maybe_unused]] const FilteredFDCollision& col, const TableType& parts, PartitionType& partsTwo, const aod::FDCascParticles& fdcascs)
380385
{
381-
for (const auto& casc : fdcascs) {
382-
const auto& part = casc.fdParticle_as<FemtoFullParticles>();
383-
rXiQA.fill(HIST("hMassXi"), part.mLambda());
386+
auto groupPartsTwo = partsTwo->sliceByCached(aod::femtouniverseparticle::fdCollisionId, col.globalIndex(), cache);
387+
388+
// Basic particle loop
389+
for (const auto& part : groupPartsTwo) {
390+
CascQAExtra.fill(HIST("hMassXi"), part.mLambda());
384391

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

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

393-
if (!isParticleTOF(posChild, CascChildTable[confCascType1][0], &posChildTOF) || !isParticleTOF(negChild, CascChildTable[confCascType1][1], &negChildTOF) || !isParticleTOF(bachelor, CascChildTable[confCascType1][2], &bachelorTOF))
394-
continue;
401+
if (!isParticleTOF(posChild, CascChildTable[confCascType1][0], &posChildTOF) || !isParticleTOF(negChild, CascChildTable[confCascType1][1], &negChildTOF) || !isParticleTOF(bachelor, CascChildTable[confCascType1][2], &bachelorTOF))
402+
continue;
403+
404+
CascQAExtra.fill(HIST("hPtXi"), part.pt());
405+
CascQAExtra.fill(HIST("hEtaXi"), part.eta());
406+
CascQAExtra.fill(HIST("hPhiXi"), part.phi());
407+
CascQAExtra.fill(HIST("hMassXiSelected"), part.mLambda());
408+
CascQAExtra.fill(HIST("hInvMpT"), part.pt(), part.mLambda());
409+
}
410+
}
411+
412+
// Cascade extended table loop
413+
for (const auto& casc : fdcascs) {
414+
const auto& part = casc.fdParticle_as<FemtoFullParticles>();
395415

396-
rXiQA.fill(HIST("hPtXi"), part.pt());
397-
rXiQA.fill(HIST("hEtaXi"), part.eta());
398-
rXiQA.fill(HIST("hPhiXi"), part.phi());
399-
rXiQA.fill(HIST("hMassXiSelected"), part.mLambda());
400-
rXiQA.fill(HIST("hDCAV0Daughters"), casc.dcaV0daughters());
401-
rXiQA.fill(HIST("hV0CosPA"), casc.cpav0());
402-
rXiQA.fill(HIST("hV0TranRad"), casc.v0radius());
403-
rXiQA.fill(HIST("hCascCosPA"), casc.cpaCasc());
404-
rXiQA.fill(HIST("hDCACascDaughters"), casc.dcacascdaughters());
405-
rXiQA.fill(HIST("hCascTranRad"), casc.cascradius());
406-
rXiQA.fill(HIST("hDcaPostoPV"), casc.dcapostopv());
407-
rXiQA.fill(HIST("hDcaNegtoPV"), casc.dcanegtopv());
408-
rXiQA.fill(HIST("hDcaBachtoPV"), casc.dcabachtopv());
409-
rXiQA.fill(HIST("hDcaV0toPV"), casc.dcav0topv());
410-
rXiQA.fill(HIST("hInvMpT"), part.pt(), part.mLambda());
416+
const auto& posChildExt = parts.iteratorAt(part.globalIndex() - 3 - parts.begin().globalIndex());
417+
const auto& negChildExt = parts.iteratorAt(part.globalIndex() - 2 - parts.begin().globalIndex());
418+
const auto& bachelorExt = parts.iteratorAt(part.globalIndex() - 1 - parts.begin().globalIndex());
419+
420+
if constexpr (std::experimental::is_detected<hasSigma, typename TableType::iterator>::value) {
421+
float posChildTPCExt, negChildTPCExt, bachelorTPCExt, posChildTOFExt, negChildTOFExt, bachelorTOFExt;
422+
if (!isParticleTPC(posChildExt, CascChildTable[confCascType1][0], &posChildTPCExt) || !isParticleTPC(negChildExt, CascChildTable[confCascType1][1], &negChildTPCExt) || !isParticleTPC(bachelorExt, CascChildTable[confCascType1][2], &bachelorTPCExt))
423+
continue;
424+
425+
if (!isParticleTOF(posChildExt, CascChildTable[confCascType1][0], &posChildTOFExt) || !isParticleTOF(negChildExt, CascChildTable[confCascType1][1], &negChildTOFExt) || !isParticleTOF(bachelorExt, CascChildTable[confCascType1][2], &bachelorTOFExt))
426+
continue;
427+
428+
CascQAExtra.fill(HIST("hDCAV0Daughters"), casc.dcaV0daughters());
429+
CascQAExtra.fill(HIST("hV0CosPA"), casc.cpav0());
430+
CascQAExtra.fill(HIST("hV0TranRad"), casc.v0radius());
431+
CascQAExtra.fill(HIST("hCascCosPA"), casc.cpaCasc());
432+
CascQAExtra.fill(HIST("hDCACascDaughters"), casc.dcacascdaughters());
433+
CascQAExtra.fill(HIST("hCascTranRad"), casc.cascradius());
434+
CascQAExtra.fill(HIST("hDcaPostoPV"), casc.dcapostopv());
435+
CascQAExtra.fill(HIST("hDcaNegtoPV"), casc.dcanegtopv());
436+
CascQAExtra.fill(HIST("hDcaBachtoPV"), casc.dcabachtopv());
437+
CascQAExtra.fill(HIST("hDcaV0toPV"), casc.dcav0topv());
438+
}
411439
}
412440
}
413-
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processCascadeQA, "Enable processing cascades", false);
414-
415-
template <class T>
416-
using hasSigma = decltype(std::declval<T&>().tpcNSigmaStorePr());
417441

418442
/// track - cascade correlations
419443
template <class TableType, typename PartitionType>
@@ -474,7 +498,7 @@ struct femtoUniversePairTaskTrackCascadeExtended {
474498
bachHistos.fillQABase<false, false>(bachelor, HIST("hBachelor"));
475499
cascQAHistos.fillQA<false, false>(part);
476500
}
477-
rXiQA.fill(HIST("hInvMpTmult"), part.pt(), part.mLambda(), multCol);
501+
CascQAExtra.fill(HIST("hInvMpTmult"), part.pt(), part.mLambda(), multCol);
478502
}
479503

480504
for (const auto& part : groupPartsOne) {
@@ -557,6 +581,12 @@ struct femtoUniversePairTaskTrackCascadeExtended {
557581
}
558582
}
559583

584+
void processCascadeQA([[maybe_unused]] const FilteredFDCollision& col, const FemtoFullParticles& parts, const aod::FDCascParticles& fdcascs)
585+
{
586+
doCascadeQA(col, parts, partsTwoFull, fdcascs);
587+
}
588+
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processCascadeQA, "Enable additional QA for cascades", false);
589+
560590
void processSameEvent(const FilteredFDCollision& col, const FemtoFullParticles& parts)
561591
{
562592
doSameEvent(col, parts, partsOneFull, partsTwoFull);

0 commit comments

Comments
 (0)