diff --git a/PWGLF/Tasks/Strangeness/strangeCascTrack.cxx b/PWGLF/Tasks/Strangeness/strangeCascTrack.cxx index 4274ca7a8cc..5f709c51c7c 100644 --- a/PWGLF/Tasks/Strangeness/strangeCascTrack.cxx +++ b/PWGLF/Tasks/Strangeness/strangeCascTrack.cxx @@ -9,7 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. // -/// \file strangecasctrack.cxx +/// \file strangeCascTrack.cxx /// \brief Analysis of strangeness tracking efficiency via primary production of Omega and Xi in Run 3 /// \author Yakiv Paroviak (yakiv.paroviak@cern.ch) @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -67,24 +68,26 @@ struct StrangeCascTrack { HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; // subprocess switches: + // Configurable doProcessDirectData{"doProcessDirectData", false, "true for direct data, false for derived data"}; + Configurable doProcesspp{"doProcesspp", true, "true for pp"}; Configurable doProcessPbPb{"doProcessPbPb", false, "true for PbPb"}; Configurable doProcessOO{"doProcessOO", false, "true for OO"}; Configurable doProcesspO{"doProcesspO", false, "true for pO"}; - Configurable doApplyEventCuts{"doApplyEventCuts", true, "apply general event cuts"}; // general cascade cuts - dca, cosPA etc. + Configurable doApplyEventCuts{"doApplyEventCuts", true, "apply general event cuts"}; // event filter - PVz, sel8, INEL>0 // Xi selections - Configurable doApplyGenCutsXi{"doApplyGenCutsXi", true, "apply general cuts (Omega)"}; // general cascade cuts - dca, cosPA etc. Configurable doApplyPtCutsXi{"doApplyPtCutsXi", true, "apply pt cuts (Xi)"}; // ignore particles with extremely low efficiencies + Configurable doApplyGenCutsXi{"doApplyGenCutsXi", true, "apply general cuts (Xi)"}; // general cascade cuts - cosPA, TPC hits etc. Configurable doApplyTPCPIDXi{"doApplyTPCPIDXi", true, "apply tpc pid to dau tracks (Xi)"}; Configurable doApplyTOFPIDXi{"doApplyTOFPIDXi", true, "apply tof pid to dau tracks (Xi)"}; // Omega selections - Configurable doApplyGenCutsOmega{"doApplyGenCutsOmega", true, "apply general cuts (Omega)"}; // general cascade cuts - dca, cosPA etc. - Configurable doApplyPtCutsOmega{"doApplyPtCutsOmega", true, "apply pt cuts (Omega)"}; // ignore particles with extremely low efficiencies + Configurable doApplyPtCutsOmega{"doApplyPtCutsOmega", true, "apply pt cuts (Omega)"}; + Configurable doApplyGenCutsOmega{"doApplyGenCutsOmega", true, "apply general cuts (Omega)"}; Configurable doApplyTPCPIDOmega{"doApplyTPCPIDOmega", true, "apply tpc pid to dau tracks (Omega)"}; Configurable doApplyTOFPIDOmega{"doApplyTOFPIDOmega", true, "apply tof pid to dau tracks (Omega)"}; Configurable doCompetingMassRej{"doCompetingMassRej", true, "competing mass rejection (Omega)"}; - // efficiency and purity corrections: + // efficiency and purity corrections on the fly (warning: to be avoided because interpolation causes errors): // only correct by pt Configurable doApplyEfficiency1D{"doApplyEfficiency1D", false, "apply efficiency correction"}; Configurable doPropagateEfficiency1D{"doPropagateEfficiency1D", false, "apply efficiency propagation"}; @@ -103,46 +106,54 @@ struct StrangeCascTrack { // event and dau track selection struct : ConfigurableGroup { - Configurable cutZVertex{"cutZVertex", 10.0f, "max Z-vertex position"}; - Configurable cutSel8{"cutSel8", true, "choose events with sel8"}; - Configurable cutDCAtoPVxy{"cutDCAtoPVxy", 0.02f, "max cascade dca to PV in xy"}; - Configurable cutDCAtoPVz{"cutDCAtoPVz", 0.02f, "max cascade dca to PV in z"}; - Configurable cutV0CosPA{"cutV0CosPA", 0.97f, "max V0 cosPA"}; - Configurable cutBachCosPA{"cutBachCosPA", 0.97f, "max Bachelor cosPA"}; - Configurable cutRapidity{"cutRapidity", 0.5f, "max rapidity"}; - Configurable cutCompMassRej{"cutCompMassRej", 0.008f, "Competing mass rejection"}; + // event cuts + Configurable cutDoINEL{"cutDoINEL", true, "choose events with INEL>0"}; + Configurable cutZVertex{"cutZVertex", 10.0f, "max Z-vertex position"}; + Configurable cutDoSel8{"cutDoSel8", true, "choose events with sel8"}; + // cascade cuts + Configurable cutDoPropagateDCA{"cutDoPropagateDCA", false, "choose events with sel8"}; + Configurable cutPropDCAtoPVxy{"cutPropDCAtoPVxy", 0.02f, "max cascade dca to PV in xy - propagated"}; + Configurable cutPropDCAtoPVz{"cutPropDCAtoPVz", 0.02f, "max cascade dca to PV in z - propagated"}; + Configurable cutNClsTPC{"cutNClsTPC", 70, "min number of found TPC clusters for dau tracks"}; + Configurable cutMinV0CosPA{"cutMinV0CosPA", -1.1f, "min V0 cosPA"}; + Configurable cutMaxV0CosPA{"cutMaxV0CosPA", 1.1f, "max V0 cosPA"}; + Configurable cutMinBachCosPA{"cutMinBachCosPA", -1.1f, "min Bachelor cosPA"}; + Configurable cutMaxBachCosPA{"cutMaxBachCosPA", 1.1f, "max Bachelor cosPA"}; + Configurable cutMinCascCosPA{"cutMinCascCosPA", 0.995f, "min cascade cosPA"}; + Configurable cutRapidity{"cutRapidity", 0.5f, "max rapidity"}; + Configurable cutDauEta{"cutDauEta", 1.0f, "max eta of dau tracks"}; + Configurable cutCompMassRej{"cutCompMassRej", 0.008f, "Competing mass rejection"}; // minimum and maximum desired pt - Configurable cutMinPtXiStd{"cutMinPtXiStd", 0.0f, "min pt for standard Xi"}; - Configurable cutMaxPtXiStd{"cutMaxPtXiStd", 15.0f, "min pt for standard Xi"}; - Configurable cutMinPtXiTra{"cutMinPtXiTra", 0.5f, "min pt for tracked Xi"}; - Configurable cutMaxPtXiTra{"cutMaxPtXiTra", 15.0f, "min pt for standard Xi"}; - Configurable cutMinPtOmegaStd{"cutMinPtOmegaStd", 0.5f, "min pt for standard Omega"}; - Configurable cutMaxPtOmegaStd{"cutMaxPtOmegaStd", 15.0f, "min pt for standard Omega"}; - Configurable cutMinPtOmegaTra{"cutMinPtOmegaTra", 1.0f, "min pt for tracked Omega"}; - Configurable cutMaxPtOmegaTra{"cutMaxPtOmegaTra", 15.0f, "min pt for standard Omega"}; + Configurable cutMinPtXiStd{"cutMinPtXiStd", 0.0f, "min pt for standard Xi"}; + Configurable cutMaxPtXiStd{"cutMaxPtXiStd", 15.0f, "min pt for standard Xi"}; + Configurable cutMinPtXiTra{"cutMinPtXiTra", 0.5f, "min pt for tracked Xi"}; + Configurable cutMaxPtXiTra{"cutMaxPtXiTra", 15.0f, "min pt for standard Xi"}; + Configurable cutMinPtOmegaStd{"cutMinPtOmegaStd", 0.5f, "min pt for standard Omega"}; + Configurable cutMaxPtOmegaStd{"cutMaxPtOmegaStd", 15.0f, "min pt for standard Omega"}; + Configurable cutMinPtOmegaTra{"cutMinPtOmegaTra", 1.0f, "min pt for tracked Omega"}; + Configurable cutMaxPtOmegaTra{"cutMaxPtOmegaTra", 15.0f, "min pt for standard Omega"}; // TPC PID selection - Configurable nSigmaTPCPion{"nSigmaTPCPion", 4, "NSigmaTPCPion"}; - Configurable nSigmaTPCKaon{"nSigmaTPCKaon", 4, "NSigmaTPCKaon"}; - Configurable nSigmaTPCProton{"nSigmaTPCProton", 4, "NSigmaTPCProton"}; + Configurable cutNSigmaTPCPion{"cutNSigmaTPCPion", 4, "cutNSigmaTPCPion"}; + Configurable cutNSigmaTPCKaon{"cutNSigmaTPCKaon", 4, "cutNSigmaTPCKaon"}; + Configurable cutNSigmaTPCProton{"cutNSigmaTPCProton", 4, "cutNSigmaTPCProton"}; // TOF PID selection - Configurable nSigmaTOFXi{"nSigmaTOFXi", 3, "nSigmaTOFXi"}; - Configurable nSigmaTOFOmega{"nSigmaTOFOmega", 3, "nSigmaTOFOmega"}; + Configurable cutNSigmaTOFXi{"cutNSigmaTOFXi", 3, "cutNSigmaTOFXi"}; + Configurable cutNSigmaTOFOmega{"cutNSigmaTOFOmega", 3, "cutNSigmaTOFOmega"}; } selCuts; // axes struct : ConfigurableGroup { - ConfigurableAxis axisPhi{"axisPhi", {72, 0, TwoPI}, "#phi"}; ConfigurableAxis axisEta{"axisEta", {102, -2.01, 2.01}, "#eta"}; ConfigurableAxis axisDCAxy{"axisDCAxy", {500, 0., 0.5}, "cm"}; ConfigurableAxis axisDCAz{"axisDCAz", {500, 0., 0.5}, "cm"}; - ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, 10.0}, "p_{T} (GeV/c)"}; + ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 5.0, 6.0, 10.0}, "p_{T} (GeV/c)"}; ConfigurableAxis axisMult{"axisMult", {VARIABLE_WIDTH, 0.0f, 5.0, 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 70.0f, 100.0f}, "FT0 mult %"}; ConfigurableAxis axisOmegaMass{"axisOmegaMass", {2000, 1.6, 1.8}, "#Omega M_{inv} (GeV/c^{2})"}; ConfigurableAxis axisXiMass{"axisXiMass", {2000, 1.2, 1.4}, "#Xi M_{inv} (GeV/c^{2})"}; } axesConfig; - // cascade reconstruction types - static constexpr std::string_view kTypeNames[] = {"Standard", "Tracked"}; + // cascade reconstruction Types + static constexpr std::string_view TypeNames[] = {"Standard", "Tracked"}; // for efficiency and purity corrections TH1F* hEfficiencyOmegaStd1D; @@ -263,93 +274,187 @@ struct StrangeCascTrack { template void fillEvents(TEvent const& collision) { - histos.fill(HIST("Events/EvCounter"), 0.5); + histos.fill(HIST("NoSel-Events/EvCounter"), 0.5); double mult = (doProcesspp || doProcesspO) ? collision.centFT0M() : collision.centFT0C(); - histos.fill(HIST("Events/Mult"), mult); + histos.fill(HIST("NoSel-Events/Mult"), mult); double pvx = collision.posX(); double pvy = collision.posY(); double pvz = collision.posZ(); - histos.fill(HIST("Events/PVx"), pvx); - histos.fill(HIST("Events/PVy"), pvy); - histos.fill(HIST("Events/PVz"), pvz); + histos.fill(HIST("NoSel-Events/PVxy"), pvx, pvy); + histos.fill(HIST("NoSel-Events/PVz"), pvz); } // checks general selection criteria for collisions template bool isValidEvent(TEvent collision) { - if (std::abs(collision.posZ()) > selCuts.cutZVertex) - return false; - if (selCuts.cutSel8 && !collision.sel8()) - return false; - return true; + bool passedAllSels = true; + if (!selCuts.cutDoINEL || collision.multNTracksPVeta1() > 0) + histos.fill(HIST("Rec-Events/EvFilter"), 0.5); + else + passedAllSels = false; + if (std::abs(collision.posZ()) < selCuts.cutZVertex) + histos.fill(HIST("Rec-Events/EvFilter"), 1.5); + else + passedAllSels = false; + if (!selCuts.cutDoSel8 || collision.sel8()) + histos.fill(HIST("Rec-Events/EvFilter"), 2.5); + else + passedAllSels = false; + if (passedAllSels) + histos.fill(HIST("Rec-Events/EvFilter"), 3.5); + return passedAllSels; } - // checks general selection criteria for cascades - from std casc - template - bool isValidCascGen(TEvent collision, TCascade cascade) + // checks cascade pt + template + bool isValidPt(TCascade cascade, TString particle, int Type) { - if (cascade.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) < selCuts.cutV0CosPA) - return false; - if (cascade.bachBaryonCosPA() < selCuts.cutBachCosPA) - return false; - return true; + bool passedSel = true; + double ptMin = 0.0; + double ptMax = 0.0; + if (Type == 1 && particle == "Xi") { + ptMin = selCuts.cutMinPtXiTra; + ptMax = selCuts.cutMaxPtXiTra; + } + if (Type == 1 && particle == "Omega") { + ptMin = selCuts.cutMinPtOmegaTra; + ptMax = selCuts.cutMaxPtOmegaTra; + } + if (Type == 0 && particle == "Xi") { + ptMin = selCuts.cutMinPtXiStd; + ptMax = selCuts.cutMaxPtXiStd; + } + if (Type == 0 && particle == "Omega") { + ptMin = selCuts.cutMinPtOmegaStd; + ptMax = selCuts.cutMaxPtOmegaStd; + } + if (cascade.pt() < ptMin || cascade.pt() > ptMax) + passedSel = false; + // histos.fill(HIST(Form("%s/Rec/Filters%s", TypeNames[Type].data(), particle)), 0.5); + return passedSel; } - // checks general selection criteria for cascades - from std or tracked casc - template - bool isValidCascSpec(TCascade cascade, TString particle) + // checks general selection criteria for cascades + template + std::array isValidCasc(TEvent collision, TCascade cascade, TStdCascade stdcasc, TString particle) { - if (cascade.dcaXYCascToPV() > selCuts.cutDCAtoPVxy) - return false; - if (cascade.dcaZCascToPV() > selCuts.cutDCAtoPVz) - return false; - ROOT::Math::PxPyPzMVector momentum; - if (particle == "xi") - momentum.SetCoordinates(cascade.px(), cascade.py(), cascade.pz(), o2::constants::physics::MassXiMinus); + bool passedAllSels = true; + // cascade rapidity + bool passedRapidity = true; + double y; + if (particle == "Xi") + y = std::abs(cascade.yXi()); else - momentum.SetCoordinates(cascade.px(), cascade.py(), cascade.pz(), o2::constants::physics::MassOmegaMinus); - if (std::abs(momentum.Rapidity()) > selCuts.cutRapidity) - return false; - return true; + y = std::abs(cascade.yOmega()); + if (y > selCuts.cutRapidity) { + passedRapidity = false; + passedAllSels = false; + } + // daughter track pseudorapidity + bool passedDauEta = true; + double bachEta = std::abs(cascade.bacheloreta()); + double negEta = std::abs(cascade.negativeeta()); + double posEta = std::abs(cascade.positiveeta()); + if (bachEta > selCuts.cutDauEta || negEta > selCuts.cutDauEta || posEta > selCuts.cutDauEta) { + passedDauEta = false; + passedAllSels = false; + } + // daughter found TPC clusters + bool passedTPCCls = true; + const auto& posTrack = stdcasc.template posTrackExtra_as(); + const auto& negTrack = stdcasc.template negTrackExtra_as(); + const auto& bachTrack = stdcasc.template bachTrackExtra_as(); + double posCls = posTrack.tpcClusters(); + double negCls = negTrack.tpcClusters(); + double bachCls = bachTrack.tpcClusters(); + if (posCls < selCuts.cutNClsTPC || negCls < selCuts.cutNClsTPC || bachCls < selCuts.cutNClsTPC) { + passedTPCCls = false; + passedAllSels = false; + } + // V0 cosPA + bool passedV0CosPA = true; + double v0cospa = cascade.v0cosPA(collision.posX(), collision.posY(), collision.posZ()); + if (v0cospa < selCuts.cutMinV0CosPA || v0cospa > selCuts.cutMaxV0CosPA) { + passedV0CosPA = false; + passedAllSels = false; + } + // Bachelor cosPA + bool passedBachCosPA = true; + double bachcospa = stdcasc.bachBaryonCosPA(); + if (bachcospa < selCuts.cutMinBachCosPA || bachcospa > selCuts.cutMaxBachCosPA) { + passedBachCosPA = false; + passedAllSels = false; + } + // Cascade cosPA + bool passedCascCosPA = true; + double casccospa = cascade.casccosPA(collision.posX(), collision.posY(), collision.posZ()); + if (casccospa < selCuts.cutMinCascCosPA) { + passedCascCosPA = false; + passedAllSels = false; + } + // Propagated cacade DCAxy to PV + bool passedPropDCAxy = true; + if (selCuts.cutDoPropagateDCA && cascade.dcaXYCascToPV() > selCuts.cutPropDCAtoPVxy) { + passedPropDCAxy = false; + passedAllSels = false; + } + // Propagated cacade DCAz to PV + bool passedPropDCAz = true; + if (selCuts.cutDoPropagateDCA && cascade.dcaZCascToPV() > selCuts.cutPropDCAtoPVz) { + passedPropDCAz = false; + passedAllSels = false; + } + return {passedRapidity, passedDauEta, passedTPCCls, passedV0CosPA, passedBachCosPA, passedCascCosPA, passedPropDCAxy, passedPropDCAz, passedAllSels}; } // checks TPC PID of dau tracks template - bool passesTPC(TCascade cascade) + bool passesTPC(TCascade cascade, TString particle) { - const auto& posDaughterTrackCasc = cascade.template posTrackExtra_as(); - const auto& negDaughterTrackCasc = cascade.template negTrackExtra_as(); + bool passedSel = true; + const auto& posTrack = cascade.template posTrackExtra_as(); + const auto& negTrack = cascade.template negTrackExtra_as(); + const auto& bachTrack = cascade.template bachTrackExtra_as(); if (cascade.sign() < 0) { - if (std::abs(posDaughterTrackCasc.tpcNSigmaPr()) > selCuts.nSigmaTPCProton) { - return false; + if (std::abs(posTrack.tpcNSigmaPr()) > selCuts.cutNSigmaTPCProton) { + passedSel = false; } - if (std::abs(negDaughterTrackCasc.tpcNSigmaPi()) > selCuts.nSigmaTPCPion) { - return false; + if (std::abs(negTrack.tpcNSigmaPi()) > selCuts.cutNSigmaTPCPion) { + passedSel = false; + } + if ((particle == "Xi" && std::abs(bachTrack.tpcNSigmaPi()) > selCuts.cutNSigmaTPCPion) || + (particle == "Omega" && std::abs(bachTrack.tpcNSigmaKa()) > selCuts.cutNSigmaTPCKaon)) { + passedSel = false; } } else { - if (std::abs(negDaughterTrackCasc.tpcNSigmaPr()) > selCuts.nSigmaTPCProton) { - return false; + if (std::abs(negTrack.tpcNSigmaPr()) > selCuts.cutNSigmaTPCProton) { + passedSel = false; } - if (std::abs(posDaughterTrackCasc.tpcNSigmaPi()) > selCuts.nSigmaTPCPion) { - return false; + if (std::abs(posTrack.tpcNSigmaPi()) > selCuts.cutNSigmaTPCPion) { + passedSel = false; + } + if ((particle == "Xi" && std::abs(bachTrack.tpcNSigmaPi()) > selCuts.cutNSigmaTPCPion) || + (particle == "Omega" && std::abs(bachTrack.tpcNSigmaKa()) > selCuts.cutNSigmaTPCKaon)) { + passedSel = false; } } - return true; + return passedSel; } // checks TOF PID of dau tracks template bool passesTOF(TCascade cascade, TString particle) { - if (particle == "xi") - return cascade.tofXiCompatibility(selCuts.nSigmaTOFXi); - if (particle == "omega") - return cascade.tofOmegaCompatibility(selCuts.nSigmaTOFOmega); - return true; + bool passedSel = true; + if (particle == "Xi") + passedSel = cascade.tofXiCompatibility(selCuts.cutNSigmaTOFXi); + if (particle == "Omega") + passedSel = cascade.tofOmegaCompatibility(selCuts.cutNSigmaTOFOmega); + return passedSel; } // checks whether gen cascade corresponds to PDG code template bool isValidPDG(TCascade cascade, TString particle) { - if (particle == "xi" && std::abs(cascade.pdgCode()) == PDG_t::kXiMinus) + if (particle == "Xi" && std::abs(cascade.pdgCode()) == PDG_t::kXiMinus) return true; - if (particle == "omega" && std::abs(cascade.pdgCode()) == PDG_t::kOmegaMinus) + if (particle == "Omega" && std::abs(cascade.pdgCode()) == PDG_t::kOmegaMinus) return true; return false; } @@ -362,9 +467,9 @@ struct StrangeCascTrack { if (!cascmccore.isPhysicalPrimary()) return false; int pdg = std::abs(cascmccore.pdgCode()); - if (particle == "xi") + if (particle == "Xi") return (pdg == PDG_t::kXiMinus); - if (particle == "omega") + if (particle == "Omega") return (pdg == PDG_t::kOmegaMinus); } return false; @@ -381,6 +486,17 @@ struct StrangeCascTrack { hist->SetBinContent(bin, currentContent); hist->SetBinError2(bin, currentError2); } + // calculates DCA from cosPA + template + double calculateDCA(TEvent collision, double cosPA, double decX, double decY, double decZ) + { + double pvX = collision.posX(); + double pvY = collision.posX(); + double pvZ = collision.posX(); + double sinPA = std::sqrt(1 - cosPA * cosPA); + double dca = sinPA * std::sqrt(std::pow(decX - pvX, 2) + std::pow(decY - pvY, 2) + std::pow(decZ - pvZ, 2)); + return dca; + } // applies selections for and fills histograms template void analyseCascs(TEvent collision, TCascs cascades) @@ -406,8 +522,8 @@ struct StrangeCascTrack { } }(); - // fill cascade statistics without any selections - static constexpr int type = [&]() { + // Type 1 for tracked cascades, Type 0 for standard + static constexpr int Type = [&]() { if constexpr (requires { cascade.topologyChi2(); }) { return 1; } else { @@ -415,8 +531,6 @@ struct StrangeCascTrack { } }(); - double mult = (doProcesspp || doProcesspO) ? collision.centFT0M() : collision.centFT0C(); // ion collisions use FT0C for multiplicity, pp uses both - float efficiencyOmega = 1.0f; float efficiencyXi = 1.0f; float efficiencyOmegaErr = 0.0f; @@ -426,6 +540,8 @@ struct StrangeCascTrack { float purityOmegaErr = 0.0f; float purityXiErr = 0.0f; + double mult = (doProcesspp || doProcesspO) ? collision.centFT0M() : collision.centFT0C(); // ion collisions use FT0C for multiplicity, pp uses both + if (doApplyEfficiency1D) { if constexpr (requires { cascade.topologyChi2(); }) { efficiencyOmega = hEfficiencyOmegaTra1D->Interpolate(cascade.pt()); @@ -562,142 +678,225 @@ struct StrangeCascTrack { } } + // fill multiplicity for events with >=1 cascade if (collision.index() != casccollid) { - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel/EvMult"), mult); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/EvMult"), mult); + if constexpr (requires { collision.straMCCollisionId(); }) { + if (isMCTruth(stdCasc, "Xi") || isMCTruth(stdCasc, "Omega")) { + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/EvMult"), mult); + } + } casccollid = collision.index(); } double massXi = cascade.mXi(); double massOmega = cascade.mOmega(); double pt = cascade.pt(); - double v0cosPA = stdCasc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()); - - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel/DCAxy"), cascade.dcaXYCascToPV()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel/DCAz"), cascade.dcaZCascToPV()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel/Phi"), cascade.phi()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel/Eta"), cascade.eta()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel/BachCosPA"), stdCasc.bachBaryonCosPA()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel/V0CosPA"), v0cosPA); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel/MassXi"), massXi); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel/MassOmega"), massOmega); - + double v0cosPA = cascade.v0cosPA(collision.posX(), collision.posY(), collision.posZ()); + double casccosPA = cascade.casccosPA(collision.posX(), collision.posY(), collision.posZ()); + double calcDCA = calculateDCA(collision, casccosPA, cascade.x(), cascade.y(), cascade.z()); + double bachEta = cascade.bacheloreta(); + double negEta = cascade.negativeeta(); + double posEta = cascade.positiveeta(); + // fill filters for no cascade selections + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/PropDCAxy"), cascade.dcaXYCascToPV()); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/PropDCAz"), cascade.dcaZCascToPV()); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/CalcDCA"), calcDCA); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/BachCosPA"), stdCasc.bachBaryonCosPA()); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/V0CosPA"), v0cosPA); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/CascCosPA"), casccosPA); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/RapidityXi"), cascade.yXi()); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/RapidityOmega"), cascade.yOmega()); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/EtaDau"), bachEta); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/EtaDau"), negEta); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/Filters/EtaDau"), posEta); + // fill inv mass for no cascade selections + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/MassXi"), massXi); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel/MassOmega"), massOmega); + // fill filters and inv mass for no cascade selections (MC truth) if constexpr (requires { collision.straMCCollisionId(); }) { - if (isMCTruth(stdCasc, "xi") || isMCTruth(stdCasc, "omega")) { - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel-Truth/DCAxy"), cascade.dcaXYCascToPV()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel-Truth/DCAz"), cascade.dcaZCascToPV()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel-Truth/DCAzVSpt"), pt, cascade.dcaZCascToPV()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel-Truth/Phi"), cascade.phi()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel-Truth/Eta"), cascade.eta()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel-Truth/EvMult"), mult); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel-Truth/BachCosPA"), stdCasc.bachBaryonCosPA()); - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel-Truth/V0CosPA"), v0cosPA); - if (isMCTruth(stdCasc, "xi")) - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel-Truth/MassXi"), massXi); - if (isMCTruth(stdCasc, "omega")) - histos.fill(HIST(kTypeNames[type]) + HIST("/NoSel-Truth/MassOmega"), massOmega); + if (isMCTruth(stdCasc, "Xi") || isMCTruth(stdCasc, "Omega")) { + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/PropDCAxy"), cascade.dcaXYCascToPV()); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/PropDCAz"), cascade.dcaZCascToPV()); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/CalcDCA"), calcDCA); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/BachCosPA"), stdCasc.bachBaryonCosPA()); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/V0CosPA"), v0cosPA); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/CascCosPA"), casccosPA); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/EtaDau"), bachEta); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/EtaDau"), negEta); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/EtaDau"), posEta); + if (isMCTruth(stdCasc, "Xi")) { + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/RapidityXi"), cascade.yXi()); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/MassXi"), massXi); + } + if (isMCTruth(stdCasc, "Omega")) { + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/Filters/RapidityOmega"), cascade.yOmega()); + histos.fill(HIST(TypeNames[Type]) + HIST("/NoSel-Truth/MassOmega"), massOmega); + } } } - // start checking selections bool passedAllSelsXi = true; bool passedAllSelsOmega = true; - // apply general selection criteria - if (doApplyEventCuts) { - if (!isValidEvent(collision)) { - passedAllSelsXi = false; - passedAllSelsOmega = false; + bool fillTruthXi = false; + bool fillTruthOmega = false; + if constexpr (requires { collision.straMCCollisionId(); }) { + if (isMCTruth(stdCasc, "Xi")) { + fillTruthXi = true; } } - if (doApplyGenCutsXi) { - if (!isValidCascGen(collision, stdCasc) || !isValidCascSpec(cascade, "xi")) + if constexpr (requires { collision.straMCCollisionId(); }) { + if (isMCTruth(stdCasc, "Omega")) { + fillTruthOmega = true; + } + } + // apply pt cuts + if (doApplyPtCutsXi) { + if (isValidPt(cascade, "Xi", Type)) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersXi"), 0.5); + if (fillTruthXi) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersXi"), 0.5); + } else passedAllSelsXi = false; } - if (doApplyGenCutsOmega) { - if (!isValidCascGen(collision, stdCasc) || !isValidCascSpec(cascade, "omega")) + if (doApplyPtCutsOmega) { + if (isValidPt(cascade, "Omega", Type)) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersOmega"), 0.5); + if (fillTruthOmega) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersOmega"), 0.5); + } else passedAllSelsOmega = false; } - // apply pt cuts - if constexpr (requires { cascade.topologyChi2(); }) { - if (doApplyPtCutsXi) { - if (pt < selCuts.cutMinPtXiTra || pt > selCuts.cutMaxPtXiTra) - passedAllSelsXi = false; - } - if (doApplyPtCutsOmega) { - if (pt < selCuts.cutMinPtOmegaTra || pt > selCuts.cutMaxPtOmegaTra) - passedAllSelsOmega = false; - } - } else { - if (doApplyPtCutsXi) { - if (pt < selCuts.cutMinPtXiStd || pt > selCuts.cutMaxPtXiStd) - passedAllSelsXi = false; + // apply general cascade cuts + if (doApplyGenCutsXi) { + auto genSels = isValidCasc(collision, cascade, stdCasc, "Xi"); + for (int i = 0; i < sizeof(genSels); ++i) { + if (genSels[i]) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/GenFiltersXi"), (i + 0.5)); + if (fillTruthXi) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/GenFiltersXi"), (i + 0.5)); + } } - if (doApplyPtCutsOmega) { - if (pt < selCuts.cutMinPtOmegaStd || pt > selCuts.cutMaxPtOmegaStd) - passedAllSelsOmega = false; + if (genSels[sizeof(genSels) - 1]) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersXi"), 1.5); + if (fillTruthXi) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersXi"), 1.5); + } else + passedAllSelsXi = false; + } + if (doApplyGenCutsOmega) { + auto genSels = isValidCasc(collision, cascade, stdCasc, "Omega"); + for (int i = 0; i < sizeof(genSels); ++i) { + if (genSels[i]) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/GenFiltersOmega"), (i + 0.5)); + if (fillTruthOmega) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/GenFiltersOmega"), (i + 0.5)); + } } + if (genSels[sizeof(genSels) - 1]) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersOmega"), 1.5); + if (fillTruthOmega) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersOmega"), 1.5); + } else + passedAllSelsOmega = false; } // apply tpc pid if (doApplyTPCPIDXi) { - if (!passesTPC(stdCasc)) + if (passesTPC(stdCasc, "Xi")) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersXi"), 2.5); + if (fillTruthXi) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersXi"), 2.5); + } else passedAllSelsXi = false; } if (doApplyTPCPIDOmega) { - if (!passesTPC(stdCasc)) + if (passesTPC(stdCasc, "Omega")) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersOmega"), 2.5); + if (fillTruthOmega) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersOmega"), 2.5); + } else passedAllSelsOmega = false; } // apply tof pid if (doApplyTOFPIDXi) { - if (!passesTOF(stdCasc, "xi")) + if (passesTOF(stdCasc, "Xi")) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersXi"), 3.5); + if (fillTruthXi) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersXi"), 3.5); + } else passedAllSelsXi = false; } if (doApplyTOFPIDOmega) { - if (!passesTOF(stdCasc, "omega")) + if (passesTOF(stdCasc, "Omega")) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersOmega"), 3.5); + if (fillTruthOmega) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersOmega"), 3.5); + } else passedAllSelsOmega = false; } // apply competing mass rej if (doCompetingMassRej) { - if (!(std::abs(massXi - o2::constants::physics::MassXiMinus) > selCuts.cutCompMassRej)) + if ((std::abs(massXi - o2::constants::physics::MassXiMinus) > selCuts.cutCompMassRej)) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersOmega"), 4.5); + if (fillTruthOmega) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersOmega"), 4.5); + } else passedAllSelsOmega = false; } - // fill truth w/ cascs that passed all applied sels - double binFillXi[3] = {massXi, pt, mult}; - - if constexpr (requires { collision.straMCCollisionId(); }) { - if (passedAllSelsXi || passedAllSelsOmega) { // fill once for every desired cascade - if (isMCTruth(stdCasc, "xi") || isMCTruth(stdCasc, "omega")) { - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/DCAxy"), cascade.dcaXYCascToPV()); - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/DCAz"), cascade.dcaZCascToPV()); - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/DCAzVSpt"), pt, cascade.dcaZCascToPV()); - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/Phi"), cascade.phi()); - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/Eta"), cascade.eta()); - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/EvMult"), mult); - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/BachCosPA"), stdCasc.bachBaryonCosPA()); - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/V0CosPA"), v0cosPA); - } + // fil rec histograms + if (passedAllSelsXi || passedAllSelsOmega) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/EvMult"), mult); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/PropDCAxy"), cascade.dcaXYCascToPV()); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/PropDCAz"), cascade.dcaZCascToPV()); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/CalcDCA"), calcDCA); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/BachCosPA"), stdCasc.bachBaryonCosPA()); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/V0CosPA"), v0cosPA); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/CascCosPA"), casccosPA); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/EtaDau"), bachEta); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/EtaDau"), negEta); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/EtaDau"), posEta); + if (passedAllSelsXi) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/RapidityXi"), cascade.yXi()); + if (passedAllSelsOmega) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/Filters/RapidityOmega"), cascade.yOmega()); + if (fillTruthXi || fillTruthOmega) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/EvMult"), mult); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/PropDCAxy"), cascade.dcaXYCascToPV()); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/PropDCAz"), cascade.dcaZCascToPV()); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/CalcDCA"), calcDCA); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/BachCosPA"), stdCasc.bachBaryonCosPA()); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/V0CosPA"), v0cosPA); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/CascCosPA"), casccosPA); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/EtaDau"), bachEta); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/EtaDau"), negEta); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/EtaDau"), posEta); + if (passedAllSelsXi) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/RapidityXi"), cascade.yXi()); + if (passedAllSelsOmega) + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Filters/RapidityOmega"), cascade.yOmega()); } } - - // fill rec + double binFillXi[3] = {massXi, pt, mult}; if (passedAllSelsXi) { - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec/MassXi"), massXi); - fillHist(histos.get(HIST(kTypeNames[type]) + HIST("/Rec/Xi")), binFillXi, efficiencyXi, efficiencyXiErr, purityXi, purityXiErr); - if constexpr (requires { collision.straMCCollisionId(); }) { - if (isMCTruth(stdCasc, "xi")) { - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/MassXi"), massXi); - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/Xi"), massXi, pt, mult); - } + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersXi"), 4.5); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/MassXi"), massXi); + fillHist(histos.get(HIST(TypeNames[Type]) + HIST("/Rec/Xi")), binFillXi, efficiencyXi, efficiencyXiErr, purityXi, purityXiErr); + if (fillTruthXi) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersXi"), 4.5); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/MassXi"), massXi); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Xi"), massXi, pt, mult); } } double binFillOmega[3] = {massOmega, pt, mult}; if (passedAllSelsOmega) { - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec/MassOmega"), massOmega); - fillHist(histos.get(HIST(kTypeNames[type]) + HIST("/Rec/Omega")), binFillOmega, efficiencyOmega, efficiencyOmegaErr, purityOmega, purityOmegaErr); - if constexpr (requires { collision.straMCCollisionId(); }) { - if (isMCTruth(stdCasc, "omega")) { - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/MassOmega"), massOmega); - histos.fill(HIST(kTypeNames[type]) + HIST("/Rec-Truth/Omega"), massOmega, pt, mult); - } + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/FiltersOmega"), 5.5); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec/MassOmega"), massOmega); + fillHist(histos.get(HIST(TypeNames[Type]) + HIST("/Rec/Omega")), binFillOmega, efficiencyOmega, efficiencyOmegaErr, purityOmega, purityOmegaErr); + if (fillTruthOmega) { + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/FiltersOmega"), 5.5); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/MassOmega"), massOmega); + histos.fill(HIST(TypeNames[Type]) + HIST("/Rec-Truth/Omega"), massOmega, pt, mult); } } } @@ -706,52 +905,89 @@ struct StrangeCascTrack { void init(InitContext const&) { // for all events processing - histos.add("Events/EvCounter", "Event Counter", kTH1F, {{1, 0, 1}}); - histos.add("Events/PVx", "PV x position", kTH1F, {{200, -0.1, 0.1}}); - histos.add("Events/PVy", "PV y position", kTH1F, {{200, -0.1, 0.1}}); - histos.add("Events/PVz", "PV z position", kTH1F, {{100, -20, 20}}); - histos.add("Events/Mult", "Multiplicity", kTH1F, {axesConfig.axisMult}); + histos.add("NoSel-Events/EvCounter", "Event Counter", kTH1F, {{1, 0, 1}}); + histos.add("NoSel-Events/PVxy", "PV xy position", kTH2F, {{200, -0.1, 0.1}, {200, -0.1, 0.1}}); + histos.add("NoSel-Events/PVz", "PV z position", kTH1F, {{100, -20, 20}}); + histos.add("NoSel-Events/Mult", "Multiplicity", kTH1F, {axesConfig.axisMult}); + // for all events processing + histos.add("Rec-Events/EvCounter", "Event Counter", kTH1F, {{1, 0, 1}}); + histos.add("Rec-Events/PVxy", "PV xy position", kTH2F, {{200, -0.1, 0.1}, {200, -0.1, 0.1}}); + histos.add("Rec-Events/PVz", "PV z position", kTH1F, {{100, -20, 20}}); + histos.add("Rec-Events/Mult", "Multiplicity", kTH1F, {axesConfig.axisMult}); + histos.add("Rec-Events/EvFilter", "Event Filter", kTH1F, {{4, 0, 4}}); + histos.get(HIST("Rec-Events/EvFilter"))->GetXaxis()->SetBinLabel(1, "INEL>0"); + histos.get(HIST("Rec-Events/EvFilter"))->GetXaxis()->SetBinLabel(2, "PVz cut"); + histos.get(HIST("Rec-Events/EvFilter"))->GetXaxis()->SetBinLabel(3, "sel8"); + histos.get(HIST("Rec-Events/EvFilter"))->GetXaxis()->SetBinLabel(4, "all"); // for cascade processing - static_for<0, 1>([&](auto type) { + static_for<0, 1>([&](auto Type) { // no selections applied - histos.add(Form("%s/NoSel/Phi", kTypeNames[type].data()), "Phi", kTH1F, {axesConfig.axisPhi}); - histos.add(Form("%s/NoSel/Eta", kTypeNames[type].data()), "Eta", kTH1F, {axesConfig.axisEta}); - histos.add(Form("%s/NoSel/DCAxy", kTypeNames[type].data()), "DCA to xy", kTH1F, {axesConfig.axisDCAxy}); - histos.add(Form("%s/NoSel/DCAz", kTypeNames[type].data()), "DCA to z", kTH1F, {axesConfig.axisDCAz}); - histos.add(Form("%s/NoSel/BachCosPA", kTypeNames[type].data()), "Bachelor cosPA", kTH1F, {{202, -1.1, 1.1}}); - histos.add(Form("%s/NoSel/V0CosPA", kTypeNames[type].data()), "V0 cosPA", kTH1F, {{202, -1.1, 1.1}}); - histos.add(Form("%s/NoSel/EvMult", kTypeNames[type].data()), "Multiplicity of events with >=1 cascade", kTH1F, {axesConfig.axisMult}); - histos.add(Form("%s/NoSel/MassXi", kTypeNames[type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisXiMass}); - histos.add(Form("%s/NoSel/MassOmega", kTypeNames[type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisOmegaMass}); + histos.add(Form("%s/NoSel/Filters/PropDCAxy", TypeNames[Type].data()), "DCA to xy (propagated)", kTH1F, {axesConfig.axisDCAxy}); + histos.add(Form("%s/NoSel/Filters/PropDCAz", TypeNames[Type].data()), "DCA to z (propagated)", kTH1F, {axesConfig.axisDCAz}); + histos.add(Form("%s/NoSel/Filters/CalcDCA", TypeNames[Type].data()), "DCA (calculated)", kTH1F, {axesConfig.axisDCAxy}); + histos.add(Form("%s/NoSel/Filters/BachCosPA", TypeNames[Type].data()), "Bachelor cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/NoSel/Filters/V0CosPA", TypeNames[Type].data()), "V0 cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/NoSel/Filters/CascCosPA", TypeNames[Type].data()), "V0 cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/NoSel/Filters/RapidityXi", TypeNames[Type].data()), "y under Xi hypothesis", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/NoSel/Filters/RapidityOmega", TypeNames[Type].data()), "y under Omega hypothesis", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/NoSel/Filters/EtaDau", TypeNames[Type].data()), "|#eta| of dau tracks", kTH1F, {axesConfig.axisEta}); + histos.add(Form("%s/NoSel/EvMult", TypeNames[Type].data()), "Multiplicity of events with >=1 cascade", kTH1F, {axesConfig.axisMult}); + histos.add(Form("%s/NoSel/MassXi", TypeNames[Type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisXiMass}); + histos.add(Form("%s/NoSel/MassOmega", TypeNames[Type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisOmegaMass}); // mc truth for no selectrion - histos.add(Form("%s/NoSel-Truth/Phi", kTypeNames[type].data()), "Phi", kTH1F, {axesConfig.axisPhi}); - histos.add(Form("%s/NoSel-Truth/Eta", kTypeNames[type].data()), "Eta", kTH1F, {axesConfig.axisEta}); - histos.add(Form("%s/NoSel-Truth/DCAxy", kTypeNames[type].data()), "DCA to xy", kTH1F, {axesConfig.axisDCAxy}); - histos.add(Form("%s/NoSel-Truth/DCAz", kTypeNames[type].data()), "DCA to z", kTH1F, {axesConfig.axisDCAz}); - histos.add(Form("%s/NoSel-Truth/DCAzVSpt", kTypeNames[type].data()), "DCA to z vs pT", kTH2F, {axesConfig.axisPt, axesConfig.axisDCAz}); - histos.add(Form("%s/NoSel-Truth/BachCosPA", kTypeNames[type].data()), "Bachelor cosPA", kTH1F, {{202, -1.1, 1.1}}); - histos.add(Form("%s/NoSel-Truth/V0CosPA", kTypeNames[type].data()), "V0 cosPA", kTH1F, {{202, -1.1, 1.1}}); - histos.add(Form("%s/NoSel-Truth/EvMult", kTypeNames[type].data()), "Multiplicity of events with >=1 cascade", kTH1F, {axesConfig.axisMult}); - histos.add(Form("%s/NoSel-Truth/MassXi", kTypeNames[type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisXiMass}); - histos.add(Form("%s/NoSel-Truth/MassOmega", kTypeNames[type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisOmegaMass}); + histos.add(Form("%s/NoSel-Truth/Filters/PropDCAxy", TypeNames[Type].data()), "DCA to xy (propagated)", kTH1F, {axesConfig.axisDCAxy}); + histos.add(Form("%s/NoSel-Truth/Filters/PropDCAz", TypeNames[Type].data()), "DCA to z (propagated)", kTH1F, {axesConfig.axisDCAz}); + histos.add(Form("%s/NoSel-Truth/Filters/CalcDCA", TypeNames[Type].data()), "DCA (calculated)", kTH1F, {axesConfig.axisDCAxy}); + histos.add(Form("%s/NoSel-Truth/Filters/BachCosPA", TypeNames[Type].data()), "Bachelor cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/NoSel-Truth/Filters/V0CosPA", TypeNames[Type].data()), "V0 cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/NoSel-Truth/Filters/CascCosPA", TypeNames[Type].data()), "V0 cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/NoSel-Truth/Filters/RapidityXi", TypeNames[Type].data()), "y under Xi hypothesis", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/NoSel-Truth/Filters/RapidityOmega", TypeNames[Type].data()), "y under Omega hypothesis", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/NoSel-Truth/Filters/EtaDau", TypeNames[Type].data()), "|#eta| of dau tracks", kTH1F, {axesConfig.axisEta}); + histos.add(Form("%s/NoSel-Truth/EvMult", TypeNames[Type].data()), "Multiplicity of events with >=1 cascade", kTH1F, {axesConfig.axisMult}); + histos.add(Form("%s/NoSel-Truth/MassXi", TypeNames[Type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisXiMass}); + histos.add(Form("%s/NoSel-Truth/MassOmega", TypeNames[Type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisOmegaMass}); + // xi and omega selection statistics + histos.add(Form("%s/Rec/FiltersXi", TypeNames[Type].data()), "main cascade filters for Xi", kTH1F, {{5, 0, 5}}); + histos.add(Form("%s/Rec/GenFiltersXi", TypeNames[Type].data()), "general cascade filters for Xi", kTH1F, {{9, 0, 9}}); + histos.add(Form("%s/Rec/FiltersOmega", TypeNames[Type].data()), "main cascade filters for Omega", kTH1F, {{6, 0, 6}}); + histos.add(Form("%s/Rec/GenFiltersOmega", TypeNames[Type].data()), "general cascade filters for Omega", kTH1F, {{9, 0, 9}}); + histos.add(Form("%s/Rec/Filters/PropDCAxy", TypeNames[Type].data()), "DCA to xy (propagated)", kTH1F, {axesConfig.axisDCAxy}); + histos.add(Form("%s/Rec/Filters/PropDCAz", TypeNames[Type].data()), "DCA to z (propagated)", kTH1F, {axesConfig.axisDCAz}); + histos.add(Form("%s/Rec/Filters/CalcDCA", TypeNames[Type].data()), "DCA (calculated)", kTH1F, {axesConfig.axisDCAxy}); + histos.add(Form("%s/Rec/Filters/BachCosPA", TypeNames[Type].data()), "Bachelor cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/Rec/Filters/V0CosPA", TypeNames[Type].data()), "V0 cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/Rec/Filters/CascCosPA", TypeNames[Type].data()), "V0 cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/Rec/Filters/RapidityXi", TypeNames[Type].data()), "y under Xi hypothesis", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/Rec/Filters/RapidityOmega", TypeNames[Type].data()), "y under Omega hypothesis", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/Rec/Filters/EtaDau", TypeNames[Type].data()), "|#eta| of dau tracks", kTH1F, {axesConfig.axisEta}); // passed all applied sels - histos.add(Form("%s/Rec/MassOmega", kTypeNames[type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisOmegaMass}); - histos.add(Form("%s/Rec/MassXi", kTypeNames[type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisXiMass}); - histos.add(Form("%s/Rec/Omega", kTypeNames[type].data()), "", kTHnD, {axesConfig.axisOmegaMass, axesConfig.axisPt, axesConfig.axisMult}); - histos.add(Form("%s/Rec/Xi", kTypeNames[type].data()), "", kTHnD, {axesConfig.axisXiMass, axesConfig.axisPt, axesConfig.axisMult}); + histos.add(Form("%s/Rec/EvMult", TypeNames[Type].data()), "Multiplicity of events with >=1 cascade", kTH1F, {axesConfig.axisMult}); + histos.add(Form("%s/Rec/MassXi", TypeNames[Type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisXiMass}); + histos.add(Form("%s/Rec/MassOmega", TypeNames[Type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisOmegaMass}); + histos.add(Form("%s/Rec/Xi", TypeNames[Type].data()), "", kTHnD, {axesConfig.axisXiMass, axesConfig.axisPt, axesConfig.axisMult}); + histos.add(Form("%s/Rec/Omega", TypeNames[Type].data()), "", kTHnD, {axesConfig.axisOmegaMass, axesConfig.axisPt, axesConfig.axisMult}); // mc truth for all passed selections - histos.add(Form("%s/Rec-Truth/Phi", kTypeNames[type].data()), "Phi", kTH1F, {axesConfig.axisPhi}); - histos.add(Form("%s/Rec-Truth/Eta", kTypeNames[type].data()), "Eta", kTH1F, {axesConfig.axisEta}); - histos.add(Form("%s/Rec-Truth/DCAxy", kTypeNames[type].data()), "DCA to xy", kTH1F, {axesConfig.axisDCAxy}); - histos.add(Form("%s/Rec-Truth/DCAz", kTypeNames[type].data()), "DCA to z", kTH1F, {axesConfig.axisDCAz}); - histos.add(Form("%s/Rec-Truth/DCAzVSpt", kTypeNames[type].data()), "DCA to z vs pT", kTH2F, {axesConfig.axisPt, axesConfig.axisDCAz}); - histos.add(Form("%s/Rec-Truth/BachCosPA", kTypeNames[type].data()), "Bachelor cosPA", kTH1F, {{202, -1.1, 1.1}}); - histos.add(Form("%s/Rec-Truth/V0CosPA", kTypeNames[type].data()), "V0 cosPA", kTH1F, {{202, -1.1, 1.1}}); - histos.add(Form("%s/Rec-Truth/EvMult", kTypeNames[type].data()), "Multiplicity of events with >=1 cascade", kTH1F, {axesConfig.axisMult}); - histos.add(Form("%s/Rec-Truth/MassXi", kTypeNames[type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisXiMass}); - histos.add(Form("%s/Rec-Truth/MassOmega", kTypeNames[type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisOmegaMass}); - histos.add(Form("%s/Rec-Truth/Omega", kTypeNames[type].data()), "", kTHnD, {axesConfig.axisOmegaMass, axesConfig.axisPt, axesConfig.axisMult}); - histos.add(Form("%s/Rec-Truth/Xi", kTypeNames[type].data()), "", kTHnD, {axesConfig.axisXiMass, axesConfig.axisPt, axesConfig.axisMult}); + // xi and omega truth selection statistics + histos.add(Form("%s/Rec-Truth/FiltersXi", TypeNames[Type].data()), "main cascade filters for Xi", kTH1F, {{5, 0, 5}}); + histos.add(Form("%s/Rec-Truth/GenFiltersXi", TypeNames[Type].data()), "general cascade filters for Xi", kTH1F, {{9, 0, 9}}); + histos.add(Form("%s/Rec-Truth/FiltersOmega", TypeNames[Type].data()), "main cascade filters for Omega", kTH1F, {{6, 0, 6}}); + histos.add(Form("%s/Rec-Truth/GenFiltersOmega", TypeNames[Type].data()), "general cascade filters for Omega", kTH1F, {{9, 0, 9}}); + histos.add(Form("%s/Rec-Truth/Filters/PropDCAxy", TypeNames[Type].data()), "DCA to xy (propagated)", kTH1F, {axesConfig.axisDCAxy}); + histos.add(Form("%s/Rec-Truth/Filters/PropDCAz", TypeNames[Type].data()), "DCA to z (propagated)", kTH1F, {axesConfig.axisDCAz}); + histos.add(Form("%s/Rec-Truth/Filters/CalcDCA", TypeNames[Type].data()), "DCA (calculated)", kTH1F, {axesConfig.axisDCAxy}); + histos.add(Form("%s/Rec-Truth/Filters/BachCosPA", TypeNames[Type].data()), "Bachelor cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/Rec-Truth/Filters/V0CosPA", TypeNames[Type].data()), "V0 cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/Rec-Truth/Filters/CascCosPA", TypeNames[Type].data()), "V0 cosPA", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/Rec-Truth/Filters/RapidityXi", TypeNames[Type].data()), "y under Xi hypothesis", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/Rec-Truth/Filters/RapidityOmega", TypeNames[Type].data()), "y under Omega hypothesis", kTH1F, {{200, -1.0, 1.0}}); + histos.add(Form("%s/Rec-Truth/Filters/EtaDau", TypeNames[Type].data()), "|#eta| of dau tracks", kTH1F, {axesConfig.axisEta}); + // truth that passed all sels + histos.add(Form("%s/Rec-Truth/EvMult", TypeNames[Type].data()), "Multiplicity of events with >=1 cascade", kTH1F, {axesConfig.axisMult}); + histos.add(Form("%s/Rec-Truth/MassXi", TypeNames[Type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisXiMass}); + histos.add(Form("%s/Rec-Truth/MassOmega", TypeNames[Type].data()), "Invariant mass hypothesis", kTH1F, {axesConfig.axisOmegaMass}); + histos.add(Form("%s/Rec-Truth/Omega", TypeNames[Type].data()), "", kTHnD, {axesConfig.axisOmegaMass, axesConfig.axisPt, axesConfig.axisMult}); + histos.add(Form("%s/Rec-Truth/Xi", TypeNames[Type].data()), "", kTHnD, {axesConfig.axisXiMass, axesConfig.axisPt, axesConfig.axisMult}); }); // for MC-specific processing histos.add("MC/Gen/EvCounter", "Event Counter", kTH1F, {{1, 0, 1}}); @@ -759,8 +995,124 @@ struct StrangeCascTrack { histos.add("MC/Gen/Omega", "Omega", kTH2F, {axesConfig.axisPt, axesConfig.axisMult}); // generated Omegas histos.add("MC/Gen/PrimaryXi", "Xi primaries", kTH2F, {axesConfig.axisPt, axesConfig.axisMult}); // generated primary Xis histos.add("MC/Gen/PrimaryOmega", "Omega primaries", kTH2F, {axesConfig.axisPt, axesConfig.axisMult}); // generated primary Omegas - histos.add("MC/Rec/EvCounter", "Event Counter", kTH1F, {{1, 0, 1}}); // counter of all recreated events - histos.add("MC/Rec/EvMult", "Multiplicity", kTH1F, {axesConfig.axisMult}); // multiplicity of all recreated events + // label filter statistic bins for standard cascs + histos.get(HIST("Standard/Rec/FiltersXi"))->GetXaxis()->SetBinLabel(1, "p_{T}"); + histos.get(HIST("Standard/Rec/FiltersXi"))->GetXaxis()->SetBinLabel(2, "gen"); + histos.get(HIST("Standard/Rec/FiltersXi"))->GetXaxis()->SetBinLabel(3, "TPC"); + histos.get(HIST("Standard/Rec/FiltersXi"))->GetXaxis()->SetBinLabel(4, "TOF"); + histos.get(HIST("Standard/Rec/FiltersXi"))->GetXaxis()->SetBinLabel(5, "all"); + histos.get(HIST("Standard/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(1, "casc |y|"); + histos.get(HIST("Standard/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(2, "dau |#eta|"); + histos.get(HIST("Standard/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(3, "dau TPC cls"); + histos.get(HIST("Standard/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(4, "V0CosPA"); + histos.get(HIST("Standard/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(5, "BachCosPA"); + histos.get(HIST("Standard/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(6, "CascCosPA"); + histos.get(HIST("Standard/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(7, "PropDCAxy"); + histos.get(HIST("Standard/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(8, "PropDCAz"); + histos.get(HIST("Standard/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(9, "all"); + histos.get(HIST("Standard/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(1, "p_{T}"); + histos.get(HIST("Standard/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(2, "gen"); + histos.get(HIST("Standard/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(3, "TPC"); + histos.get(HIST("Standard/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(4, "TOF"); + histos.get(HIST("Standard/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(5, "CMR"); + histos.get(HIST("Standard/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(6, "all"); + histos.get(HIST("Standard/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(1, "casc |y|"); + histos.get(HIST("Standard/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(2, "dau |#eta|"); + histos.get(HIST("Standard/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(3, "dau TPC cls"); + histos.get(HIST("Standard/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(4, "V0CosPA"); + histos.get(HIST("Standard/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(5, "BachCosPA"); + histos.get(HIST("Standard/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(6, "CascCosPA"); + histos.get(HIST("Standard/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(7, "PropDCAxy"); + histos.get(HIST("Standard/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(8, "PropDCAz"); + histos.get(HIST("Standard/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(9, "all"); + histos.get(HIST("Standard/Rec-Truth/FiltersXi"))->GetXaxis()->SetBinLabel(1, "p_{T}"); + histos.get(HIST("Standard/Rec-Truth/FiltersXi"))->GetXaxis()->SetBinLabel(2, "gen"); + histos.get(HIST("Standard/Rec-Truth/FiltersXi"))->GetXaxis()->SetBinLabel(3, "TPC"); + histos.get(HIST("Standard/Rec-Truth/FiltersXi"))->GetXaxis()->SetBinLabel(4, "TOF"); + histos.get(HIST("Standard/Rec-Truth/FiltersXi"))->GetXaxis()->SetBinLabel(5, "all"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(1, "casc |y|"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(2, "dau |#eta|"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(3, "dau TPC cls"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(4, "V0CosPA"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(5, "BachCosPA"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(6, "CascCosPA"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(7, "PropDCAxy"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(8, "PropDCAz"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(9, "all"); + histos.get(HIST("Standard/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(1, "p_{T}"); + histos.get(HIST("Standard/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(2, "gen"); + histos.get(HIST("Standard/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(3, "TPC"); + histos.get(HIST("Standard/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(4, "TOF"); + histos.get(HIST("Standard/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(5, "CMR"); + histos.get(HIST("Standard/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(6, "all"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(1, "casc |y|"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(2, "dau |#eta|"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(3, "dau TPC cls"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(4, "V0CosPA"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(5, "BachCosPA"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(6, "CascCosPA"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(7, "PropDCAxy"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(8, "PropDCAz"); + histos.get(HIST("Standard/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(9, "all"); + // label filter statistic bins for tracked cascs + histos.get(HIST("Tracked/Rec/FiltersXi"))->GetXaxis()->SetBinLabel(1, "p_{T}"); + histos.get(HIST("Tracked/Rec/FiltersXi"))->GetXaxis()->SetBinLabel(2, "gen"); + histos.get(HIST("Tracked/Rec/FiltersXi"))->GetXaxis()->SetBinLabel(3, "TPC"); + histos.get(HIST("Tracked/Rec/FiltersXi"))->GetXaxis()->SetBinLabel(4, "TOF"); + histos.get(HIST("Tracked/Rec/FiltersXi"))->GetXaxis()->SetBinLabel(5, "all"); + histos.get(HIST("Tracked/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(1, "casc |y|"); + histos.get(HIST("Tracked/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(2, "dau |#eta|"); + histos.get(HIST("Tracked/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(3, "dau TPC cls"); + histos.get(HIST("Tracked/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(4, "V0CosPA"); + histos.get(HIST("Tracked/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(5, "BachCosPA"); + histos.get(HIST("Tracked/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(6, "CascCosPA"); + histos.get(HIST("Tracked/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(7, "PropDCAxy"); + histos.get(HIST("Tracked/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(8, "PropDCAz"); + histos.get(HIST("Tracked/Rec/GenFiltersXi"))->GetXaxis()->SetBinLabel(9, "all"); + histos.get(HIST("Tracked/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(1, "p_{T}"); + histos.get(HIST("Tracked/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(2, "gen"); + histos.get(HIST("Tracked/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(3, "TPC"); + histos.get(HIST("Tracked/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(4, "TOF"); + histos.get(HIST("Tracked/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(5, "CMR"); + histos.get(HIST("Tracked/Rec/FiltersOmega"))->GetXaxis()->SetBinLabel(6, "all"); + histos.get(HIST("Tracked/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(1, "casc |y|"); + histos.get(HIST("Tracked/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(2, "dau |#eta|"); + histos.get(HIST("Tracked/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(3, "dau TPC cls"); + histos.get(HIST("Tracked/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(4, "V0CosPA"); + histos.get(HIST("Tracked/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(5, "BachCosPA"); + histos.get(HIST("Tracked/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(6, "CascCosPA"); + histos.get(HIST("Tracked/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(7, "PropDCAxy"); + histos.get(HIST("Tracked/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(8, "PropDCAz"); + histos.get(HIST("Tracked/Rec/GenFiltersOmega"))->GetXaxis()->SetBinLabel(9, "all"); + histos.get(HIST("Tracked/Rec-Truth/FiltersXi"))->GetXaxis()->SetBinLabel(1, "p_{T}"); + histos.get(HIST("Tracked/Rec-Truth/FiltersXi"))->GetXaxis()->SetBinLabel(2, "gen"); + histos.get(HIST("Tracked/Rec-Truth/FiltersXi"))->GetXaxis()->SetBinLabel(3, "TPC"); + histos.get(HIST("Tracked/Rec-Truth/FiltersXi"))->GetXaxis()->SetBinLabel(4, "TOF"); + histos.get(HIST("Tracked/Rec-Truth/FiltersXi"))->GetXaxis()->SetBinLabel(5, "all"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(1, "casc |y|"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(2, "dau |#eta|"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(3, "dau TPC cls"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(4, "V0CosPA"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(5, "BachCosPA"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(6, "CascCosPA"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(7, "PropDCAxy"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(8, "PropDCAz"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersXi"))->GetXaxis()->SetBinLabel(9, "all"); + histos.get(HIST("Tracked/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(1, "p_{T}"); + histos.get(HIST("Tracked/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(2, "gen"); + histos.get(HIST("Tracked/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(3, "TPC"); + histos.get(HIST("Tracked/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(4, "TOF"); + histos.get(HIST("Tracked/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(5, "CMR"); + histos.get(HIST("Tracked/Rec-Truth/FiltersOmega"))->GetXaxis()->SetBinLabel(6, "all"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(1, "casc |y|"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(2, "dau |#eta|"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(3, "dau TPC cls"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(4, "V0CosPA"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(5, "BachCosPA"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(6, "CascCosPA"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(7, "PropDCAxy"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(8, "PropDCAz"); + histos.get(HIST("Tracked/Rec-Truth/GenFiltersOmega"))->GetXaxis()->SetBinLabel(9, "all"); } void processDerivedData(DerCollisionWMults::iterator const& collision, DerCascDatas const& allCascs, DerTraCascDatas const& traCascs, DauTracks const&) @@ -769,8 +1121,15 @@ struct StrangeCascTrack { if (doApplyEfficiency1D || doApplyPurity1D || doApplyEfficiency2D || doApplyPurity2D) { initEfficiencyFromCCDB(collision.runNumber(), collision.timestamp()); } - analyseCascs(collision, allCascs); // process all cascades - analyseCascs(collision, traCascs); // process tracked cascades + if (isValidEvent(collision)) { + histos.fill(HIST("Rec-Events/EvCounter"), 0.5); + histos.fill(HIST("Rec-Events/PVxy"), collision.posX(), collision.posY()); + histos.fill(HIST("Rec-Events/PVz"), collision.posZ()); + double mult = (doProcesspp || doProcesspO) ? collision.centFT0M() : collision.centFT0C(); + histos.fill(HIST("Rec-Events/Mult"), mult); + analyseCascs(collision, allCascs); // process all cascades + analyseCascs(collision, traCascs); // process tracked cascades + } } void processDerivedMCGen(aod::StraMCCollisions const& genColls, DerMCGenCascades const& genCascs, soa::Join const& recColls) @@ -780,23 +1139,21 @@ struct StrangeCascTrack { // (for efficiency calculation) only take reconstructed events auto slicedRecColls = recColls.sliceBy(perMcCollision, genColl.globalIndex()); for (auto const& recColl : slicedRecColls) { - histos.fill(HIST("MC/Rec/EvCounter"), 0.5); - double casc_mult = (doProcesspp || doProcesspO) ? recColl.centFT0M() : recColl.centFT0C(); - histos.fill(HIST("MC/Rec/EvMult"), casc_mult); + double cascMult = (doProcesspp || doProcesspO) ? recColl.centFT0M() : recColl.centFT0C(); int64_t genCollId = recColl.straMCCollisionId(); for (auto const& casc : genCascs) { if (casc.straMCCollisionId() != genCollId) continue; // safety check - double casc_pt = std::sqrt(std::pow(casc.pxMC(), 2) + std::pow(casc.pyMC(), 2)); - if (isValidPDG(casc, "xi")) - histos.fill(HIST("MC/Gen/Xi"), casc_pt, casc_mult); - if (isValidPDG(casc, "omega")) - histos.fill(HIST("MC/Gen/Omega"), casc_pt, casc_mult); + double cascPt = std::sqrt(std::pow(casc.pxMC(), 2) + std::pow(casc.pyMC(), 2)); + if (isValidPDG(casc, "Xi")) + histos.fill(HIST("MC/Gen/Xi"), cascPt, cascMult); + if (isValidPDG(casc, "Omega")) + histos.fill(HIST("MC/Gen/Omega"), cascPt, cascMult); if (casc.isPhysicalPrimary()) { - if (isValidPDG(casc, "xi")) - histos.fill(HIST("MC/Gen/PrimaryXi"), casc_pt, casc_mult); - if (isValidPDG(casc, "omega")) - histos.fill(HIST("MC/Gen/PrimaryOmega"), casc_pt, casc_mult); + if (isValidPDG(casc, "Xi")) + histos.fill(HIST("MC/Gen/PrimaryXi"), cascPt, cascMult); + if (isValidPDG(casc, "Omega")) + histos.fill(HIST("MC/Gen/PrimaryOmega"), cascPt, cascMult); } } } @@ -809,8 +1166,15 @@ struct StrangeCascTrack { if (doApplyEfficiency1D || doApplyPurity1D || doApplyEfficiency2D || doApplyPurity2D) { initEfficiencyFromCCDB(collision.runNumber(), collision.timestamp()); } - analyseCascs(collision, allCascs); // process all cascades - analyseCascs(collision, traCascs); // process tracked cascades + if (isValidEvent(collision)) { + histos.fill(HIST("Rec-Events/EvCounter"), 0.5); + histos.fill(HIST("Rec-Events/PVxy"), collision.posX(), collision.posY()); + histos.fill(HIST("Rec-Events/PVz"), collision.posZ()); + double mult = (doProcesspp || doProcesspO) ? collision.centFT0M() : collision.centFT0C(); + histos.fill(HIST("Rec-Events/Mult"), mult); + analyseCascs(collision, allCascs); // process all cascades + analyseCascs(collision, traCascs); // process tracked cascades + } } PROCESS_SWITCH(StrangeCascTrack, processDerivedData, "process derived data", true);