From 27e710bad1cc267f5b9979576794666d4a3db53d Mon Sep 17 00:00:00 2001 From: fcolamar Date: Tue, 3 Jun 2025 10:56:52 +0200 Subject: [PATCH 1/2] Completing separation of topological distribution for S and B --- ALICE3/TableProducer/alice3-decayfinder.cxx | 104 +++++++++++--------- 1 file changed, 58 insertions(+), 46 deletions(-) diff --git a/ALICE3/TableProducer/alice3-decayfinder.cxx b/ALICE3/TableProducer/alice3-decayfinder.cxx index 73eb406295f..110dc3dd66c 100644 --- a/ALICE3/TableProducer/alice3-decayfinder.cxx +++ b/ALICE3/TableProducer/alice3-decayfinder.cxx @@ -428,12 +428,18 @@ struct alice3decayFinder { if (doDCAplotsD) { histos.add("hDCADDaughters", "hDCADDaughters", kTH1D, {axisDCADaughters}); histos.add("hDCADbarDaughters", "hDCADbarDaughters", kTH1D, {axisDCADaughters}); - histos.add("hDCADDaughters_Selected", "hDCADDaughters", kTH1D, {axisDCADaughters}); - histos.add("hDCADbarDaughters_Selected", "hDCADbarDaughters", kTH1D, {axisDCADaughters}); + histos.add("hDCADDaughters_Selected", "hDCADDaughters_Selected", kTH1D, {axisDCADaughters}); + histos.add("hDCADbarDaughters_Selected", "hDCADbarDaughters_Selected", kTH1D, {axisDCADaughters}); histos.add("h2dDCAxyVsPtPiPlusFromD", "h2dDCAxyVsPtPiPlusFromD", kTH2F, {axisPt, axisDCA}); histos.add("h2dDCAxyVsPtPiMinusFromD", "h2dDCAxyVsPtPiMinusFromD", kTH2F, {axisPt, axisDCA}); histos.add("h2dDCAxyVsPtKaPlusFromD", "h2dDCAxyVsPtKaPlusFromD", kTH2F, {axisPt, axisDCA}); histos.add("h2dDCAxyVsPtKaMinusFromD", "h2dDCAxyVsPtKaMinusFromD", kTH2F, {axisPt, axisDCA}); + if (doTopoPlotsForSAndB) { + histos.add("hDCADDaughters_Signal", "hDCADDaughters_Signal", kTH1D, {axisDCADaughters}); + histos.add("hDCADDaughters_Bkg", "hDCADDaughters_Bkg", kTH1D, {axisDCADaughters}); + histos.add("hDCADbarDaughters_Signal", "hDCADbarDaughters_Signal", kTH1D, {axisDCADaughters}); + histos.add("hDCADbarDaughters_Bkg", "hDCADbarDaughters_Bkg", kTH1D, {axisDCADaughters}); + } } } if (doprocessFindLcBaryons) { @@ -533,29 +539,32 @@ struct alice3decayFinder { histos.fill(HIST("hDCADDaughters"), dmeson.dcaDau * 1e+4); if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here) - histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA); - histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy); - histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar); - histos.fill(HIST("hDDecayLength_Signal"), decayLength); - histos.fill(HIST("hDDecayLengthXY_Signal"), decayLengthXY); - histos.fill(HIST("hDNormDecayLength_Signal"), dmeson.normalizedDecayLength); - histos.fill(HIST("hImpParPi_Signal"), impParXY_daugPos); - histos.fill(HIST("hImpParK_Signal"), impParXY_daugNeg); - histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg); - histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA); - histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy); - histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar); - histos.fill(HIST("hDDecayLength_Bkg"), decayLength); - histos.fill(HIST("hDDecayLengthXY_Bkg"), decayLengthXY); - histos.fill(HIST("hDNormDecayLength_Bkg"), dmeson.normalizedDecayLength); - histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4); - histos.fill(HIST("hImpParPi_Bkg"), impParXY_daugPos); - histos.fill(HIST("hImpParK_Bkg"), impParXY_daugNeg); - histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg); - if (doDCAplotsD) { - histos.fill(HIST("hDCADDaughters_Signal"), dmeson.dcaDau * 1e+4); - histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4); + if (dmeson.mcTruth == 1) { //true D0 + histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA); + histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy); + histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar); + histos.fill(HIST("hDDecayLength_Signal"), decayLength); + histos.fill(HIST("hDDecayLengthXY_Signal"), decayLengthXY); + histos.fill(HIST("hDNormDecayLength_Signal"), dmeson.normalizedDecayLength); + histos.fill(HIST("hImpParPi_Signal"), impParXY_daugPos); + histos.fill(HIST("hImpParK_Signal"), impParXY_daugNeg); + histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg); + if (doDCAplotsD) + histos.fill(HIST("hDCADDaughters_Signal"), dmeson.dcaDau * 1e+4); } + else if (!dmeson.mcTruth) { //bkg D0 + histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA); + histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy); + histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar); + histos.fill(HIST("hDDecayLength_Bkg"), decayLength); + histos.fill(HIST("hDDecayLengthXY_Bkg"), decayLengthXY); + histos.fill(HIST("hDNormDecayLength_Bkg"), dmeson.normalizedDecayLength); + histos.fill(HIST("hImpParPi_Bkg"), impParXY_daugPos); + histos.fill(HIST("hImpParK_Bkg"), impParXY_daugNeg); + histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg); + if (doDCAplotsD) + histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4); + } } if (dmeson.dcaDau > dcaDaughtersSelection) @@ -676,29 +685,32 @@ struct alice3decayFinder { histos.fill(HIST("hDCADbarDaughters"), dmeson.dcaDau * 1e+4); if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here) - histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA); - histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy); - histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar); - histos.fill(HIST("hDDecayLength_Signal"), decayLength); - histos.fill(HIST("hDDecayLengthXY_Signal"), decayLengthXY); - histos.fill(HIST("hDNormDecayLength_Signal"), dmeson.normalizedDecayLength); - histos.fill(HIST("hImpParPi_Signal"), impParXY_daugNeg); - histos.fill(HIST("hImpParK_Signal"), impParXY_daugPos); - histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg); - histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA); - histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy); - histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar); - histos.fill(HIST("hDDecayLength_Bkg"), decayLength); - histos.fill(HIST("hDDecayLengthXY_Bkg"), decayLengthXY); - histos.fill(HIST("hDNormDecayLength_Bkg"), dmeson.normalizedDecayLength); - histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4); - histos.fill(HIST("hImpParPi_Bkg"), impParXY_daugNeg); - histos.fill(HIST("hImpParK_Bkg"), impParXY_daugPos); - histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg); - if (doDCAplotsD) { - histos.fill(HIST("hDCADDaughters_Signal"), dmeson.dcaDau * 1e+4); - histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4); + if (dmeson.mcTruth == 2) { //true D0bar + histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA); + histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy); + histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar); + histos.fill(HIST("hDDecayLength_Signal"), decayLength); + histos.fill(HIST("hDDecayLengthXY_Signal"), decayLengthXY); + histos.fill(HIST("hDNormDecayLength_Signal"), dmeson.normalizedDecayLength); + histos.fill(HIST("hImpParPi_Signal"), impParXY_daugNeg); + histos.fill(HIST("hImpParK_Signal"), impParXY_daugPos); + histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg); + if (doDCAplotsD) + histos.fill(HIST("hDCADbarDaughters_Signal"), dmeson.dcaDau * 1e+4); + } + else if (!dmeson.mcTruth) { //bkg D0bar + histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA); + histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy); + histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar); + histos.fill(HIST("hDDecayLength_Bkg"), decayLength); + histos.fill(HIST("hDDecayLengthXY_Bkg"), decayLengthXY); + histos.fill(HIST("hDNormDecayLength_Bkg"), dmeson.normalizedDecayLength); + histos.fill(HIST("hImpParPi_Bkg"), impParXY_daugNeg); + histos.fill(HIST("hImpParK_Bkg"), impParXY_daugPos); + histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg); } + if (doDCAplotsD) + histos.fill(HIST("hDCADbarDaughters_Bkg"), dmeson.dcaDau * 1e+4); } if (dmeson.dcaDau > dcaDaughtersSelection) From 29ee514bd512b36b5cd3e0dd9e2ff59a7330e2e6 Mon Sep 17 00:00:00 2001 From: fcolamar Date: Tue, 3 Jun 2025 11:07:20 +0200 Subject: [PATCH 2/2] Clang fixes --- ALICE3/TableProducer/alice3-decayfinder.cxx | 30 ++++++++++----------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/ALICE3/TableProducer/alice3-decayfinder.cxx b/ALICE3/TableProducer/alice3-decayfinder.cxx index 110dc3dd66c..83f1998bf38 100644 --- a/ALICE3/TableProducer/alice3-decayfinder.cxx +++ b/ALICE3/TableProducer/alice3-decayfinder.cxx @@ -434,7 +434,7 @@ struct alice3decayFinder { histos.add("h2dDCAxyVsPtPiMinusFromD", "h2dDCAxyVsPtPiMinusFromD", kTH2F, {axisPt, axisDCA}); histos.add("h2dDCAxyVsPtKaPlusFromD", "h2dDCAxyVsPtKaPlusFromD", kTH2F, {axisPt, axisDCA}); histos.add("h2dDCAxyVsPtKaMinusFromD", "h2dDCAxyVsPtKaMinusFromD", kTH2F, {axisPt, axisDCA}); - if (doTopoPlotsForSAndB) { + if (doTopoPlotsForSAndB) { histos.add("hDCADDaughters_Signal", "hDCADDaughters_Signal", kTH1D, {axisDCADaughters}); histos.add("hDCADDaughters_Bkg", "hDCADDaughters_Bkg", kTH1D, {axisDCADaughters}); histos.add("hDCADbarDaughters_Signal", "hDCADbarDaughters_Signal", kTH1D, {axisDCADaughters}); @@ -538,8 +538,8 @@ struct alice3decayFinder { if (doDCAplotsD) histos.fill(HIST("hDCADDaughters"), dmeson.dcaDau * 1e+4); - if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here) - if (dmeson.mcTruth == 1) { //true D0 + if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here) + if (dmeson.mcTruth == 1) { // true D0 histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA); histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy); histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar); @@ -549,10 +549,9 @@ struct alice3decayFinder { histos.fill(HIST("hImpParPi_Signal"), impParXY_daugPos); histos.fill(HIST("hImpParK_Signal"), impParXY_daugNeg); histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg); - if (doDCAplotsD) + if (doDCAplotsD) histos.fill(HIST("hDCADDaughters_Signal"), dmeson.dcaDau * 1e+4); - } - else if (!dmeson.mcTruth) { //bkg D0 + } else if (!dmeson.mcTruth) { // bkg D0 histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA); histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy); histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar); @@ -562,9 +561,9 @@ struct alice3decayFinder { histos.fill(HIST("hImpParPi_Bkg"), impParXY_daugPos); histos.fill(HIST("hImpParK_Bkg"), impParXY_daugNeg); histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg); - if (doDCAplotsD) + if (doDCAplotsD) histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4); - } + } } if (dmeson.dcaDau > dcaDaughtersSelection) @@ -684,8 +683,8 @@ struct alice3decayFinder { if (doDCAplotsD) histos.fill(HIST("hDCADbarDaughters"), dmeson.dcaDau * 1e+4); - if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here) - if (dmeson.mcTruth == 2) { //true D0bar + if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here) + if (dmeson.mcTruth == 2) { // true D0bar histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA); histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy); histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar); @@ -695,11 +694,10 @@ struct alice3decayFinder { histos.fill(HIST("hImpParPi_Signal"), impParXY_daugNeg); histos.fill(HIST("hImpParK_Signal"), impParXY_daugPos); histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg); - if (doDCAplotsD) + if (doDCAplotsD) histos.fill(HIST("hDCADbarDaughters_Signal"), dmeson.dcaDau * 1e+4); - } - else if (!dmeson.mcTruth) { //bkg D0bar - histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA); + } else if (!dmeson.mcTruth) { // bkg D0bar + histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA); histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy); histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar); histos.fill(HIST("hDDecayLength_Bkg"), decayLength); @@ -709,8 +707,8 @@ struct alice3decayFinder { histos.fill(HIST("hImpParK_Bkg"), impParXY_daugPos); histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg); } - if (doDCAplotsD) - histos.fill(HIST("hDCADbarDaughters_Bkg"), dmeson.dcaDau * 1e+4); + if (doDCAplotsD) + histos.fill(HIST("hDCADbarDaughters_Bkg"), dmeson.dcaDau * 1e+4); } if (dmeson.dcaDau > dcaDaughtersSelection)