diff --git a/ALICE3/DataModel/OTFStrangeness.h b/ALICE3/DataModel/OTFStrangeness.h index 395f1ab8681..03f180bb0ff 100644 --- a/ALICE3/DataModel/OTFStrangeness.h +++ b/ALICE3/DataModel/OTFStrangeness.h @@ -37,6 +37,8 @@ DECLARE_SOA_INDEX_COLUMN_FULL(PosTrack, posTrack, int, Tracks, "_Pos"); DECLARE_SOA_INDEX_COLUMN_FULL(NegTrack, negTrack, int, Tracks, "_Neg"); //! DECLARE_SOA_INDEX_COLUMN_FULL(BachTrack, bachTrack, int, Tracks, "_Bach"); //! +DECLARE_SOA_INDEX_COLUMN(McParticle, mcParticle); + // topo vars DECLARE_SOA_COLUMN(DcaV0Daughters, dcaV0Daughters, float); DECLARE_SOA_COLUMN(DcaCascadeDaughters, dcaCascadeDaughters, float); @@ -70,6 +72,9 @@ DECLARE_SOA_TABLE(UpgradeCascades, "AOD", "UPGRADECASCADES", using UpgradeCascade = UpgradeCascades::iterator; +DECLARE_SOA_TABLE(A3CascadeMcLabels, "AOD", "A3CASCADEMCLABELS", + o2::soa::Index<>, otfcascade::McParticleId); + namespace otfv0 { DECLARE_SOA_INDEX_COLUMN(Collision, collision); //! diff --git a/ALICE3/TableProducer/alice3strangenessFinder.cxx b/ALICE3/TableProducer/alice3strangenessFinder.cxx index 3599bc12d97..9b455a72382 100644 --- a/ALICE3/TableProducer/alice3strangenessFinder.cxx +++ b/ALICE3/TableProducer/alice3strangenessFinder.cxx @@ -74,33 +74,23 @@ struct Alice3strangenessFinder { HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; - Produces v0CandidateIndices; // contains V0 candidate indices - Produces v0CandidateCores; // contains V0 candidate core information - Produces tableCascadeCores; - Produces tableCascadeIndices; + Produces v0CandidateIndices; // contains V0 candidate indices + Produces v0CandidateCores; // contains V0 candidate core information + Produces tableStoredCascCores; // contains stored cascade core information + Produces tableA3CascadeMcLabels; // contains cascade core MC labels + Produces tableCascIndices; // contains cascade indices Configurable buildCascade{"buildCascade", false, "build cascade candidates"}; - Configurable nSigmaTOF{"nSigmaTOF", 5.0f, "Nsigma for TOF PID (if enabled)"}; - Configurable dcaXYconstant{"dcaXYconstant", -1.0f, "[0] in |DCAxy| > [0]+[1]/pT"}; - Configurable dcaXYpTdep{"dcaXYpTdep", 0.0, "[1] in |DCAxy| > [0]+[1]/pT"}; ConfigurableAxis axisK0Mass{"axisK0Mass", {200, 0.4f, 0.6f}, "K0 mass axis"}; ConfigurableAxis axisLambdaMass{"axisLambdaMass", {200, 1.101f, 1.131f}, "Lambda mass axis"}; ConfigurableAxis axisXiMass{"axisXiMass", {200, 1.22f, 1.42f}, "Xi mass axis"}; - ConfigurableAxis axisMassOmega{"axisMassOmega", {200, 1.57f, 1.77f}, "Omega mass axis"}; + ConfigurableAxis axisOmegaMass{"axisOmegaMass", {200, 1.57f, 1.77f}, "Omega mass axis"}; ConfigurableAxis axisEta{"axisEta", {80, -4.f, 4.f}, "Eta axis"}; ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0f, 0.025f, 0.05f, 0.075f, 0.1f, 0.125f, 0.15f, 0.175f, 0.2f, 0.225f, 0.25f, 0.275f, 0.3f, 0.325f, 0.35f, 0.375f, 0.4f, 0.425f, 0.45f, 0.475f, 0.5f, 0.525f, 0.55f, 0.575f, 0.6f, 0.625f, 0.65f, 0.675f, 0.7f, 0.725f, 0.75f, 0.775f, 0.8f, 0.82f, 0.85f, 0.875f, 0.9f, 0.925f, 0.95f, 0.975f, 1.0f, 1.05f, 1.1f}, "pt axis for QA histograms"}; - Configurable bachMinConstDCAxy{"bachMinConstDCAxy", -1.0f, "[0] in |DCAxy| > [0]+[1]/pT"}; - Configurable bachMinPtDepDCAxy{"bachMinPtDepDCAxy", 0.0, "[1] in |DCAxy| > [0]+[1]/pT"}; - Configurable bachMinConstDCAz{"bachMinConstDCAz", -1.0f, "[0] in |DCAz| > [0]+[1]/pT"}; - Configurable bachMinPtDepDCAz{"bachMinPtDepDCAz", 0.0, "[1] in |DCAz| > [0]+[1]/pT"}; - - Configurable v0MaxDauDCA{"v0MaxDauDCA", 0.005f, "DCA between v0 daughters (cm)"}; - Configurable cascMaxDauDCA{"cascMaxDauDCA", 0.005f, "DCA between cascade daughters (cm)"}; - // DCA Fitter struct : ConfigurableGroup { std::string prefix = "cfgFitter"; @@ -123,7 +113,23 @@ struct Alice3strangenessFinder { Configurable maxIter{"maxIter", 30, "maximum number of iterations for vertex fitter"}; } cfgFitter; - Configurable acceptedLambdaMassWindow{"acceptedLambdaMassWindow", 0.2f, "accepted Lambda mass window around PDG mass"}; + // Pre-selections + struct : ConfigurableGroup { + std::string prefix = "presel"; + Configurable acceptedLambdaMassWindow{"acceptedLambdaMassWindow", 0.2f, "accepted Lambda mass window around PDG mass"}; + + Configurable posMinConstDCAxy{"posMinConstDCAxy", -1.0f, "[0] in |DCAxy| > [0]+[1]/pT"}; + Configurable posMinPtDepDCAxy{"posMinPtDepDCAxy", 0.0, "[1] in |DCAxy| > [0]+[1]/pT"}; + + Configurable negMinConstDCAxy{"negMinConstDCAxy", -1.0f, "[0] in |DCAxy| > [0]+[1]/pT"}; + Configurable negMinPtDepDCAxy{"negMinPtDepDCAxy", 0.0, "[1] in |DCAxy| > [0]+[1]/pT"}; + + Configurable bachMinConstDCAxy{"bachMinConstDCAxy", -1.0f, "[0] in |DCAxy| > [0]+[1]/pT"}; + Configurable bachMinPtDepDCAxy{"bachMinPtDepDCAxy", 0.0, "[1] in |DCAxy| > [0]+[1]/pT"}; + + Configurable v0MaxDauDCA{"v0MaxDauDCA", 0.005f, "DCA between v0 daughters (cm)"}; + Configurable cascMaxDauDCA{"cascMaxDauDCA", 0.005f, "DCA between cascade daughters (cm)"}; + } presel; // Operation Configurable magneticField{"magneticField", 20.0f, "Magnetic field (in kilogauss)"}; @@ -136,24 +142,22 @@ struct Alice3strangenessFinder { Configurable useOriginalTrackParams{"useOriginalTrackParams", false, "use original track parameters instead of the ones propagated to PCA (effective only if skipFitter is false) and for MC truth info"}; o2::vertexing::DCAFitterN<2> fitter; - o2::vertexing::DCAFitterN<3> fitter3; - Service pdgDB; // partitions for v0/casc dau tracks Partition positiveSecondaryTracksACTS = - aod::track::signed1Pt > 0.0f && nabs(aod::track::dcaXY) > dcaXYconstant + dcaXYpTdep* nabs(aod::track::signed1Pt); + aod::track::signed1Pt > 0.0f && nabs(aod::track::dcaXY) > presel.posMinConstDCAxy + presel.posMinPtDepDCAxy* nabs(aod::track::signed1Pt); Partition negativeSecondaryTracksACTS = - aod::track::signed1Pt < 0.0f && nabs(aod::track::dcaXY) > dcaXYconstant + dcaXYpTdep* nabs(aod::track::signed1Pt); + aod::track::signed1Pt < 0.0f && nabs(aod::track::dcaXY) > presel.negMinConstDCAxy + presel.negMinPtDepDCAxy* nabs(aod::track::signed1Pt); Partition bachelorTracksACTS = - nabs(aod::track::dcaXY) > bachMinConstDCAxy + bachMinPtDepDCAxy* nabs(aod::track::signed1Pt) && nabs(aod::track::dcaZ) > bachMinConstDCAz + bachMinPtDepDCAz* nabs(aod::track::signed1Pt); + nabs(aod::track::dcaXY) > presel.bachMinConstDCAxy + presel.bachMinPtDepDCAxy* nabs(aod::track::signed1Pt); Partition positiveSecondaryTracksOTF = - aod::track::signed1Pt > 0.0f && nabs(aod::track::dcaXY) > dcaXYconstant + dcaXYpTdep* nabs(aod::track::signed1Pt); + aod::track::signed1Pt > 0.0f && nabs(aod::track::dcaXY) > presel.posMinConstDCAxy + presel.posMinPtDepDCAxy* nabs(aod::track::signed1Pt); Partition negativeSecondaryTracksOTF = - aod::track::signed1Pt < 0.0f && nabs(aod::track::dcaXY) > dcaXYconstant + dcaXYpTdep* nabs(aod::track::signed1Pt); + aod::track::signed1Pt < 0.0f && nabs(aod::track::dcaXY) > presel.negMinConstDCAxy + presel.negMinPtDepDCAxy* nabs(aod::track::signed1Pt); Partition bachelorTracksOTF = - nabs(aod::track::dcaXY) > bachMinConstDCAxy + bachMinPtDepDCAxy* nabs(aod::track::signed1Pt) && nabs(aod::track::dcaZ) > bachMinConstDCAz + bachMinPtDepDCAz* nabs(aod::track::signed1Pt); + nabs(aod::track::dcaXY) > presel.bachMinConstDCAxy + presel.bachMinPtDepDCAxy* nabs(aod::track::signed1Pt); Partition positiveMCParticles = aod::mcparticle_alice3::charge > 0.0f; Partition negativeMCParticles = aod::mcparticle_alice3::charge < 0.0f; @@ -172,6 +176,7 @@ struct Alice3strangenessFinder { // Partition secondaryAntiProtons = nabs(aod::upgrade_tof::nSigmaProtonInnerTOF) < nSigmaTOF && nabs(aod::upgrade_tof::nSigmaProtonOuterTOF) < nSigmaTOF && aod::track::signed1Pt < 0.0f && nabs(aod::track::dcaXY) > dcaXYconstant + dcaXYpTdep* nabs(aod::track::signed1Pt); struct Candidate { + int index{-1}; // decay properties float dcaDau{}; float eta{}; @@ -202,7 +207,12 @@ struct Alice3strangenessFinder { fitter.setMaxIter(cfgFitter.maxIter); fitter.setMatCorrType(o2::base::Propagator::MatCorrType::USEMatCorrNONE); - histos.add("hFitterQA", "", kTH1D, {{10, 0, 10}}); // For QA reasons, counting found candidates at different stages + auto hFitterQA = histos.add("hFitterQA", "hFitterQA", kTH1D, {{10, 0, 10}}); + hFitterQA->GetXaxis()->SetBinLabel(1, "All"); // all fitter attempts + hFitterQA->GetXaxis()->SetBinLabel(2, "Processed"); // attempts that made the fitter.process() call + hFitterQA->GetXaxis()->SetBinLabel(3, "Found cands"); // nCand == 0 + hFitterQA->GetXaxis()->SetBinLabel(4, "Done"); // checks isPropagateTracksToVertexDone() + auto hFitterStatusCode = histos.add("hFitterStatusCode", "hFitterStatusCode", kTH1D, {{15, -0.5, 14.5}}); hFitterStatusCode->GetXaxis()->SetBinLabel(1, "None"); // no status set (should not be possible!) @@ -238,6 +248,9 @@ struct Alice3strangenessFinder { histos.add("hRadiusVsHitsNeg", "", kTH2D, {{400, 0, 400}, {12, 0.5, 12.5}}); // radius vs hist for MC studies histos.add("hRadiusVsHitsPos", "", kTH2D, {{400, 0, 400}, {12, 0.5, 12.5}}); // radius vs hist for MC studies + histos.add("hXiMass", "", kTH1D, {axisXiMass}); + histos.add("hOmegaMass", "", kTH1D, {axisOmegaMass}); + auto hV0Building = histos.add("hV0Building", "hV0Building", kTH1D, {{10, 0.5, 10.5}}); hV0Building->GetXaxis()->SetBinLabel(1, "Pair"); hV0Building->GetXaxis()->SetBinLabel(2, "Pdg check"); @@ -246,16 +259,17 @@ struct Alice3strangenessFinder { auto hCascadeBuilding = histos.add("hCascadeBuilding", "hCascadeBuilding", kTH1D, {{10, 0.5, 10.5}}); hCascadeBuilding->GetXaxis()->SetBinLabel(1, "Attempts"); hCascadeBuilding->GetXaxis()->SetBinLabel(2, "La mass window"); - hCascadeBuilding->GetXaxis()->SetBinLabel(3, "DCA Fitter"); + hCascadeBuilding->GetXaxis()->SetBinLabel(3, "Mc check"); + hCascadeBuilding->GetXaxis()->SetBinLabel(4, "DCA Fitter"); if (doprocessGenerated) { - histos.add("hGeneratedK0s", "hGeneratedK0s", kTH2D, {{axisPt}, {axisEta}}); - histos.add("hGeneratedLambda", "hGeneratedLambda", kTH2D, {{axisPt}, {axisEta}}); - histos.add("hGeneratedAntiLambda", "hGeneratedAntiLambda", kTH2D, {{axisPt}, {axisEta}}); - histos.add("hGeneratedXi", "hGeneratedXi", kTH2D, {{axisPt}, {axisEta}}); - histos.add("hGeneratedAntiXi", "hGeneratedAntiXi", kTH2D, {{axisPt}, {axisEta}}); - histos.add("hGeneratedOmega", "hGeneratedOmega", kTH2D, {{axisPt}, {axisEta}}); - histos.add("hGeneratedAntiOmega", "hGeneratedAntiOmega", kTH2D, {{axisPt}, {axisEta}}); + histos.add("Generated/hGeneratedK0s", "hGeneratedK0s", kTH2D, {{axisPt}, {axisEta}}); + histos.add("Generated/hGeneratedLambda", "hGeneratedLambda", kTH2D, {{axisPt}, {axisEta}}); + histos.add("Generated/hGeneratedAntiLambda", "hGeneratedAntiLambda", kTH2D, {{axisPt}, {axisEta}}); + histos.add("Generated/hGeneratedXi", "hGeneratedXi", kTH2D, {{axisPt}, {axisEta}}); + histos.add("Generated/hGeneratedAntiXi", "hGeneratedAntiXi", kTH2D, {{axisPt}, {axisEta}}); + histos.add("Generated/hGeneratedOmega", "hGeneratedOmega", kTH2D, {{axisPt}, {axisEta}}); + histos.add("Generated/hGeneratedAntiOmega", "hGeneratedAntiOmega", kTH2D, {{axisPt}, {axisEta}}); } histos.print(); @@ -287,6 +301,29 @@ struct Alice3strangenessFinder { return returnValue; } + template + bool checkSameMotherExtra(TTrackType const& track1, TTrackType const& track2) + { + bool returnValue = false; + if (track1.has_mcParticle() && track2.has_mcParticle()) { + auto mcParticle1 = track1.template mcParticle_as(); + auto mcParticle2 = track2.template mcParticle_as(); + if (mcParticle1.has_mothers() && mcParticle2.has_mothers()) { + for (const auto& mcParticleMother1 : mcParticle1.template mothers_as()) { + if (mcParticleMother1.has_mothers()) { + for (const auto& mcParticleGrandMother1 : mcParticleMother1.template mothers_as()) { + for (const auto& mcParticleMother2 : mcParticle2.template mothers_as()) { + if (mcParticleGrandMother1.globalIndex() == mcParticleMother2.globalIndex()) { + returnValue = true; + } + } + } + } + } + } + } // end association check + return returnValue; + } template bool buildDecayCandidateTwoBody(TTrackType const& t0, TTrackType const& t1, std::array vtx, Candidate& thisCandidate) { @@ -295,7 +332,6 @@ struct Alice3strangenessFinder { histos.fill(HIST("hPtPosDau"), t0.getPt()); if (!skipFitter) { - histos.fill(HIST("hFitterQA"), 0.5); //}-{}-{}-{}-{}-{}-{}-{}-{}-{} // Move close to minima @@ -396,25 +432,25 @@ struct Alice3strangenessFinder { void processGenerated(aod::McParticles const&) { for (const auto& mcParticle : trueK0s) { - histos.fill(HIST("hGeneratedK0s"), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("Generated/hGeneratedK0s"), mcParticle.pt(), mcParticle.eta()); } for (const auto& mcParticle : trueLambda) { - histos.fill(HIST("hGeneratedLambda"), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("Generated/hGeneratedLambda"), mcParticle.pt(), mcParticle.eta()); } for (const auto& mcParticle : trueAntiLambda) { - histos.fill(HIST("hGeneratedAntiLambda"), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("Generated/hGeneratedAntiLambda"), mcParticle.pt(), mcParticle.eta()); } for (const auto& mcParticle : trueXi) { - histos.fill(HIST("hGeneratedXi"), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("Generated/hGeneratedXi"), mcParticle.pt(), mcParticle.eta()); } for (const auto& mcParticle : trueAntiXi) { - histos.fill(HIST("hGeneratedAntiXi"), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("Generated/hGeneratedAntiXi"), mcParticle.pt(), mcParticle.eta()); } for (const auto& mcParticle : trueOmega) { - histos.fill(HIST("hGeneratedOmega"), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("Generated/hGeneratedOmega"), mcParticle.pt(), mcParticle.eta()); } for (const auto& mcParticle : trueAntiOmega) { - histos.fill(HIST("hGeneratedAntiOmega"), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("Generated/hGeneratedAntiOmega"), mcParticle.pt(), mcParticle.eta()); } } @@ -430,7 +466,6 @@ struct Alice3strangenessFinder { } o2::track::TrackParCov pos = getTrackParCov(posTrack); - for (auto const& negTrack : negTracksGrouped) { if (!negTrack.isReconstructed()) { continue; // no ghost tracks @@ -441,33 +476,35 @@ struct Alice3strangenessFinder { continue; // keep only if same mother } - // ACTS: pdg code attached to track - if constexpr (requires { posTrack.pdgCode(); }) { - if ((posTrack.pdgCode() != kPiPlus && negTrack.pdgCode() != kPiMinus) && isK0Gun) { - continue; - } - if ((posTrack.pdgCode() != kProton && negTrack.pdgCode() != kPiMinus) && isLambdaGun) { - continue; + if (isK0Gun || isLambdaGun) { + // ACTS: pdg code attached to track + if constexpr (requires { posTrack.pdgCode(); }) { + if ((posTrack.pdgCode() != kPiPlus && negTrack.pdgCode() != kPiMinus) && isK0Gun) { + continue; + } + if ((posTrack.pdgCode() != kProton && negTrack.pdgCode() != kPiMinus) && isLambdaGun) { + continue; + } + } else { + // OTF: pdg code from mcParticle table + if (!posTrack.has_mcParticle() && !negTrack.has_mcParticle()) { + continue; + } + auto mcParticlePos = posTrack.template mcParticle_as(); + auto mcParticleNeg = negTrack.template mcParticle_as(); + if ((mcParticlePos.pdgCode() != kPiPlus && mcParticleNeg.pdgCode() != kPiMinus) && isK0Gun) { + continue; + } + if ((mcParticlePos.pdgCode() != kProton && mcParticleNeg.pdgCode() != kPiMinus) && isLambdaGun) { + continue; + } } } - // OTF: pdg code from mcParticle table - if (!posTrack.has_mcParticle() && !negTrack.has_mcParticle()) { - continue; - } - auto mcParticlePos = posTrack.template mcParticle_as(); - auto mcParticleNeg = negTrack.template mcParticle_as(); - if ((mcParticlePos.pdgCode() != kPiPlus && mcParticleNeg.pdgCode() != kPiMinus) && isK0Gun) { - continue; - } - if ((mcParticlePos.pdgCode() != kProton && mcParticleNeg.pdgCode() != kPiMinus) && isLambdaGun) { - continue; - } - + Candidate v0Cand; histos.fill(HIST("hV0Building"), 2.0); o2::track::TrackParCov neg = getTrackParCov(negTrack); - Candidate v0cand; - if (!buildDecayCandidateTwoBody(pos, neg, vtx, v0cand)) { + if (!buildDecayCandidateTwoBody(pos, neg, vtx, v0Cand)) { continue; // failed at building candidate } @@ -490,27 +527,26 @@ struct Alice3strangenessFinder { negTrack.globalIndex(), -1); - v0CandidateCores(v0cand.posSV[0], v0cand.posSV[1], v0cand.posSV[2], - v0cand.pDau0[0], v0cand.pDau0[1], v0cand.pDau0[2], - v0cand.pDau1[0], v0cand.pDau1[1], v0cand.pDau1[2], - v0cand.dcaDau, posTrack.dcaXY(), negTrack.dcaXY(), - v0cand.cosPA, v0cand.dcaToPV); + v0CandidateCores(v0Cand.posSV[0], v0Cand.posSV[1], v0Cand.posSV[2], + v0Cand.pDau0[0], v0Cand.pDau0[1], v0Cand.pDau0[2], + v0Cand.pDau1[0], v0Cand.pDau1[1], v0Cand.pDau1[2], + v0Cand.dcaDau, posTrack.dcaXY(), negTrack.dcaXY(), + v0Cand.cosPA, v0Cand.dcaToPV); - o2::track::TrackParCov v0(v0cand.posSV, v0cand.p, v0cand.parentTrackCovMatrix, 0); - const float lambdaMassHypothesis = RecoDecay::m(std::array{std::array{v0cand.pDau0[0], v0cand.pDau0[1], v0cand.pDau0[2]}, - std::array{v0cand.pDau1[0], v0cand.pDau1[1], v0cand.pDau1[2]}}, + const float lambdaMassHypothesis = RecoDecay::m(std::array{std::array{v0Cand.pDau0[0], v0Cand.pDau0[1], v0Cand.pDau0[2]}, + std::array{v0Cand.pDau1[0], v0Cand.pDau1[1], v0Cand.pDau1[2]}}, std::array{o2::constants::physics::MassProton, o2::constants::physics::MassPionCharged}); - const float antiLambdaMassHypothesis = RecoDecay::m(std::array{std::array{v0cand.pDau0[0], v0cand.pDau0[1], v0cand.pDau0[2]}, - std::array{v0cand.pDau1[0], v0cand.pDau1[1], v0cand.pDau1[2]}}, + const float antiLambdaMassHypothesis = RecoDecay::m(std::array{std::array{v0Cand.pDau0[0], v0Cand.pDau0[1], v0Cand.pDau0[2]}, + std::array{v0Cand.pDau1[0], v0Cand.pDau1[1], v0Cand.pDau1[2]}}, std::array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassProton}); if (!buildCascade) { continue; // not building cascades, so skip the rest } - const bool inLambdaMassWindow = std::abs(lambdaMassHypothesis - o2::constants::physics::MassLambda0) < acceptedLambdaMassWindow; - const bool inAntiLambdaMassWindow = std::abs(antiLambdaMassHypothesis - o2::constants::physics::MassLambda0) < acceptedLambdaMassWindow; + const bool inLambdaMassWindow = std::abs(lambdaMassHypothesis - o2::constants::physics::MassLambda0) < presel.acceptedLambdaMassWindow; + const bool inAntiLambdaMassWindow = std::abs(antiLambdaMassHypothesis - o2::constants::physics::MassLambda0) < presel.acceptedLambdaMassWindow; if (!inLambdaMassWindow && !inAntiLambdaMassWindow) { continue; // Likely not a lambda, should not be considered for cascade building } @@ -530,15 +566,24 @@ struct Alice3strangenessFinder { } histos.fill(HIST("hCascadeBuilding"), 2.0); + Candidate cascCand; + if (mcSameMotherCheck) { + if ((!checkSameMotherExtra(posTrack, bachTrack) || !checkSameMotherExtra(negTrack, bachTrack))) { + continue; + } - // TODO mc same mother check + if (bachTrack.has_mcParticle()) { + auto bachParticle = bachTrack.template mcParticle_as(); + cascCand.index = bachParticle.mothersIds().front(); + } + } - Candidate cascCand; + histos.fill(HIST("hCascadeBuilding"), 3.0); o2::track::TrackParCov bach = getTrackParCov(bachTrack); + o2::track::TrackParCov v0(v0Cand.posSV, v0Cand.p, v0Cand.parentTrackCovMatrix, 0); if (!buildDecayCandidateTwoBody(v0, bach, vtx, cascCand)) { continue; // failed at building candidate } - histos.fill(HIST("hCascadeBuilding"), 3.0); const float massXi = RecoDecay::m(std::array{std::array{cascCand.pDau0[0], cascCand.pDau0[1], cascCand.pDau0[2]}, std::array{cascCand.pDau1[0], cascCand.pDau1[1], cascCand.pDau1[2]}}, @@ -560,22 +605,28 @@ struct Alice3strangenessFinder { bachTrack.px(), bachTrack.py(), bachTrack.pz(), vtx[0], vtx[1], vtx[2]); - tableCascadeIndices(0, // cascade index, dummy value - posTrack.globalIndex(), - negTrack.globalIndex(), - bachTrack.globalIndex(), - collision.globalIndex()); - - tableCascadeCores(bachTrack.sign(), massXi, massOm, - cascCand.posSV[0], cascCand.posSV[1], cascCand.posSV[2], - v0cand.posSV[0], v0cand.posSV[1], v0cand.posSV[2], - v0cand.pDau0[0], v0cand.pDau0[1], v0cand.pDau0[2], - v0cand.pDau1[0], v0cand.pDau1[1], v0cand.pDau1[2], - cascCand.pDau1[0], cascCand.pDau1[1], cascCand.pDau1[2], - cascCand.p[0], cascCand.p[1], cascCand.p[2], - v0cand.dcaDau, cascCand.dcaDau, - dcaPosToPV, dcaNegToPV, dcaBachToPV, - cascCand.dcaToPV, cascCand.dcaToPV); + histos.fill(HIST("hCascadeBuilding"), 4.0); + histos.fill(HIST("hXiMass"), massXi); + histos.fill(HIST("hOmegaMass"), massOm); + + tableA3CascadeMcLabels(cascCand.index); + tableCascIndices(0, // cascade index, dummy value + posTrack.globalIndex(), + negTrack.globalIndex(), + bachTrack.globalIndex(), + collision.globalIndex()); + + tableStoredCascCores(bachTrack.sign(), massXi, massOm, + cascCand.posSV[0], cascCand.posSV[1], cascCand.posSV[2], + v0Cand.posSV[0], v0Cand.posSV[1], v0Cand.posSV[2], + v0Cand.pDau0[0], v0Cand.pDau0[1], v0Cand.pDau0[2], + v0Cand.pDau1[0], v0Cand.pDau1[1], v0Cand.pDau1[2], + cascCand.pDau1[0], cascCand.pDau1[1], cascCand.pDau1[2], + cascCand.p[0], cascCand.p[1], cascCand.p[2], + v0Cand.dcaDau, cascCand.dcaDau, + dcaPosToPV, dcaNegToPV, dcaBachToPV, + cascCand.dcaToPV, cascCand.dcaToPV); // FIXME + } // end bachTrack } // end negTrack } // end posTrack diff --git a/ALICE3/Tasks/alice3Strangeness.cxx b/ALICE3/Tasks/alice3Strangeness.cxx index 499624cd6bf..c2876300161 100644 --- a/ALICE3/Tasks/alice3Strangeness.cxx +++ b/ALICE3/Tasks/alice3Strangeness.cxx @@ -51,7 +51,7 @@ using namespace o2::constants::math; using Alice3Tracks = soa::Join; using FullV0Candidates = soa::Join; -using FullCascadeCandidates = soa::Join; +using FullCascadeCandidates = soa::Join; using FullCollisions = soa::Join; struct Alice3Strangeness { @@ -66,15 +66,17 @@ struct Alice3Strangeness { ConfigurableAxis axisOmegaMass{"axisOmegaMass", {200, 1.57f, 1.77f}, ""}; ConfigurableAxis axisVertexZ{"axisVertexZ", {40, -20, 20}, "vertex Z (cm)"}; ConfigurableAxis axisDCA{"axisDCA", {200, 0, 5}, "DCA (cm)"}; - ConfigurableAxis axisV0Radius{"axisV0Radius", {50, 0.0, 100}, "V0 radius (cm)"}; + ConfigurableAxis axisRadius{"axisRadius", {50, 0.0, 100}, "V0 radius (cm)"}; ConfigurableAxis axisDCAV0Daughters{"axisDCAV0Daughters", {20, 0, 5}, "DCA V0 daughters"}; ConfigurableAxis axisPointingAngle{"axisPointingAngle", {40, 0.0f, 0.4f}, "pointing angle "}; + ConfigurableAxis axisCosPA{"axisCosPA", {100, 0.91f, 1.01f}, "cos(pointing angle) "}; ConfigurableAxis axisProperLifeTime{"axisProperLifeTime", {100, 0.0f, 100.0f}, "proper lifetime (cm)"}; + ConfigurableAxis axisNormalizedDecayLength{"axisNormalizedDecayLength", {100, 0.0f, 20}, "Normalized decay length"}; ConfigurableAxis axisEta{"axisEta", {100, -5.0f, 5.0f}, "eta"}; } histAxes; struct : ConfigurableGroup { - std::string prefix = "selectionFlags"; + std::string prefix = "v0SelectionFlags"; Configurable applyRapiditySelection{"applyRapiditySelection", true, "apply rapidity selection"}; Configurable applyDCAdaughterSelection{"applyDCAdaughterSelection", true, "apply DCA daughter selection"}; Configurable applyCosOfPAngleSelection{"applyCosOfPAngleSelection", true, "apply cosine of pointing angle selection"}; @@ -86,10 +88,10 @@ struct Alice3Strangeness { Configurable applyEtaDaughterSelection{"applyEtaDaughterSelection", true, "apply eta daughter selection"}; Configurable doQAforSelectionVariables{"doQAforSelectionVariables", false, "enable QA plots"}; Configurable analyseOnlyTrueV0s{"analyseOnlyTrueV0s", false, "analyse only true V0s from MC"}; - } selectionFlags; + } v0SelectionFlags; struct : ConfigurableGroup { - std::string prefix = "selectionValues"; + std::string prefix = "v0SelectionValues"; Configurable yK0Selection{"yK0Selection", 0.5f, "rapidity selection for K0"}; Configurable yLambdaSelection{"yLambdaSelection", 0.5f, "rapidity selection for Lambda"}; Configurable dcaDaughterSelection{"dcaDaughterSelection", 1.0f, "DCA daughter selection"}; @@ -104,9 +106,54 @@ struct Alice3Strangeness { Configurable etaDaughterSelection{"etaDaughterSelection", 0.8f, "eta daughter selection"}; Configurable acceptedLambdaMassWindow{"acceptedLambdaMassWindow", 0.2f, "accepted Lambda mass window around PDG mass"}; Configurable acceptedK0MassWindow{"acceptedK0MassWindow", 0.3f, "accepted K0 mass window around PDG mass"}; - Configurable acceptedXiMassWindow{"acceptedXiMassWindow", 0.5f, "accepted Xi mass window around PDG mass"}; - Configurable acceptedOmegaMassWindow{"acceptedOmegaMassWindow", 0.5f, "accepted Omega mass window around PDG mass"}; - } selectionValues; + } v0SelectionValues; + + struct : ConfigurableGroup { + std::string prefix = "cascadeSelectionValues"; + Configurable posMinConstDCAxy{"posMinConstDCAxy", 0.5f, "[0] in |DCAxy| > [0]+[1]/pT"}; + Configurable posMinPtDepDCAxy{"posMinPtDepDCAxy", 0.f, "[1] in |DCAxy| > [0]+[1]/pT"}; + Configurable posMinConstDCAz{"posMinConstDCAz", -1.f, "[1] in |DCAz| > [0]+[1]/pT"}; + Configurable posMinPtDepDCAz{"posMinPtDepDCAz", 0.f, "[0] in |DCAz| > [0]+[1]/pT"}; + Configurable negMinConstDCAxy{"negMinConstDCAxy", 0.5f, "[0] in |DCAxy| > [0]+[1]/pT"}; + Configurable negMinPtDepDCAxy{"negMinPtDepDCAxy", 0.f, "[1] in |DCAxy| > [0]+[1]/pT"}; + Configurable negMinConstDCAz{"negMinConstDCAz", -1.f, "[1] in |DCAz| > [0]+[1]/pT"}; + Configurable negMinPtDepDCAz{"negMinPtDepDCAz", 0.f, "[0] in |DCAz| > [0]+[1]/pT"}; + Configurable bachMinConstDCAxy{"bachMinConstDCAxy", 0.5f, "[0] in |DCAxy| > [0]+[1]/pT"}; + Configurable bachMinPtDepDCAxy{"bachMinPtDepDCAxy", 0.f, "[1] in |DCAxy| > [0]+[1]/pT"}; + Configurable bachMinConstDCAz{"bachMinConstDCAz", -1.f, "[1] in |DCAz| > [0]+[1]/pT"}; + Configurable bachMinPtDepDCAz{"bachMinPtDepDCAz", 0.f, "[0] in |DCAz| > [0]+[1]/pT"}; + Configurable laMaxDauDCA{"laMaxDauDCA", 0.5f, "DCA (cm) between lambda daughters"}; + Configurable laMinDecayRadius{"laMinDecayRadius", 0.5f, "Minimum lambda radius"}; + Configurable laMassWindow{"laMassWindow", 0.5f, "accepted la mass window around PDG mass"}; + Configurable laMinCosPA{"laMinCosPA", 0.98, "Min Lambda CosPA"}; + Configurable cascMaxDauDCA{"cascMaxDauDCA", 0.5f, "DCA (cm) between cascade daughters"}; + Configurable cascMaxNormalizedDecayLength{"cascMaxNormalizedDecayLength", 3, "Max cascade nomralized decay length (ctau/)"}; + Configurable cascMinCosPA{"cascMinCosPA", 0.98, "Minimum cascade CosPA"}; + Configurable cascMinDecayRadius{"cascMinDecayRadius", 0.5f, "Minimum cascade decay radius"}; + Configurable cascMassWindow{"cascMassWindow", 0.5f, "accepted cascade mass window around PDG mass"}; + Configurable competingMassRejection{"competingMassRejection", 0.5f, "competing mass rejection"}; + } cascadeSelectionValues; + + struct : ConfigurableGroup { + std::string prefix = "cascadeFlags"; + Configurable analyseCascade{"analyseCascade", 0, "0: Xi, 1: AntiXi, 2: Omega, 3: AntiOmega"}; + Configurable analyseOnlyTrueCascades{"analyseOnlyTrueCascades", false, "analyse only true cascades from MC"}; + Configurable posDCAxy{"posDCAxy", true, "enable posDCAxy selection"}; + Configurable posDCAz{"posDCAz", false, "enable posDCAz selection"}; + Configurable negDCAxy{"negDCAxy", true, "enable negDCAxy selection"}; + Configurable negDCAz{"negDCAz", false, "enable negDCAz selection"}; + Configurable bachDCAxy{"bachDCAxy", true, "enable bachDCAxy selection"}; + Configurable bachDCAz{"bachDCAz", false, "enable bachDCAz selection"}; + Configurable laMaxDauDCA{"laMaxDauDCA", true, "enable laMaxDauDCA selection"}; + Configurable laMinDecayRadius{"laMinDecayRadius", true, "enable laMinDecayRadius selection"}; + Configurable laMassWindow{"laMassWindow", true, "enable laMassWindow selection"}; + Configurable laMinCosPA{"laMinCosPA", true, "enable laMinCosPA selection"}; + Configurable cascMaxDauDCA{"cascMaxDauDCA", true, "enable cascMaxDauDCA selection"}; + Configurable cascMinDecayRadius{"cascMinDecayRadius", true, "enable cascMinDecayRadius selection"}; + Configurable cascMaxNormalizedDecayLength{"cascMaxNormalizedDecayLength", true, "enable cascMaxNormalizedDecayLength selection"}; + Configurable cascMinCosPA{"cascMinCosPA", true, "enable cascMinCosPA selection"}; + Configurable competingMassRejection{"competingMassRejection", false, "enable competingMassRejection selection"}; + } cascadeFlags; uint16_t appliedSelectionCheckMask; double selectionCheck; @@ -114,6 +161,41 @@ struct Alice3Strangeness { const int posDaugDCAselIDx = 3; static constexpr std::string_view KSelectionNames[] = {"DCAV0Daughters", "PointingAngle", "DCAtoPVNegDaughter", "DCAtoPVPosDaughter", "V0Radius", "ProperLifeTime"}; + static constexpr float ToMicrons = 1e+4f; + static constexpr float CtauXi = 4.91f; + static constexpr float CtauOmega = 2.461f; + + struct Cascade { + enum Type { Xi = 0, + AntiXi, + Omega, + AntiOmega }; + Type type{}; + + float pdgMass{}, pdgCompetingMass{}, ctau{}; + int sign{}, pdgCode{}; + + void setCascadeType(Type newType) + { + type = newType; + if (type == Xi || type == AntiXi) { + ctau = CtauXi; + pdgMass = o2::constants::physics::MassXiMinus; + pdgCompetingMass = o2::constants::physics::MassOmegaMinus; + pdgCode = (type == Xi) ? PDG_t::kXiMinus : kXiPlusBar; + sign = (type == Xi) ? -1 : 1; + } + + if (type == Omega || type == AntiOmega) { + ctau = CtauOmega; + pdgMass = o2::constants::physics::MassOmegaMinus; + pdgCompetingMass = o2::constants::physics::MassXiMinus; + pdgCode = (type == Omega) ? PDG_t::kOmegaMinus : kOmegaPlusBar; + sign = (type == Omega) ? -1 : 1; + } + } + } analysedCascade; + void init(InitContext&) { histos.add("K0/hMassAllCandidates", "", kTH2D, {histAxes.axisK0Mass, histAxes.axisPt}); @@ -135,35 +217,77 @@ struct Alice3Strangeness { histos.add("reconstructedCandidates/hArmeterosAfterAllSelections", "hArmeterosAfterAllSelections", kTH2D, {{100, -1.0f, 1.0f}, {200, 0.0f, 0.5f}}); if (doprocessFoundCascadeCandidates) { - histos.add("reconstructedCandidates/Xi/hMassAllCandidates", "hMassAllCandidates", kTH1D, {histAxes.axisXiMass}); - histos.add("reconstructedCandidates/Xi/hMassSelected", "hMassSelected", kTH1D, {histAxes.axisXiMass}); - histos.add("reconstructedCandidates/Omega/hMassAllCandidates", "hMassAllCandidates", kTH1D, {histAxes.axisOmegaMass}); - histos.add("reconstructedCandidates/Omega/hMassSelected", "hMassSelected", kTH1D, {histAxes.axisOmegaMass}); - - histos.addClone("reconstructedCandidates/Xi/", "reconstructedCandidates/AntiXi/"); - histos.addClone("reconstructedCandidates/Omega/", "reconstructedCandidates/AntiOmega/"); + analysedCascade.setCascadeType(static_cast(cascadeFlags.analyseCascade.value)); + histos.add("reconstructedCandidates/Cascade/hMassAllXiCandidates", "hMassAllXiCandidates", kTH1D, {histAxes.axisXiMass}); + histos.add("reconstructedCandidates/Cascade/hMassAllAntiXiCandidates", "hMassAllAntiXiCandidates", kTH1D, {histAxes.axisXiMass}); + histos.add("reconstructedCandidates/Cascade/hMassAllOmegaCandidates", "hMassAllOmegaCandidates", kTH1D, {histAxes.axisOmegaMass}); + histos.add("reconstructedCandidates/Cascade/hMassAllAntiOmegaCandidates", "hMassAllAntiOmegaCandidates", kTH1D, {histAxes.axisOmegaMass}); + + histos.add("reconstructedCandidates/Cascade/hMassSelectedXiCandidates", "hMassSelectedXiCandidates", kTH1D, {histAxes.axisXiMass}); + histos.add("reconstructedCandidates/Cascade/hMassSelectedAntiXiCandidates", "hMassSelectedAntiXiCandidates", kTH1D, {histAxes.axisXiMass}); + histos.add("reconstructedCandidates/Cascade/hMassSelectedOmegaCandidates", "hMassSelectedOmegaCandidates", kTH1D, {histAxes.axisOmegaMass}); + histos.add("reconstructedCandidates/Cascade/hMassSelectedAntiOmegaCandidates", "hMassSelectedAntiOmegaCandidates", kTH1D, {histAxes.axisOmegaMass}); + + histos.add("reconstructedCandidates/Cascade/h3dXiCandidates", "h3dXiCandidates", kTH3D, {histAxes.axisPt, histAxes.axisEta, histAxes.axisXiMass}); + histos.add("reconstructedCandidates/Cascade/h3dAntiXiCandidates", "h3dAntiXiCandidates", kTH3D, {histAxes.axisPt, histAxes.axisEta, histAxes.axisXiMass}); + histos.add("reconstructedCandidates/Cascade/h3dOmegaCandidates", "h3dOmegaCandidates", kTH3D, {histAxes.axisPt, histAxes.axisEta, histAxes.axisOmegaMass}); + histos.add("reconstructedCandidates/Cascade/h3dAntiOmegaCandidates", "h3dAntiOmegaCandidates", kTH3D, {histAxes.axisPt, histAxes.axisEta, histAxes.axisOmegaMass}); + + histos.add("reconstructedCandidates/Cascade/hSelectionQa", "hSelectionQa", kTH1D, {{20, 0.5, 20.5}}); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(1, "all candidates"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(2, "pos dcaXY"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(3, "neg dcaXY"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(4, "bach dcaXY"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(5, "pos dcaZ"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(6, "neg dcaZ"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(7, "bach dcaZ"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(8, "la dau dca"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(9, "la decay radius"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(10, "la mass window"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(11, "la cosPA"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(12, "casc dau dca"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(13, "casc norm decay length"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(14, "casc decay radius"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(15, "casc cosPA"); + histos.get(HIST("reconstructedCandidates/Cascade/hSelectionQa"))->GetXaxis()->SetBinLabel(16, "competing mass"); + + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hPosDCAxy", "hPosDCAxy", kTH1D, {histAxes.axisDCA}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hNegDCAxy", "hNegDCAxy", kTH1D, {histAxes.axisDCA}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hBachDCAxy", "hBachDCAxy", kTH1D, {histAxes.axisDCA}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hPosDCAz", "hPosDCAz", kTH1D, {histAxes.axisDCA}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hNegDCAz", "hNegDCAz", kTH1D, {histAxes.axisDCA}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hBachDCAz", "hBachDCAz", kTH1D, {histAxes.axisDCA}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hLaDauDCA", "hLaDauDCA", kTH1D, {histAxes.axisDCA}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hLaDecayRadius", "hLaDecayRadius", kTH1D, {histAxes.axisRadius}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hLaMassWindow", "hLaMassWindow", kTH1D, {histAxes.axisLambdaMass}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hLaCosPA", "hLaCosPA", kTH1D, {histAxes.axisCosPA}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hCascDauDCA", "hCascDauDCA", kTH1D, {histAxes.axisDCA}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hCascDecayLength", "hCascDecayLength", kTH1D, {histAxes.axisNormalizedDecayLength}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hCascDecayRadius", "hCascDecayRadius", kTH1D, {histAxes.axisRadius}); + histos.add("reconstructedCandidates/Cascade/BeforeSelection/hCascCosPA", "hCascCosPA", kTH1D, {histAxes.axisCosPA}); + histos.addClone("reconstructedCandidates/Cascade/BeforeSelection/", "reconstructedCandidates/Cascade/AfterSelection/"); } - if (selectionFlags.doQAforSelectionVariables) { - if (!selectionFlags.applyDCADaughtersToPVSelection) { + if (v0SelectionFlags.doQAforSelectionVariables) { + if (!v0SelectionFlags.applyDCADaughtersToPVSelection) { histos.add("reconstructedCandidates/K0/hDCAtoPVNegDaughter", "hDCAtoPVNegDaughter", kTH3D, {histAxes.axisK0Mass, histAxes.axisPt, histAxes.axisDCA}); histos.add("reconstructedCandidates/K0/hDCAtoPVPosDaughter", "hDCAtoPVPosDaughter", kTH3D, {histAxes.axisK0Mass, histAxes.axisPt, histAxes.axisDCA}); histos.add("reconstructedCandidates/Lambda/hDCAtoPVNegDaughter", "hDCAtoPVNegDaughter", kTH3D, {histAxes.axisLambdaMass, histAxes.axisPt, histAxes.axisDCA}); histos.add("reconstructedCandidates/Lambda/hDCAtoPVPosDaughter", "hDCAtoPVPosDaughter", kTH3D, {histAxes.axisLambdaMass, histAxes.axisPt, histAxes.axisDCA}); } - if (!selectionFlags.applyV0RadiusSelection) { - histos.add("reconstructedCandidates/K0/hV0Radius", "hV0Radius", kTH3D, {histAxes.axisK0Mass, histAxes.axisPt, histAxes.axisV0Radius}); - histos.add("reconstructedCandidates/Lambda/hV0Radius", "hV0Radius", kTH3D, {histAxes.axisLambdaMass, histAxes.axisPt, histAxes.axisV0Radius}); + if (!v0SelectionFlags.applyV0RadiusSelection) { + histos.add("reconstructedCandidates/K0/hV0Radius", "hV0Radius", kTH3D, {histAxes.axisK0Mass, histAxes.axisPt, histAxes.axisRadius}); + histos.add("reconstructedCandidates/Lambda/hV0Radius", "hV0Radius", kTH3D, {histAxes.axisLambdaMass, histAxes.axisPt, histAxes.axisRadius}); } - if (!selectionFlags.applyDCAdaughterSelection) { + if (!v0SelectionFlags.applyDCAdaughterSelection) { histos.add("reconstructedCandidates/K0/hDCAV0Daughters", "hDCAV0Daughters", kTH3D, {histAxes.axisK0Mass, histAxes.axisPt, histAxes.axisDCAV0Daughters}); histos.add("reconstructedCandidates/Lambda/hDCAV0Daughters", "hDCAV0Daughters", kTH3D, {histAxes.axisLambdaMass, histAxes.axisPt, histAxes.axisDCAV0Daughters}); } - if (!selectionFlags.applyCosOfPAngleSelection) { + if (!v0SelectionFlags.applyCosOfPAngleSelection) { histos.add("reconstructedCandidates/K0/hPointingAngle", "hPointingAngle", kTH3D, {histAxes.axisK0Mass, histAxes.axisPt, histAxes.axisPointingAngle}); histos.add("reconstructedCandidates/Lambda/hPointingAngle", "hPointingAngle", kTH3D, {histAxes.axisLambdaMass, histAxes.axisPt, histAxes.axisPointingAngle}); } - if (!selectionFlags.applyLifetimeSelection) { + if (!v0SelectionFlags.applyLifetimeSelection) { histos.add("reconstructedCandidates/K0/hProperLifeTime", "hProperLifeTime", kTH3D, {histAxes.axisK0Mass, histAxes.axisPt, histAxes.axisProperLifeTime}); histos.add("reconstructedCandidates/Lambda/hProperLifeTime", "hProperLifeTime", kTH3D, {histAxes.axisLambdaMass, histAxes.axisPt, histAxes.axisProperLifeTime}); } @@ -171,19 +295,25 @@ struct Alice3Strangeness { histos.addClone("reconstructedCandidates/Lambda/", "reconstructedCandidates/AntiLambda/"); appliedSelectionCheckMask = 0; - if (!selectionFlags.applyDCAdaughterSelection) + if (!v0SelectionFlags.applyDCAdaughterSelection) { SETBIT(appliedSelectionCheckMask, 0); - if (!selectionFlags.applyCosOfPAngleSelection) + } + if (!v0SelectionFlags.applyCosOfPAngleSelection) { SETBIT(appliedSelectionCheckMask, 1); - if (!selectionFlags.applyDCADaughtersToPVSelection) { + } + if (!v0SelectionFlags.applyDCADaughtersToPVSelection) { SETBIT(appliedSelectionCheckMask, 2); SETBIT(appliedSelectionCheckMask, 3); } - if (!selectionFlags.applyV0RadiusSelection) + if (!v0SelectionFlags.applyV0RadiusSelection) { SETBIT(appliedSelectionCheckMask, 4); - if (!selectionFlags.applyLifetimeSelection) + } + if (!v0SelectionFlags.applyLifetimeSelection) { SETBIT(appliedSelectionCheckMask, 5); + } + histos.print(); } + void processAllFindableCandidates(aod::Collisions const& collisions, aod::McCollisions const&, aod::UpgradeV0s const& v0Recos, aod::UpgradeCascades const& cascRecos, Alice3Tracks const&) { for (const auto& collision : collisions) { @@ -193,8 +323,8 @@ struct Alice3Strangeness { } for (const auto& v0Cand : v0Recos) { - auto negV0Daughter = v0Cand.negTrack_as(); // de-reference neg track - auto posV0Daughter = v0Cand.posTrack_as(); // de-reference pos track + auto negV0Daughter = v0Cand.negTrack_as(); // de-reference negative track + auto posV0Daughter = v0Cand.posTrack_as(); // de-reference positive track bool isK0 = v0Cand.mK0() > 0; if (isK0) { @@ -202,19 +332,19 @@ struct Alice3Strangeness { histos.fill(HIST("K0/hSelections"), 0); // all candidates histos.fill(HIST("K0/hDCANegDaughter"), negV0Daughter.dcaXY()); histos.fill(HIST("K0/hDCAPosDaughter"), posV0Daughter.dcaXY()); - if (std::abs(negV0Daughter.dcaXY()) < selectionValues.dcaDaughtersToPVSelection) + if (std::abs(negV0Daughter.dcaXY()) < v0SelectionValues.dcaDaughtersToPVSelection) continue; histos.fill(HIST("K0/hSelections"), 1); // dcaXY cut - if (std::abs(posV0Daughter.dcaXY()) < selectionValues.dcaDaughtersToPVSelection) + if (std::abs(posV0Daughter.dcaXY()) < v0SelectionValues.dcaDaughtersToPVSelection) continue; histos.fill(HIST("K0/hSelections"), 2); // dcaXY cut - if (v0Cand.dcaV0Daughters() > selectionValues.dcaDaughterSelection) + if (v0Cand.dcaV0Daughters() > v0SelectionValues.dcaDaughterSelection) continue; histos.fill(HIST("K0/hSelections"), 3); // dca between daughters - if (v0Cand.v0Radius() < selectionValues.v0RadiusSelection) + if (v0Cand.v0Radius() < v0SelectionValues.v0RadiusSelection) continue; histos.fill(HIST("K0/hSelections"), 4); // radius cut - if (std::abs(negV0Daughter.eta()) > selectionValues.etaDaughterSelection || std::abs(posV0Daughter.eta()) > selectionValues.etaDaughterSelection) + if (std::abs(negV0Daughter.eta()) > v0SelectionValues.etaDaughterSelection || std::abs(posV0Daughter.eta()) > v0SelectionValues.etaDaughterSelection) continue; histos.fill(HIST("K0/hSelections"), 5); // eta cut histos.fill(HIST("K0/hMassSelected"), v0Cand.mK0(), v0Cand.pt()); @@ -222,9 +352,9 @@ struct Alice3Strangeness { } for (const auto& cascCand : cascRecos) { - // auto bach = cascCand.bachTrack_as(); // de-reference bach track - // auto neg = cascCand.negTrack_as(); // de-reference neg track - // auto pos = cascCand.posTrack_as(); // de-reference pos track + // auto bachelor = cascCand.bachTrack_as(); // de-reference bachelor track + // auto negative = cascCand.negTrack_as(); // de-reference negative track + // auto positive = cascCand.posTrack_as(); // de-reference positive track // Only XiMinus in the tracker for now histos.fill(HIST("Xi/hMassAllCandidates"), cascCand.mXi()); @@ -241,71 +371,71 @@ struct Alice3Strangeness { float collisionZ = collision.posZ(); histos.fill(HIST("hPVz"), collisionZ); for (auto const& v0 : v0Candidates) { - bool isK0 = std::abs(v0.mK0Short() - o2::constants::physics::MassK0Short) < selectionValues.acceptedK0MassWindow; - bool isLambda = std::abs(v0.mLambda() - o2::constants::physics::MassLambda0) < selectionValues.acceptedLambdaMassWindow; - bool isAntiLambda = std::abs(v0.mAntiLambda() - o2::constants::physics::MassLambda0) < selectionValues.acceptedLambdaMassWindow; + bool isK0 = std::abs(v0.mK0Short() - o2::constants::physics::MassK0Short) < v0SelectionValues.acceptedK0MassWindow; + bool isLambda = std::abs(v0.mLambda() - o2::constants::physics::MassLambda0) < v0SelectionValues.acceptedLambdaMassWindow; + bool isAntiLambda = std::abs(v0.mAntiLambda() - o2::constants::physics::MassLambda0) < v0SelectionValues.acceptedLambdaMassWindow; histos.fill(HIST("reconstructedCandidates/hArmeterosBeforeAllSelections"), v0.alpha(), v0.qtArm()); histos.fill(HIST("hV0CandidateCounter"), 0.5); - if (selectionFlags.applyRapiditySelection) { - if (isK0 && std::abs(v0.yK0Short()) > selectionValues.yK0Selection) + if (v0SelectionFlags.applyRapiditySelection) { + if (isK0 && std::abs(v0.yK0Short()) > v0SelectionValues.yK0Selection) continue; - if ((isLambda || isAntiLambda) && std::abs(v0.yLambda()) > selectionValues.yLambdaSelection) + if ((isLambda || isAntiLambda) && std::abs(v0.yLambda()) > v0SelectionValues.yLambdaSelection) continue; } histos.fill(HIST("hV0CandidateCounter"), 1.5); - if (selectionFlags.applyDCAdaughterSelection) { - if (std::abs(v0.dcaV0Daughters()) > selectionValues.dcaDaughterSelection) + if (v0SelectionFlags.applyDCAdaughterSelection) { + if (std::abs(v0.dcaV0Daughters()) > v0SelectionValues.dcaDaughterSelection) continue; } else { selectionCheck = v0.dcaV0Daughters(); } histos.fill(HIST("hV0CandidateCounter"), 2.5); - if (selectionFlags.applyCosOfPAngleSelection) { - if (v0.cosPA() < selectionValues.cosPAngleSelection) + if (v0SelectionFlags.applyCosOfPAngleSelection) { + if (v0.cosPA() < v0SelectionValues.cosPAngleSelection) continue; } else { selectionCheck = std::acos(v0.cosPA()); } histos.fill(HIST("hV0CandidateCounter"), 3.5); - if (selectionFlags.applyDCADaughtersToPVSelection) { - if ((std::abs(v0.dcaNegToPV()) < selectionValues.dcaDaughtersToPVSelection) || - (std::abs(v0.dcaPosToPV()) < selectionValues.dcaDaughtersToPVSelection)) + if (v0SelectionFlags.applyDCADaughtersToPVSelection) { + if ((std::abs(v0.dcaNegToPV()) < v0SelectionValues.dcaDaughtersToPVSelection) || + (std::abs(v0.dcaPosToPV()) < v0SelectionValues.dcaDaughtersToPVSelection)) continue; } else { selectionCheckPos = std::abs(v0.dcaPosToPV()); selectionCheck = std::abs(v0.dcaNegToPV()); } histos.fill(HIST("hV0CandidateCounter"), 4.5); - if (selectionFlags.applyV0RadiusSelection) { - if (v0.v0radius() < selectionValues.v0RadiusSelection) + if (v0SelectionFlags.applyV0RadiusSelection) { + if (v0.v0radius() < v0SelectionValues.v0RadiusSelection) continue; } else { selectionCheck = v0.v0radius(); } histos.fill(HIST("hV0CandidateCounter"), 5.5); if (isK0) { - if (selectionFlags.applyArmenterosSelection) { - if (v0.qtArm() < selectionValues.armenterosSelection * std::abs(v0.alpha())) + if (v0SelectionFlags.applyArmenterosSelection) { + if (v0.qtArm() < v0SelectionValues.armenterosSelection * std::abs(v0.alpha())) continue; } } histos.fill(HIST("hV0CandidateCounter"), 6.5); - if (isK0 && selectionFlags.applyCompetingMassRejection) { - if (std::abs(v0.mLambda() - o2::constants::physics::MassLambda0) < selectionValues.competingMassRejectionK0) + if (isK0 && v0SelectionFlags.applyCompetingMassRejection) { + if (std::abs(v0.mLambda() - o2::constants::physics::MassLambda0) < v0SelectionValues.competingMassRejectionK0) continue; - if (std::abs(v0.mAntiLambda() - o2::constants::physics::MassLambda0) < selectionValues.competingMassRejectionK0) + if (std::abs(v0.mAntiLambda() - o2::constants::physics::MassLambda0) < v0SelectionValues.competingMassRejectionK0) continue; } - if ((isLambda || isAntiLambda) && selectionFlags.applyCompetingMassRejection) { - if (std::abs(v0.mK0Short() - o2::constants::physics::MassK0Short) < selectionValues.competingMassRejectionLambda) + if ((isLambda || isAntiLambda) && v0SelectionFlags.applyCompetingMassRejection) { + if (std::abs(v0.mK0Short() - o2::constants::physics::MassK0Short) < v0SelectionValues.competingMassRejectionLambda) continue; } histos.fill(HIST("hV0CandidateCounter"), 7.5); - if (selectionFlags.applyLifetimeSelection) { - if (isK0 && v0.distOverTotMom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassK0Short > selectionValues.lifetimecutak0) + if (v0SelectionFlags.applyLifetimeSelection) { + if (isK0 && v0.distOverTotMom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassK0Short > v0SelectionValues.lifetimecutak0) continue; - if ((isLambda || isAntiLambda) && v0.distOverTotMom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassLambda0 > selectionValues.lifetimecutambda) + if ((isLambda || isAntiLambda) && v0.distOverTotMom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassLambda0 > v0SelectionValues.lifetimecutambda) continue; } else { if (isK0) @@ -316,8 +446,8 @@ struct Alice3Strangeness { histos.fill(HIST("hV0CandidateCounter"), 8.5); auto posTrack = v0.template posTrack_as(); auto negTrack = v0.template negTrack_as(); - if (selectionFlags.applyEtaDaughterSelection) { - if (std::abs(posTrack.eta()) > selectionValues.etaDaughterSelection || std::abs(negTrack.eta()) > selectionValues.etaDaughterSelection) + if (v0SelectionFlags.applyEtaDaughterSelection) { + if (std::abs(posTrack.eta()) > v0SelectionValues.etaDaughterSelection || std::abs(negTrack.eta()) > v0SelectionValues.etaDaughterSelection) continue; } histos.fill(HIST("reconstructedCandidates/hEtaDaughters"), posTrack.eta()); @@ -325,7 +455,7 @@ struct Alice3Strangeness { histos.fill(HIST("hV0CandidateCounter"), 9.5); histos.fill(HIST("reconstructedCandidates/hArmeterosAfterAllSelections"), v0.alpha(), v0.qtArm()); - if (selectionFlags.doQAforSelectionVariables) { + if (v0SelectionFlags.doQAforSelectionVariables) { static_for<0, 5>([&](auto i) { constexpr int In = i.value; if (TESTBIT(appliedSelectionCheckMask, In)) { @@ -355,46 +485,161 @@ struct Alice3Strangeness { } } - void processFoundCascadeCandidates(aod::Collision const&, FullCascadeCandidates const& cascadeCandidates, Alice3Tracks const&, aod::McParticles const&) + void processFoundCascadeCandidates(aod::Collision const& collision, FullCascadeCandidates const& cascadeCandidates, Alice3Tracks const&, aod::McParticles const&) { - for (const auto& casc : cascadeCandidates) { - const bool isXi = (std::abs(casc.mXi() - o2::constants::physics::MassXiMinus) < selectionValues.acceptedXiMassWindow) && casc.sign() > 0; - const bool isOm = (std::abs(casc.mOmega() - o2::constants::physics::MassOmegaMinus) < selectionValues.acceptedOmegaMassWindow) && casc.sign() > 0; - const bool isAntiXi = (std::abs(casc.mXi() - o2::constants::physics::MassXiMinus) < selectionValues.acceptedXiMassWindow) && casc.sign() < 0; - const bool isAntiOm = (std::abs(casc.mOmega() - o2::constants::physics::MassOmegaMinus) < selectionValues.acceptedOmegaMassWindow) && casc.sign() < 0; + for (const auto& cascade : cascadeCandidates) { + if (cascade.sign() < 0) { + histos.fill(HIST("reconstructedCandidates/Cascade/hMassAllXiCandidates"), cascade.mXi()); + histos.fill(HIST("reconstructedCandidates/Cascade/hMassAllOmegaCandidates"), cascade.mOmega()); + } else { + histos.fill(HIST("reconstructedCandidates/Cascade/hMassAllAntiXiCandidates"), cascade.mXi()); + histos.fill(HIST("reconstructedCandidates/Cascade/hMassAllAntiOmegaCandidates"), cascade.mOmega()); + } + + auto positive = cascade.template posTrack_as(); + auto negative = cascade.template negTrack_as(); + auto bachelor = cascade.template bachelor_as(); + + const float posDCAxyCut = cascadeSelectionValues.posMinConstDCAxy + cascadeSelectionValues.posMinPtDepDCAxy / positive.pt(); + const float negDCAxyCut = cascadeSelectionValues.negMinConstDCAxy + cascadeSelectionValues.negMinPtDepDCAxy / negative.pt(); + const float bachDCAxyCut = cascadeSelectionValues.bachMinConstDCAxy + cascadeSelectionValues.bachMinPtDepDCAxy / bachelor.pt(); + const float posDCAzCut = cascadeSelectionValues.posMinConstDCAz + cascadeSelectionValues.posMinPtDepDCAz / positive.pt(); + const float negDCAzCut = cascadeSelectionValues.negMinConstDCAz + cascadeSelectionValues.negMinPtDepDCAz / negative.pt(); + const float bachDCAzCut = cascadeSelectionValues.bachMinConstDCAz + cascadeSelectionValues.bachMinPtDepDCAz / bachelor.pt(); + const float distanceFromPV = std::hypot(cascade.x() - collision.posX(), cascade.y() - collision.posY(), cascade.z() - collision.posZ()); + const float normalizedDecayLength = analysedCascade.pdgMass * distanceFromPV / (cascade.p() * analysedCascade.ctau); + + const float cascadeCandidateMass = (analysedCascade.type == Cascade::Xi || analysedCascade.type == Cascade::AntiXi) ? cascade.mXi() : cascade.mOmega(); + const float cascadeCompetingCandidateMass = (analysedCascade.type == Cascade::Xi || analysedCascade.type == Cascade::AntiXi) ? cascade.mOmega() : cascade.mXi(); + bool isAnalysedCascade = (std::abs(cascadeCandidateMass - analysedCascade.pdgMass) < cascadeSelectionValues.cascMassWindow) && (analysedCascade.sign * cascade.sign() > 0); + if (!isAnalysedCascade) { + continue; + } + + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hPosDCAxy"), positive.dcaXY() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hNegDCAxy"), negative.dcaXY() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hBachDCAxy"), bachelor.dcaXY() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hPosDCAz"), positive.dcaZ() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hNegDCAz"), negative.dcaZ() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hBachDCAz"), bachelor.dcaZ() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hLaDauDCA"), cascade.dcaV0daughters() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hLaDecayRadius"), cascade.v0radius()); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hLaMassWindow"), cascade.mLambda()); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hLaCosPA"), cascade.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hCascDauDCA"), cascade.dcacascdaughters() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hCascDecayLength"), normalizedDecayLength); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hCascDecayRadius"), cascade.cascradius()); + histos.fill(HIST("reconstructedCandidates/Cascade/BeforeSelection/hCascCosPA"), cascade.casccosPA(collision.posX(), collision.posY(), collision.posZ())); + + if (cascadeFlags.analyseOnlyTrueCascades) { + if (!cascade.has_mcParticle()) { + continue; + } + + auto mcCasc = cascade.template mcParticle_as(); + if (mcCasc.pdgCode() != analysedCascade.pdgCode) { + continue; + } + } - if (isXi) { - histos.fill(HIST("reconstructedCandidates/Xi/hMassAllCandidates"), casc.mXi()); + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 1 /* All candidates*/); + if (cascadeFlags.posDCAxy && std::abs(positive.dcaXY()) < posDCAxyCut) { + continue; } - if (isOm) { - histos.fill(HIST("reconstructedCandidates/Omega/hMassAllCandidates"), casc.mOmega()); + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 2 /* Pass pos dcaXY*/); + if (cascadeFlags.negDCAxy && std::abs(negative.dcaXY()) < negDCAxyCut) { + continue; } - if (isAntiXi) { - histos.fill(HIST("reconstructedCandidates/AntiXi/hMassAllCandidates"), casc.mXi()); + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 3 /* Pass neg dcaXY*/); + if (cascadeFlags.bachDCAxy && std::abs(bachelor.dcaXY()) < bachDCAxyCut) { + continue; } - if (isAntiOm) { - histos.fill(HIST("reconstructedCandidates/AntiOmega/hMassAllCandidates"), casc.mOmega()); + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 4 /* Pass bach dcaXY*/); + if (cascadeFlags.posDCAz && std::abs(positive.dcaZ()) < posDCAzCut) { + continue; } - // TODO Add selections - if (isXi) { - histos.fill(HIST("reconstructedCandidates/Xi/hMassSelected"), casc.mXi()); + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 5 /* Pass pos dcaZ*/); + if (cascadeFlags.negDCAz && std::abs(negative.dcaZ()) < negDCAzCut) { + continue; } - if (isOm) { - histos.fill(HIST("reconstructedCandidates/Omega/hMassSelected"), casc.mOmega()); + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 6 /* Pass neg dcaZ*/); + if (cascadeFlags.bachDCAz && std::abs(bachelor.dcaZ()) < bachDCAzCut) { + continue; } - if (isAntiXi) { - histos.fill(HIST("reconstructedCandidates/AntiXi/hMassSelected"), casc.mXi()); + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 7 /* Pass bach dcaZ*/); + if (cascadeFlags.laMaxDauDCA && cascade.dcaV0daughters() > cascadeSelectionValues.laMaxDauDCA) { + continue; } - if (isAntiOm) { - histos.fill(HIST("reconstructedCandidates/AntiOmega/hMassSelected"), casc.mOmega()); + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 8 /* Pass la dau dca*/); + if (cascadeFlags.laMinDecayRadius && cascade.v0radius() < cascadeSelectionValues.laMinDecayRadius) { + continue; } + + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 9 /* Pass la decay radius*/); + if (cascadeFlags.laMassWindow && std::abs(cascade.mLambda() - o2::constants::physics::MassLambda0) > cascadeSelectionValues.laMassWindow) { + continue; + } + + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 10 /* Pass la mass window*/); + if (cascadeFlags.laMinCosPA && cascade.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < cascadeSelectionValues.laMinCosPA) { + continue; + } + + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 11 /* Pass la cosPA*/); + if (cascadeFlags.cascMaxDauDCA && cascade.dcacascdaughters() > cascadeSelectionValues.cascMaxDauDCA) { + continue; + } + + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 12 /* Pass casc dau dca*/); + if (cascadeFlags.cascMaxNormalizedDecayLength && normalizedDecayLength > cascadeSelectionValues.cascMaxNormalizedDecayLength) { + continue; + } + + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 13 /* Pass casc norm decay length*/); + if (cascadeFlags.cascMinDecayRadius && cascade.cascradius() < cascadeSelectionValues.cascMinDecayRadius) { + continue; + } + + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 14 /* Pass casc decay radius*/); + if (cascadeFlags.cascMinCosPA && cascade.casccosPA(collision.posX(), collision.posY(), collision.posZ()) < cascadeSelectionValues.cascMinCosPA) { + continue; + } + + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 15 /* Pass casc cosPA*/); + if (cascadeFlags.competingMassRejection && std::abs(cascadeCompetingCandidateMass - analysedCascade.pdgCompetingMass) < cascadeSelectionValues.competingMassRejection) { + continue; + } + + histos.fill(HIST("reconstructedCandidates/Cascade/hSelectionQa"), 16 /* Pass casc competing mass rej*/); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hPosDCAxy"), positive.dcaXY() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hNegDCAxy"), negative.dcaXY() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hBachDCAxy"), bachelor.dcaXY() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hPosDCAz"), positive.dcaZ() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hNegDCAz"), negative.dcaZ() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hBachDCAz"), bachelor.dcaZ() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hLaDauDCA"), cascade.dcaV0daughters() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hLaDecayRadius"), cascade.v0radius()); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hLaMassWindow"), cascade.mLambda()); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hLaCosPA"), cascade.v0cosPA(collision.posX(), collision.posY(), collision.posZ())); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hCascDauDCA"), cascade.dcacascdaughters() * ToMicrons); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hCascDecayLength"), normalizedDecayLength); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hCascDecayRadius"), cascade.cascradius()); + histos.fill(HIST("reconstructedCandidates/Cascade/AfterSelection/hCascCosPA"), cascade.casccosPA(collision.posX(), collision.posY(), collision.posZ())); + histos.fill(HIST("reconstructedCandidates/Cascade/hMassSelectedXiCandidates"), cascade.mXi()); + histos.fill(HIST("reconstructedCandidates/Cascade/hMassSelectedAntiXiCandidates"), cascade.mXi()); + histos.fill(HIST("reconstructedCandidates/Cascade/hMassSelectedOmegaCandidates"), cascade.mOmega()); + histos.fill(HIST("reconstructedCandidates/Cascade/hMassSelectedAntiOmegaCandidates"), cascade.mOmega()); + histos.fill(HIST("reconstructedCandidates/Cascade/h3dXiCandidates"), cascade.pt(), cascade.eta(), cascade.mOmega()); + histos.fill(HIST("reconstructedCandidates/Cascade/h3dAntiXiCandidates"), cascade.pt(), cascade.eta(), cascade.mOmega()); + histos.fill(HIST("reconstructedCandidates/Cascade/h3dOmegaCandidates"), cascade.pt(), cascade.eta(), cascade.mOmega()); + histos.fill(HIST("reconstructedCandidates/Cascade/h3dAntiOmegaCandidates"), cascade.pt(), cascade.eta(), cascade.mOmega()); } }