@@ -851,32 +851,31 @@ struct femtoUniversePairTaskTrackCascadeExtended {
851851 continue ;
852852
853853 cascQAHistos.fillQA <false , false >(part);
854-
855- for (const auto & part : groupPartsOne) {
856- int pdgCode = static_cast <int >(part.pidCut ());
857- if (pdgCode != confTrkPDGCodePartOne)
858- continue ;
859- const auto & pdgTrackParticle = pdgMC->GetParticle (pdgCode);
860- if (!pdgTrackParticle) {
861- continue ;
862- }
863-
864- if (pdgTrackParticle->Charge () > 0 ) {
865- trackHistoPartOnePos.fillQA <false , false >(part);
866- } else if (pdgTrackParticle->Charge () < 0 ) {
867- trackHistoPartOneNeg.fillQA <false , false >(part);
868- }
854+ }
855+ for (const auto & part : groupPartsOne) {
856+ int pdgCode = static_cast <int >(part.pidCut ());
857+ if (pdgCode != confTrkPDGCodePartOne)
858+ continue ;
859+ const auto & pdgTrackParticle = pdgMC->GetParticle (pdgCode);
860+ if (!pdgTrackParticle) {
861+ continue ;
869862 }
870863
871- for (const auto & [p1, p2] : combinations (CombinationsFullIndexPolicy (groupPartsOne, groupPartsTwo))) {
872- if (static_cast <int >(p1.pidCut ()) != confTrkPDGCodePartOne)
873- continue ;
874- int pdgCodeCasc = static_cast <int >(p2.pidCut ());
875- if ((confCascType1 == 0 && pdgCodeCasc != kOmegaMinus ) || (confCascType1 == 2 && pdgCodeCasc != kOmegaPlusBar ) || (confCascType1 == 1 && pdgCodeCasc != kXiMinus ) || (confCascType1 == 3 && pdgCodeCasc != kXiPlusBar ))
876- continue ;
877- sameEventCont.setPair <false >(p1, p2, multCol, confUse3D, 1 .0f );
864+ if (pdgTrackParticle->Charge () > 0 ) {
865+ trackHistoPartOnePos.fillQA <false , false >(part);
866+ } else if (pdgTrackParticle->Charge () < 0 ) {
867+ trackHistoPartOneNeg.fillQA <false , false >(part);
878868 }
879869 }
870+
871+ for (const auto & [p1, p2] : combinations (CombinationsFullIndexPolicy (groupPartsOne, groupPartsTwo))) {
872+ if (static_cast <int >(p1.pidCut ()) != confTrkPDGCodePartOne)
873+ continue ;
874+ int pdgCodeCasc = static_cast <int >(p2.pidCut ());
875+ if ((confCascType1 == 0 && pdgCodeCasc != kOmegaMinus ) || (confCascType1 == 2 && pdgCodeCasc != kOmegaPlusBar ) || (confCascType1 == 1 && pdgCodeCasc != kXiMinus ) || (confCascType1 == 3 && pdgCodeCasc != kXiPlusBar ))
876+ continue ;
877+ sameEventCont.setPair <false >(p1, p2, multCol, confUse3D, 1 .0f );
878+ }
880879 }
881880 PROCESS_SWITCH (femtoUniversePairTaskTrackCascadeExtended, processSameEventMCgen, " Enable processing same event MC truth for track - cascade" , false );
882881
@@ -895,24 +894,24 @@ struct femtoUniversePairTaskTrackCascadeExtended {
895894 continue ;
896895
897896 cascQAHistos.fillQA <false , false >(part);
897+ }
898898
899- auto pairProcessFunc = [&](auto & p1, auto & p2) -> void {
900- int pdgCodeCasc1 = static_cast <int >(p1.pidCut ());
901- if ((confCascType1 == 0 && pdgCodeCasc1 != kOmegaMinus ) || (confCascType1 == 2 && pdgCodeCasc1 != kOmegaPlusBar ) || (confCascType1 == 1 && pdgCodeCasc1 != kXiMinus ) || (confCascType1 == 3 && pdgCodeCasc1 != kXiPlusBar ))
902- return ;
903- int pdgCodeCasc2 = static_cast <int >(p2.pidCut ());
904- if ((confCascType2 == 0 && pdgCodeCasc2 != kOmegaMinus ) || (confCascType2 == 2 && pdgCodeCasc2 != kOmegaPlusBar ) || (confCascType2 == 1 && pdgCodeCasc2 != kXiMinus ) || (confCascType2 == 3 && pdgCodeCasc2 != kXiPlusBar ))
905- return ;
906- sameEventCont.setPair <false >(p1, p2, multCol, confUse3D, 1 .0f );
907- };
899+ auto pairProcessFunc = [&](auto & p1, auto & p2) -> void {
900+ int pdgCodeCasc1 = static_cast <int >(p1.pidCut ());
901+ if ((confCascType1 == 0 && pdgCodeCasc1 != kOmegaMinus ) || (confCascType1 == 2 && pdgCodeCasc1 != kOmegaPlusBar ) || (confCascType1 == 1 && pdgCodeCasc1 != kXiMinus ) || (confCascType1 == 3 && pdgCodeCasc1 != kXiPlusBar ))
902+ return ;
903+ int pdgCodeCasc2 = static_cast <int >(p2.pidCut ());
904+ if ((confCascType2 == 0 && pdgCodeCasc2 != kOmegaMinus ) || (confCascType2 == 2 && pdgCodeCasc2 != kOmegaPlusBar ) || (confCascType2 == 1 && pdgCodeCasc2 != kXiMinus ) || (confCascType2 == 3 && pdgCodeCasc2 != kXiPlusBar ))
905+ return ;
906+ sameEventCont.setPair <false >(p1, p2, multCol, confUse3D, 1 .0f );
907+ };
908908
909- if (confCascType1 == confCascType2) {
910- for (const auto & [p1, p2] : combinations (CombinationsStrictlyUpperIndexPolicy (groupPartsTwo, groupPartsTwo)))
911- pairProcessFunc (p1, p2);
912- } else {
913- for (const auto & [p1, p2] : combinations (CombinationsFullIndexPolicy (groupPartsTwo, groupPartsTwo)))
914- pairProcessFunc (p1, p2);
915- }
909+ if (confCascType1 == confCascType2) {
910+ for (const auto & [p1, p2] : combinations (CombinationsStrictlyUpperIndexPolicy (groupPartsTwo, groupPartsTwo)))
911+ pairProcessFunc (p1, p2);
912+ } else {
913+ for (const auto & [p1, p2] : combinations (CombinationsFullIndexPolicy (groupPartsTwo, groupPartsTwo)))
914+ pairProcessFunc (p1, p2);
916915 }
917916 }
918917 PROCESS_SWITCH (femtoUniversePairTaskTrackCascadeExtended, processSameEventCascMCgen, " Enable processing same event MC truth for cascade - cascade" , false );
0 commit comments