Skip to content

Commit 27e710b

Browse files
author
fcolamar
committed
Completing separation of topological distribution for S and B
1 parent f8f8fbc commit 27e710b

File tree

1 file changed

+58
-46
lines changed

1 file changed

+58
-46
lines changed

ALICE3/TableProducer/alice3-decayfinder.cxx

Lines changed: 58 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,18 @@ struct alice3decayFinder {
428428
if (doDCAplotsD) {
429429
histos.add("hDCADDaughters", "hDCADDaughters", kTH1D, {axisDCADaughters});
430430
histos.add("hDCADbarDaughters", "hDCADbarDaughters", kTH1D, {axisDCADaughters});
431-
histos.add("hDCADDaughters_Selected", "hDCADDaughters", kTH1D, {axisDCADaughters});
432-
histos.add("hDCADbarDaughters_Selected", "hDCADbarDaughters", kTH1D, {axisDCADaughters});
431+
histos.add("hDCADDaughters_Selected", "hDCADDaughters_Selected", kTH1D, {axisDCADaughters});
432+
histos.add("hDCADbarDaughters_Selected", "hDCADbarDaughters_Selected", kTH1D, {axisDCADaughters});
433433
histos.add("h2dDCAxyVsPtPiPlusFromD", "h2dDCAxyVsPtPiPlusFromD", kTH2F, {axisPt, axisDCA});
434434
histos.add("h2dDCAxyVsPtPiMinusFromD", "h2dDCAxyVsPtPiMinusFromD", kTH2F, {axisPt, axisDCA});
435435
histos.add("h2dDCAxyVsPtKaPlusFromD", "h2dDCAxyVsPtKaPlusFromD", kTH2F, {axisPt, axisDCA});
436436
histos.add("h2dDCAxyVsPtKaMinusFromD", "h2dDCAxyVsPtKaMinusFromD", kTH2F, {axisPt, axisDCA});
437+
if (doTopoPlotsForSAndB) {
438+
histos.add("hDCADDaughters_Signal", "hDCADDaughters_Signal", kTH1D, {axisDCADaughters});
439+
histos.add("hDCADDaughters_Bkg", "hDCADDaughters_Bkg", kTH1D, {axisDCADaughters});
440+
histos.add("hDCADbarDaughters_Signal", "hDCADbarDaughters_Signal", kTH1D, {axisDCADaughters});
441+
histos.add("hDCADbarDaughters_Bkg", "hDCADbarDaughters_Bkg", kTH1D, {axisDCADaughters});
442+
}
437443
}
438444
}
439445
if (doprocessFindLcBaryons) {
@@ -533,29 +539,32 @@ struct alice3decayFinder {
533539
histos.fill(HIST("hDCADDaughters"), dmeson.dcaDau * 1e+4);
534540

535541
if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here)
536-
histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA);
537-
histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy);
538-
histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar);
539-
histos.fill(HIST("hDDecayLength_Signal"), decayLength);
540-
histos.fill(HIST("hDDecayLengthXY_Signal"), decayLengthXY);
541-
histos.fill(HIST("hDNormDecayLength_Signal"), dmeson.normalizedDecayLength);
542-
histos.fill(HIST("hImpParPi_Signal"), impParXY_daugPos);
543-
histos.fill(HIST("hImpParK_Signal"), impParXY_daugNeg);
544-
histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg);
545-
histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA);
546-
histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy);
547-
histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar);
548-
histos.fill(HIST("hDDecayLength_Bkg"), decayLength);
549-
histos.fill(HIST("hDDecayLengthXY_Bkg"), decayLengthXY);
550-
histos.fill(HIST("hDNormDecayLength_Bkg"), dmeson.normalizedDecayLength);
551-
histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4);
552-
histos.fill(HIST("hImpParPi_Bkg"), impParXY_daugPos);
553-
histos.fill(HIST("hImpParK_Bkg"), impParXY_daugNeg);
554-
histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg);
555-
if (doDCAplotsD) {
556-
histos.fill(HIST("hDCADDaughters_Signal"), dmeson.dcaDau * 1e+4);
557-
histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4);
542+
if (dmeson.mcTruth == 1) { //true D0
543+
histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA);
544+
histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy);
545+
histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar);
546+
histos.fill(HIST("hDDecayLength_Signal"), decayLength);
547+
histos.fill(HIST("hDDecayLengthXY_Signal"), decayLengthXY);
548+
histos.fill(HIST("hDNormDecayLength_Signal"), dmeson.normalizedDecayLength);
549+
histos.fill(HIST("hImpParPi_Signal"), impParXY_daugPos);
550+
histos.fill(HIST("hImpParK_Signal"), impParXY_daugNeg);
551+
histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg);
552+
if (doDCAplotsD)
553+
histos.fill(HIST("hDCADDaughters_Signal"), dmeson.dcaDau * 1e+4);
558554
}
555+
else if (!dmeson.mcTruth) { //bkg D0
556+
histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA);
557+
histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy);
558+
histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar);
559+
histos.fill(HIST("hDDecayLength_Bkg"), decayLength);
560+
histos.fill(HIST("hDDecayLengthXY_Bkg"), decayLengthXY);
561+
histos.fill(HIST("hDNormDecayLength_Bkg"), dmeson.normalizedDecayLength);
562+
histos.fill(HIST("hImpParPi_Bkg"), impParXY_daugPos);
563+
histos.fill(HIST("hImpParK_Bkg"), impParXY_daugNeg);
564+
histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg);
565+
if (doDCAplotsD)
566+
histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4);
567+
}
559568
}
560569

561570
if (dmeson.dcaDau > dcaDaughtersSelection)
@@ -676,29 +685,32 @@ struct alice3decayFinder {
676685
histos.fill(HIST("hDCADbarDaughters"), dmeson.dcaDau * 1e+4);
677686

678687
if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here)
679-
histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA);
680-
histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy);
681-
histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar);
682-
histos.fill(HIST("hDDecayLength_Signal"), decayLength);
683-
histos.fill(HIST("hDDecayLengthXY_Signal"), decayLengthXY);
684-
histos.fill(HIST("hDNormDecayLength_Signal"), dmeson.normalizedDecayLength);
685-
histos.fill(HIST("hImpParPi_Signal"), impParXY_daugNeg);
686-
histos.fill(HIST("hImpParK_Signal"), impParXY_daugPos);
687-
histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg);
688-
histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA);
689-
histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy);
690-
histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar);
691-
histos.fill(HIST("hDDecayLength_Bkg"), decayLength);
692-
histos.fill(HIST("hDDecayLengthXY_Bkg"), decayLengthXY);
693-
histos.fill(HIST("hDNormDecayLength_Bkg"), dmeson.normalizedDecayLength);
694-
histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4);
695-
histos.fill(HIST("hImpParPi_Bkg"), impParXY_daugNeg);
696-
histos.fill(HIST("hImpParK_Bkg"), impParXY_daugPos);
697-
histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg);
698-
if (doDCAplotsD) {
699-
histos.fill(HIST("hDCADDaughters_Signal"), dmeson.dcaDau * 1e+4);
700-
histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4);
688+
if (dmeson.mcTruth == 2) { //true D0bar
689+
histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA);
690+
histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy);
691+
histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar);
692+
histos.fill(HIST("hDDecayLength_Signal"), decayLength);
693+
histos.fill(HIST("hDDecayLengthXY_Signal"), decayLengthXY);
694+
histos.fill(HIST("hDNormDecayLength_Signal"), dmeson.normalizedDecayLength);
695+
histos.fill(HIST("hImpParPi_Signal"), impParXY_daugNeg);
696+
histos.fill(HIST("hImpParK_Signal"), impParXY_daugPos);
697+
histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg);
698+
if (doDCAplotsD)
699+
histos.fill(HIST("hDCADbarDaughters_Signal"), dmeson.dcaDau * 1e+4);
700+
}
701+
else if (!dmeson.mcTruth) { //bkg D0bar
702+
histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA);
703+
histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy);
704+
histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar);
705+
histos.fill(HIST("hDDecayLength_Bkg"), decayLength);
706+
histos.fill(HIST("hDDecayLengthXY_Bkg"), decayLengthXY);
707+
histos.fill(HIST("hDNormDecayLength_Bkg"), dmeson.normalizedDecayLength);
708+
histos.fill(HIST("hImpParPi_Bkg"), impParXY_daugNeg);
709+
histos.fill(HIST("hImpParK_Bkg"), impParXY_daugPos);
710+
histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg);
701711
}
712+
if (doDCAplotsD)
713+
histos.fill(HIST("hDCADbarDaughters_Bkg"), dmeson.dcaDau * 1e+4);
702714
}
703715

704716
if (dmeson.dcaDau > dcaDaughtersSelection)

0 commit comments

Comments
 (0)