@@ -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) {
@@ -532,29 +538,31 @@ struct alice3decayFinder {
532538 if (doDCAplotsD)
533539 histos.fill (HIST (" hDCADDaughters" ), dmeson.dcaDau * 1e+4 );
534540
535- 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 );
541+ if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here)
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 );
554+ } else if (!dmeson.mcTruth ) { // bkg D0
555+ histos.fill (HIST (" hDCosPA_Bkg" ), dmeson.cosPA );
556+ histos.fill (HIST (" hDCosPAxy_Bkg" ), dmeson.cosPAxy );
557+ histos.fill (HIST (" hDCosThetaStar_Bkg" ), dmeson.cosThetaStar );
558+ histos.fill (HIST (" hDDecayLength_Bkg" ), decayLength);
559+ histos.fill (HIST (" hDDecayLengthXY_Bkg" ), decayLengthXY);
560+ histos.fill (HIST (" hDNormDecayLength_Bkg" ), dmeson.normalizedDecayLength );
561+ histos.fill (HIST (" hImpParPi_Bkg" ), impParXY_daugPos);
562+ histos.fill (HIST (" hImpParK_Bkg" ), impParXY_daugNeg);
563+ histos.fill (HIST (" hImpParProduct_Bkg" ), impParXY_daugPos * impParXY_daugNeg);
564+ if (doDCAplotsD)
565+ histos.fill (HIST (" hDCADDaughters_Bkg" ), dmeson.dcaDau * 1e+4 );
558566 }
559567 }
560568
@@ -675,30 +683,32 @@ struct alice3decayFinder {
675683 if (doDCAplotsD)
676684 histos.fill (HIST (" hDCADbarDaughters" ), dmeson.dcaDau * 1e+4 );
677685
678- 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 );
686+ if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here)
687+ if ( dmeson.mcTruth == 2 ) { // true D0bar
688+ histos.fill (HIST (" hDCosPA_Signal " ), dmeson.cosPA );
689+ histos.fill (HIST (" hDCosPAxy_Signal " ), dmeson.cosPAxy );
690+ histos.fill (HIST (" hDCosThetaStar_Signal " ), dmeson. cosThetaStar );
691+ histos.fill (HIST (" hDDecayLength_Signal " ), decayLength );
692+ histos.fill (HIST (" hDDecayLengthXY_Signal " ), decayLengthXY );
693+ histos.fill (HIST (" hDNormDecayLength_Signal " ), dmeson. normalizedDecayLength );
694+ histos.fill (HIST (" hImpParPi_Signal " ), impParXY_daugNeg );
695+ histos.fill (HIST (" hImpParK_Signal " ), impParXY_daugPos);
696+ histos.fill (HIST (" hImpParProduct_Signal " ), impParXY_daugPos * impParXY_daugNeg );
697+ if (doDCAplotsD)
698+ histos.fill (HIST (" hDCADbarDaughters_Signal " ), dmeson.dcaDau * 1e+4 );
699+ } else if (!dmeson. mcTruth ) { // bkg D0bar
700+ histos.fill (HIST (" hDCosPA_Bkg " ), dmeson. cosPA );
701+ histos.fill (HIST (" hDCosPAxy_Bkg " ), dmeson.cosPAxy );
702+ histos.fill (HIST (" hDCosThetaStar_Bkg " ), dmeson.cosThetaStar );
703+ histos.fill (HIST (" hDDecayLength_Bkg " ), decayLength );
704+ histos.fill (HIST (" hDDecayLengthXY_Bkg " ), decayLengthXY );
705+ histos.fill (HIST (" hDNormDecayLength_Bkg " ), dmeson. normalizedDecayLength );
706+ histos. fill ( HIST ( " hImpParPi_Bkg " ), impParXY_daugNeg);
707+ histos.fill (HIST (" hImpParK_Bkg " ), impParXY_daugPos );
708+ histos.fill (HIST (" hImpParProduct_Bkg " ), impParXY_daugPos * impParXY_daugNeg );
701709 }
710+ if (doDCAplotsD)
711+ histos.fill (HIST (" hDCADbarDaughters_Bkg" ), dmeson.dcaDau * 1e+4 );
702712 }
703713
704714 if (dmeson.dcaDau > dcaDaughtersSelection)
0 commit comments