@@ -75,6 +75,7 @@ struct HfCorrelatorDMesonPairs {
7575 Configurable<float > massCut{" massCut" , 0.05 , " Maximum deviation from PDG peak allowed for signal region" };
7676 Configurable<bool > daughterTracksCutFlag{" daughterTracksCutFlag" , false , " Flag to add cut on daughter tracks" };
7777 Configurable<bool > removeAmbiguous{" removeAmbiguous" , false , " Flag to remove ambiguous candidates" };
78+ Configurable<float > ptMaxRemoveAmbiguous{" ptMaxRemoveAmbiguous" , 5.0 , " Max. pT to remove the ambiguous candidates" };
7879
7980 // ML inference
8081 Configurable<bool > applyMl{" applyMl" , false , " Flag to apply ML selections" };
@@ -612,7 +613,7 @@ struct HfCorrelatorDMesonPairs {
612613 }
613614
614615 // Remove ambiguous D0 candidates if flag is true
615- if (removeAmbiguous && (isDCand1 && isDbarCand1)) {
616+ if (removeAmbiguous && (isDCand1 && isDbarCand1) && candidate1. pt () < ptMaxRemoveAmbiguous ) {
616617 continue ;
617618 }
618619
@@ -687,7 +688,7 @@ struct HfCorrelatorDMesonPairs {
687688 }
688689
689690 // Remove ambiguous D0 candidates if flag is true
690- if (removeAmbiguous && (isDCand2 && isDbarCand2)) {
691+ if (removeAmbiguous && (isDCand2 && isDbarCand2) && candidate2. pt () < ptMaxRemoveAmbiguous ) {
691692 continue ;
692693 }
693694
@@ -776,7 +777,7 @@ struct HfCorrelatorDMesonPairs {
776777 }
777778
778779 // Remove ambiguous D0 candidates if flag is true
779- if (removeAmbiguous && (isDCand1 && isDbarCand1)) {
780+ if (removeAmbiguous && (isDCand1 && isDbarCand1) && candidate1. pt () < ptMaxRemoveAmbiguous ) {
780781 continue ;
781782 }
782783
@@ -803,10 +804,10 @@ struct HfCorrelatorDMesonPairs {
803804 registry.fill (HIST (" hMass" ), hfHelper.invMassD0ToPiK (candidate1), candidate1.pt ());
804805 registry.fill (HIST (" hPtVsYVsNContribMcRec" ), candidate1.pt (), hfHelper.yD0 (candidate1), collision.numContrib ());
805806 registry.fill (HIST (" hNContribMcRec" ), collision.numContrib ());
806- if (originRec1 == 1 ) {
807+ if (originRec1 == RecoDecay::Prompt ) {
807808 registry.fill (HIST (" hMassMcRecPrompt" ), hfHelper.invMassD0ToPiK (candidate1), candidate1.pt ());
808809 registry.fill (HIST (" hPtVsYVsNContribMcRecPrompt" ), candidate1.pt (), hfHelper.yD0 (candidate1), collision.numContrib ());
809- } else if (originRec1 == 2 ) {
810+ } else if (originRec1 == RecoDecay::NonPrompt ) {
810811 registry.fill (HIST (" hMassMcRecNonPrompt" ), hfHelper.invMassD0ToPiK (candidate1), candidate1.pt ());
811812 registry.fill (HIST (" hPtVsYVsNContribMcRecNonPrompt" ), candidate1.pt (), hfHelper.yD0 (candidate1), collision.numContrib ());
812813 }
@@ -824,9 +825,9 @@ struct HfCorrelatorDMesonPairs {
824825 registry.fill (HIST (" hMass" ), hfHelper.invMassD0barToKPi (candidate1), candidate1.pt ());
825826 registry.fill (HIST (" hPtVsYVsNContribMcRec" ), candidate1.pt (), hfHelper.yD0 (candidate1), collision.numContrib ());
826827 registry.fill (HIST (" hNContribMcRec" ), collision.numContrib ());
827- if (originRec1 == 1 ) {
828+ if (originRec1 == RecoDecay::Prompt ) {
828829 registry.fill (HIST (" hMassMcRecPrompt" ), hfHelper.invMassD0barToKPi (candidate1), candidate1.pt ());
829- } else if (originRec1 == 2 ) {
830+ } else if (originRec1 == RecoDecay::NonPrompt ) {
830831 registry.fill (HIST (" hMassMcRecNonPrompt" ), hfHelper.invMassD0barToKPi (candidate1), candidate1.pt ());
831832 }
832833 } else if (isTrueDCand1) {
@@ -893,7 +894,7 @@ struct HfCorrelatorDMesonPairs {
893894 }
894895
895896 // Remove ambiguous D0 candidates if flag is true
896- if (removeAmbiguous && (isDCand2 && isDbarCand2)) {
897+ if (removeAmbiguous && (isDCand2 && isDbarCand2) && candidate2. pt () < ptMaxRemoveAmbiguous ) {
897898 continue ;
898899 }
899900
@@ -1011,10 +1012,10 @@ struct HfCorrelatorDMesonPairs {
10111012 }
10121013
10131014 registry.fill (HIST (" hPtVsYVsNContribMcGen" ), particle1.pt (), particle1.y (), numPvContributorsGen);
1014- if (originGen1 == 1 ) {
1015+ if (originGen1 == RecoDecay::Prompt ) {
10151016 registry.fill (HIST (" hPtVsYVsNContribMcGenPrompt" ), particle1.pt (), particle1.y (), numPvContributorsGen);
10161017 }
1017- if (originGen1 == 2 ) {
1018+ if (originGen1 == RecoDecay::NonPrompt ) {
10181019 registry.fill (HIST (" hPtVsYVsNContribMcGenNonPrompt" ), particle1.pt (), particle1.y (), numPvContributorsGen);
10191020 }
10201021 registry.fill (HIST (" hNContribMcGen" ), numPvContributorsGen);
0 commit comments