@@ -254,7 +254,12 @@ struct HfTaskCorrelationDsHadrons {
254254 registry.add (" hDeltaEtaPtIntSidebandRightMcRec" , " Ds-h deltaEta sideband right region MC reco" , {HistType::kTH1F , {axisDetlaEta}});
255255 registry.add (" hDeltaPhiPtIntSidebandRightMcRec" , " Ds-h deltaPhi sideband right region MC reco" , {HistType::kTH1F , {axisDetlaPhi}});
256256 registry.add (" hCorrel2DVsPtSidebandRightMcRec" , " Ds-h correlations sideband right region MC reco" , {HistType::kTHnSparseD , {{axisDetlaPhi}, {axisDetlaEta}, {axisPtD}, {axisPtHadron}, {axisPoolBin}}});
257-
257+ if (doLSpair) {
258+ registry.add (" hCorrel2DVsPtPhysicalPrimaryMcRecLS" , " Ds-h correlations signal region (only true primary particles) MC reco" , {HistType::kTHnSparseD , {{axisDetlaPhi}, {axisDetlaEta}, {axisPtD}, {axisPtHadron}, {axisDsPrompt}, {axisPoolBin}}});
259+ }
260+ if (doULSpair) {
261+ registry.add (" hCorrel2DVsPtPhysicalPrimaryMcRecULS" , " Ds-h correlations signal region (only true primary particles) MC reco" , {HistType::kTHnSparseD , {{axisDetlaPhi}, {axisDetlaEta}, {axisPtD}, {axisPtHadron}, {axisDsPrompt}, {axisPoolBin}}});
262+ }
258263 registry.get <THnSparse>(HIST (" hCorrel2DVsPtSignalRegionMcRec" ))->Sumw2 ();
259264 registry.get <THnSparse>(HIST (" hCorrel2DVsPtPhysicalPrimaryMcRec" ))->Sumw2 ();
260265 registry.get <THnSparse>(HIST (" hCorrel2DVsPtSidebandLeftMcRec" ))->Sumw2 ();
@@ -270,6 +275,14 @@ struct HfTaskCorrelationDsHadrons {
270275 registry.add (" hCorrel2DVsPtMcGenNonPromptDsNonPromptHadron" , " Ds-h correlations non prompt Ds non prompt h MC Gen" , {HistType::kTHnSparseD , {{axisDetlaPhi}, {axisDetlaEta}, {axisPtD}, {axisPtHadron}, {axisPoolBin}}});
271276 registry.add (" hCorrel2DVsPtMcGenNonPrompt" , " Ds-h correlations NonPrompt MC Gen" , {HistType::kTHnSparseD , {{axisDetlaPhi}, {axisDetlaEta}, {axisPtD}, {axisPtHadron}, {axisPoolBin}}});
272277
278+ if (doLSpair) {
279+ registry.add (" hCorrel2DVsPtMcGenPromptLS" , " Ds-h correlations Prompt MC Gen" , {HistType::kTHnSparseD , {{axisDetlaPhi}, {axisDetlaEta}, {axisPtD}, {axisPtHadron}, {axisPoolBin}}});
280+ registry.add (" hCorrel2DVsPtMcGenNonPromptLS" , " Ds-h correlations NonPrompt MC Gen" , {HistType::kTHnSparseD , {{axisDetlaPhi}, {axisDetlaEta}, {axisPtD}, {axisPtHadron}, {axisPoolBin}}});
281+ }
282+ if (doULSpair) {
283+ registry.add (" hCorrel2DVsPtMcGenPromptULS" , " Ds-h correlations Prompt MC Gen" , {HistType::kTHnSparseD , {{axisDetlaPhi}, {axisDetlaEta}, {axisPtD}, {axisPtHadron}, {axisPoolBin}}});
284+ registry.add (" hCorrel2DVsPtMcGenNonPromptULS" , " Ds-h correlations NonPrompt MC Gen" , {HistType::kTHnSparseD , {{axisDetlaPhi}, {axisDetlaEta}, {axisPtD}, {axisPtHadron}, {axisPoolBin}}});
285+ }
273286 registry.get <THnSparse>(HIST (" hCorrel2DVsPtMcGen" ))->Sumw2 ();
274287 registry.get <THnSparse>(HIST (" hCorrel2DVsPtMcGenPrompt" ))->Sumw2 ();
275288 registry.get <THnSparse>(HIST (" hCorrel2DVsPtMcGenNonPrompt" ))->Sumw2 ();
@@ -642,7 +655,13 @@ struct HfTaskCorrelationDsHadrons {
642655 registry.fill (HIST (" hDeltaPhiPtIntSignalRegionMcRec" ), deltaPhi, efficiencyWeight);
643656 registry.fill (HIST (" hCorrel2DVsPtSignalRegionMcRec" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), statusDsPrompt, poolBin, efficiencyWeight);
644657 if (isPhysicalPrimary) {
645- registry.fill (HIST (" hCorrel2DVsPtPhysicalPrimaryMcRec" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), statusDsPrompt, poolBin, efficiencyWeight);
658+ if (doLSpair && ((ptD > 0 . && ptHadron > 0 .) || (ptD < 0 . && ptHadron < 0 .))) { // like-sign pairs
659+ registry.fill (HIST (" hCorrel2DVsPtPhysicalPrimaryMcRecLS" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), statusDsPrompt, poolBin, efficiencyWeight);
660+ } else if (doULSpair && ((ptD > 0 . && ptHadron < 0 .) || (ptD < 0 . && ptHadron > 0 .))) { // unlike-sign pairs
661+ registry.fill (HIST (" hCorrel2DVsPtPhysicalPrimaryMcRecULS" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), statusDsPrompt, poolBin, efficiencyWeight);
662+ } else { // default case
663+ registry.fill (HIST (" hCorrel2DVsPtPhysicalPrimaryMcRec" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), statusDsPrompt, poolBin, efficiencyWeight);
664+ }
646665 if (statusDsPrompt == 1 && statusPromptHadron == RecoDecay::OriginType::Prompt) {
647666 registry.fill (HIST (" hCorrel2DVsPtSignalRegionPromptDsPromptHadronMcRec" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), poolBin, efficiencyWeight);
648667 } else if (statusDsPrompt == 0 && statusPromptHadron == RecoDecay::OriginType::NonPrompt) {
@@ -685,11 +704,23 @@ struct HfTaskCorrelationDsHadrons {
685704 registry.fill (HIST (" hDeltaPhiPtIntMcGen" ), deltaPhi);
686705 if (isDsPrompt) {
687706 registry.fill (HIST (" hCorrel2DVsPtMcGenPrompt" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), poolBin);
707+ if (doULSpair) {
708+ registry.fill (HIST (" hCorrel2DVsPtMcGenPromptULS" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), poolBin);
709+ }
710+ if (doLSpair && ((ptD > 0 . && ptHadron > 0 .) || (ptD < 0 . && ptHadron < 0 .))) {
711+ registry.fill (HIST (" hCorrel2DVsPtMcGenPromptLS" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), poolBin);
712+ }
688713 if (statusPromptHadron == RecoDecay::OriginType::Prompt) {
689714 registry.fill (HIST (" hCorrel2DVsPtMcGenPromptDsPromptHadron" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), poolBin);
690715 }
691716 } else {
692717 registry.fill (HIST (" hCorrel2DVsPtMcGenNonPrompt" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), poolBin);
718+ if (doULSpair) {
719+ registry.fill (HIST (" hCorrel2DVsPtMcGenNonPromptULS" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), poolBin);
720+ }
721+ if (doLSpair && ((ptD > 0 . && ptHadron > 0 .) || (ptD < 0 . && ptHadron < 0 .))) {
722+ registry.fill (HIST (" hCorrel2DVsPtMcGenNonPromptLS" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), poolBin);
723+ }
693724 if (statusPromptHadron == RecoDecay::OriginType::NonPrompt) {
694725 registry.fill (HIST (" hCorrel2DVsPtMcGenNonPromptDsNonPromptHadron" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), poolBin);
695726 }
@@ -876,7 +907,13 @@ struct HfTaskCorrelationDsHadrons {
876907 registry.fill (HIST (" hDeltaPhiPtIntSignalRegionMcRec" ), deltaPhi, efficiencyWeight);
877908 registry.fill (HIST (" hCorrel2DVsPtSignalRegionMcRec" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), statusDsPrompt, poolBin, efficiencyWeight);
878909 if (isPhysicalPrimary) {
879- registry.fill (HIST (" hCorrel2DVsPtPhysicalPrimaryMcRec" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), statusDsPrompt, poolBin, efficiencyWeight);
910+ if (doLSpair && ((ptD > 0 . && ptHadron > 0 .) || (ptD < 0 . && ptHadron < 0 .))) { // like-sign pairs
911+ registry.fill (HIST (" hCorrel2DVsPtPhysicalPrimaryMcRecLS" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), statusDsPrompt, poolBin, efficiencyWeight);
912+ } else if (doULSpair && ((ptD > 0 . && ptHadron < 0 .) || (ptD < 0 . && ptHadron > 0 .))) { // unlike-sign pairs
913+ registry.fill (HIST (" hCorrel2DVsPtPhysicalPrimaryMcRecULS" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), statusDsPrompt, poolBin, efficiencyWeight);
914+ } else { // default case
915+ registry.fill (HIST (" hCorrel2DVsPtPhysicalPrimaryMcRec" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), statusDsPrompt, poolBin, efficiencyWeight);
916+ }
880917 if (statusDsPrompt == 1 && statusPromptHadron == RecoDecay::OriginType::Prompt) {
881918 registry.fill (HIST (" hCorrel2DVsPtSignalRegionPromptDsPromptHadronMcRec" ), deltaPhi, deltaEta, std::abs (ptD), std::abs (ptHadron), poolBin, efficiencyWeight);
882919 } else if (statusDsPrompt == 0 && statusPromptHadron == RecoDecay::OriginType::NonPrompt) {
0 commit comments