@@ -156,19 +156,22 @@ struct FemtoUniversePairTaskTrackV0Extended {
156156 ConfigurableAxis confkstarBins{" confkstarBins" , {1500 , 0 ., 6 .}, " binning kstar" };
157157 ConfigurableAxis confkTBins{" confkTBins" , {150 , 0 ., 9 .}, " binning kT" };
158158 ConfigurableAxis confmTBins{" confmTBins" , {225 , 0 ., 7.5 }, " binning mT" };
159- Configurable<bool > confIsCPR{" confIsCPR" , true , " Close Pair Rejection" };
160- Configurable<bool > confRectV0V0CPR{" confRectV0V0CPR" , true , " Enable rectangular CPR cut for V0-V0 pairs" };
161- Configurable<bool > confCPRPlotPerRadii{" confCPRPlotPerRadii" , false , " Plot CPR per radii" };
162- Configurable<float > confCPRdeltaPhiCutMax{" confCPRdeltaPhiCutMax" , 0.0 , " Delta Phi max cut for Close Pair Rejection" };
163- Configurable<float > confCPRdeltaPhiCutMin{" confCPRdeltaPhiCutMin" , 0.0 , " Delta Phi min cut for Close Pair Rejection" };
164- Configurable<float > confCPRdeltaEtaCutMax{" confCPRdeltaEtaCutMax" , 0.0 , " Delta Eta max cut for Close Pair Rejection" };
165- Configurable<float > confCPRdeltaEtaCutMin{" confCPRdeltaEtaCutMin" , 0.0 , " Delta Eta min cut for Close Pair Rejection" };
166- Configurable<float > confCPRChosenRadii{" confCPRChosenRadii" , 0.80 , " Delta Eta cut for Close Pair Rejection" };
167159 Configurable<int > confPhiBins{" confPhiBins" , 29 , " Number of phi bins in deta dphi" };
168160 Configurable<int > confEtaBins{" confEtaBins" , 29 , " Number of eta bins in deta dphi" };
169161 ConfigurableAxis confmTBins3D{" confmTBins3D" , {VARIABLE_WIDTH, 1 .02f , 1 .14f , 1 .20f , 1 .26f , 1 .38f , 1 .56f , 1 .86f , 4 .50f }, " mT Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <<confUse3D>> to true in order to use)" };
170162 ConfigurableAxis confMultBins3D{" confMultBins3D" , {VARIABLE_WIDTH, 0 .0f , 20 .0f , 30 .0f , 40 .0f , 99999 .0f }, " multiplicity Binning for the 3Dimensional plot: k* vs multiplicity vs mT (set <<confUse3D>> to true in order to use)" };
171163
164+ struct : o2::framework::ConfigurableGroup {
165+ Configurable<bool > confIsCPR{" confIsCPR" , true , " Close Pair Rejection" };
166+ Configurable<bool > confRectV0V0CPR{" confRectV0V0CPR" , true , " Enable rectangular CPR cut for V0-V0 pairs" };
167+ Configurable<bool > confCPRPlotPerRadii{" confCPRPlotPerRadii" , false , " Plot CPR per radii" };
168+ Configurable<float > confCPRdeltaPhiCutMax{" confCPRdeltaPhiCutMax" , 0.0 , " Delta Phi max cut for Close Pair Rejection" };
169+ Configurable<float > confCPRdeltaPhiCutMin{" confCPRdeltaPhiCutMin" , 0.0 , " Delta Phi min cut for Close Pair Rejection" };
170+ Configurable<float > confCPRdeltaEtaCutMax{" confCPRdeltaEtaCutMax" , 0.0 , " Delta Eta max cut for Close Pair Rejection" };
171+ Configurable<float > confCPRdeltaEtaCutMin{" confCPRdeltaEtaCutMin" , 0.0 , " Delta Eta min cut for Close Pair Rejection" };
172+ Configurable<float > confCPRChosenRadii{" confCPRChosenRadii" , 0.80 , " Delta Eta cut for Close Pair Rejection" };
173+ } ConfCPR;
174+
172175 // Efficiency
173176 Configurable<std::string> confLocalEfficiency{" confLocalEfficiency" , " " , " Local path to efficiency .root file" };
174177
@@ -286,10 +289,6 @@ struct FemtoUniversePairTaskTrackV0Extended {
286289 qaRegistry.add (" SameEvent/hPtNegDaugh" , " ; #it{p}_{T}^{1} (GeV/c); #it{p}_{T}^{2} (GeV/c)" , kTH2F , {{500 , 0 , 5 }, {500 , 0 , 5 }});
287290 qaRegistry.add (" SameEvent/hDaughMomPart1" , " ; #it{p}_{T}^{+} (GeV/c); #it{p}_{T}^{-} (GeV/c)" , kTH2F , {{500 , 0 , 5 }, {500 , 0 , 5 }});
288291 qaRegistry.add (" SameEvent/hDaughMomPart2" , " ; #it{p}_{T}^{+} (GeV/c); #it{p}_{T}^{-} (GeV/c)" , kTH2F , {{500 , 0 , 5 }, {500 , 0 , 5 }});
289- qaRegistry.add (" MixedEvent/hPtPosDaugh" , " ; #it{p}_{T}^{1} (GeV/c); #it{p}_{T}^{2} (GeV/c)" , kTH2F , {{500 , 0 , 5 }, {500 , 0 , 5 }});
290- qaRegistry.add (" MixedEvent/hPtNegDaugh" , " ; #it{p}_{T}^{1} (GeV/c); #it{p}_{T}^{2} (GeV/c)" , kTH2F , {{500 , 0 , 5 }, {500 , 0 , 5 }});
291- qaRegistry.add (" MixedEvent/hDaughMomPart1" , " ; #it{p}_{T}^{+} (GeV/c); #it{p}_{T}^{-} (GeV/c)" , kTH2F , {{500 , 0 , 5 }, {500 , 0 , 5 }});
292- qaRegistry.add (" MixedEvent/hDaughMomPart2" , " ; #it{p}_{T}^{+} (GeV/c); #it{p}_{T}^{-} (GeV/c)" , kTH2F , {{500 , 0 , 5 }, {500 , 0 , 5 }});
293292 }
294293
295294 trackHistoV0Type1.init (&qaRegistry, ConfV0Selection.confV0TempFitVarpTBins , ConfV0Selection.confV0TempFitVarBins , confIsMC, ConfV0Selection.confV0PDGCodePartTwo , true , " V0Type1" );
@@ -356,9 +355,9 @@ struct FemtoUniversePairTaskTrackV0Extended {
356355
357356 pairCleaner.init (&qaRegistry);
358357 pairCleanerV0.init (&qaRegistry);
359- if (confIsCPR.value ) {
360- pairCloseRejection.init (&resultRegistry, &qaRegistry, confCPRdeltaPhiCutMin.value , confCPRdeltaPhiCutMax.value , confCPRdeltaEtaCutMin.value , confCPRdeltaEtaCutMax.value , confCPRChosenRadii.value , confCPRPlotPerRadii.value );
361- pairCloseRejectionV0.init (&resultRegistry, &qaRegistry, confCPRdeltaPhiCutMin.value , confCPRdeltaPhiCutMax.value , confCPRdeltaEtaCutMin.value , confCPRdeltaEtaCutMax.value , confCPRChosenRadii.value , confCPRPlotPerRadii.value );
358+ if (ConfCPR. confIsCPR .value ) {
359+ pairCloseRejection.init (&resultRegistry, &qaRegistry, ConfCPR. confCPRdeltaPhiCutMin .value , ConfCPR. confCPRdeltaPhiCutMax .value , ConfCPR. confCPRdeltaEtaCutMin .value , ConfCPR. confCPRdeltaEtaCutMax .value , ConfCPR. confCPRChosenRadii .value , ConfCPR. confCPRPlotPerRadii .value );
360+ pairCloseRejectionV0.init (&resultRegistry, &qaRegistry, ConfCPR. confCPRdeltaPhiCutMin .value , ConfCPR. confCPRdeltaPhiCutMax .value , ConfCPR. confCPRdeltaEtaCutMin .value , ConfCPR. confCPRdeltaEtaCutMax .value , ConfCPR. confCPRChosenRadii .value , ConfCPR. confCPRPlotPerRadii .value );
362361 }
363362
364363 if (!confLocalEfficiency.value .empty ()) {
@@ -524,7 +523,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
524523 }
525524 }
526525
527- if (confIsCPR.value ) {
526+ if (ConfCPR. confIsCPR .value ) {
528527 if (pairCloseRejection.isClosePair (p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
529528 continue ;
530529 }
@@ -539,7 +538,6 @@ struct FemtoUniversePairTaskTrackV0Extended {
539538 sameEventCont.setPair <false >(p1, p2, multCol, confUse3D, weight);
540539 }
541540 }
542-
543541 // / This function processes the same event for V0 - V0
544542 template <bool isMC, typename PartType, typename PartitionType, typename MCParticles = std::nullptr_t >
545543 void doSameEventV0 (FilteredFDCollision const & col, PartType const & parts, PartitionType& groupPartsTwo, [[maybe_unused]] MCParticles mcParts = nullptr )
@@ -748,21 +746,14 @@ struct FemtoUniversePairTaskTrackV0Extended {
748746 }
749747 }
750748
751- if (confIsCPR.value ) {
752- if (confRectV0V0CPR && pairCloseRejectionV0.isClosePair <true >(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
749+ if (ConfCPR. confIsCPR .value ) {
750+ if (ConfCPR. confRectV0V0CPR && pairCloseRejectionV0.isClosePair <true >(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
753751 return false ;
754- } else if (!confRectV0V0CPR && pairCloseRejectionV0.isClosePair <false >(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
752+ } else if (!ConfCPR. confRectV0V0CPR && pairCloseRejectionV0.isClosePair <false >(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
755753 return false ;
756754 }
757755 }
758756
759- if (confIsDebug) {
760- qaRegistry.fill (HIST (" SameEvent/hPtPosDaugh" ), posChild1.pt (), posChild2.pt ());
761- qaRegistry.fill (HIST (" SameEvent/hPtNegDaugh" ), negChild1.pt (), negChild2.pt ());
762- qaRegistry.fill (HIST (" SameEvent/hDaughMomPart1" ), posChild1.pt (), negChild1.pt ());
763- qaRegistry.fill (HIST (" SameEvent/hDaughMomPart2" ), posChild2.pt (), negChild2.pt ());
764- }
765-
766757 if constexpr (std::is_same<PartType, FemtoRecoParticles>::value)
767758 sameEventCont.setPair <true >(p1, p2, multCol, confUse3D);
768759 else
@@ -776,8 +767,27 @@ struct FemtoUniversePairTaskTrackV0Extended {
776767 }
777768 // / Now build the combinations for V0s
778769 for (const auto & [p1, p2] : combinations (CombinationsStrictlyUpperIndexPolicy (groupPartsTwo, groupPartsTwo))) {
779- if (!pairProcessFunc (p1, p2))
780- pairProcessFunc (p2, p1);
770+ if (!pairProcessFunc (p1, p2)) {
771+ if (pairProcessFunc (p2, p1) && confIsDebug) {
772+ const auto & posChild1 = parts.iteratorAt (p2.globalIndex () - 2 - parts.begin ().globalIndex ());
773+ const auto & negChild1 = parts.iteratorAt (p2.globalIndex () - 1 - parts.begin ().globalIndex ());
774+ const auto & posChild2 = parts.iteratorAt (p1.globalIndex () - 2 - parts.begin ().globalIndex ());
775+ const auto & negChild2 = parts.iteratorAt (p1.globalIndex () - 1 - parts.begin ().globalIndex ());
776+ qaRegistry.fill (HIST (" SameEvent/hPtPosDaugh" ), posChild1.pt (), posChild2.pt ());
777+ qaRegistry.fill (HIST (" SameEvent/hPtNegDaugh" ), negChild1.pt (), negChild2.pt ());
778+ qaRegistry.fill (HIST (" SameEvent/hDaughMomPart1" ), posChild1.pt (), negChild1.pt ());
779+ qaRegistry.fill (HIST (" SameEvent/hDaughMomPart2" ), posChild2.pt (), negChild2.pt ());
780+ }
781+ } else if (confIsDebug) {
782+ const auto & posChild1 = parts.iteratorAt (p1.globalIndex () - 2 - parts.begin ().globalIndex ());
783+ const auto & negChild1 = parts.iteratorAt (p1.globalIndex () - 1 - parts.begin ().globalIndex ());
784+ const auto & posChild2 = parts.iteratorAt (p2.globalIndex () - 2 - parts.begin ().globalIndex ());
785+ const auto & negChild2 = parts.iteratorAt (p2.globalIndex () - 1 - parts.begin ().globalIndex ());
786+ qaRegistry.fill (HIST (" SameEvent/hPtPosDaugh" ), posChild1.pt (), posChild2.pt ());
787+ qaRegistry.fill (HIST (" SameEvent/hPtNegDaugh" ), negChild1.pt (), negChild2.pt ());
788+ qaRegistry.fill (HIST (" SameEvent/hDaughMomPart1" ), posChild1.pt (), negChild1.pt ());
789+ qaRegistry.fill (HIST (" SameEvent/hDaughMomPart2" ), posChild2.pt (), negChild2.pt ());
790+ }
781791 }
782792 }
783793
@@ -864,7 +874,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
864874 if ((ConfV0Selection.confV0Type1 == 0 && pdgCode2 != kLambda0 ) || (ConfV0Selection.confV0Type1 == 1 && pdgCode2 != kLambda0Bar ))
865875 continue ;
866876 // track cleaning
867- if (confIsCPR.value ) {
877+ if (ConfCPR. confIsCPR .value ) {
868878 if (pairCloseRejection.isClosePair (p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
869879 continue ;
870880 }
@@ -1002,7 +1012,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
10021012 if (!pairCleaner.isCleanPair (p1, p2, parts)) {
10031013 continue ;
10041014 }
1005- if (confIsCPR.value ) {
1015+ if (ConfCPR. confIsCPR .value ) {
10061016 if (pairCloseRejection.isClosePair (p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
10071017 continue ;
10081018 }
@@ -1125,21 +1135,14 @@ struct FemtoUniversePairTaskTrackV0Extended {
11251135 if (!pairCleanerV0.isCleanPair (p1, p2, parts)) {
11261136 continue ;
11271137 }
1128- if (confIsCPR.value ) {
1129- if (confRectV0V0CPR && pairCloseRejectionV0.isClosePair <true >(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
1138+ if (ConfCPR. confIsCPR .value ) {
1139+ if (ConfCPR. confRectV0V0CPR && pairCloseRejectionV0.isClosePair <true >(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
11301140 continue ;
1131- } else if (!confRectV0V0CPR && pairCloseRejectionV0.isClosePair <false >(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
1141+ } else if (!ConfCPR. confRectV0V0CPR && pairCloseRejectionV0.isClosePair <false >(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
11321142 continue ;
11331143 }
11341144 }
11351145
1136- if (confIsDebug) {
1137- qaRegistry.fill (HIST (" MixedEvent/hPtPosDaugh" ), posChild1.pt (), posChild2.pt ());
1138- qaRegistry.fill (HIST (" MixedEvent/hPtNegDaugh" ), negChild1.pt (), negChild2.pt ());
1139- qaRegistry.fill (HIST (" MixedEvent/hDaughMomPart1" ), posChild1.pt (), negChild1.pt ());
1140- qaRegistry.fill (HIST (" MixedEvent/hDaughMomPart2" ), posChild2.pt (), negChild2.pt ());
1141- }
1142-
11431146 if constexpr (std::is_same<PartType, FemtoRecoParticles>::value)
11441147 mixedEventCont.setPair <true >(p1, p2, multCol, confUse3D);
11451148 else
@@ -1220,7 +1223,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
12201223 int pdgCode2 = static_cast <int >(p2.pidCut ());
12211224 if ((ConfV0Selection.confV0Type1 == 0 && pdgCode2 != kLambda0 ) || (ConfV0Selection.confV0Type1 == 1 && pdgCode2 != kLambda0Bar ))
12221225 continue ;
1223- if (confIsCPR.value ) {
1226+ if (ConfCPR. confIsCPR .value ) {
12241227 if (pairCloseRejection.isClosePair (p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
12251228 continue ;
12261229 }
@@ -1383,7 +1386,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
13831386 if (!pairCleaner.isCleanPair (p1, p2, parts)) {
13841387 continue ;
13851388 }
1386- if (confIsCPR.value ) {
1389+ if (ConfCPR. confIsCPR .value ) {
13871390 if (pairCloseRejection.isClosePair (p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
13881391 continue ;
13891392 }
@@ -1475,7 +1478,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
14751478 if (!pairCleanerV0.isCleanPair (p1, p2, parts)) {
14761479 continue ;
14771480 }
1478- if (confIsCPR.value ) {
1481+ if (ConfCPR. confIsCPR .value ) {
14791482 if (pairCloseRejectionV0.isClosePair (p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
14801483 continue ;
14811484 }
0 commit comments