diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx index 6e4be1f95a1..6fb31897531 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx @@ -69,6 +69,7 @@ #include #include +#include #include #include #include @@ -234,6 +235,27 @@ struct HfCandidateCreatorXic0Omegac0Qa { LOGF(info, " Chosen reconstruction info: ToXiPi(%d)/ ToOmegaPi(%d)/ ToOmegaKa(%d)", configs.createToXiPi.value, configs.createOmegaCToOmegaPi.value, configs.createOmegaCToOmegaK.value); LOGF(info, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + // Histtograms for QA - Applied pre selections in lfBuilding + registry.add("PreSelectQA/h2V0PosDauPtEta", "V0 pos daughter, pT vs Eta;pT(GeV);eta", {kTH2F, {{200, 0.0, 10.0}, {200, -5.0, 5.0}}}); + registry.add("PreSelectQA/h2V0NegDauPtEta", "V0 neg daughter, pT vs Eta;pT(GeV);eta", {kTH2F, {{200, 0.0, 10.0}, {200, -5.0, 5.0}}}); + registry.add("PreSelectQA/h2BachPtEta", "Casc bachelor, pT vs Eta;pT(GeV);eta", {kTH2F, {{200, 0.0, 10.0}, {200, -5.0, 5.0}}}); + + registry.add("PreSelectQA/h2V0PosDauPtDcaXY", "V0 pos daughter, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{200, 0.0, 10.0}, {2000, -10.0, 10.0}}}); + registry.add("PreSelectQA/h2V0NegDauPtDcaXY", "V0 neg daughter, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{200, 0.0, 10.0}, {2000, -10.0, 10.0}}}); + registry.add("PreSelectQA/h2BachPtDcaXY", "Casc bachelor, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{200, 0.0, 10.0}, {2000, -10.0, 10.0}}}); + + registry.add("PreSelectQA/h2V0PosDauPtTpcNClsCrossedRows", "V0 pos daughter, pT vs TPCNClsCrossedRows;pT;TpcNClsCrossedRows", {kTH2F, {{200, 0.0, 10.0}, {200, 0.0, 200}}}); + registry.add("PreSelectQA/h2V0NegDauPtTpcNClsCrossedRows", "V0 neg daughter, pT vs TPCNClsCrossedRows;pT;TpcNClsCrossedRows", {kTH2F, {{200, 0.0, 10.0}, {200, 0.0, 200}}}); + registry.add("PreSelectQA/h2BachPtTpcNClsCrossedRows", "Casc bachelor, pT vs TPCNClsCrossedRows;pT;TpcNClsCrossedRows", {kTH2F, {{200, 0.0, 10.0}, {200, 0.0, 200}}}); + + registry.add("PreSelectQA/h2V0PtRadius", "V0, pT vs radius;pT;V0Radius", {kTH2F, {{200, 0.0, 20.0}, {1000, 0.0, 100}}}); + registry.add("PreSelectQA/h2V0PtDaughterDca", "V0, pT vs Dca between daughters;pT;Dca between Daughters", {kTH2F, {{200, 0.0, 20.0}, {200, -10.0, 10}}}); + registry.add("PreSelectQA/h2V0PtCosPA", "V0, pT vs cosPA;pT;CosPA", {kTH2F, {{200, 0.0, 20.0}, {100, 0.9, 1.0}}}); + + registry.add("PreSelectQA/h2CascPtRadius", "Casc, pT vs radius;pT;CascRadius", {kTH2F, {{200, 0.0, 20.0}, {1000, 0.0, 100}}}); + registry.add("PreSelectQA/h2CascPtDaughterDca", "Casc, pT vs Dca between daughters;pT;Dca between Daughters", {kTH2F, {{200, 0.0, 20.0}, {200, -10.0, 10}}}); + registry.add("PreSelectQA/h2CascPtCosPA", "Casc, pT vs cosPA;pT;CosPA", {kTH2F, {{200, 0.0, 20.0}, {100, 0.9, 1.0}}}); + // Add histogram to indicate which sv method was used registry.add("hVertexerType", "Use KF or DCAFitterN;Vertexer type;entries", {kTH1F, {{2, 0.0, 2.0}}}); registry.get(HIST("hVertexerType"))->GetXaxis()->SetBinLabel(1 + aod::hf_cand::VertexerType::DCAFitter, "DCAFitter"); @@ -418,6 +440,25 @@ struct HfCandidateCreatorXic0Omegac0Qa { registry.fill(HIST("hCascPt"), RecoDecay::pt(straHelper.cascade.cascadeMomentum)); if (configs.fillHistograms) { hCandCounter->Fill(CascReconstructed); + registry.fill(HIST("PreSelectQA/h2V0PosDauPtEta"), posTrack.pt(), posTrack.eta()); + registry.fill(HIST("PreSelectQA/h2V0NegDauPtEta"), negTrack.pt(), negTrack.eta()); + registry.fill(HIST("PreSelectQA/h2BachPtEta"), bachTrack.pt(), bachTrack.eta()); + + registry.fill(HIST("PreSelectQA/h2V0PosDauPtDcaXY"), posTrack.pt(), straHelper.cascade.positiveDCAxy); + registry.fill(HIST("PreSelectQA/h2V0NegDauPtDcaXY"), negTrack.pt(), straHelper.cascade.negativeDCAxy); + registry.fill(HIST("PreSelectQA/h2BachPtDcaXY"), bachTrack.pt(), straHelper.cascade.bachelorDCAxy); + + registry.fill(HIST("PreSelectQA/h2V0PosDauPtTpcNClsCrossedRows"), posTrack.pt(), posTrack.tpcNClsCrossedRows()); + registry.fill(HIST("PreSelectQA/h2V0NegDauPtTpcNClsCrossedRows"), negTrack.pt(), negTrack.tpcNClsCrossedRows()); + registry.fill(HIST("PreSelectQA/h2BachPtTpcNClsCrossedRows"), bachTrack.pt(), bachTrack.tpcNClsCrossedRows()); + + registry.fill(HIST("PreSelectQA/h2V0PtRadius"), RecoDecay::pt(straHelper.cascade.v0Momentum), std::hypot(straHelper.cascade.v0Position[0], straHelper.cascade.v0Position[1])); + registry.fill(HIST("PreSelectQA/h2V0PtDaughterDca"), RecoDecay::pt(straHelper.cascade.v0Momentum), straHelper.cascade.v0DaughterDCA); + registry.fill(HIST("PreSelectQA/h2V0PtCosPA"), RecoDecay::pt(straHelper.cascade.v0Momentum), std::cos(straHelper.v0.pointingAngle)); + + registry.fill(HIST("PreSelectQA/h2CascPtRadius"), RecoDecay::pt(straHelper.cascade.cascadeMomentum), std::hypot(straHelper.cascade.cascadePosition[0], straHelper.cascade.cascadePosition[1])); + registry.fill(HIST("PreSelectQA/h2CascPtDaughterDca"), RecoDecay::pt(straHelper.cascade.cascadeMomentum), straHelper.cascade.cascadeDaughterDCA); + registry.fill(HIST("PreSelectQA/h2CascPtCosPA"), RecoDecay::pt(straHelper.cascade.cascadeMomentum), std::cos(straHelper.cascade.pointingAngle)); } //------------------------------Create cascade track------------------------------ @@ -659,6 +700,26 @@ struct HfCandidateCreatorXic0Omegac0Qa { registry.fill(HIST("hCascPt"), RecoDecay::pt(kfCasc.GetPx(), kfCasc.GetPy())); if (configs.fillHistograms) { hCandCounter->Fill(CascReconstructed); + } else { + registry.fill(HIST("PreSelectQA/h2V0PosDauPtEta"), posTrack.pt(), posTrack.eta()); + registry.fill(HIST("PreSelectQA/h2V0NegDauPtEta"), negTrack.pt(), negTrack.eta()); + registry.fill(HIST("PreSelectQA/h2BachPtEta"), bachTrack.pt(), bachTrack.eta()); + + registry.fill(HIST("PreSelectQA/h2V0PosDauPtDcaXY"), posTrack.pt(), straHelper.cascade.positiveDCAxy); + registry.fill(HIST("PreSelectQA/h2V0NegDauPtDcaXY"), negTrack.pt(), straHelper.cascade.negativeDCAxy); + registry.fill(HIST("PreSelectQA/h2BachPtDcaXY"), bachTrack.pt(), straHelper.cascade.bachelorDCAxy); + + registry.fill(HIST("PreSelectQA/h2V0PosDauPtTpcNClsCrossedRows"), posTrack.pt(), posTrack.tpcNClsCrossedRows()); + registry.fill(HIST("PreSelectQA/h2V0NegDauPtTpcNClsCrossedRows"), negTrack.pt(), negTrack.tpcNClsCrossedRows()); + registry.fill(HIST("PreSelectQA/h2BachPtTpcNClsCrossedRows"), bachTrack.pt(), bachTrack.tpcNClsCrossedRows()); + + registry.fill(HIST("PreSelectQA/h2V0PtRadius"), RecoDecay::pt(straHelper.cascade.v0Momentum), std::hypot(straHelper.cascade.v0Position[0], straHelper.cascade.v0Position[1])); + registry.fill(HIST("PreSelectQA/h2V0PtDaughterDca"), RecoDecay::pt(straHelper.cascade.v0Momentum), straHelper.cascade.v0DaughterDCA); + registry.fill(HIST("PreSelectQA/h2V0PtCosPA"), RecoDecay::pt(straHelper.cascade.v0Momentum), std::cos(straHelper.v0.pointingAngle)); + + registry.fill(HIST("PreSelectQA/h2CascPtRadius"), RecoDecay::pt(straHelper.cascade.cascadeMomentum), std::hypot(straHelper.cascade.cascadePosition[0], straHelper.cascade.cascadePosition[1])); + registry.fill(HIST("PreSelectQA/h2CascPtDaughterDca"), RecoDecay::pt(straHelper.cascade.cascadeMomentum), straHelper.cascade.cascadeDaughterDCA); + registry.fill(HIST("PreSelectQA/h2CascPtCosPA"), RecoDecay::pt(straHelper.cascade.cascadeMomentum), std::cos(straHelper.cascade.pointingAngle)); } //~~~~~~~Construct Charm Baryon with KF~~~~~~~ diff --git a/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx b/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx index 1cba8655af7..1fd56f56375 100644 --- a/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx +++ b/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx @@ -45,8 +45,10 @@ #include +#include #include #include +#include #include #include @@ -89,12 +91,9 @@ struct HfCandidateSelectorToXiPiQa { Configurable> onnxFileNames{"onnxFileNames", std::vector{"ModelHandler_onnx_Xic0ToXipiKf.onnx"}, "ONNX file names for each pT bin (if not from CCDB full path)"}; Configurable timestampCCDB{"timestampCCDB", -1, "timestamp of the ONNX file for ML model used to query in CCDB"}; Configurable loadModelsFromCCDB{"loadModelsFromCCDB", false, "Flag to enable or disable the loading of models from CCDB"}; - // LF analysis selections + // Topological selections Configurable etaTrackCharmBachMax{"etaTrackCharmBachMax", 0.8, "Max absolute value of eta for charm baryon bachelor"}; - Configurable etaTrackLFDauMax{"etaTrackLFDauMax", 1.0, "Max absolute value of eta for V0 and cascade daughters"}; Configurable ptPiFromCascMin{"ptPiFromCascMin", 0.15, "Min pT pi <--Casc"}; - Configurable radiusCascMin{"radiusCascMin", 0.6, "Min Cascade radius"}; - Configurable radiusV0Min{"radiusV0Min", 1.2, "Min V0 radius"}; Configurable impactParXYPiFromCharmBaryonMin{"impactParXYPiFromCharmBaryonMin", 0., "Min dcaxy pi from charm baryon track to pV"}; Configurable impactParXYPiFromCharmBaryonMax{"impactParXYPiFromCharmBaryonMax", 10., "Max dcaxy pi from charm baryon track to pV"}; Configurable impactParXYCascMin{"impactParXYCascMin", 0., "Min dcaxy casc track to pV"}; @@ -110,25 +109,26 @@ struct HfCandidateSelectorToXiPiQa { Configurable invMassCharmBaryonMin{"invMassCharmBaryonMin", 2.0, "Lower limit of invariant mass spectrum charm baryon"}; Configurable invMassCharmBaryonMax{"invMassCharmBaryonMax", 3.1, "Upper limit of invariant mass spectrum charm baryon"}; // PID options - Configurable usePidTpcOnly{"usePidTpcOnly", false, "Perform PID using only TPC"}; - Configurable usePidTpcOrTof{"usePidTpcOrTof", true, "Perform PID using TPC or TOF"}; + Configurable usePidTpcOnly{"usePidTpcOnly", true, "Perform PID using only TPC"}; + Configurable usePidTpcOrTof{"usePidTpcOrTof", false, "Perform PID using TPC or TOF"}; + Configurable usePidTpcAndTof{"usePidTpcAndTof", false, "Perform PID using TPC and TOF"}; // PID - TPC selections Configurable ptPiPidTpcMin{"ptPiPidTpcMin", -1, "Lower bound of track pT for TPC PID for pion selection"}; Configurable ptPiPidTpcMax{"ptPiPidTpcMax", 9999.9, "Upper bound of track pT for TPC PID for pion selection"}; - Configurable nSigmaTpcPiMax{"nSigmaTpcPiMax", 3., "Nsigma cut on TPC only for pion selection"}; + Configurable nSigmaTpcPiMax{"nSigmaTpcPiMax", 5., "Nsigma cut on TPC only for pion selection"}; Configurable nSigmaTpcCombinedPiMax{"nSigmaTpcCombinedPiMax", 0., "Nsigma cut on TPC combined with TOF for pion selection"}; Configurable ptPrPidTpcMin{"ptPrPidTpcMin", -1, "Lower bound of track pT for TPC PID for proton selection"}; Configurable ptPrPidTpcMax{"ptPrPidTpcMax", 9999.9, "Upper bound of track pT for TPC PID for proton selection"}; - Configurable nSigmaTpcPrMax{"nSigmaTpcPrMax", 3., "Nsigma cut on TPC only for proton selection"}; + Configurable nSigmaTpcPrMax{"nSigmaTpcPrMax", 5., "Nsigma cut on TPC only for proton selection"}; Configurable nSigmaTpcCombinedPrMax{"nSigmaTpcCombinedPrMax", 0., "Nsigma cut on TPC combined with TOF for proton selection"}; // PID - TOF selections Configurable ptPiPidTofMin{"ptPiPidTofMin", -1, "Lower bound of track pT for TOF PID for pion selection"}; Configurable ptPiPidTofMax{"ptPiPidTofMax", 9999.9, "Upper bound of track pT for TOF PID for pion selection"}; - Configurable nSigmaTofPiMax{"nSigmaTofPiMax", 3., "Nsigma cut on TOF only for pion selection"}; + Configurable nSigmaTofPiMax{"nSigmaTofPiMax", 5., "Nsigma cut on TOF only for pion selection"}; Configurable nSigmaTofCombinedPiMax{"nSigmaTofCombinedPiMax", 0., "Nsigma cut on TOF combined with TPC for pion selection"}; Configurable ptPrPidTofMin{"ptPrPidTofMin", -1, "Lower bound of track pT for TOF PID for proton selection"}; Configurable ptPrPidTofMax{"ptPrPidTofMax", 9999.9, "Upper bound of track pT for TOF PID for proton selection"}; - Configurable nSigmaTofPrMax{"nSigmaTofPrMax", 3., "Nsigma cut on TOF only for proton selection"}; + Configurable nSigmaTofPrMax{"nSigmaTofPrMax", 5., "Nsigma cut on TOF only for proton selection"}; Configurable nSigmaTofCombinedPrMax{"nSigmaTofCombinedPrMax", 0., "Nsigma cut on TOF combined with TPC for proton selection"}; // detector track quality selections Configurable nClustersTpcMin{"nClustersTpcMin", 70, "Minimum number of TPC clusters requirement"}; @@ -152,12 +152,58 @@ struct HfCandidateSelectorToXiPiQa { HistogramRegistry registry{"registry"}; // for QA of selections + enum Xic0Selections { fromCreator = 0, + // Topologiccal selections + passPtPiFromCasc, + passImpactParXYCascadeToPv, + passImpactParZCascadeToPv, + passCpaV0ToCascade, // -> Only Applied with KF + passChi2GeoV0, // -> Only Applied with KF + passChi2GeoCascade, // -> Only Applied with KF + passChi2TopoOverNdfV0ToPv, // -> Only Applied with KF + passChi2TopoOverNdfCascadeToPv, // -> Only Applied with KF + passChi2TopoOverNdfV0ToCascade, // -> Only Applied with KF + passDecayLengthNormKfV0, // -> Only Applied with KF + passDecayLengthNormKfCascade, // -> Only Applied with KF + passEtaCharmBach, + passPtCharmBach, + passImpactParXYCharmBachToPv, + passImpactParZCharmBachToPv, + passYCharmHadronMax, + passCpaCascadeToCharmHadron, // -> Only Applied with KF + passChi2GeoXic, // -> Only Applied with KF + passChi2TopoXicToPv, // -> Only Applied with KF + passChi2TopoCascToXic, // -> Only Applied with KF + passDecayLengthXYXic, // -> Only Appled with KF + passCTauXic, // -> Only Applied with KF + // Tpc & ITS Clueter/Track quality selections + passTrackTpcQualityPiFromLam, + passTrackTpcQualityPrFromLam, + passTrackTpcQualityPiFromCasc, + passTrackTpcQualityPiFromCharm, + passTrackItsQualityPiFromCharm, + // PID selections + passStatusPidLambda, + passStatusPidCascade, + passStatusPidCharmBaryon, + // ML Selections + passMlSelection, + // Number of applied selections + NSelections }; + void init(InitContext const&) { + // Exit if workflow is not configured correctly if (doprocessSelectionDCAFitter && doprocessSelectionKFParticle) { LOGF(fatal, "Enable only one XiPi selector mode"); } + std::vector pidSelectionOptions{usePidTpcOnly, usePidTpcOrTof, usePidTpcAndTof}; + if (std::accumulate(pidSelectionOptions.begin(), pidSelectionOptions.end(), 0) > 1) { + LOGF(fatal, "More than one option for PID selection applied. Only apply one PID selection"); + } + + // Set TrackSelector selectorPion.setRangePtTpc(ptPiPidTpcMin, ptPiPidTpcMax); selectorPion.setRangeNSigmaTpc(-nSigmaTpcPiMax, nSigmaTpcPiMax); selectorPion.setRangeNSigmaTpcCondTof(-nSigmaTpcCombinedPiMax, nSigmaTpcCombinedPiMax); @@ -172,99 +218,149 @@ struct HfCandidateSelectorToXiPiQa { selectorProton.setRangeNSigmaTof(-nSigmaTofPrMax, nSigmaTofPrMax); selectorProton.setRangeNSigmaTofCondTpc(-nSigmaTofCombinedPrMax, nSigmaTofCombinedPrMax); - const AxisSpec axisSel{2, -0.5, 1.5, "status"}; - const AxisSpec axisSelOnLfDca{14, -0.5, 13.5, "status"}; - const AxisSpec axisSelOnLfKf{23, -0.5, 22.5, "status"}; - const AxisSpec axisSelOnHfDca{6, -0.5, 5.5, "status"}; - const AxisSpec axisSelOnHfKf{12, -0.5, 11.5, "status"}; - + // Histtograms for QA - Distributions before applying selection + registry.add("QaBeforeSelector/h2V0PosDauPtEta", "V0 pos daughter, pT vs Eta;pT(GeV);eta", {kTH2F, {{400, 0.0, 10.0}, {200, -5.0, 5.0}}}); + registry.add("QaBeforeSelector/h2V0NegDauPtEta", "V0 neg daughter, pT vs Eta;pT(GeV);eta", {kTH2F, {{400, 0.0, 10.0}, {200, -5.0, 5.0}}}); + registry.add("QaBeforeSelector/h2BachPtEta", "Casc bachelor, pT vs Eta;pT(GeV);eta", {kTH2F, {{400, 0.0, 10.0}, {200, -5.0, 5.0}}}); + registry.add("QaBeforeSelector/h2CharmBachPtEta", "Charm bachelor, pT vs Eta;pT(GeV);eta", {kTH2F, {{400, 0.0, 10.0}, {200, -5.0, 5.0}}}); + registry.add("QaBeforeSelector/h1CharmBachPt", "Charm bachelor, pT;pT(GeV);", {kTH1F, {{400, 0.0, 10.0}}}); + + registry.add("QaBeforeSelector/h2V0PosDauPtDcaXY", "V0 pos daughter, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{400, 0.0, 10.0}, {2000, -10.0, 10.0}}}); + registry.add("QaBeforeSelector/h2V0NegDauPtDcaXY", "V0 neg daughter, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{400, 0.0, 10.0}, {2000, -10.0, 10.0}}}); + registry.add("QaBeforeSelector/h2BachPtDcaXY", "Casc bachelor, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{400, 0.0, 10.0}, {2000, -10.0, 10.0}}}); + registry.add("QaBeforeSelector/h2CharmBachPtDcaXY", "Charm bach, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{400, 0.0, 10.0}, {3000, -15.0, 15.0}}}); + registry.add("QaBeforeSelector/h2CharmBachPtDcaZ", "Charm bach, pT vs DcaZ to PV;pT;DcaZ To PV", {kTH2F, {{400, 0.0, 10.0}, {3000, -15.0, 15.0}}}); + registry.add("QaBeforeSelector/h2CascadePtDcaXY", "Cascade, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{400, 0.0, 10.0}, {3000, -15.0, 15.0}}}); + registry.add("QaBeforeSelector/h2CascadePtDcaZ", "Cascade, pT vs DcaZ to PV;pT;DcaZ To PV", {kTH2F, {{400, 0.0, 10.0}, {3000, -15.0, 15.0}}}); + + registry.add("QaBeforeSelector/h2V0PosDauPtTpcClsFound", "V0 pos daughter, pT vs TpcClsFound;pT(GeV);TpcClsFound", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaBeforeSelector/h2V0NegDauPtTpcClsFound", "V0 neg daughter, pT vs TpcClsFound;pT(GeV);TpcClsFound", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaBeforeSelector/h2BachPtTpcClsFound", "Bach, pT vs TpcClsFound;pT(GeV);TpcClsFound", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaBeforeSelector/h2CharmBachPtTpcClsFound", "Charm Bach, pT vs TpcClsFound;pT(GeV);TpcClsFound", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaBeforeSelector/h2V0PosDauPtTpcNClsCrossedRows", "V0 pos daughter, pT vs TpcNClsCrossedRows;pT(GeV);TpcNClsCrossedRows", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaBeforeSelector/h2V0NegDauPtTpcNClsCrossedRows", "V0 neg daughter, pT vs TpcNClsCrossedRows;pT(GeV);TpcNClsCrossedRows", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaBeforeSelector/h2BachPtTpcNClsCrossedRows", "Bach, pT vs TpcNClsCrossedRows;pT(GeV);TpcNClsCrossedRows", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaBeforeSelector/h2CharmBachPtTpcNClsCrossedRows", "Charm Bach, pT vs TpcNClsCrossedRows;pT(GeV);TpcNClsCrossedRows", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaBeforeSelector/h2V0PosDauPtTpcCrossedRowsOverFindableCls", "V0 pos daughter, pT vs TpcCrossedRowsOverFindableCls;pT(GeV);TpcCrossedRowsOverFindableCls", {kTH2F, {{400, 0.0, 10.0}, {120, 0.0, 1.2}}}); + registry.add("QaBeforeSelector/h2V0NegDauPtTpcCrossedRowsOverFindableCls", "V0 neg daughter, pT vs TpcCrossedRowsOverFindableCls;pT(GeV);TpcCrossedRowsOverFindableCls", {kTH2F, {{400, 0.0, 10.0}, {120, 0.0, 1.2}}}); + registry.add("QaBeforeSelector/h2BachPtTpcCrossedRowsOverFindableCls", "Bach, pT vs TpcCrossedRowsOverFindableCls;pT(GeV);TpcCrossedRowsOverFindableCls", {kTH2F, {{400, 0.0, 10.0}, {120, 0.0, 1.2}}}); + registry.add("QaBeforeSelector/h2CharmBachPtTpcCrossedRowsOverFindableCls", "Charm Bach, pT vs TpcCrossedRowsOverFindableCls;pT(GeV);TpcCrossedRowsOverFindableCls", {kTH2F, {{400, 0.0, 10.0}, {120, 0.0, 1.2}}}); + registry.add("QaBeforeSelector/h2V0PosDauPtTpcChi2NCls", "V0 pos daughter, pT vs TpcChi2NCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + registry.add("QaBeforeSelector/h2V0NegDauPtTpcChi2NCls", "V0 neg daughter, pT vs TpcChi2NCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + registry.add("QaBeforeSelector/h2BachPtTpcChi2NCls", "Bach, pT vs TpcChi2NCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + registry.add("QaBeforeSelector/h2CharmBachPtTpcChi2NCls", "Charm Bach, pT vs TpcChi2NCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + registry.add("QaBeforeSelector/h2CharmBachPtItsNCls", "Charm Bach, pT vs ItsNCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + registry.add("QaBeforeSelector/h2CharmBachPtItsChi2NCls", "Charm Bach, pT vs ItsChi2NCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + + registry.add("QaBeforeSelector/h2PiFromLamPtTpcNSigma", "V0 pos daughter, pT vs Tpc N-Sigma;pT(GeV);Tpc N-Sigma", {kTH2F, {{400, 0.0, 10.0}, {400, -10.0, 10.0}}}); + registry.add("QaBeforeSelector/h2PrFromLamPtTpcNSigma", "V0 neg daughter, pT vs Tpc N-Sigma;pT(GeV);Tpc N-Sigma", {kTH2F, {{400, 0.0, 10.0}, {400, -10.0, 10.0}}}); + registry.add("QaBeforeSelector/h2PiFromCascPtTpcNSigma", "Bach, pT vs Tpc N-Sigma;pT(GeV);Tpc N-Sigma", {kTH2F, {{400, 0.0, 10.0}, {400, -10.0, 10.0}}}); + registry.add("QaBeforeSelector/h2PiFromCharmPtTpcNSigma", "Charm Bach, pT vs Tpc N-Sigma;pT(GeV);Tpc N-Sigma", {kTH2F, {{400, 0.0, 10.0}, {400, -10.0, 10.0}}}); + + registry.add("QaBeforeSelector/h2V0PtRadius", "V0, pT vs radius;pT;V0Radius", {kTH2F, {{800, 0.0, 20.0}, {1000, 0.0, 100}}}); + registry.add("QaBeforeSelector/h2V0PtDaughterDca", "V0, pT vs Dca between daughters;pT;Dca between Daughters", {kTH2F, {{800, 0.0, 20.0}, {200, -10.0, 10}}}); + registry.add("QaBeforeSelector/h2V0PtCosPA", "V0, pT vs cosPA;pT;CosPA", {kTH2F, {{800, 0.0, 20.0}, {100, 0.9, 1.0}}}); + + registry.add("QaBeforeSelector/h2CascPtRadius", "Casc, pT vs radius;pT;CascRadius", {kTH2F, {{800, 0.0, 20.0}, {1000, 0.0, 100}}}); + registry.add("QaBeforeSelector/h2CascPtDaughterDca", "Casc, pT vs Dca between daughters;pT;Dca between Daughters", {kTH2F, {{800, 0.0, 20.0}, {200, -10.0, 10}}}); + registry.add("QaBeforeSelector/h2CascPtCosPA", "Casc, pT vs cosPA;pT;CosPA", {kTH2F, {{800, 0.0, 20.0}, {100, 0.9, 1.0}}}); + + registry.add("QaBeforeSelector/h2V0PtInvMass", "V0, pT vs Inv.Mass;pT;Inv.Mass", {kTH2F, {{800, 0.0, 20.0}, {1000, 1.0, 2.0}}}); + registry.add("QaBeforeSelector/h2CascPtInvMass", "Casc, pT vs Inv.Mass;pT;Inv.Mass", {kTH2F, {{800, 0.0, 20.0}, {1000, 1.0, 2.0}}}); + + // Histtograms for QA - Distributions after applying selection + registry.add("QaAfterSelector/h2V0PosDauPtEta", "V0 pos daughter, pT vs Eta;pT(GeV);eta", {kTH2F, {{400, 0.0, 10.0}, {200, -5.0, 5.0}}}); + registry.add("QaAfterSelector/h2V0NegDauPtEta", "V0 neg daughter, pT vs Eta;pT(GeV);eta", {kTH2F, {{400, 0.0, 10.0}, {200, -5.0, 5.0}}}); + registry.add("QaAfterSelector/h2BachPtEta", "Casc bachelor, pT vs Eta;pT(GeV);eta", {kTH2F, {{400, 0.0, 10.0}, {200, -5.0, 5.0}}}); + registry.add("QaAfterSelector/h2CharmBachPtEta", "Charm bachelor, pT vs Eta;pT(GeV);eta", {kTH2F, {{400, 0.0, 10.0}, {200, -5.0, 5.0}}}); + registry.add("QaAfterSelector/h1CharmBachPt", "Charm bachelor, pT;pT(GeV);", {kTH1F, {{400, 0.0, 10.0}}}); + + registry.add("QaAfterSelector/h2V0PosDauPtDcaXY", "V0 pos daughter, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{400, 0.0, 10.0}, {2000, -10.0, 10.0}}}); + registry.add("QaAfterSelector/h2V0NegDauPtDcaXY", "V0 neg daughter, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{400, 0.0, 10.0}, {2000, -10.0, 10.0}}}); + registry.add("QaAfterSelector/h2BachPtDcaXY", "Casc bachelor, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{400, 0.0, 10.0}, {2000, -10.0, 10.0}}}); + registry.add("QaAfterSelector/h2CharmBachPtDcaXY", "Charm bach, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{400, 0.0, 10.0}, {3000, -15.0, 15.0}}}); + registry.add("QaAfterSelector/h2CharmBachPtDcaZ", "Charm bach, pT vs DcaZ to PV;pT;DcaZ To PV", {kTH2F, {{400, 0.0, 10.0}, {3000, -15.0, 15.0}}}); + registry.add("QaAfterSelector/h2CascadePtDcaXY", "Cascade, pT vs DcaXY to PV;pT;DcaXY To PV", {kTH2F, {{400, 0.0, 10.0}, {3000, -15.0, 15.0}}}); + registry.add("QaAfterSelector/h2CascadePtDcaZ", "Cascade, pT vs DcaZ to PV;pT;DcaZ To PV", {kTH2F, {{400, 0.0, 10.0}, {3000, -15.0, 15.0}}}); + + registry.add("QaAfterSelector/h2V0PosDauPtTpcClsFound", "V0 pos daughter, pT vs TpcClsFound;pT(GeV);TpcClsFound", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaAfterSelector/h2V0NegDauPtTpcClsFound", "V0 neg daughter, pT vs TpcClsFound;pT(GeV);TpcClsFound", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaAfterSelector/h2BachPtTpcClsFound", "Bach, pT vs TpcClsFound;pT(GeV);TpcClsFound", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaAfterSelector/h2CharmBachPtTpcClsFound", "Charm Bach, pT vs TpcClsFound;pT(GeV);TpcClsFound", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaAfterSelector/h2V0PosDauPtTpcNClsCrossedRows", "V0 pos daughter, pT vs TpcNClsCrossedRows;pT(GeV);TpcNClsCrossedRows", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaAfterSelector/h2V0NegDauPtTpcNClsCrossedRows", "V0 neg daughter, pT vs TpcNClsCrossedRows;pT(GeV);TpcNClsCrossedRows", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaAfterSelector/h2BachPtTpcNClsCrossedRows", "Bach, pT vs TpcNClsCrossedRows;pT(GeV);TpcNClsCrossedRows", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaAfterSelector/h2CharmBachPtTpcNClsCrossedRows", "Charm Bach, pT vs TpcNClsCrossedRows;pT(GeV);TpcNClsCrossedRows", {kTH2F, {{400, 0.0, 10.0}, {161, -0.5, 160.5}}}); + registry.add("QaAfterSelector/h2V0PosDauPtTpcCrossedRowsOverFindableCls", "V0 pos daughter, pT vs TpcCrossedRowsOverFindableCls;pT(GeV);TpcCrossedRowsOverFindableCls", {kTH2F, {{400, 0.0, 10.0}, {120, 0.0, 1.2}}}); + registry.add("QaAfterSelector/h2V0NegDauPtTpcCrossedRowsOverFindableCls", "V0 neg daughter, pT vs TpcCrossedRowsOverFindableCls;pT(GeV);TpcCrossedRowsOverFindableCls", {kTH2F, {{400, 0.0, 10.0}, {120, 0.0, 1.2}}}); + registry.add("QaAfterSelector/h2BachPtTpcCrossedRowsOverFindableCls", "Bach, pT vs TpcCrossedRowsOverFindableCls;pT(GeV);TpcCrossedRowsOverFindableCls", {kTH2F, {{400, 0.0, 10.0}, {120, 0.0, 1.2}}}); + registry.add("QaAfterSelector/h2CharmBachPtTpcCrossedRowsOverFindableCls", "Charm Bach, pT vs TpcCrossedRowsOverFindableCls;pT(GeV);TpcCrossedRowsOverFindableCls", {kTH2F, {{400, 0.0, 10.0}, {120, 0.0, 1.2}}}); + registry.add("QaAfterSelector/h2V0PosDauPtTpcChi2NCls", "V0 pos daughter, pT vs TpcChi2NCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + registry.add("QaAfterSelector/h2V0NegDauPtTpcChi2NCls", "V0 neg daughter, pT vs TpcChi2NCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + registry.add("QaAfterSelector/h2BachPtTpcChi2NCls", "Bach, pT vs TpcChi2NCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + registry.add("QaAfterSelector/h2CharmBachPtTpcChi2NCls", "Charm Bach, pT vs TpcChi2NCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + registry.add("QaAfterSelector/h2CharmBachPtItsNCls", "Charm Bach, pT vs ItsNCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + registry.add("QaAfterSelector/h2CharmBachPtItsChi2NCls", "Charm Bach, pT vs ItsChi2NCls;pT(GeV);TpcChi2NCls", {kTH2F, {{400, 0.0, 10.0}, {100, 0.0, 10.0}}}); + + registry.add("QaAfterSelector/h2PiFromLamPtTpcNSigma", "V0 pos daughter, pT vs Tpc N-Sigma;pT(GeV);Tpc N-Sigma", {kTH2F, {{400, 0.0, 10.0}, {400, -10.0, 10.0}}}); + registry.add("QaAfterSelector/h2PrFromLamPtTpcNSigma", "V0 neg daughter, pT vs Tpc N-Sigma;pT(GeV);Tpc N-Sigma", {kTH2F, {{400, 0.0, 10.0}, {400, -10.0, 10.0}}}); + registry.add("QaAfterSelector/h2PiFromCascPtTpcNSigma", "Bach, pT vs Tpc N-Sigma;pT(GeV);Tpc N-Sigma", {kTH2F, {{400, 0.0, 10.0}, {400, -10.0, 10.0}}}); + registry.add("QaAfterSelector/h2PiFromCharmPtTpcNSigma", "Charm Bach, pT vs Tpc N-Sigma;pT(GeV);Tpc N-Sigma", {kTH2F, {{400, 0.0, 10.0}, {400, -10.0, 10.0}}}); + + registry.add("QaAfterSelector/h2V0PtRadius", "V0, pT vs radius;pT;V0Radius", {kTH2F, {{800, 0.0, 20.0}, {1000, 0.0, 100}}}); + registry.add("QaAfterSelector/h2V0PtDaughterDca", "V0, pT vs Dca between daughters;pT;Dca between Daughters", {kTH2F, {{800, 0.0, 20.0}, {200, -10.0, 10}}}); + registry.add("QaAfterSelector/h2V0PtCosPA", "V0, pT vs cosPA;pT;CosPA", {kTH2F, {{800, 0.0, 20.0}, {100, 0.9, 1.0}}}); + + registry.add("QaAfterSelector/h2CascPtRadius", "Casc, pT vs radius;pT;CascRadius", {kTH2F, {{800, 0.0, 20.0}, {1000, 0.0, 100}}}); + registry.add("QaAfterSelector/h2CascPtDaughterDca", "Casc, pT vs Dca between daughters;pT;Dca between Daughters", {kTH2F, {{800, 0.0, 20.0}, {200, -10.0, 10}}}); + registry.add("QaAfterSelector/h2CascPtCosPA", "Casc, pT vs cosPA;pT;CosPA", {kTH2F, {{800, 0.0, 20.0}, {100, 0.9, 1.0}}}); + + registry.add("QaAfterSelector/h2V0PtInvMass", "V0, pT vs Inv.Mass;pT;Inv.Mass", {kTH2F, {{800, 0.0, 20.0}, {1000, 1.0, 2.0}}}); + registry.add("QaAfterSelector/h2CascPtInvMass", "Casc, pT vs Inv.Mass;pT;Inv.Mass", {kTH2F, {{800, 0.0, 20.0}, {1000, 1.0, 2.0}}}); + + // Histograms for QA - Summarize selection status + const AxisSpec axisSel{NSelections, -0.5f, +NSelections - 0.5, "status"}; registry.add("hSelSignDec", "hSelSignDec;status;entries", {HistType::kTH1F, {axisSel}}); - registry.add("hSelStatusCluster", "hSelStatusCluster:# of events Passed;;", {HistType::kTH1F, {{6, -0.5, 5.5}}}); - registry.get(HIST("hSelStatusCluster"))->GetXaxis()->SetBinLabel(1, "All"); - registry.get(HIST("hSelStatusCluster"))->GetXaxis()->SetBinLabel(2, "TpcCluster PiFromV0"); - registry.get(HIST("hSelStatusCluster"))->GetXaxis()->SetBinLabel(3, "TpcCluster PrFromV0"); - registry.get(HIST("hSelStatusCluster"))->GetXaxis()->SetBinLabel(4, "TpcCluster PiFromCasc"); - registry.get(HIST("hSelStatusCluster"))->GetXaxis()->SetBinLabel(5, "TpcCluster PiFromCharm"); - registry.get(HIST("hSelStatusCluster"))->GetXaxis()->SetBinLabel(6, "ItsCluster PiFromCharm"); - - registry.add("hSelStatusPID", "hSelStatusPID;# of events Passed;;", {HistType::kTH1F, {{4, -0.5, 3.5}}}); - registry.get(HIST("hSelStatusPID"))->GetXaxis()->SetBinLabel(1, "All"); - registry.get(HIST("hSelStatusPID"))->GetXaxis()->SetBinLabel(2, "Lambda"); - registry.get(HIST("hSelStatusPID"))->GetXaxis()->SetBinLabel(3, "Cascade"); - registry.get(HIST("hSelStatusPID"))->GetXaxis()->SetBinLabel(4, "CharmBaryon"); - - // For QA of LF & HF selection - if (doprocessSelectionDCAFitter) { - registry.add("hSelStatusLf", "hSelStatusLf;# of candidate passed;", {HistType::kTH1F, {axisSelOnLfDca}}); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(1, "All"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(2, "etaV0Dau"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(3, "radiusV0"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(4, "radiusCasc"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(5, "cosPAV0"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(6, "cosPACasc"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(7, "dcaV0Dau"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(8, "dcaCascDau"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(9, "dcaXYToPvV0Dau0"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(10, "dcaXYToPvV0Dau1"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(11, "dcaXYToPvCascDau"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(12, "ptPiFromCasc"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(13, "impactParCascXY"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(14, "impactParCascZ"); - - registry.add("hSelStatusHf", "hSelStatusHf;# of candidate passed;", {HistType::kTH1F, {axisSelOnHfDca}}); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(1, "All"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(2, "etaTrackCharmBach"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(3, "dcaCharmBaryonDau"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(4, "ptPiFromCharmBaryon"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(5, "impactParBachFromCharmXY"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(6, "impactParBachFromCharmZ"); - } - if (doprocessSelectionKFParticle) { - registry.add("hSelStatusLf", "hSelStatusLf;# of candidate passed;", {HistType::kTH1F, {axisSelOnLfKf}}); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(1, "All"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(2, "etaV0Dau"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(3, "radiusV0"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(4, "radiusCasc"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(5, "cosPAV0"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(6, "cosPACasc"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(7, "dcaV0Dau"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(8, "dcaCascDau"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(9, "dcaXYToPvV0Dau0"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(10, "dcaXYToPvV0Dau1"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(11, "dcaXYToPvCascDau"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(12, "ptPiFromCasc"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(13, "cosPAV0ToCasc"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(14, "kfDcaXYCascToPv"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(15, "chi2GeoV0"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(16, "chi2GeoCasc"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(17, "chi2TopoV0ToPv"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(18, "chi2TopoCascToPv"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(19, "chi2TopoV0ToCasc"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(20, "v0ldl"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(21, "cascldl"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(22, "decayLenXYLambda"); - registry.get(HIST("hSelStatusLf"))->GetXaxis()->SetBinLabel(23, "decayLenXYCasc"); - - registry.add("hSelStatusHf", "hSelStatusHf;# of candidate passed;", {HistType::kTH1F, {axisSelOnHfKf}}); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(1, "All"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(2, "etaTrackCharmBach"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(3, "dcaCharmBaryonDau"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(4, "ptPiFromCharmBaryon"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(5, "cosPaCascToXic"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(6, "kfDcaXYPiFromXic"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(7, "chi2GeoXic"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(8, "chi2TopoXicToPv"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(9, "chi2TopoPiFromXicToPv"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(10, "chi2TopoCascToXic"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(11, "decayLenXYXic"); - registry.get(HIST("hSelStatusHf"))->GetXaxis()->SetBinLabel(12, "cTauXic"); - } + registry.add("hSelStatus", "hSelStatus;# of candidate passed given cut;", {HistType::kTH1F, {axisSel}}); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + fromCreator, "FromCreator"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passPtPiFromCasc, "PassPtPiFromCasc"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passImpactParXYCascadeToPv, "PassImpactParXYCascadeToPv"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passImpactParZCascadeToPv, "PassImpactParZCascadeT0Pv"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passCpaV0ToCascade, "PassCpaV0ToCascade"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passChi2GeoV0, "PassChi2GeoV0"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passChi2GeoCascade, "PassChi2GeoCascade"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passChi2TopoOverNdfV0ToPv, "PassChi2TopoOverNdfV0ToPv"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passChi2TopoOverNdfCascadeToPv, "PassChi2TopoOverNdfCascadeToPv"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passChi2TopoOverNdfV0ToCascade, "PassChi2TopoOverNdfV0ToCascade"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passDecayLengthNormKfV0, "PassDecayLengthNormKfV0"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passDecayLengthNormKfCascade, "PassDecayLengthNormKfCascade"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passEtaCharmBach, "PassEtaTrackCharmBach"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passPtCharmBach, "PassPtPiFromCharmBach"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passImpactParXYCharmBachToPv, "PassImpactParXYCharmBachToPv"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passImpactParZCharmBachToPv, "PassImpactParZCharmBachToPv"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passYCharmHadronMax, "PassYCharmHadronMax"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passCpaCascadeToCharmHadron, "PassCpaCascadeToCharmHadron"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passChi2GeoXic, "PassChi2GeoXic"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passChi2TopoXicToPv, "PassChi2TopoXicToPv"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passChi2TopoCascToXic, "PassChi2TopoCascToXic"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passDecayLengthXYXic, "PassDecayLengthXYXic"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passCTauXic, "PassCTauXic"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passTrackTpcQualityPiFromLam, "PassTrackTpcQualityPiFromLam"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passTrackTpcQualityPrFromLam, "PassTrackTpcQualityPrFromLam"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passTrackTpcQualityPiFromCasc, "PassTrackTpcQualityPiFromCasc"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passTrackTpcQualityPiFromCharm, "PassTrackTpcQualityPiFromCharm"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passTrackItsQualityPiFromCharm, "PassTrackItsQualityPiFromCharm"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passStatusPidLambda, "PassStatusPidLambda"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passStatusPidCascade, "PassStatusPidCascade"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passStatusPidCharmBaryon, "PassStatusPidCharmBaryon"); + registry.get(HIST("hSelStatus"))->GetXaxis()->SetBinLabel(1 + passMlSelection, "PassMlSelection"); // invarinat mass histograms - registry.add("hInvMassCharmBaryonWoPidInvMassCut", "Charm baryon invariant mass; int mass; entries", {HistType::kTH1F, {{1500, 1.5, 4.5}}}); - registry.add("hInvMassCharmBaryon", "Charm baryon invariant mass; int mass; entries", {HistType::kTH1F, {{1500, 1.5, 4.5}}}); - registry.add("hInvMassCharmBaryonBkg", "Charm baryon invariant mass, rejected; int mass; entries", {HistType::kTH1F, {{1500, 1.5, 4.5}}}); + registry.add("h2CharmHadPtInvMassSelStatus01", "Charm hadron, Pt vs Inv.Mass;pT;Inv.Mass ", {HistType::kTH2F, {{2000, 0.0, 20.0}, {1500, 1.5, 4.5}}}); + registry.add("h2CharmHadPtInvMassSelStatus03", "Charm hadron, Pt vs Inv.Mass;pT;Inv.Mass ", {HistType::kTH2F, {{2000, 0.0, 20.0}, {1500, 1.5, 4.5}}}); + registry.add("h2CharmHadPtInvMassSelStatus07", "Charm hadron, Pt vs Inv.Mass;pT;Inv.Mass ", {HistType::kTH2F, {{2000, 0.0, 20.0}, {1500, 1.5, 4.5}}}); + registry.add("h2CharmHadPtInvMassSelStatus15", "Charm hadron, Pt vs Inv.Mass;pT;Inv.Mass ", {HistType::kTH2F, {{2000, 0.0, 20.0}, {1500, 1.5, 4.5}}}); // HfMlResponse initialization if (applyMl) { @@ -292,153 +388,265 @@ struct HfCandidateSelectorToXiPiQa { } } - // TODO: check if all these cuts are needed and remove those that are already applied in the candidate creator - // Selection on LF related informations - // returns true if all cuts are passed - template - bool selectOnLf(const T& candidate, const int& inputPtBin, TracksSelLf const& lfTracks) + // Fill histograms for QA + template + void fillQaHistograms(bool isBeforeSel, + TCand const& candidate, + TracksSel const& tracks, + TracksSelLf const& lfTracks) { + // Getting tracks auto trackV0PosDau = lfTracks.rawIteratorAt(candidate.posTrackId()); auto trackV0NegDau = lfTracks.rawIteratorAt(candidate.negTrackId()); auto trackPiFromCasc = lfTracks.rawIteratorAt(candidate.bachelorId()); + auto trackPiFromCharm = tracks.rawIteratorAt(candidate.prong1Id()); - registry.fill(HIST("hSelStatusLf"), 0.0); - - // Eta selection of V0, Cascade daughters - double etaV0PosDau = trackV0PosDau.eta(); - double etaV0NegDau = trackV0NegDau.eta(); - double etaPiFromCasc = trackPiFromCasc.eta(); - - if (std::abs(etaV0PosDau) > etaTrackLFDauMax || std::abs(etaV0NegDau) > etaTrackLFDauMax || std::abs(etaPiFromCasc) > etaTrackLFDauMax) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 1.0); - - // Minimum radius cut - double radiusV0 = RecoDecay::sqrtSumOfSquares(candidate.xV0Vertex(), candidate.yV0Vertex()); - double radiusCasc = RecoDecay::sqrtSumOfSquares(candidate.xCascadeVertex(), candidate.yCascadeVertex()); - - if (radiusV0 < radiusV0Min) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 2.0); - if (radiusCasc < radiusCascMin) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 3.0); - - // Cosine of pointing angle - if (candidate.cpaV0() < cuts->get(inputPtBin, "cosPAV0")) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 4.0); - if (candidate.cpaCascade() < cuts->get(inputPtBin, "cosPACasc")) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 5.0); - - // Distance of Closest Approach(DCA) - if (candidate.dcaV0Daughters() > cuts->get(inputPtBin, "dcaV0Dau")) { - return false; + auto trackPiFromLam = (trackPiFromCharm.sign() < 0) ? trackV0PosDau : trackV0NegDau; + auto trackPrFromLam = (trackPiFromCharm.sign() < 0) ? trackV0NegDau : trackV0PosDau; + + // pT of daughter tracks + const auto ptV0PosDau = trackV0PosDau.pt(); + const auto ptV0NegDau = trackV0NegDau.pt(); + const auto ptPiFromCasc = trackPiFromCasc.pt(); + const auto ptPiFromCharm = trackPiFromCharm.pt(); + + // pT of V0 and cascade + const auto ptV0 = RecoDecay::sqrtSumOfSquares( + trackV0PosDau.px() + trackV0NegDau.px(), + trackV0PosDau.py() + trackV0NegDau.py()); + + const auto ptCasc = RecoDecay::sqrtSumOfSquares( + candidate.pxProng0(), candidate.pyProng0()); + + // Radius of V0 and cascade + const auto radiusV0 = RecoDecay::sqrtSumOfSquares( + candidate.xV0Vertex(), candidate.yV0Vertex()); + + const auto radiusCasc = RecoDecay::sqrtSumOfSquares( + candidate.xCascadeVertex(), candidate.yCascadeVertex()); + + if (isBeforeSel) { + // Pseudorapidity + registry.fill(HIST("QaBeforeSelector/h2V0PosDauPtEta"), ptV0PosDau, trackV0PosDau.eta()); + registry.fill(HIST("QaBeforeSelector/h2V0NegDauPtEta"), ptV0NegDau, trackV0NegDau.eta()); + registry.fill(HIST("QaBeforeSelector/h2BachPtEta"), ptPiFromCasc, trackPiFromCasc.eta()); + registry.fill(HIST("QaBeforeSelector/h2CharmBachPtEta"), ptPiFromCharm, trackPiFromCharm.eta()); + registry.fill(HIST("QaBeforeSelector/h1CharmBachPt"), ptPiFromCharm); + + // DCA XY of LF daughter tracks to PV + registry.fill(HIST("QaBeforeSelector/h2V0PosDauPtDcaXY"), ptV0PosDau, candidate.impactParameterXYV0PosDau()); + registry.fill(HIST("QaBeforeSelector/h2V0NegDauPtDcaXY"), ptV0NegDau, candidate.impactParameterXYV0NegDau()); + registry.fill(HIST("QaBeforeSelector/h2BachPtDcaXY"), ptPiFromCasc, candidate.impactParameterXYCascadeBach()); + + // Dca XY of Charm bach & Cascade to PV + registry.fill(HIST("QaBeforeSelector/h2CharmBachPtDcaXY"), ptPiFromCharm, candidate.impactParameter1()); + registry.fill(HIST("QaBeforeSelector/h2CharmBachPtDcaZ"), ptPiFromCharm, candidate.impactParameterZ1()); + registry.fill(HIST("QaBeforeSelector/h2CascadePtDcaXY"), ptCasc, candidate.impactParameter0()); + registry.fill(HIST("QaBeforeSelector/h2CascadePtDcaZ"), ptCasc, candidate.impactParameterZ0()); + + // V0 topological variables + registry.fill(HIST("QaBeforeSelector/h2V0PtRadius"), ptV0, radiusV0); + registry.fill(HIST("QaBeforeSelector/h2V0PtDaughterDca"), ptV0, candidate.dcaV0Daughters()); + registry.fill(HIST("QaBeforeSelector/h2V0PtCosPA"), ptV0, candidate.cpaV0()); + + // Cascade topological variables + registry.fill(HIST("QaBeforeSelector/h2CascPtRadius"), ptCasc, radiusCasc); + registry.fill(HIST("QaBeforeSelector/h2CascPtDaughterDca"), ptCasc, candidate.dcaCascadeDaughters()); + registry.fill(HIST("QaBeforeSelector/h2CascPtCosPA"), ptCasc, candidate.cpaCascade()); + + // TPC number of found clusters + registry.fill(HIST("QaBeforeSelector/h2V0PosDauPtTpcClsFound"), ptV0PosDau, trackV0PosDau.tpcNClsFound()); + registry.fill(HIST("QaBeforeSelector/h2V0NegDauPtTpcClsFound"), ptV0NegDau, trackV0NegDau.tpcNClsFound()); + registry.fill(HIST("QaBeforeSelector/h2BachPtTpcClsFound"), ptPiFromCasc, trackPiFromCasc.tpcNClsFound()); + registry.fill(HIST("QaBeforeSelector/h2CharmBachPtTpcClsFound"), ptPiFromCharm, trackPiFromCharm.tpcNClsFound()); + + // TPC number of crossed rows + registry.fill(HIST("QaBeforeSelector/h2V0PosDauPtTpcNClsCrossedRows"), ptV0PosDau, trackV0PosDau.tpcNClsCrossedRows()); + registry.fill(HIST("QaBeforeSelector/h2V0NegDauPtTpcNClsCrossedRows"), ptV0NegDau, trackV0NegDau.tpcNClsCrossedRows()); + registry.fill(HIST("QaBeforeSelector/h2BachPtTpcNClsCrossedRows"), ptPiFromCasc, trackPiFromCasc.tpcNClsCrossedRows()); + registry.fill(HIST("QaBeforeSelector/h2CharmBachPtTpcNClsCrossedRows"), ptPiFromCharm, trackPiFromCharm.tpcNClsCrossedRows()); + + // TPC crossed rows over findable clusters + registry.fill(HIST("QaBeforeSelector/h2V0PosDauPtTpcCrossedRowsOverFindableCls"), ptV0PosDau, trackV0PosDau.tpcCrossedRowsOverFindableCls()); + registry.fill(HIST("QaBeforeSelector/h2V0NegDauPtTpcCrossedRowsOverFindableCls"), ptV0NegDau, trackV0NegDau.tpcCrossedRowsOverFindableCls()); + registry.fill(HIST("QaBeforeSelector/h2BachPtTpcCrossedRowsOverFindableCls"), ptPiFromCasc, trackPiFromCasc.tpcCrossedRowsOverFindableCls()); + registry.fill(HIST("QaBeforeSelector/h2CharmBachPtTpcCrossedRowsOverFindableCls"), ptPiFromCharm, trackPiFromCharm.tpcCrossedRowsOverFindableCls()); + + // TPC chi2 per cluster + registry.fill(HIST("QaBeforeSelector/h2V0PosDauPtTpcChi2NCls"), ptV0PosDau, trackV0PosDau.tpcChi2NCl()); + registry.fill(HIST("QaBeforeSelector/h2V0NegDauPtTpcChi2NCls"), ptV0NegDau, trackV0NegDau.tpcChi2NCl()); + registry.fill(HIST("QaBeforeSelector/h2BachPtTpcChi2NCls"), ptPiFromCasc, trackPiFromCasc.tpcChi2NCl()); + registry.fill(HIST("QaBeforeSelector/h2CharmBachPtTpcChi2NCls"), ptPiFromCharm, trackPiFromCharm.tpcChi2NCl()); + + // TPC N-sigma + registry.fill(HIST("QaBeforeSelector/h2PiFromLamPtTpcNSigma"), trackPiFromLam.pt(), trackPiFromLam.tpcNSigmaPi()); + registry.fill(HIST("QaBeforeSelector/h2PrFromLamPtTpcNSigma"), trackPrFromLam.pt(), trackPrFromLam.tpcNSigmaPr()); + registry.fill(HIST("QaBeforeSelector/h2PiFromCascPtTpcNSigma"), ptPiFromCasc, trackPiFromCasc.tpcNSigmaPi()); + registry.fill(HIST("QaBeforeSelector/h2PiFromCharmPtTpcNSigma"), ptPiFromCharm, trackPiFromCharm.tpcNSigmaPi()); + + // ITS track quality + registry.fill(HIST("QaBeforeSelector/h2CharmBachPtItsNCls"), ptPiFromCharm, trackPiFromCharm.itsNCls()); + registry.fill(HIST("QaBeforeSelector/h2CharmBachPtItsChi2NCls"), ptPiFromCharm, trackPiFromCharm.itsChi2NCl()); + + // Inv.Mass V0 & Casc + registry.fill(HIST("QaBeforeSelector/h2V0PtInvMass"), ptV0, candidate.massLambda()); + registry.fill(HIST("QaBeforeSelector/h2CascPtInvMass"), ptCasc, candidate.massCascade()); + } else { + // Pseudorapidity + registry.fill(HIST("QaAfterSelector/h2V0PosDauPtEta"), ptV0PosDau, trackV0PosDau.eta()); + registry.fill(HIST("QaAfterSelector/h2V0NegDauPtEta"), ptV0NegDau, trackV0NegDau.eta()); + registry.fill(HIST("QaAfterSelector/h2BachPtEta"), ptPiFromCasc, trackPiFromCasc.eta()); + registry.fill(HIST("QaAfterSelector/h2CharmBachPtEta"), ptPiFromCharm, trackPiFromCharm.eta()); + registry.fill(HIST("QaAfterSelector/h1CharmBachPt"), ptPiFromCharm); + + // DCA XY of LF daughter tracks to PV + registry.fill(HIST("QaAfterSelector/h2V0PosDauPtDcaXY"), ptV0PosDau, candidate.impactParameterXYV0PosDau()); + registry.fill(HIST("QaAfterSelector/h2V0NegDauPtDcaXY"), ptV0NegDau, candidate.impactParameterXYV0NegDau()); + registry.fill(HIST("QaAfterSelector/h2BachPtDcaXY"), ptPiFromCasc, candidate.impactParameterXYCascadeBach()); + + // Dca XY of Charm bach & Cascade to PV + registry.fill(HIST("QaAfterSelector/h2CharmBachPtDcaXY"), ptPiFromCharm, candidate.impactParameter1()); + registry.fill(HIST("QaAfterSelector/h2CharmBachPtDcaZ"), ptPiFromCharm, candidate.impactParameterZ1()); + registry.fill(HIST("QaAfterSelector/h2CascadePtDcaXY"), ptCasc, candidate.impactParameter0()); + registry.fill(HIST("QaAfterSelector/h2CascadePtDcaZ"), ptCasc, candidate.impactParameterZ0()); + + // V0 topological variables + registry.fill(HIST("QaAfterSelector/h2V0PtRadius"), ptV0, radiusV0); + registry.fill(HIST("QaAfterSelector/h2V0PtDaughterDca"), ptV0, candidate.dcaV0Daughters()); + registry.fill(HIST("QaAfterSelector/h2V0PtCosPA"), ptV0, candidate.cpaV0()); + + // Cascade topological variables + registry.fill(HIST("QaAfterSelector/h2CascPtRadius"), ptCasc, radiusCasc); + registry.fill(HIST("QaAfterSelector/h2CascPtDaughterDca"), ptCasc, candidate.dcaCascadeDaughters()); + registry.fill(HIST("QaAfterSelector/h2CascPtCosPA"), ptCasc, candidate.cpaCascade()); + + // TPC number of found clusters + registry.fill(HIST("QaAfterSelector/h2V0PosDauPtTpcClsFound"), ptV0PosDau, trackV0PosDau.tpcNClsFound()); + registry.fill(HIST("QaAfterSelector/h2V0NegDauPtTpcClsFound"), ptV0NegDau, trackV0NegDau.tpcNClsFound()); + registry.fill(HIST("QaAfterSelector/h2BachPtTpcClsFound"), ptPiFromCasc, trackPiFromCasc.tpcNClsFound()); + registry.fill(HIST("QaAfterSelector/h2CharmBachPtTpcClsFound"), ptPiFromCharm, trackPiFromCharm.tpcNClsFound()); + + // TPC number of crossed rows + registry.fill(HIST("QaAfterSelector/h2V0PosDauPtTpcNClsCrossedRows"), ptV0PosDau, trackV0PosDau.tpcNClsCrossedRows()); + registry.fill(HIST("QaAfterSelector/h2V0NegDauPtTpcNClsCrossedRows"), ptV0NegDau, trackV0NegDau.tpcNClsCrossedRows()); + registry.fill(HIST("QaAfterSelector/h2BachPtTpcNClsCrossedRows"), ptPiFromCasc, trackPiFromCasc.tpcNClsCrossedRows()); + registry.fill(HIST("QaAfterSelector/h2CharmBachPtTpcNClsCrossedRows"), ptPiFromCharm, trackPiFromCharm.tpcNClsCrossedRows()); + + // TPC crossed rows over findable clusters + registry.fill(HIST("QaAfterSelector/h2V0PosDauPtTpcCrossedRowsOverFindableCls"), ptV0PosDau, trackV0PosDau.tpcCrossedRowsOverFindableCls()); + registry.fill(HIST("QaAfterSelector/h2V0NegDauPtTpcCrossedRowsOverFindableCls"), ptV0NegDau, trackV0NegDau.tpcCrossedRowsOverFindableCls()); + registry.fill(HIST("QaAfterSelector/h2BachPtTpcCrossedRowsOverFindableCls"), ptPiFromCasc, trackPiFromCasc.tpcCrossedRowsOverFindableCls()); + registry.fill(HIST("QaAfterSelector/h2CharmBachPtTpcCrossedRowsOverFindableCls"), ptPiFromCharm, trackPiFromCharm.tpcCrossedRowsOverFindableCls()); + + // TPC N-sigma + registry.fill(HIST("QaAfterSelector/h2PiFromLamPtTpcNSigma"), trackPiFromLam.pt(), trackPiFromLam.tpcNSigmaPi()); + registry.fill(HIST("QaAfterSelector/h2PrFromLamPtTpcNSigma"), trackPrFromLam.pt(), trackPrFromLam.tpcNSigmaPr()); + registry.fill(HIST("QaAfterSelector/h2PiFromCascPtTpcNSigma"), ptPiFromCasc, trackPiFromCasc.tpcNSigmaPi()); + registry.fill(HIST("QaAfterSelector/h2PiFromCharmPtTpcNSigma"), ptPiFromCharm, trackPiFromCharm.tpcNSigmaPi()); + + // TPC chi2 per cluster + registry.fill(HIST("QaAfterSelector/h2V0PosDauPtTpcChi2NCls"), ptV0PosDau, trackV0PosDau.tpcChi2NCl()); + registry.fill(HIST("QaAfterSelector/h2V0NegDauPtTpcChi2NCls"), ptV0NegDau, trackV0NegDau.tpcChi2NCl()); + registry.fill(HIST("QaAfterSelector/h2BachPtTpcChi2NCls"), ptPiFromCasc, trackPiFromCasc.tpcChi2NCl()); + registry.fill(HIST("QaAfterSelector/h2CharmBachPtTpcChi2NCls"), ptPiFromCharm, trackPiFromCharm.tpcChi2NCl()); + + // ITS track quality + registry.fill(HIST("QaAfterSelector/h2CharmBachPtItsNCls"), ptPiFromCharm, trackPiFromCharm.itsNCls()); + registry.fill(HIST("QaAfterSelector/h2CharmBachPtItsChi2NCls"), ptPiFromCharm, trackPiFromCharm.itsChi2NCl()); + + // Inv.Mass V0 & Casc + registry.fill(HIST("QaAfterSelector/h2V0PtInvMass"), ptV0, candidate.massLambda()); + registry.fill(HIST("QaAfterSelector/h2CascPtInvMass"), ptCasc, candidate.massCascade()); } - registry.fill(HIST("hSelStatusLf"), 6.0); + } - if (candidate.dcaCascadeDaughters() > cuts->get(inputPtBin, "dcaCascDau")) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 7.0); + // TODO: check if all these cuts are needed and remove those that are already applied in the candidate creator + // Selection on LF related informations + // returns true if all cuts are passed + template + bool selectOnLf(const T& candidate, const int& inputPtBin, TracksSelLf const& lfTracks) + { + bool resSelection = true; - if (std::abs(candidate.impactParameterXYV0PosDau()) < cuts->get(inputPtBin, "dcaXYToPvV0Dau0")) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 8.0); + auto trackPiFromCasc = lfTracks.rawIteratorAt(candidate.bachelorId()); - if (std::abs(candidate.impactParameterXYV0NegDau()) < cuts->get(inputPtBin, "dcaXYToPvV0Dau1")) { - return false; + // pT: Bachelor + if (std::abs(trackPiFromCasc.pt()) < ptPiFromCascMin) { + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passPtPiFromCasc); } - registry.fill(HIST("hSelStatusLf"), 9.0); - if (std::abs(candidate.impactParameterXYCascadeBach()) < cuts->get(inputPtBin, "dcaXYToPvCascDau")) { - return false; + // Impact parameter of Cascade to PV + if (std::abs(candidate.impactParameter0()) < impactParXYCascMin || std::abs(candidate.impactParameter0()) > impactParXYCascMax) { + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passImpactParXYCascadeToPv); } - registry.fill(HIST("hSelStatusLf"), 10.0); - // pT: Bachelor - if (std::abs(trackPiFromCasc.pt()) < ptPiFromCascMin) { - return false; + // Impact parameter of Cascade to PV + if (std::abs(candidate.impactParameterZ0()) < impactParZCascMin || std::abs(candidate.impactParameterZ0()) > impactParZCascMax) { + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passImpactParZCascadeToPv); } - registry.fill(HIST("hSelStatusLf"), 11.0); // Extra cuts for KFParticle if constexpr (svReco == doKfParticle) { - // Cosine of Pointing angle - if (candidate.cpaV0ToCascade() < cuts->get(inputPtBin, "cosPaV0ToCasc")) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 12.0); - // DCA - if (std::abs(candidate.impactParameter0()) > cuts->get(inputPtBin, "kfDcaXYCascToPv")) { - return false; + // Cosine of Pointing angle of v0 to Cascade + if (candidate.cpaV0ToCascade() < cuts->get(inputPtBin, "cosPaV0ToCasc")) { + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passCpaV0ToCascade); } - registry.fill(HIST("hSelStatusLf"), 13.0); // Chi2 if (candidate.chi2GeoV0() < 0 || candidate.chi2GeoV0() > cuts->get(inputPtBin, "chi2GeoV0")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passChi2GeoV0); } - registry.fill(HIST("hSelStatusLf"), 14.0); + if (candidate.chi2GeoCascade() < 0 || candidate.chi2GeoCascade() > cuts->get(inputPtBin, "chi2GeoCasc")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passChi2GeoCascade); } - registry.fill(HIST("hSelStatusLf"), 15.0); + if (candidate.chi2TopoOverNdfV0ToPv() > 0 && candidate.chi2TopoOverNdfV0ToPv() < cuts->get(inputPtBin, "chi2TopoV0ToPv")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passChi2TopoOverNdfV0ToPv); } - registry.fill(HIST("hSelStatusLf"), 16.0); + if (candidate.chi2TopoOverNdfCascadeToPv() < 0 || candidate.chi2TopoOverNdfCascadeToPv() > cuts->get(inputPtBin, "chi2TopoCascToPv")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passChi2TopoOverNdfCascadeToPv); } - registry.fill(HIST("hSelStatusLf"), 17.0); + if (candidate.chi2TopoOverNdfV0ToCascade() < 0 || candidate.chi2TopoOverNdfV0ToCascade() > cuts->get(inputPtBin, "chi2TopoV0ToCasc")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passChi2TopoOverNdfV0ToCascade); } - registry.fill(HIST("hSelStatusLf"), 18.0); // ldl if (candidate.decayLengthNormKfV0() < cuts->get(inputPtBin, "v0ldl")) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 19.0); - if (candidate.decayLengthNormKfCascade() < cuts->get(inputPtBin, "cascldl")) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 20.0); - - // Decay length - if (std::abs(candidate.decayLengthXYV0()) < cuts->get(inputPtBin, "decayLenXYLambda")) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 21.0); - if (std::abs(candidate.decayLengthXYCascade()) < cuts->get(inputPtBin, "decayLenXYCasc")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passDecayLengthNormKfV0); } - registry.fill(HIST("hSelStatusLf"), 22.0); - } else { - // Impact parameter(DCA?) - if (std::abs(candidate.impactParameter0()) < impactParXYCascMin || std::abs(candidate.impactParameter0()) > impactParXYCascMax) { - return false; - } - registry.fill(HIST("hSelStatusLf"), 12.0); - if (std::abs(candidate.impactParameterZ0()) < impactParZCascMin || std::abs(candidate.impactParameterZ0()) > impactParZCascMax) { - return false; + if (candidate.decayLengthNormKfCascade() < cuts->get(inputPtBin, "cascldl")) { + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passDecayLengthNormKfCascade); } - registry.fill(HIST("hSelStatusLf"), 13.0); } - // If passes all cuts, return true - return true; + return resSelection; } // TODO: check if all these cuts are needed and remove those that are already applied in the candidate creator @@ -447,86 +655,89 @@ struct HfCandidateSelectorToXiPiQa { template bool selectOnHf(const T& candidate, const int& inputPtBin, TracksSel const& tracks) { - auto trackPiFromCharm = tracks.rawIteratorAt(candidate.prong1Id()); + bool resSelection = true; - registry.fill(HIST("hSelStatusHf"), 0.0); + auto trackPiFromCharm = tracks.rawIteratorAt(candidate.prong1Id()); // eta selection on charm bayron bachelor if (std::abs(trackPiFromCharm.eta()) > etaTrackCharmBachMax) { - return false; - } - registry.fill(HIST("hSelStatusHf"), 1.0); - // Distance of Closest Approach(DCA) - if (candidate.dcaDaughters() > cuts->get(inputPtBin, "dcaCharmBaryonDau")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passEtaCharmBach); } - registry.fill(HIST("hSelStatusHf"), 2.0); // pT: Charm Bachelor double ptPiFromCharmBaryon = RecoDecay::sqrtSumOfSquares(candidate.pxProng1(), candidate.pyProng1()); if (ptPiFromCharmBaryon < cuts->get(inputPtBin, "ptPiFromCharmBaryon")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passPtCharmBach); + } + + // Impact parameter of charm bachelor to PV + if ((std::abs(candidate.impactParameter1()) < impactParXYPiFromCharmBaryonMin) || (std::abs(candidate.impactParameter1()) > impactParXYPiFromCharmBaryonMax)) { + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passImpactParXYCharmBachToPv); + } + + if ((std::abs(candidate.impactParameterZ1()) < impactParZPiFromCharmBaryonMin) || (std::abs(candidate.impactParameterZ1()) > impactParZPiFromCharmBaryonMax)) { + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passImpactParZCharmBachToPv); } - registry.fill(HIST("hSelStatusHf"), 3.0); // specific selections with KFParticle output if constexpr (svReco == doKfParticle) { // Cosine of pointing angle if (candidate.cpaCascadeToCharmHadron() < cuts->get(inputPtBin, "cosPaCascToXic")) { - return false; - } - registry.fill(HIST("hSelStatusHf"), 4.0); - - // DCA - if (std::abs(candidate.impactParameter1()) > cuts->get(inputPtBin, "kfDcaXYPiFromXic")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passCpaCascadeToCharmHadron); } - registry.fill(HIST("hSelStatusHf"), 5.0); // Chi2 if (candidate.chi2Geo() < 0 || candidate.chi2Geo() > cuts->get(inputPtBin, "chi2GeoXic")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passChi2GeoXic); } - registry.fill(HIST("hSelStatusHf"), 6.0); + if (candidate.chi2TopoOverNdfToPv() < 0 || candidate.chi2TopoOverNdfToPv() > cuts->get(inputPtBin, "chi2TopoXicToPv")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passChi2TopoXicToPv); } - registry.fill(HIST("hSelStatusHf"), 7.0); + // TODO: check if this cut is needed,the QA KF table has no dedicated charm-bachelor-to-PV topological chi2 column // if (candidate.chi2TopoPiFromXicToPv() < 0 || candidate.chi2TopoPiFromXicToPv() > cuts->get(inputPtBin, "chi2TopoPiFromXicToPv")) { // return false; // } // registry.fill(HIST("hSelStatusHf"), 8.0); + if (candidate.chi2TopoOverNdfCascadeToCharmHadron() < 0 || candidate.chi2TopoOverNdfCascadeToCharmHadron() > cuts->get(inputPtBin, "chi2TopoCascToXic")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passChi2TopoCascToXic); } - registry.fill(HIST("hSelStatusHf"), 9.0); // Decay Length if (std::abs(candidate.decayLengthXY()) > cuts->get(inputPtBin, "decayLenXYXic")) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passDecayLengthXYXic); } - registry.fill(HIST("hSelStatusHf"), 10.0); // TODO: this is not correct for the OmegaC0->XiPi decay, need to differentiate between the two decays // ctau if (std::abs(HfHelper::ctXiczero(candidate)) > cuts->get(inputPtBin, "cTauXic")) { - return false; - } - registry.fill(HIST("hSelStatusHf"), 11.0); - } else { - if ((std::abs(candidate.impactParameter1()) < impactParXYPiFromCharmBaryonMin) || (std::abs(candidate.impactParameter1()) > impactParXYPiFromCharmBaryonMax)) { - return false; - } - registry.fill(HIST("hSelStatusHf"), 4.0); - if ((std::abs(candidate.impactParameterZ1()) < impactParZPiFromCharmBaryonMin) || (std::abs(candidate.impactParameterZ1()) > impactParZPiFromCharmBaryonMax)) { - return false; + resSelection = false; + } else { + registry.fill(HIST("hSelStatus"), passCTauXic); } - registry.fill(HIST("hSelStatusHf"), 5.0); } - // If passes all cuts, return true - return true; + return resSelection; } template @@ -547,6 +758,7 @@ struct HfCandidateSelectorToXiPiQa { continue; } SETBIT(selectionStatus, aod::SelectionStep::RecoSkims); + registry.fill(HIST("hSelStatus"), fromCreator); auto trackV0PosDau = lfTracks.rawIteratorAt(candidate.posTrackId()); auto trackV0NegDau = lfTracks.rawIteratorAt(candidate.negTrackId()); @@ -564,8 +776,13 @@ struct HfCandidateSelectorToXiPiQa { registry.fill(HIST("hSelSignDec"), 0); // particle decay } - // pT selection + // Fill QA histogram - Before selection + fillQaHistograms(true, candidate, tracks, lfTracks); + auto ptCandXic0 = candidate.pt(); + const double invMassCharmBaryon = HfHelper::invMassXiczeroToXiPi(candidate); + + // pT selection int pTBin = findBin(binsPt, ptCandXic0); if (pTBin == -1) { hfSelToXiPi(selectionStatus); @@ -573,6 +790,8 @@ struct HfCandidateSelectorToXiPiQa { hfMlToXiPi(outputMlXic0ToXiPi); } continue; + } else { + registry.fill(HIST("h2CharmHadPtInvMassSelStatus01"), ptCandXic0, invMassCharmBaryon); } // Topological selection @@ -581,45 +800,41 @@ struct HfCandidateSelectorToXiPiQa { // TPC clusters selections bool selectedTrackQuality = true; - registry.fill(HIST("hSelStatusCluster"), 0.0); + if (applyTrkSelLf) { if (!isSelectedTrackTpcQuality(trackPiFromLam, nClustersTpcMin, nTpcCrossedRowsMin, tpcCrossedRowsOverFindableClustersRatioMin, tpcChi2PerClusterMax)) { selectedTrackQuality = false; } else { - registry.fill(HIST("hSelStatusCluster"), 1.0); + registry.fill(HIST("hSelStatus"), passTrackTpcQualityPiFromLam); } if (!isSelectedTrackTpcQuality(trackPrFromLam, nClustersTpcMin, nTpcCrossedRowsMin, tpcCrossedRowsOverFindableClustersRatioMin, tpcChi2PerClusterMax)) { selectedTrackQuality = false; } else { - registry.fill(HIST("hSelStatusCluster"), 2.0); + registry.fill(HIST("hSelStatus"), passTrackTpcQualityPrFromLam); } if (!isSelectedTrackTpcQuality(trackPiFromCasc, nClustersTpcMin, nTpcCrossedRowsMin, tpcCrossedRowsOverFindableClustersRatioMin, tpcChi2PerClusterMax)) { selectedTrackQuality = false; } else { - registry.fill(HIST("hSelStatusCluster"), 3.0); + registry.fill(HIST("hSelStatus"), passTrackTpcQualityPiFromCasc); } } if (!isSelectedTrackTpcQuality(trackPiFromCharm, nClustersTpcMin, nTpcCrossedRowsMin, tpcCrossedRowsOverFindableClustersRatioMin, tpcChi2PerClusterMax)) { selectedTrackQuality = false; } else { - registry.fill(HIST("hSelStatusCluster"), 4.0); + registry.fill(HIST("hSelStatus"), passTrackTpcQualityPiFromCharm); } // ITS clusters selection if (!isSelectedTrackItsQuality(trackPiFromCharm, nClustersItsMin, itsChi2PerClusterMax) || trackPiFromCharm.itsNClsInnerBarrel() < nClustersItsInnBarrMin) { selectedTrackQuality = false; } else { - registry.fill(HIST("hSelStatusCluster"), 5.0); - } - - const double invMassCharmBaryon = HfHelper::invMassXiczeroToXiPi(candidate); - if (selectionResOnLF && selectionResOnHF && selectedTrackQuality) { - registry.fill(HIST("hInvMassCharmBaryonWoPidInvMassCut"), invMassCharmBaryon); + registry.fill(HIST("hSelStatus"), passTrackItsQualityPiFromCharm); } + // Inv mass cut const bool statusInvMassLambda = std::abs(candidate.massLambda() - o2::constants::physics::MassLambda0) < v0MassWindow; const bool statusInvMassCascade = std::abs(candidate.massCascade() - o2::constants::physics::MassXiMinus) < cascMassWindow; @@ -630,19 +845,13 @@ struct HfCandidateSelectorToXiPiQa { if (applyMl) { hfMlToXiPi(outputMlXic0ToXiPi); } - registry.fill(HIST("hInvMassCharmBaryonBkg"), invMassCharmBaryon); continue; } SETBIT(selectionStatus, aod::SelectionStep::RecoTopol); + registry.fill(HIST("h2CharmHadPtInvMassSelStatus03"), ptCandXic0, invMassCharmBaryon); // Track level PID selection - registry.fill(HIST("hSelStatusPID"), 0.0); - - if (usePidTpcOnly == usePidTpcOrTof) { - LOGF(fatal, "Check the PID configurables, usePidTpcOnly and usePidTpcOrTof can't have the same value"); - } - TrackSelectorPID::Status statusPidPrFromLam{}; TrackSelectorPID::Status statusPidPiFromLam{}; TrackSelectorPID::Status statusPidPiFromCasc{}; @@ -659,20 +868,25 @@ struct HfCandidateSelectorToXiPiQa { statusPidPiFromLam = selectorPion.statusTpcOrTof(trackPiFromLam); statusPidPiFromCasc = selectorPion.statusTpcOrTof(trackPiFromCasc); statusPidPiFromCharmBaryon = selectorPion.statusTpcOrTof(trackPiFromCharm); + } else if (usePidTpcAndTof) { + statusPidPrFromLam = selectorProton.statusTpcAndTof(trackPrFromLam); + statusPidPiFromLam = selectorPion.statusTpcAndTof(trackPiFromLam); + statusPidPiFromCasc = selectorPion.statusTpcAndTof(trackPiFromCasc); + statusPidPiFromCharmBaryon = selectorPion.statusTpcAndTof(trackPiFromCharm); } // TODO: check PID logic, usually we require particles to not be TrackSelectorPID::Rejected - const bool statusPidLambda = (statusPidPrFromLam == TrackSelectorPID::Accepted) && (statusPidPiFromLam == TrackSelectorPID::Accepted); + const bool statusPidLambda = (statusPidPrFromLam != TrackSelectorPID::Rejected) && (statusPidPiFromLam != TrackSelectorPID::Rejected); if (statusPidLambda) { - registry.fill(HIST("hSelStatusPID"), 1.0); + registry.fill(HIST("hSelStatus"), passStatusPidLambda); } - const bool statusPidCascade = statusPidLambda && statusPidPiFromCasc == TrackSelectorPID::Accepted; + const bool statusPidCascade = statusPidLambda && (statusPidPiFromCasc != TrackSelectorPID::Rejected); if (statusPidCascade) { - registry.fill(HIST("hSelStatusPID"), 2.0); + registry.fill(HIST("hSelStatus"), passStatusPidCascade); } - const bool statusPidCharmBaryon = statusPidCascade && statusPidPiFromCharmBaryon == TrackSelectorPID::Accepted; + const bool statusPidCharmBaryon = statusPidCascade && (statusPidPiFromCharmBaryon != TrackSelectorPID::Rejected); if (statusPidCharmBaryon) { - registry.fill(HIST("hSelStatusPID"), 3.0); + registry.fill(HIST("hSelStatus"), passStatusPidCharmBaryon); } if (!statusPidCharmBaryon) { @@ -680,10 +894,10 @@ struct HfCandidateSelectorToXiPiQa { if (applyMl) { hfMlToXiPi(outputMlXic0ToXiPi); } - registry.fill(HIST("hInvMassCharmBaryonBkg"), invMassCharmBaryon); continue; } SETBIT(selectionStatus, aod::SelectionStep::RecoPID); + registry.fill(HIST("h2CharmHadPtInvMassSelStatus07"), ptCandXic0, invMassCharmBaryon); // ML BDT selection if required if (applyMl && findBin(binsPtMl, ptCandXic0) != -1) { @@ -698,16 +912,18 @@ struct HfCandidateSelectorToXiPiQa { if (isSelectedMlXic0) { SETBIT(selectionStatus, aod::SelectionStep::RecoMl); + registry.fill(HIST("h2CharmHadPtInvMassSelStatus15"), ptCandXic0, invMassCharmBaryon); } } - registry.fill(HIST("hInvMassCharmBaryon"), invMassCharmBaryon); - hfSelToXiPi(selectionStatus); if (applyMl) { hfMlToXiPi(outputMlXic0ToXiPi); } + // Fill QA histogram - After full selection + fillQaHistograms(false, candidate, tracks, lfTracks); + } // end of candidate loop } // end run fuction diff --git a/PWGHF/TableProducer/treeCreatorToXiPiQa.cxx b/PWGHF/TableProducer/treeCreatorToXiPiQa.cxx index 7d10f17f3ff..fb0d2fe6033 100644 --- a/PWGHF/TableProducer/treeCreatorToXiPiQa.cxx +++ b/PWGHF/TableProducer/treeCreatorToXiPiQa.cxx @@ -66,105 +66,136 @@ namespace full DECLARE_SOA_COLUMN(IsEventSel8, isEventSel8, bool); DECLARE_SOA_COLUMN(IsEventSelZ, isEventSelZ, bool); DECLARE_SOA_COLUMN(Centrality, centrality, float); +// selection info +DECLARE_SOA_COLUMN(IsSelToXiPi, isSelToXiPi, int); // from creator -DECLARE_SOA_COLUMN(XPv, xPv, float); -DECLARE_SOA_COLUMN(YPv, yPv, float); -DECLARE_SOA_COLUMN(ZPv, zPv, float); -DECLARE_SOA_COLUMN(XDecayVtxCharmBaryon, xDecayVtxCharmBaryon, float); -DECLARE_SOA_COLUMN(YDecayVtxCharmBaryon, yDecayVtxCharmBaryon, float); -DECLARE_SOA_COLUMN(ZDecayVtxCharmBaryon, zDecayVtxCharmBaryon, float); -DECLARE_SOA_COLUMN(XDecayVtxCascade, xDecayVtxCascade, float); -DECLARE_SOA_COLUMN(YDecayVtxCascade, yDecayVtxCascade, float); -DECLARE_SOA_COLUMN(ZDecayVtxCascade, zDecayVtxCascade, float); -DECLARE_SOA_COLUMN(XDecayVtxV0, xDecayVtxV0, float); -DECLARE_SOA_COLUMN(YDecayVtxV0, yDecayVtxV0, float); -DECLARE_SOA_COLUMN(ZDecayVtxV0, zDecayVtxV0, float); -DECLARE_SOA_COLUMN(SignDecay, signDecay, int8_t); // sign of pi <- xi -DECLARE_SOA_COLUMN(PxCharmBaryon, pxCharmBaryon, float); -DECLARE_SOA_COLUMN(PyCharmBaryon, pyCharmBaryon, float); -DECLARE_SOA_COLUMN(PzCharmBaryon, pzCharmBaryon, float); -DECLARE_SOA_COLUMN(PxCasc, pxCasc, float); -DECLARE_SOA_COLUMN(PyCasc, pyCasc, float); -DECLARE_SOA_COLUMN(PzCasc, pzCasc, float); -DECLARE_SOA_COLUMN(PxPiFromCharmBaryon, pxPiFromCharmBaryon, float); -DECLARE_SOA_COLUMN(PyPiFromCharmBaryon, pyPiFromCharmBaryon, float); -DECLARE_SOA_COLUMN(PzPiFromCharmBaryon, pzPiFromCharmBaryon, float); +DECLARE_SOA_COLUMN(PvX, pvX, float); +DECLARE_SOA_COLUMN(PvY, pvY, float); +DECLARE_SOA_COLUMN(PvZ, pvZ, float); +DECLARE_SOA_COLUMN(CharmBaryonDecayVtxX, charmBaryonDecayVtxX, float); +DECLARE_SOA_COLUMN(CharmBaryonDecayVtxY, charmBaryonDecayVtxY, float); +DECLARE_SOA_COLUMN(CharmBaryonDecayVtxZ, charmBaryonDecayVtxZ, float); +DECLARE_SOA_COLUMN(CascadeDecayVtxX, cascadeDecayVtxX, float); +DECLARE_SOA_COLUMN(CascadeDecayVtxY, cascadeDecayVtxY, float); +DECLARE_SOA_COLUMN(CascadeDecayVtxZ, cascadeDecayVtxZ, float); +DECLARE_SOA_COLUMN(V0DecayVtxX, v0DecayVtxX, float); +DECLARE_SOA_COLUMN(V0DecayVtxY, v0DecayVtxY, float); +DECLARE_SOA_COLUMN(V0DecayVtxZ, v0DecayVtxZ, float); +DECLARE_SOA_COLUMN(CascBachSign, cascBachSign, int8_t); // sign of pi <- xi +DECLARE_SOA_COLUMN(CharmBaryonPx, charmBaryonPx, float); +DECLARE_SOA_COLUMN(CharmBaryonPy, charmBaryonPy, float); +DECLARE_SOA_COLUMN(CharmBaryonPz, charmBaryonPz, float); +DECLARE_SOA_COLUMN(CascadeFitPx, cascadeFitPx, float); +DECLARE_SOA_COLUMN(CascadeFitPy, cascadeFitPy, float); +DECLARE_SOA_COLUMN(CascadeFitPz, cascadeFitPz, float); +DECLARE_SOA_COLUMN(CharmBachFitPx, charmBachFitPx, float); +DECLARE_SOA_COLUMN(CharmBachFitPy, charmBachFitPy, float); +DECLARE_SOA_COLUMN(CharmBachFitPz, charmBachFitPz, float); DECLARE_SOA_COLUMN(PxLambda, pxLambda, float); DECLARE_SOA_COLUMN(PyLambda, pyLambda, float); DECLARE_SOA_COLUMN(PzLambda, pzLambda, float); -DECLARE_SOA_COLUMN(PtCharmBaryon, ptCharmBaryon, float); -DECLARE_SOA_COLUMN(PtPiFromCharmBaryon, ptPiFromCharmBaryon, float); -DECLARE_SOA_COLUMN(PxPiFromCasc, pxPiFromCasc, float); -DECLARE_SOA_COLUMN(PyPiFromCasc, pyPiFromCasc, float); -DECLARE_SOA_COLUMN(PzPiFromCasc, pzPiFromCasc, float); -DECLARE_SOA_COLUMN(PxPosV0Dau, pxPosV0Dau, float); -DECLARE_SOA_COLUMN(PyPosV0Dau, pyPosV0Dau, float); -DECLARE_SOA_COLUMN(PzPosV0Dau, pzPosV0Dau, float); -DECLARE_SOA_COLUMN(PxNegV0Dau, pxNegV0Dau, float); -DECLARE_SOA_COLUMN(PyNegV0Dau, pyNegV0Dau, float); -DECLARE_SOA_COLUMN(PzNegV0Dau, pzNegV0Dau, float); -DECLARE_SOA_COLUMN(ImpactParCascXY, impactParCascXY, float); -DECLARE_SOA_COLUMN(ImpactParPiFromCharmBaryonXY, impactParPiFromCharmBaryonXY, float); -DECLARE_SOA_COLUMN(ImpactParCascZ, impactParCascZ, float); -DECLARE_SOA_COLUMN(ImpactParPiFromCharmBaryonZ, impactParPiFromCharmBaryonZ, float); -DECLARE_SOA_COLUMN(ErrImpactParCascXY, errImpactParCascXY, float); -DECLARE_SOA_COLUMN(ErrImpactParPiFromCharmBaryonXY, errImpactParPiFromCharmBaryonXY, float); -DECLARE_SOA_COLUMN(InvMassLambda, invMassLambda, float); -DECLARE_SOA_COLUMN(InvMassCascade, invMassCascade, float); -DECLARE_SOA_COLUMN(InvMassCharmBaryon, invMassCharmBaryon, float); -DECLARE_SOA_COLUMN(CosPAV0, cosPAV0, float); -DECLARE_SOA_COLUMN(CosPACharmBaryon, cosPACharmBaryon, float); -DECLARE_SOA_COLUMN(CosPACasc, cosPACasc, float); -DECLARE_SOA_COLUMN(CosPAXYV0, cosPAXYV0, float); -DECLARE_SOA_COLUMN(CosPAXYCharmBaryon, cosPAXYCharmBaryon, float); -DECLARE_SOA_COLUMN(CosPAXYCasc, cosPAXYCasc, float); -DECLARE_SOA_COLUMN(CTauOmegac, cTauOmegac, float); +DECLARE_SOA_COLUMN(CharmBaryonPt, charmBaryonPt, float); +DECLARE_SOA_COLUMN(CharmBaryonY, charmBaryonY, float); +DECLARE_SOA_COLUMN(CharmBachFitPt, charmBachFitPt, float); +DECLARE_SOA_COLUMN(CascBachPx, cascBachPx, float); +DECLARE_SOA_COLUMN(CascBachPy, cascBachPy, float); +DECLARE_SOA_COLUMN(CascBachPz, cascBachPz, float); +DECLARE_SOA_COLUMN(V0PosDauPx, v0PosDauPx, float); +DECLARE_SOA_COLUMN(V0PosDauPy, v0PosDauPy, float); +DECLARE_SOA_COLUMN(V0PosDauPz, v0PosDauPz, float); +DECLARE_SOA_COLUMN(V0NegDauPx, v0NegDauPx, float); +DECLARE_SOA_COLUMN(V0NegDauPy, v0NegDauPy, float); +DECLARE_SOA_COLUMN(V0NegDauPz, v0NegDauPz, float); +DECLARE_SOA_COLUMN(CascadeImpactParXY, cascadeImpactParXY, float); +DECLARE_SOA_COLUMN(CharmBachImpactParXY, charmBachImpactParXY, float); +DECLARE_SOA_COLUMN(CascadeImpactParZ, cascadeImpactParZ, float); +DECLARE_SOA_COLUMN(CharmBachImpactParZ, charmBachImpactParZ, float); +DECLARE_SOA_COLUMN(CascadeErrImpactParXY, cascadeErrImpactParXY, float); +DECLARE_SOA_COLUMN(CharmBachErrImpactParXY, charmBachErrImpactParXY, float); +DECLARE_SOA_COLUMN(V0InvMassLambda, v0InvMassLambda, float); +DECLARE_SOA_COLUMN(CascadeInvMass, cascadeInvMass, float); +DECLARE_SOA_COLUMN(CharmBaryonInvMass, charmBaryonInvMass, float); +DECLARE_SOA_COLUMN(V0CosPA, v0CosPA, float); +DECLARE_SOA_COLUMN(CharmBaryonCosPA, charmBaryonCosPA, float); +DECLARE_SOA_COLUMN(CascadeCosPA, cascadeCosPA, float); +DECLARE_SOA_COLUMN(V0CosPAXY, v0CosPAXY, float); +DECLARE_SOA_COLUMN(CharmBaryonCosPAXY, charmBaryonCosPAXY, float); +DECLARE_SOA_COLUMN(CascadeCosPAXY, cascadeCosPAXY, float); +DECLARE_SOA_COLUMN(CharmBaryonCTauXicHypothesis, charmBaryonCTauXicHypothesis, float); DECLARE_SOA_COLUMN(CTauCascade, cTauCascade, float); DECLARE_SOA_COLUMN(CTauV0, cTauV0, float); DECLARE_SOA_COLUMN(CTauXic, cTauXic, float); -DECLARE_SOA_COLUMN(EtaV0PosDau, etaV0PosDau, float); -DECLARE_SOA_COLUMN(EtaV0NegDau, etaV0NegDau, float); -DECLARE_SOA_COLUMN(EtaPiFromCasc, etaPiFromCasc, float); -DECLARE_SOA_COLUMN(EtaPiFromCharmBaryon, etaPiFromCharmBaryon, float); -DECLARE_SOA_COLUMN(EtaCharmBaryon, etaCharmBaryon, float); -DECLARE_SOA_COLUMN(EtaCascade, etaCascade, float); +DECLARE_SOA_COLUMN(V0PosDauEta, v0PosDauEta, float); +DECLARE_SOA_COLUMN(V0NegDauEta, v0NegDauEta, float); +DECLARE_SOA_COLUMN(CascBachEta, cascBachEta, float); +DECLARE_SOA_COLUMN(CharmBachEta, charmBachEta, float); +DECLARE_SOA_COLUMN(CharmBaryonEta, charmBaryonEta, float); +DECLARE_SOA_COLUMN(CascadeEta, cascadeEta, float); DECLARE_SOA_COLUMN(PhiCharmBaryon, phiCharmBaryon, float); DECLARE_SOA_COLUMN(YCharmBaryon, yCharmBaryon, float); -DECLARE_SOA_COLUMN(EtaV0, etaV0, float); -DECLARE_SOA_COLUMN(DcaXYToPvV0Dau0, dcaXYToPvV0Dau0, float); -DECLARE_SOA_COLUMN(DcaXYToPvV0Dau1, dcaXYToPvV0Dau1, float); -DECLARE_SOA_COLUMN(DcaXYToPvCascDau, dcaXYToPvCascDau, float); -DECLARE_SOA_COLUMN(DcaZToPvV0Dau0, dcaZToPvV0Dau0, float); -DECLARE_SOA_COLUMN(DcaZToPvV0Dau1, dcaZToPvV0Dau1, float); -DECLARE_SOA_COLUMN(DcaZToPvCascDau, dcaZToPvCascDau, float); -DECLARE_SOA_COLUMN(DcaCascDau, dcaCascDau, float); -DECLARE_SOA_COLUMN(DcaV0Dau, dcaV0Dau, float); -DECLARE_SOA_COLUMN(DcaCharmBaryonDau, dcaCharmBaryonDau, float); -DECLARE_SOA_COLUMN(DecLenCharmBaryon, decLenCharmBaryon, float); -DECLARE_SOA_COLUMN(DecLenCascade, decLenCascade, float); -DECLARE_SOA_COLUMN(DecLenV0, decLenV0, float); -DECLARE_SOA_COLUMN(ErrorDecayLengthCharmBaryon, errorDecayLengthCharmBaryon, float); -DECLARE_SOA_COLUMN(ErrorDecayLengthXYCharmBaryon, errorDecayLengthXYCharmBaryon, float); -DECLARE_SOA_COLUMN(NormImpParCascade, normImpParCascade, double); -DECLARE_SOA_COLUMN(NormImpParPiFromCharmBar, normImpParPiFromCharmBar, double); -DECLARE_SOA_COLUMN(NormDecayLenCharmBar, normDecayLenCharmBar, double); -DECLARE_SOA_COLUMN(IsPionGlbTrkWoDca, isPionGlbTrkWoDca, bool); -DECLARE_SOA_COLUMN(PionItsNCls, pionItsNCls, uint8_t); -DECLARE_SOA_COLUMN(NTpcRowsPion, nTpcRowsPion, int16_t); -DECLARE_SOA_COLUMN(NTpcRowsPiFromCasc, nTpcRowsPiFromCasc, int16_t); -DECLARE_SOA_COLUMN(NTpcRowsPosV0Dau, nTpcRowsPosV0Dau, int16_t); -DECLARE_SOA_COLUMN(NTpcRowsNegV0Dau, nTpcRowsNegV0Dau, int16_t); +DECLARE_SOA_COLUMN(V0Eta, v0Eta, float); +DECLARE_SOA_COLUMN(V0PosDauDcaXYToPv, v0PosDauDcaXYToPv, float); +DECLARE_SOA_COLUMN(V0NegDauDcaXYToPv, v0NegDauDcaXYToPv, float); +DECLARE_SOA_COLUMN(CascBachDcaXYToPv, cascBachDcaXYToPv, float); +DECLARE_SOA_COLUMN(V0PosDauDcaZToPv, v0PosDauDcaZToPv, float); +DECLARE_SOA_COLUMN(V0NegDauDcaZToPv, v0NegDauDcaZToPv, float); +DECLARE_SOA_COLUMN(CascBachDcaZToPv, cascBachDcaZToPv, float); +DECLARE_SOA_COLUMN(CascadeDcaDau, cascadeDcaDau, float); +DECLARE_SOA_COLUMN(V0DcaDau, v0DcaDau, float); +DECLARE_SOA_COLUMN(CharmBaryonDcaDau, charmBaryonDcaDau, float); +DECLARE_SOA_COLUMN(CharmBaryonDecayLength, charmBaryonDecayLength, float); +DECLARE_SOA_COLUMN(CascadeDecayLength, cascadeDecayLength, float); +DECLARE_SOA_COLUMN(V0DecayLength, v0DecayLength, float); +DECLARE_SOA_COLUMN(CharmBaryonErrorDecayLength, charmBaryonErrorDecayLength, float); +DECLARE_SOA_COLUMN(CharmBaryonErrorDecayLengthXY, charmBaryonErrorDecayLengthXY, float); +DECLARE_SOA_COLUMN(CascadeNormImpPar, cascadeNormImpPar, double); +DECLARE_SOA_COLUMN(CharmBachNormImpPar, charmBachNormImpPar, double); +DECLARE_SOA_COLUMN(CharmBaryonNormDecayLength, charmBaryonNormDecayLength, double); +DECLARE_SOA_COLUMN(CharmBachIsGlobalTrackWoDca, charmBachIsGlobalTrackWoDca, bool); +DECLARE_SOA_COLUMN(CharmBachItsNCls, charmBachItsNCls, uint8_t); +DECLARE_SOA_COLUMN(CharmBachTpcNClsCrossedRows, charmBachTpcNClsCrossedRows, int16_t); +DECLARE_SOA_COLUMN(CascBachTpcNClsCrossedRows, cascBachTpcNClsCrossedRows, int16_t); +DECLARE_SOA_COLUMN(V0PosDauTpcNClsCrossedRows, v0PosDauTpcNClsCrossedRows, int16_t); +DECLARE_SOA_COLUMN(V0NegDauTpcNClsCrossedRows, v0NegDauTpcNClsCrossedRows, int16_t); // from creator - MC DECLARE_SOA_COLUMN(FlagMcMatchRec, flagMcMatchRec, int8_t); // reconstruction level DECLARE_SOA_COLUMN(OriginRec, originRec, int8_t); -DECLARE_SOA_COLUMN(TpcNSigmaPiFromCharmBaryon, tpcNSigmaPiFromCharmBaryon, float); -DECLARE_SOA_COLUMN(TpcNSigmaPiFromCasc, tpcNSigmaPiFromCasc, float); -DECLARE_SOA_COLUMN(TpcNSigmaPiFromLambda, tpcNSigmaPiFromLambda, float); -DECLARE_SOA_COLUMN(TpcNSigmaPrFromLambda, tpcNSigmaPrFromLambda, float); -DECLARE_SOA_COLUMN(TofNSigmaPiFromCharmBaryon, tofNSigmaPiFromCharmBaryon, float); -DECLARE_SOA_COLUMN(TofNSigmaPiFromCasc, tofNSigmaPiFromCasc, float); -DECLARE_SOA_COLUMN(TofNSigmaPiFromLambda, tofNSigmaPiFromLambda, float); -DECLARE_SOA_COLUMN(TofNSigmaPrFromLambda, tofNSigmaPrFromLambda, float); +DECLARE_SOA_COLUMN(CharmBachTpcNSigma, charmBachTpcNSigma, float); +DECLARE_SOA_COLUMN(CascBachTpcNSigma, cascBachTpcNSigma, float); +DECLARE_SOA_COLUMN(LambdaPiTpcNSigma, lambdaPiTpcNSigma, float); +DECLARE_SOA_COLUMN(LambdaPrTpcNSigma, lambdaPrTpcNSigma, float); +DECLARE_SOA_COLUMN(CharmBachTofNSigma, charmBachTofNSigma, float); +DECLARE_SOA_COLUMN(CascBachTofNSigma, cascBachTofNSigma, float); +DECLARE_SOA_COLUMN(LambdaPiTofNSigma, lambdaPiTofNSigma, float); +DECLARE_SOA_COLUMN(LambdaPrTofNSigma, lambdaPrTofNSigma, float); +// Additional track information +DECLARE_SOA_COLUMN(CharmBachTpcNClsFound, charmBachTpcNClsFound, int16_t); +DECLARE_SOA_COLUMN(CharmBachTpcCrossedRowsOverFindableCls, charmBachTpcCrossedRowsOverFindableCls, float); +DECLARE_SOA_COLUMN(CharmBachTpcChi2NCl, charmBachTpcChi2NCl, float); +DECLARE_SOA_COLUMN(CharmBachHasTpc, charmBachHasTpc, bool); +DECLARE_SOA_COLUMN(CharmBachHasTof, charmBachHasTof, bool); +DECLARE_SOA_COLUMN(CascBachTpcNClsFound, cascBachTpcNClsFound, int16_t); +DECLARE_SOA_COLUMN(CascBachTpcCrossedRowsOverFindableCls, cascBachTpcCrossedRowsOverFindableCls, float); +DECLARE_SOA_COLUMN(CascBachTpcChi2NCl, cascBachTpcChi2NCl, float); +DECLARE_SOA_COLUMN(CascBachHasTpc, cascBachHasTpc, bool); +DECLARE_SOA_COLUMN(CascBachHasTof, cascBachHasTof, bool); +DECLARE_SOA_COLUMN(V0PosDauTpcNClsFound, v0PosDauTpcNClsFound, int16_t); +DECLARE_SOA_COLUMN(V0PosDauTpcCrossedRowsOverFindableCls, v0PosDauTpcCrossedRowsOverFindableCls, float); +DECLARE_SOA_COLUMN(V0PosDauTpcChi2NCl, v0PosDauTpcChi2NCl, float); +DECLARE_SOA_COLUMN(V0PosDauHasTpc, v0PosDauHasTpc, bool); +DECLARE_SOA_COLUMN(V0PosDauHasTof, v0PosDauHasTof, bool); +DECLARE_SOA_COLUMN(V0NegDauTpcNClsFound, v0NegDauTpcNClsFound, int16_t); +DECLARE_SOA_COLUMN(V0NegDauTpcCrossedRowsOverFindableCls, v0NegDauTpcCrossedRowsOverFindableCls, float); +DECLARE_SOA_COLUMN(V0NegDauTpcChi2NCl, v0NegDauTpcChi2NCl, float); +DECLARE_SOA_COLUMN(V0NegDauHasTpc, v0NegDauHasTpc, bool); +DECLARE_SOA_COLUMN(V0NegDauHasTof, v0NegDauHasTof, bool); +DECLARE_SOA_COLUMN(CharmBachItsChi2NCl, charmBachItsChi2NCl, float); +DECLARE_SOA_COLUMN(CharmBachItsNClsInnerBarrel, charmBachItsNClsInnerBarrel, uint8_t); +DECLARE_SOA_COLUMN(CharmBachTrackPt, charmBachTrackPt, float); +DECLARE_SOA_COLUMN(CascBachTrackPt, cascBachTrackPt, float); +DECLARE_SOA_COLUMN(V0PosDauHasItsOrTrd, v0PosDauHasItsOrTrd, bool); +DECLARE_SOA_COLUMN(V0NegDauHasItsOrTrd, v0NegDauHasItsOrTrd, bool); +DECLARE_SOA_COLUMN(CharmBachIsQualityTrackIts, charmBachIsQualityTrackIts, bool); // from creator KF DECLARE_SOA_COLUMN(KfDcaXYPiFromXic, kfDcaXYPiFromXic, float); DECLARE_SOA_COLUMN(KfDcaXYCascToPv, kfDcaXYCascToPv, float); @@ -220,85 +251,188 @@ DECLARE_SOA_TABLE(HfToXiPiEvs, "AOD", "HFTOXIPIEV", full::IsEventSel8, full::IsEventSelZ); DECLARE_SOA_TABLE(HfToXiPiFulls, "AOD", "HFTOXIPIFULL", - full::XPv, full::YPv, full::ZPv, full::Centrality, collision::NumContrib, collision::Chi2, - full::XDecayVtxCharmBaryon, full::YDecayVtxCharmBaryon, full::ZDecayVtxCharmBaryon, - full::XDecayVtxCascade, full::YDecayVtxCascade, full::ZDecayVtxCascade, - full::XDecayVtxV0, full::YDecayVtxV0, full::ZDecayVtxV0, - full::SignDecay, - full::PtCharmBaryon, full::PtPiFromCharmBaryon, - full::PxCharmBaryon, full::PyCharmBaryon, full::PzCharmBaryon, - full::PxCasc, full::PyCasc, full::PzCasc, - full::PxPiFromCharmBaryon, full::PyPiFromCharmBaryon, full::PzPiFromCharmBaryon, - full::PxPiFromCasc, full::PyPiFromCasc, full::PzPiFromCasc, - full::PxPosV0Dau, full::PyPosV0Dau, full::PzPosV0Dau, - full::PxNegV0Dau, full::PyNegV0Dau, full::PzNegV0Dau, - full::ImpactParCascXY, full::ImpactParPiFromCharmBaryonXY, - full::ImpactParCascZ, full::ImpactParPiFromCharmBaryonZ, - full::ErrImpactParCascXY, full::ErrImpactParPiFromCharmBaryonXY, - full::InvMassLambda, full::InvMassCascade, full::InvMassCharmBaryon, - full::CosPAV0, full::CosPACharmBaryon, full::CosPACasc, full::CosPAXYV0, full::CosPAXYCharmBaryon, full::CosPAXYCasc, - full::CTauOmegac, - full::EtaV0PosDau, full::EtaV0NegDau, full::EtaPiFromCasc, full::EtaPiFromCharmBaryon, - full::EtaCharmBaryon, full::EtaCascade, full::EtaV0, - full::DcaXYToPvV0Dau0, full::DcaXYToPvV0Dau1, full::DcaXYToPvCascDau, - full::DcaZToPvV0Dau0, full::DcaZToPvV0Dau1, full::DcaZToPvCascDau, - full::DcaCascDau, full::DcaV0Dau, full::DcaCharmBaryonDau, - full::DecLenCharmBaryon, full::DecLenCascade, full::DecLenV0, full::ErrorDecayLengthCharmBaryon, full::ErrorDecayLengthXYCharmBaryon, - full::NormImpParCascade, full::NormImpParPiFromCharmBar, full::NormDecayLenCharmBar, full::IsPionGlbTrkWoDca, full::PionItsNCls, - full::NTpcRowsPion, full::NTpcRowsPiFromCasc, full::NTpcRowsPosV0Dau, full::NTpcRowsNegV0Dau, - full::TpcNSigmaPiFromCharmBaryon, full::TpcNSigmaPiFromCasc, full::TpcNSigmaPiFromLambda, full::TpcNSigmaPrFromLambda, - full::TofNSigmaPiFromCharmBaryon, full::TofNSigmaPiFromCasc, full::TofNSigmaPiFromLambda, full::TofNSigmaPrFromLambda, - full::FlagMcMatchRec, full::OriginRec); + // Collision and primary vertex + full::PvX, + full::PvY, + full::PvZ, + full::Centrality, + collision::NumContrib, + collision::Chi2, + // Charm baryon + full::CharmBaryonDecayVtxX, + full::CharmBaryonDecayVtxY, + full::CharmBaryonDecayVtxZ, + full::CharmBaryonPt, + full::CharmBaryonPx, + full::CharmBaryonPy, + full::CharmBaryonPz, + full::CharmBaryonY, + full::CharmBaryonInvMass, + full::CharmBaryonCosPA, + full::CharmBaryonCosPAXY, + full::CharmBaryonCTauXicHypothesis, + full::CharmBaryonEta, + full::CharmBaryonDcaDau, + full::CharmBaryonDecayLength, + full::CharmBaryonErrorDecayLength, + full::CharmBaryonErrorDecayLengthXY, + full::CharmBaryonNormDecayLength, + // Cascade + full::CascadeDecayVtxX, + full::CascadeDecayVtxY, + full::CascadeDecayVtxZ, + full::CascadeFitPx, + full::CascadeFitPy, + full::CascadeFitPz, + full::CascadeImpactParXY, + full::CascadeImpactParZ, + full::CascadeErrImpactParXY, + full::CascadeInvMass, + full::CascadeCosPA, + full::CascadeCosPAXY, + full::CascadeEta, + full::CascadeDcaDau, + full::CascadeDecayLength, + full::CascadeNormImpPar, + // V0 + full::V0DecayVtxX, + full::V0DecayVtxY, + full::V0DecayVtxZ, + full::V0InvMassLambda, + full::V0CosPA, + full::V0CosPAXY, + full::V0Eta, + full::V0DcaDau, + full::V0DecayLength, + // Charm bachelor + full::CharmBachFitPt, + full::CharmBachTrackPt, + full::CharmBachFitPx, + full::CharmBachFitPy, + full::CharmBachFitPz, + full::CharmBachImpactParXY, + full::CharmBachImpactParZ, + full::CharmBachErrImpactParXY, + full::CharmBachEta, + full::CharmBachNormImpPar, + full::CharmBachIsGlobalTrackWoDca, + full::CharmBachItsNCls, + full::CharmBachTpcNClsCrossedRows, + full::CharmBachTpcNSigma, + full::CharmBachTofNSigma, + full::CharmBachTpcNClsFound, + full::CharmBachTpcCrossedRowsOverFindableCls, + full::CharmBachTpcChi2NCl, + full::CharmBachHasTpc, + full::CharmBachHasTof, + full::CharmBachItsChi2NCl, + full::CharmBachItsNClsInnerBarrel, + full::CharmBachIsQualityTrackIts, + // Cascade bachelor + full::CascBachSign, + full::CascBachTrackPt, + full::CascBachPx, + full::CascBachPy, + full::CascBachPz, + full::CascBachEta, + full::CascBachDcaXYToPv, + full::CascBachDcaZToPv, + full::CascBachTpcNClsCrossedRows, + full::CascBachTpcNSigma, + full::CascBachTofNSigma, + full::CascBachTpcNClsFound, + full::CascBachTpcCrossedRowsOverFindableCls, + full::CascBachTpcChi2NCl, + full::CascBachHasTpc, + full::CascBachHasTof, + // Positive V0 daughter + full::V0PosDauPx, + full::V0PosDauPy, + full::V0PosDauPz, + full::V0PosDauEta, + full::V0PosDauDcaXYToPv, + full::V0PosDauDcaZToPv, + full::V0PosDauTpcNClsCrossedRows, + full::V0PosDauTpcNClsFound, + full::V0PosDauTpcCrossedRowsOverFindableCls, + full::V0PosDauTpcChi2NCl, + full::V0PosDauHasTpc, + full::V0PosDauHasTof, + full::V0PosDauHasItsOrTrd, + // Negative V0 daughter + full::V0NegDauPx, + full::V0NegDauPy, + full::V0NegDauPz, + full::V0NegDauEta, + full::V0NegDauDcaXYToPv, + full::V0NegDauDcaZToPv, + full::V0NegDauTpcNClsCrossedRows, + full::V0NegDauTpcNClsFound, + full::V0NegDauTpcCrossedRowsOverFindableCls, + full::V0NegDauTpcChi2NCl, + full::V0NegDauHasTpc, + full::V0NegDauHasTof, + full::V0NegDauHasItsOrTrd, + // Lambda pion PID + full::LambdaPiTpcNSigma, + full::LambdaPiTofNSigma, + // Lambda proton PID + full::LambdaPrTpcNSigma, + full::LambdaPrTofNSigma, + // Selection and MC matching + full::IsSelToXiPi, + full::FlagMcMatchRec, + full::OriginRec); DECLARE_SOA_TABLE(HfToXiPiLites, "AOD", "HFTOXIPILITE", - full::XPv, full::YPv, full::ZPv, full::Centrality, collision::NumContrib, collision::Chi2, - full::XDecayVtxCharmBaryon, full::YDecayVtxCharmBaryon, full::ZDecayVtxCharmBaryon, - full::XDecayVtxCascade, full::YDecayVtxCascade, full::ZDecayVtxCascade, - full::XDecayVtxV0, full::YDecayVtxV0, full::ZDecayVtxV0, - full::SignDecay, - full::PtCharmBaryon, full::PtPiFromCharmBaryon, - full::PxCharmBaryon, full::PyCharmBaryon, full::PzCharmBaryon, - full::PxPiFromCharmBaryon, full::PyPiFromCharmBaryon, full::PzPiFromCharmBaryon, - full::PxPiFromCasc, full::PyPiFromCasc, full::PzPiFromCasc, - full::PxPosV0Dau, full::PyPosV0Dau, full::PzPosV0Dau, - full::PxNegV0Dau, full::PyNegV0Dau, full::PzNegV0Dau, - full::ImpactParCascXY, full::ImpactParPiFromCharmBaryonXY, - full::ErrImpactParCascXY, full::ErrImpactParPiFromCharmBaryonXY, - full::InvMassLambda, full::InvMassCascade, full::InvMassCharmBaryon, - full::CosPAV0, full::CosPACharmBaryon, full::CosPACasc, - full::EtaV0PosDau, full::EtaV0NegDau, full::EtaPiFromCasc, full::EtaPiFromCharmBaryon, full::EtaCharmBaryon, - full::DcaXYToPvV0Dau0, full::DcaXYToPvV0Dau1, full::DcaXYToPvCascDau, - full::DcaCascDau, full::DcaV0Dau, full::DcaCharmBaryonDau, - full::ErrorDecayLengthCharmBaryon, full::NormImpParCascade, full::NormImpParPiFromCharmBar, - full::IsPionGlbTrkWoDca, full::PionItsNCls, - full::NTpcRowsPion, full::NTpcRowsPiFromCasc, full::NTpcRowsPosV0Dau, full::NTpcRowsNegV0Dau, - full::TpcNSigmaPiFromCharmBaryon, full::TpcNSigmaPiFromCasc, full::TpcNSigmaPiFromLambda, full::TpcNSigmaPrFromLambda, - full::TofNSigmaPiFromCharmBaryon, full::TofNSigmaPiFromCasc, full::TofNSigmaPiFromLambda, full::TofNSigmaPrFromLambda, - full::FlagMcMatchRec, full::OriginRec); + full::PvX, full::PvY, full::PvZ, full::Centrality, collision::NumContrib, collision::Chi2, + full::CharmBaryonDecayVtxX, full::CharmBaryonDecayVtxY, full::CharmBaryonDecayVtxZ, + full::CascadeDecayVtxX, full::CascadeDecayVtxY, full::CascadeDecayVtxZ, + full::V0DecayVtxX, full::V0DecayVtxY, full::V0DecayVtxZ, + full::CascBachSign, + full::CharmBaryonPt, full::CharmBachFitPt, + full::CharmBaryonPx, full::CharmBaryonPy, full::CharmBaryonPz, + full::CharmBachFitPx, full::CharmBachFitPy, full::CharmBachFitPz, + full::CascBachPx, full::CascBachPy, full::CascBachPz, + full::V0PosDauPx, full::V0PosDauPy, full::V0PosDauPz, + full::V0NegDauPx, full::V0NegDauPy, full::V0NegDauPz, + full::CascadeImpactParXY, full::CharmBachImpactParXY, + full::CascadeErrImpactParXY, full::CharmBachErrImpactParXY, + full::V0InvMassLambda, full::CascadeInvMass, full::CharmBaryonInvMass, + full::V0CosPA, full::CharmBaryonCosPA, full::CascadeCosPA, + full::V0PosDauEta, full::V0NegDauEta, full::CascBachEta, full::CharmBachEta, full::CharmBaryonEta, + full::V0PosDauDcaXYToPv, full::V0NegDauDcaXYToPv, full::CascBachDcaXYToPv, + full::CascadeDcaDau, full::V0DcaDau, full::CharmBaryonDcaDau, + full::CharmBaryonErrorDecayLength, full::CascadeNormImpPar, full::CharmBachNormImpPar, + full::CharmBachIsGlobalTrackWoDca, full::CharmBachItsNCls, + full::CharmBachTpcNClsCrossedRows, full::CascBachTpcNClsCrossedRows, full::V0PosDauTpcNClsCrossedRows, full::V0NegDauTpcNClsCrossedRows, + full::CharmBachTpcNSigma, full::CascBachTpcNSigma, full::LambdaPiTpcNSigma, full::LambdaPrTpcNSigma, + full::CharmBachTofNSigma, full::CascBachTofNSigma, full::LambdaPiTofNSigma, full::LambdaPrTofNSigma, + full::IsSelToXiPi, full::FlagMcMatchRec, full::OriginRec); DECLARE_SOA_TABLE(HfKfXicFulls, "AOD", "HFKFXICFULL", full::Centrality, - full::TpcNSigmaPiFromCharmBaryon, full::TofNSigmaPiFromCharmBaryon, full::TpcNSigmaPiFromCasc, full::TofNSigmaPiFromCasc, - full::TpcNSigmaPiFromLambda, full::TofNSigmaPiFromLambda, full::TpcNSigmaPrFromLambda, full::TofNSigmaPrFromLambda, - full::KfDcaXYPiFromXic, full::DcaCascDau, full::DcaV0Dau, full::DcaCharmBaryonDau, full::KfDcaXYCascToPv, - full::DcaXYToPvV0Dau0, full::DcaXYToPvV0Dau1, full::DcaXYToPvCascDau, + full::CharmBachTpcNSigma, full::CharmBachTofNSigma, full::CascBachTpcNSigma, full::CascBachTofNSigma, + full::LambdaPiTpcNSigma, full::LambdaPiTofNSigma, full::LambdaPrTpcNSigma, full::LambdaPrTofNSigma, + full::KfDcaXYPiFromXic, full::CascadeDcaDau, full::V0DcaDau, full::CharmBaryonDcaDau, full::KfDcaXYCascToPv, + full::V0PosDauDcaXYToPv, full::V0NegDauDcaXYToPv, full::CascBachDcaXYToPv, full::Chi2GeoV0, full::Chi2GeoCasc, full::Chi2GeoXic, full::V0ldl, full::Cascldl, full::Chi2TopoV0ToPv, full::Chi2TopoCascToPv, full::Chi2TopoXicToPv, full::Chi2TopoV0ToCasc, full::Chi2TopoCascToXic, full::DecayLenXYLambda, full::DecayLenXYCasc, full::DecayLenXYXic, full::CosPaV0ToCasc, full::CosPaV0ToPv, full::CosPaCascToXic, full::CosPaCascToPv, // full::CosPaXicToPv, - full::InvMassLambda, full::InvMassCascade, full::InvMassCharmBaryon, + full::V0InvMassLambda, full::CascadeInvMass, full::CharmBaryonInvMass, full::KfRapXic, full::KfptPiFromXic, full::KfptXic, full::CosThetaStarPiFromXic, full::CtXic, full::EtaXic, full::V0Ndf, full::CascNdf, full::XicNdf, full::V0Chi2OverNdf, full::CascChi2OverNdf, full::XicChi2OverNdf, - full::FlagMcMatchRec, full::OriginRec); + full::IsSelToXiPi, full::FlagMcMatchRec, full::OriginRec); DECLARE_SOA_TABLE(HfCandToXiPiGen, "AOD", "HFCANDTOXIPIGEN", - full::InvMassCharmBaryon, - full::PtCharmBaryon, - full::EtaCharmBaryon, + full::CharmBaryonInvMass, + full::CharmBaryonPt, + full::CharmBaryonEta, full::PhiCharmBaryon, full::YCharmBaryon, full::FlagMcMatchRec, @@ -467,101 +601,143 @@ struct HfTreeCreatorToXiPiQa { trackPiFromCasc.tofNSigmaPi(), trackPiFromLam.tofNSigmaPi(), trackPrFromLam.tofNSigmaPr(), + candidate.isSelToXiPi(), flagMc, originMc); } else { - rowCandidateFull(candidate.posX(), - candidate.posY(), - candidate.posZ(), - centrality, - candidate.template collision_as().numContrib(), - candidate.template collision_as().chi2(), - candidate.xSecondaryVertex(), - candidate.ySecondaryVertex(), - candidate.zSecondaryVertex(), - candidate.xCascadeVertex(), - candidate.yCascadeVertex(), - candidate.zCascadeVertex(), - candidate.xV0Vertex(), - candidate.yV0Vertex(), - candidate.zV0Vertex(), - trackPiFromCasc.sign(), - candidate.pt(), - RecoDecay::pt(candidate.pxProng1(), candidate.pyProng1()), - candidate.px(), - candidate.py(), - candidate.pz(), - candidate.pxProng0(), - candidate.pyProng0(), - candidate.pzProng0(), - candidate.pxProng1(), - candidate.pyProng1(), - candidate.pzProng1(), - trackPiFromCasc.px(), - trackPiFromCasc.py(), - trackPiFromCasc.pz(), - trackV0PosDau.px(), - trackV0PosDau.py(), - trackV0PosDau.pz(), - trackV0NegDau.px(), - trackV0NegDau.py(), - trackV0NegDau.pz(), - candidate.impactParameter0(), - candidate.impactParameter1(), - candidate.impactParameterZ0(), - candidate.impactParameterZ1(), - candidate.errorImpactParameter0(), - candidate.errorImpactParameter1(), - candidate.massLambda(), - candidate.massCascade(), - HfHelper::invMassXiczeroToXiPi(candidate), - candidate.cpaV0(), - candidate.cpa(), - candidate.cpaCascade(), - candidate.cpaXYV0(), - candidate.cpaXY(), - candidate.cpaXYCascade(), - HfHelper::ctXiczero(candidate), // TODO: this gives incorrect value for Omegac0, need to use proper helper function for Omegac0->XiPi - trackV0PosDau.eta(), - trackV0NegDau.eta(), - trackPiFromCasc.eta(), - trackPiFromCharm.eta(), - candidate.eta(), - candidate.etaCascade(), - candidate.etaV0(), - candidate.impactParameterXYV0PosDau(), - candidate.impactParameterXYV0NegDau(), - candidate.impactParameterXYCascadeBach(), - candidate.impactParameterZV0PosDau(), - candidate.impactParameterZV0NegDau(), - candidate.impactParameterZCascadeBach(), - candidate.dcaCascadeDaughters(), - candidate.dcaV0Daughters(), - candidate.dcaDaughters(), - candidate.decayLength(), - candidate.decayLengthCascade(), - candidate.decayLengthV0(), - candidate.errorDecayLength(), - candidate.errorDecayLengthXY(), - candidate.impactParameterNormalised0(), - candidate.impactParameterNormalised1(), - candidate.decayLengthNormalised(), - trackPiFromCharm.isGlobalTrackWoDCA(), - trackPiFromCharm.itsNCls(), - trackPiFromCharm.tpcNClsCrossedRows(), - trackPiFromCasc.tpcNClsCrossedRows(), - trackV0PosDau.tpcNClsCrossedRows(), - trackV0NegDau.tpcNClsCrossedRows(), - trackPiFromCharm.tpcNSigmaPi(), - trackPiFromCasc.tpcNSigmaPi(), - trackPiFromLam.tpcNSigmaPi(), - trackPrFromLam.tpcNSigmaPr(), - trackPiFromCharm.tofNSigmaPi(), - trackPiFromCasc.tofNSigmaPi(), - trackPiFromLam.tofNSigmaPi(), - trackPrFromLam.tofNSigmaPr(), - flagMc, - originMc); + rowCandidateFull( + // Collision and primary vertex + candidate.posX(), + candidate.posY(), + candidate.posZ(), + centrality, + candidate.template collision_as().numContrib(), + candidate.template collision_as().chi2(), + // Charm baryon + candidate.xSecondaryVertex(), + candidate.ySecondaryVertex(), + candidate.zSecondaryVertex(), + candidate.pt(), + candidate.px(), + candidate.py(), + candidate.pz(), + HfHelper::yXiczero(candidate), + HfHelper::invMassXiczeroToXiPi(candidate), + candidate.cpa(), + candidate.cpaXY(), + HfHelper::ctXiczero(candidate), // TODO: this gives incorrect value for Omegac0, need to use proper helper function for Omegac0->XiPi + candidate.eta(), + candidate.dcaDaughters(), + candidate.decayLength(), + candidate.errorDecayLength(), + candidate.errorDecayLengthXY(), + candidate.decayLengthNormalised(), + // Cascade + candidate.xCascadeVertex(), + candidate.yCascadeVertex(), + candidate.zCascadeVertex(), + candidate.pxProng0(), + candidate.pyProng0(), + candidate.pzProng0(), + candidate.impactParameter0(), + candidate.impactParameterZ0(), + candidate.errorImpactParameter0(), + candidate.massCascade(), + candidate.cpaCascade(), + candidate.cpaXYCascade(), + candidate.etaCascade(), + candidate.dcaCascadeDaughters(), + candidate.decayLengthCascade(), + candidate.impactParameterNormalised0(), + // V0 + candidate.xV0Vertex(), + candidate.yV0Vertex(), + candidate.zV0Vertex(), + candidate.massLambda(), + candidate.cpaV0(), + candidate.cpaXYV0(), + candidate.etaV0(), + candidate.dcaV0Daughters(), + candidate.decayLengthV0(), + // Charm bachelor + RecoDecay::pt(candidate.pxProng1(), candidate.pyProng1()), + trackPiFromCharm.pt(), + candidate.pxProng1(), + candidate.pyProng1(), + candidate.pzProng1(), + candidate.impactParameter1(), + candidate.impactParameterZ1(), + candidate.errorImpactParameter1(), + trackPiFromCharm.eta(), + candidate.impactParameterNormalised1(), + trackPiFromCharm.isGlobalTrackWoDCA(), + trackPiFromCharm.itsNCls(), + trackPiFromCharm.tpcNClsCrossedRows(), + trackPiFromCharm.tpcNSigmaPi(), + trackPiFromCharm.tofNSigmaPi(), + trackPiFromCharm.tpcNClsFound(), + trackPiFromCharm.tpcCrossedRowsOverFindableCls(), + trackPiFromCharm.tpcChi2NCl(), + trackPiFromCharm.hasTPC(), + trackPiFromCharm.hasTOF(), + trackPiFromCharm.itsChi2NCl(), + trackPiFromCharm.itsNClsInnerBarrel(), + trackPiFromCharm.isQualityTrackITS(), + // Cascade bachelor + trackPiFromCasc.sign(), + trackPiFromCasc.pt(), + trackPiFromCasc.px(), + trackPiFromCasc.py(), + trackPiFromCasc.pz(), + trackPiFromCasc.eta(), + candidate.impactParameterXYCascadeBach(), + candidate.impactParameterZCascadeBach(), + trackPiFromCasc.tpcNClsCrossedRows(), + trackPiFromCasc.tpcNSigmaPi(), + trackPiFromCasc.tofNSigmaPi(), + trackPiFromCasc.tpcNClsFound(), + trackPiFromCasc.tpcCrossedRowsOverFindableCls(), + trackPiFromCasc.tpcChi2NCl(), + trackPiFromCasc.hasTPC(), + trackPiFromCasc.hasTOF(), + // Positive V0 daughter + trackV0PosDau.px(), + trackV0PosDau.py(), + trackV0PosDau.pz(), + trackV0PosDau.eta(), + candidate.impactParameterXYV0PosDau(), + candidate.impactParameterZV0PosDau(), + trackV0PosDau.tpcNClsCrossedRows(), + trackV0PosDau.tpcNClsFound(), + trackV0PosDau.tpcCrossedRowsOverFindableCls(), + trackV0PosDau.tpcChi2NCl(), + trackV0PosDau.hasTPC(), + trackV0PosDau.hasTOF(), + trackV0PosDau.hasITS() || trackV0PosDau.hasTRD(), + // Negative V0 daughter + trackV0NegDau.px(), + trackV0NegDau.py(), + trackV0NegDau.pz(), + trackV0NegDau.eta(), + candidate.impactParameterXYV0NegDau(), + candidate.impactParameterZV0NegDau(), + trackV0NegDau.tpcNClsCrossedRows(), + trackV0NegDau.tpcNClsFound(), + trackV0NegDau.tpcCrossedRowsOverFindableCls(), + trackV0NegDau.tpcChi2NCl(), + trackV0NegDau.hasTPC(), + trackV0NegDau.hasTOF(), + trackV0NegDau.hasITS() || trackV0NegDau.hasTRD(), + // Lambda pion PID + trackPiFromLam.tpcNSigmaPi(), + trackPiFromLam.tofNSigmaPi(), + // Lambda proton PID + trackPrFromLam.tpcNSigmaPr(), + trackPrFromLam.tofNSigmaPr(), + // Selection and MC matching + candidate.isSelToXiPi(), + flagMc, + originMc); } } else { if constexpr (tableSize == LITE) { @@ -616,6 +792,7 @@ struct HfTreeCreatorToXiPiQa { candidate.chi2GeoOverNdfV0(), candidate.chi2GeoOverNdfCascade(), candidate.chi2GeoOverNdf(), + candidate.isSelToXiPi(), flagMc, originMc); }