@@ -317,6 +317,10 @@ struct HfCorrelatorDsHadrons {
317317 registry.add (" hCorrAllPrimaryKaons" , " Ds-kaon correlations MC Gen" , {HistType::kTH3F , {{axisPhi}, {axisPtD}, {axisPtHadron}}});
318318 registry.add (" hCorrAllPrimaryProtons" , " Ds-proton correlations MC Gen" , {HistType::kTH3F , {{axisPhi}, {axisPtD}, {axisPtHadron}}});
319319 registry.add (" hFakeCollision" , " Fake collision counter" , {HistType::kTH1F , {{1 , -0.5 , 0.5 , " n fake coll" }}});
320+ if (pidTrkApplied) {
321+ registry.add (" hCorrKaonsLSPairs" , " Ds-kaon correlations LS MC Gen" , {HistType::kTH3F , {{axisPhi}, {axisPtD}, {axisPtHadron}}});
322+ registry.add (" hCorrKaonsULSPairs" , " Ds-kaon correlations ULS MC Gen" , {HistType::kTH3F , {{axisPhi}, {axisPtD}, {axisPtHadron}}});
323+ }
320324 }
321325 }
322326
@@ -423,20 +427,22 @@ struct HfCorrelatorDsHadrons {
423427 if (applyEfficiency) {
424428 efficiencyWeightD = 1 . / efficiencyD->at (o2::analysis::findBin (binsPtEfficiencyD, candidate.pt ()));
425429 }
430+ auto prong0 = candidate.template prong0_as <MyTracksData>();
431+ int chargeDs = prong0.sign ();
426432 std::vector<float > outputMl = {-1 ., -1 ., -1 .};
427433 fillHisto (candidate);
428434 if (candidate.isSelDsToKKPi () >= selectionFlagDs) {
429435 fillHistoKKPi (candidate, efficiencyWeightD);
430436 for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++) {
431437 outputMl[iclass] = candidate.mlProbDsToKKPi ()[classMl->at (iclass)];
432438 }
433- entryDsCandRecoInfo (hfHelper.invMassDsToKKPi (candidate), candidate.pt (), outputMl[0 ], outputMl[2 ], collision.numContrib ());
439+ entryDsCandRecoInfo (hfHelper.invMassDsToKKPi (candidate), candidate.pt () * chargeDs , outputMl[0 ], outputMl[2 ], collision.numContrib ());
434440 } else if (candidate.isSelDsToPiKK () >= selectionFlagDs) {
435441 fillHistoPiKK (candidate, efficiencyWeightD);
436442 for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++) {
437443 outputMl[iclass] = candidate.mlProbDsToPiKK ()[classMl->at (iclass)];
438444 }
439- entryDsCandRecoInfo (hfHelper.invMassDsToPiKK (candidate), candidate.pt (), outputMl[0 ], outputMl[2 ], collision.numContrib ());
445+ entryDsCandRecoInfo (hfHelper.invMassDsToPiKK (candidate), candidate.pt () * chargeDs , outputMl[0 ], outputMl[2 ], collision.numContrib ());
440446 }
441447 if (candidate.isSelDsToKKPi () >= selectionFlagDs && candidate.isSelDsToPiKK () >= selectionFlagDs) {
442448 registry.fill (HIST (" hCountSelectionStatusDsToKKPiAndToPiKK" ), 0 .);
@@ -457,8 +463,8 @@ struct HfCorrelatorDsHadrons {
457463 if (candidate.isSelDsToKKPi () >= selectionFlagDs) {
458464 entryDsHadronPair (getDeltaPhi (track.phi (), candidate.phi ()),
459465 track.eta () - candidate.eta (),
460- candidate.pt (),
461- track.pt (),
466+ candidate.pt () * chargeDs ,
467+ track.pt () * track. sign () ,
462468 poolBin,
463469 collision.numContrib ());
464470 entryDsHadronRecoInfo (hfHelper.invMassDsToKKPi (candidate), false , false );
@@ -468,8 +474,8 @@ struct HfCorrelatorDsHadrons {
468474 } else if (candidate.isSelDsToPiKK () >= selectionFlagDs) {
469475 entryDsHadronPair (getDeltaPhi (track.phi (), candidate.phi ()),
470476 track.eta () - candidate.eta (),
471- candidate.pt (),
472- track.pt (),
477+ candidate.pt () * chargeDs ,
478+ track.pt () * track. sign () ,
473479 poolBin,
474480 collision.numContrib ());
475481 entryDsHadronRecoInfo (hfHelper.invMassDsToPiKK (candidate), false , false );
@@ -521,6 +527,8 @@ struct HfCorrelatorDsHadrons {
521527 }
522528
523529 std::vector<float > outputMl = {-1 ., -1 ., -1 .};
530+ auto prong0 = candidate.template prong0_as <MyTracksData>();
531+ int chargeDs = prong0.sign ();
524532
525533 if (isDsSignal && isDecayChan && isCorrectInvMassHypo) {
526534 fillHistoMcRecSig (candidate, multiplicityFT0M);
@@ -532,7 +540,7 @@ struct HfCorrelatorDsHadrons {
532540 registry.fill (HIST (" hMassDsMcRecSig" ), hfHelper.invMassDsToKKPi (candidate), candidate.pt (), efficiencyWeightD);
533541 registry.fill (HIST (" hMassDsVsPtMcRec" ), hfHelper.invMassDsToKKPi (candidate), candidate.pt (), efficiencyWeightD);
534542 registry.fill (HIST (" hSelectionStatusDsToKKPiMcRec" ), candidate.isSelDsToKKPi ());
535- entryDsCandRecoInfo (hfHelper.invMassDsToKKPi (candidate), candidate.pt (), outputMl[0 ], outputMl[2 ], collision.numContrib ());
543+ entryDsCandRecoInfo (hfHelper.invMassDsToKKPi (candidate), candidate.pt () * chargeDs , outputMl[0 ], outputMl[2 ], collision.numContrib ());
536544 entryDsCandGenInfo (isDsPrompt);
537545 } else if (candidate.isSelDsToPiKK () >= selectionFlagDs) {
538546 for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++) {
@@ -542,7 +550,7 @@ struct HfCorrelatorDsHadrons {
542550 registry.fill (HIST (" hMassDsMcRecSig" ), hfHelper.invMassDsToPiKK (candidate), candidate.pt (), efficiencyWeightD);
543551 registry.fill (HIST (" hMassDsVsPtMcRec" ), hfHelper.invMassDsToPiKK (candidate), candidate.pt (), efficiencyWeightD);
544552 registry.fill (HIST (" hSelectionStatusDsToPiKKMcRec" ), candidate.isSelDsToPiKK ());
545- entryDsCandRecoInfo (hfHelper.invMassDsToPiKK (candidate), candidate.pt (), outputMl[0 ], outputMl[2 ], collision.numContrib ());
553+ entryDsCandRecoInfo (hfHelper.invMassDsToPiKK (candidate), candidate.pt () * chargeDs , outputMl[0 ], outputMl[2 ], collision.numContrib ());
546554 entryDsCandGenInfo (isDsPrompt);
547555 }
548556 } else {
@@ -582,8 +590,8 @@ struct HfCorrelatorDsHadrons {
582590 if (isCorrectInvMassHypo && candidate.isSelDsToKKPi () >= selectionFlagDs) {
583591 entryDsHadronPair (getDeltaPhi (track.phi (), candidate.phi ()),
584592 track.eta () - candidate.eta (),
585- candidate.pt (),
586- track.pt (),
593+ candidate.pt () * chargeDs ,
594+ track.pt () * track. sign () ,
587595 poolBin,
588596 collision.numContrib ());
589597 entryDsHadronRecoInfo (hfHelper.invMassDsToKKPi (candidate), isDsSignal, isDecayChan);
@@ -608,8 +616,8 @@ struct HfCorrelatorDsHadrons {
608616 } else if (isCorrectInvMassHypo && candidate.isSelDsToPiKK () >= selectionFlagDs) {
609617 entryDsHadronPair (getDeltaPhi (track.phi (), candidate.phi ()),
610618 track.eta () - candidate.eta (),
611- candidate.pt (),
612- track.pt (),
619+ candidate.pt () * chargeDs ,
620+ track.pt () * track. sign () ,
613621 poolBin,
614622 collision.numContrib ());
615623 entryDsHadronRecoInfo (hfHelper.invMassDsToPiKK (candidate), isDsSignal, isDecayChan);
@@ -703,11 +711,19 @@ struct HfCorrelatorDsHadrons {
703711 listDaughters.clear ();
704712 RecoDecay::getDaughters (particle, &listDaughters, arrDaughDsPDG, 2 );
705713 int counterDaughters = 0 ;
714+ int chargeDs = 0 ;
706715 if (listDaughters.size () == NDaughtersDs) {
707716 for (const auto & dauIdx : listDaughters) {
708717 // auto daughI = mcParticles.rawIteratorAt(dauIdx - mcParticles.offset());
709718 auto daughI = groupedMcParticles.rawIteratorAt (dauIdx - groupedMcParticles.offset ());
710719 counterDaughters += 1 ;
720+ if (counterDaughters == 1 ) {
721+ if (daughI.pdgCode () == kKPlus ) {
722+ chargeDs = 1 ;
723+ } else {
724+ chargeDs = -1 ;
725+ }
726+ }
711727 prongsId[counterDaughters - 1 ] = daughI.globalIndex ();
712728 }
713729 }
@@ -738,6 +754,13 @@ struct HfCorrelatorDsHadrons {
738754 registry.fill (HIST (" hCorrAllPrimaryHadrons" ), getDeltaPhi (particleAssoc.phi (), particle.phi ()), particle.pt (), particleAssoc.pt ());
739755 registry.fill (HIST (" hCorrAllPrimaryProtons" ), getDeltaPhi (particleAssoc.phi (), particle.phi ()), particle.pt (), particleAssoc.pt ());
740756 }
757+ if (pidTrkApplied) {
758+ if (((chargeDs == 1 ) && (particleAssoc.pdgCode () == kKPlus )) || ((chargeDs == -1 ) && (particleAssoc.pdgCode () == kKMinus ))) { // LS pairs
759+ registry.fill (HIST (" hCorrKaonsLSPairs" ), getDeltaPhi (particleAssoc.phi (), particle.phi ()), particle.pt (), particleAssoc.pt ());
760+ } else { // ULS pairs
761+ registry.fill (HIST (" hCorrKaonsULSPairs" ), getDeltaPhi (particleAssoc.phi (), particle.phi ()), particle.pt (), particleAssoc.pt ());
762+ }
763+ }
741764 }
742765
743766 // trackOrigin = RecoDecay::getCharmHadronOrigin(mcParticles, particleAssoc, true);
@@ -844,14 +867,16 @@ struct HfCorrelatorDsHadrons {
844867 if (!pAssoc.isGlobalTrackWoDCA ()) {
845868 continue ;
846869 }
870+ auto prong0 = cand.template prong0_as <MyTracksData>();
871+ int chargeDs = prong0.sign ();
847872 std::vector<float > outputMl = {-1 ., -1 ., -1 .};
848873 // DsToKKPi and DsToPiKK division
849874 if (cand.isSelDsToKKPi () >= selectionFlagDs) {
850875 // LOGF(info, "Mixed event tracks pair: (%d, %d) from events (%d, %d), track event: (%d, %d), KKPi", cand.index(), pAssoc.index(), c1.index(), c2.index(), cand.collision().index(), pAssoc.collision().index());
851876 entryDsHadronPair (getDeltaPhi (pAssoc.phi (), cand.phi ()),
852877 pAssoc.eta () - cand.eta (),
853- cand.pt (),
854- pAssoc.pt (),
878+ cand.pt () * chargeDs ,
879+ pAssoc.pt () * pAssoc. sign () ,
855880 poolBin,
856881 c1.numContrib ());
857882 entryDsHadronRecoInfo (hfHelper.invMassDsToKKPi (cand), false , false );
@@ -865,8 +890,8 @@ struct HfCorrelatorDsHadrons {
865890 // LOGF(info, "Mixed event tracks pair: (%d, %d) from events (%d, %d), track event: (%d, %d), PiKK", cand.index(), pAssoc.index(), c1.index(), c2.index(), cand.collision().index(), pAssoc.collision().index());
866891 entryDsHadronPair (getDeltaPhi (pAssoc.phi (), cand.phi ()),
867892 pAssoc.eta () - cand.eta (),
868- cand.pt (),
869- pAssoc.pt (),
893+ cand.pt () * chargeDs ,
894+ pAssoc.pt () * pAssoc. sign () ,
870895 poolBin,
871896 c1.numContrib ());
872897 entryDsHadronRecoInfo (hfHelper.invMassDsToPiKK (cand), false , false );
@@ -925,6 +950,8 @@ struct HfCorrelatorDsHadrons {
925950 if (!pAssoc.isGlobalTrackWoDCA ()) {
926951 continue ;
927952 }
953+ auto prong0 = candidate.template prong0_as <MyTracksData>();
954+ int chargeDs = prong0.sign ();
928955 std::vector<float > outputMl = {-1 ., -1 ., -1 .};
929956 // prompt and non-prompt division
930957 isDsPrompt = candidate.originMcRec () == RecoDecay::OriginType::Prompt;
@@ -942,8 +969,8 @@ struct HfCorrelatorDsHadrons {
942969 if (candidate.isSelDsToKKPi () >= selectionFlagDs) {
943970 entryDsHadronPair (getDeltaPhi (pAssoc.phi (), candidate.phi ()),
944971 pAssoc.eta () - candidate.eta (),
945- candidate.pt (),
946- pAssoc.pt (),
972+ candidate.pt () * chargeDs ,
973+ pAssoc.pt () * pAssoc. sign () ,
947974 poolBin,
948975 c1.numContrib ());
949976 entryDsHadronRecoInfo (hfHelper.invMassDsToKKPi (candidate), isDsSignal, isDecayChan);
@@ -956,8 +983,8 @@ struct HfCorrelatorDsHadrons {
956983 } else if (candidate.isSelDsToPiKK () >= selectionFlagDs) {
957984 entryDsHadronPair (getDeltaPhi (pAssoc.phi (), candidate.phi ()),
958985 pAssoc.eta () - candidate.eta (),
959- candidate.pt (),
960- pAssoc.pt (),
986+ candidate.pt () * chargeDs ,
987+ pAssoc.pt () * pAssoc. sign () ,
961988 poolBin,
962989 c1.numContrib ());
963990 entryDsHadronRecoInfo (hfHelper.invMassDsToPiKK (candidate), isDsSignal, isDecayChan);
0 commit comments