@@ -1222,34 +1222,33 @@ struct femtoUniversePairTaskTrackCascadeExtended {
12221222 int pdgCode = static_cast <int >(part.pidCut ());
12231223 if ((confCascType1 == 0 && pdgCode != kOmegaMinus ) || (confCascType1 == 2 && pdgCode != kOmegaPlusBar ) || (confCascType1 == 1 && pdgCode != kXiMinus ) || (confCascType1 == 3 && pdgCode != kXiPlusBar ))
12241224 continue ;
1225-
12261225 cascQAHistos.fillQA <false , false >(part);
1226+ }
12271227
1228- for (const auto & part : groupPartsOne) {
1229- int pdgCode = static_cast <int >(part.pidCut ());
1230- if (pdgCode != trackparticleconfigs.confTrkPDGCodePartOne )
1231- continue ;
1232- const auto & pdgTrackParticle = pdgMC->GetParticle (pdgCode);
1233- if (!pdgTrackParticle) {
1234- continue ;
1235- }
1236-
1237- if (pdgTrackParticle->Charge () > 0 ) {
1238- trackHistoPartOnePos.fillQA <false , false >(part);
1239- } else if (pdgTrackParticle->Charge () < 0 ) {
1240- trackHistoPartOneNeg.fillQA <false , false >(part);
1241- }
1228+ for (const auto & part : groupPartsOne) {
1229+ int pdgCode = static_cast <int >(part.pidCut ());
1230+ if (pdgCode != trackparticleconfigs.confTrkPDGCodePartOne )
1231+ continue ;
1232+ const auto & pdgTrackParticle = pdgMC->GetParticle (pdgCode);
1233+ if (!pdgTrackParticle) {
1234+ continue ;
12421235 }
12431236
1244- for (const auto & [p1, p2] : combinations (CombinationsFullIndexPolicy (groupPartsOne, groupPartsTwo))) {
1245- if (static_cast <int >(p1.pidCut ()) != trackparticleconfigs.confTrkPDGCodePartOne )
1246- continue ;
1247- int pdgCodeCasc = static_cast <int >(p2.pidCut ());
1248- if ((confCascType1 == 0 && pdgCodeCasc != kOmegaMinus ) || (confCascType1 == 2 && pdgCodeCasc != kOmegaPlusBar ) || (confCascType1 == 1 && pdgCodeCasc != kXiMinus ) || (confCascType1 == 3 && pdgCodeCasc != kXiPlusBar ))
1249- continue ;
1250- sameEventCont.setPair <false >(p1, p2, multCol, confUse3D, 1 .0f );
1237+ if (pdgTrackParticle->Charge () > 0 ) {
1238+ trackHistoPartOnePos.fillQA <false , false >(part);
1239+ } else if (pdgTrackParticle->Charge () < 0 ) {
1240+ trackHistoPartOneNeg.fillQA <false , false >(part);
12511241 }
12521242 }
1243+
1244+ for (const auto & [p1, p2] : combinations (CombinationsFullIndexPolicy (groupPartsOne, groupPartsTwo))) {
1245+ if (static_cast <int >(p1.pidCut ()) != trackparticleconfigs.confTrkPDGCodePartOne )
1246+ continue ;
1247+ int pdgCodeCasc = static_cast <int >(p2.pidCut ());
1248+ if ((confCascType1 == 0 && pdgCodeCasc != kOmegaMinus ) || (confCascType1 == 2 && pdgCodeCasc != kOmegaPlusBar ) || (confCascType1 == 1 && pdgCodeCasc != kXiMinus ) || (confCascType1 == 3 && pdgCodeCasc != kXiPlusBar ))
1249+ continue ;
1250+ sameEventCont.setPair <false >(p1, p2, multCol, confUse3D, 1 .0f );
1251+ }
12531252 }
12541253 PROCESS_SWITCH (femtoUniversePairTaskTrackCascadeExtended, processSameEventMCgen, " Enable processing same event MC truth for track - cascade" , false );
12551254
@@ -1268,24 +1267,23 @@ struct femtoUniversePairTaskTrackCascadeExtended {
12681267 continue ;
12691268
12701269 cascQAHistos.fillQA <false , false >(part);
1270+ }
1271+ auto pairProcessFunc = [&](auto & p1, auto & p2) -> void {
1272+ int pdgCodeCasc1 = static_cast <int >(p1.pidCut ());
1273+ if ((confCascType1 == 0 && pdgCodeCasc1 != kOmegaMinus ) || (confCascType1 == 2 && pdgCodeCasc1 != kOmegaPlusBar ) || (confCascType1 == 1 && pdgCodeCasc1 != kXiMinus ) || (confCascType1 == 3 && pdgCodeCasc1 != kXiPlusBar ))
1274+ return ;
1275+ int pdgCodeCasc2 = static_cast <int >(p2.pidCut ());
1276+ if ((confCascType2 == 0 && pdgCodeCasc2 != kOmegaMinus ) || (confCascType2 == 2 && pdgCodeCasc2 != kOmegaPlusBar ) || (confCascType2 == 1 && pdgCodeCasc2 != kXiMinus ) || (confCascType2 == 3 && pdgCodeCasc2 != kXiPlusBar ))
1277+ return ;
1278+ sameEventCont.setPair <false >(p1, p2, multCol, confUse3D, 1 .0f );
1279+ };
12711280
1272- auto pairProcessFunc = [&](auto & p1, auto & p2) -> void {
1273- int pdgCodeCasc1 = static_cast <int >(p1.pidCut ());
1274- if ((confCascType1 == 0 && pdgCodeCasc1 != kOmegaMinus ) || (confCascType1 == 2 && pdgCodeCasc1 != kOmegaPlusBar ) || (confCascType1 == 1 && pdgCodeCasc1 != kXiMinus ) || (confCascType1 == 3 && pdgCodeCasc1 != kXiPlusBar ))
1275- return ;
1276- int pdgCodeCasc2 = static_cast <int >(p2.pidCut ());
1277- if ((confCascType2 == 0 && pdgCodeCasc2 != kOmegaMinus ) || (confCascType2 == 2 && pdgCodeCasc2 != kOmegaPlusBar ) || (confCascType2 == 1 && pdgCodeCasc2 != kXiMinus ) || (confCascType2 == 3 && pdgCodeCasc2 != kXiPlusBar ))
1278- return ;
1279- sameEventCont.setPair <false >(p1, p2, multCol, confUse3D, 1 .0f );
1280- };
1281-
1282- if (confCascType1 == confCascType2) {
1283- for (const auto & [p1, p2] : combinations (CombinationsStrictlyUpperIndexPolicy (groupPartsTwo, groupPartsTwo)))
1284- pairProcessFunc (p1, p2);
1285- } else {
1286- for (const auto & [p1, p2] : combinations (CombinationsFullIndexPolicy (groupPartsTwo, groupPartsTwo)))
1287- pairProcessFunc (p1, p2);
1288- }
1281+ if (confCascType1 == confCascType2) {
1282+ for (const auto & [p1, p2] : combinations (CombinationsStrictlyUpperIndexPolicy (groupPartsTwo, groupPartsTwo)))
1283+ pairProcessFunc (p1, p2);
1284+ } else {
1285+ for (const auto & [p1, p2] : combinations (CombinationsFullIndexPolicy (groupPartsTwo, groupPartsTwo)))
1286+ pairProcessFunc (p1, p2);
12891287 }
12901288 }
12911289 PROCESS_SWITCH (femtoUniversePairTaskTrackCascadeExtended, processSameEventCascMCgen, " Enable processing same event MC truth for cascade - cascade" , false );
0 commit comments