@@ -505,6 +505,9 @@ struct OnTheFlyTracker {
505505 histos.add (" V0Building_Configuration_0/Lambda/hMass" , " hMass" , kTH2F , {axes.axisLambdaMass , axes.axisMomentum });
506506 histos.add (" V0Building_Configuration_0/AntiLambda/hMass" , " hMass" , kTH2F , {axes.axisLambdaMass , axes.axisMomentum });
507507 if (static_cast <int >(fastTrackerSettings.alice3geo ->size ()) > 1 ) {
508+ if (fastTrackerSettings.alice3geo ->size ()>4 ){
509+ LOG (warn) << " More than 4 FastTracker configurations found. Only first 4 will have V0 QA histograms filled." ;
510+ }
508511 for (int icfg = 1 ; icfg < static_cast <int >(fastTrackerSettings.alice3geo ->size ()); icfg++) {
509512 std::string histPath = " Configuration_" + std::to_string (icfg) + " /" ;
510513 histos.addClone (" V0Building_Configuration_0/" , fmt::format (" V0Building_{}" , histPath).c_str ());
@@ -805,17 +808,14 @@ struct OnTheFlyTracker {
805808 histos.fill (HIST (" hGenPrFromLa" ), laDecayRadius2D, decayProducts[2 ].Pt ());
806809 }
807810 if (v0DecaySettings.doV0QA && isV0) {
808- static_for<0 , 2 >([&](auto i) {
809- constexpr int Index = i.value ;
810- if (pdg == v0PDGs[Index]) {
811- static_for<0 , 3 >([&](auto j) {
812- constexpr int IndexCnfg = j.value ;
813- if (icfg == IndexCnfg) {
814- histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hGen" ), v0DecayRadius2D, mcParticle.pt ());
815- histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hGenNegDaughterFromV0" ), v0DecayRadius2D, v0DecayProducts[0 ].Pt ());
816- histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hGenPosDaughterFromV0" ), v0DecayRadius2D, v0DecayProducts[1 ].Pt ());
817- }
818- });
811+ static_for<0 , 11 >([&](auto i) {
812+ constexpr int Index = i.value % 3 ;
813+ constexpr int IndexCnfg = i.value % 4 ;
814+ if (pdg == v0PDGs[Index] && icfg == IndexCnfg) {
815+
816+ histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hGen" ), v0DecayRadius2D, mcParticle.pt ());
817+ histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hGenNegDaughterFromV0" ), v0DecayRadius2D, v0DecayProducts[0 ].Pt ());
818+ histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hGenPosDaughterFromV0" ), v0DecayRadius2D, v0DecayProducts[1 ].Pt ());
819819 }
820820 });
821821 }
@@ -1174,30 +1174,20 @@ struct OnTheFlyTracker {
11741174 }
11751175 }
11761176 if (v0DecaySettings.doV0QA ) {
1177- static_for<0 , 2 >([&](auto i) {
1178- constexpr int Index = i.value ;
1179- if (pdg == v0PDGs[Index]) {
1180- static_for<0 , 3 >([&](auto j) {
1181- constexpr int IndexCnfg = j.value ;
1182- if (icfg == IndexCnfg) {
1183- if (isReco[0 ] && isReco[1 ])
1184- histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hReco" ), v0DecayRadius2D, mcParticle.pt ());
1185- if (isReco[0 ])
1186- histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hRecoNegDaughterFromV0" ), v0DecayRadius2D, v0DecayProducts[0 ].Pt ());
1187- if (isReco[1 ])
1188- histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hRecoPosDaughterFromV0" ), v0DecayRadius2D, v0DecayProducts[1 ].Pt ());
1189- }
1190- });
1191- }
1192- });
1193- if (isReco[0 ] && isReco[1 ]) {
1194- static_for<0 , 3 >([&](auto j) {
1195- constexpr int IndexCnfg = j.value ;
1196- if (icfg == IndexCnfg) {
1177+ static_for<0 , 11 >([&](auto i) {
1178+ constexpr int Index = i.value % 3 ;
1179+ constexpr int IndexCnfg = i.value % 4 ;
1180+ if (pdg == v0PDGs[Index] && icfg == IndexCnfg) {
1181+ if (isReco[0 ] && isReco[1 ]) {
11971182 histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /hV0Building" ), 1 .0f );
1183+ histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hReco" ), v0DecayRadius2D, mcParticle.pt ());
11981184 }
1199- });
1200- }
1185+ if (isReco[0 ])
1186+ histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hRecoNegDaughterFromV0" ), v0DecayRadius2D, v0DecayProducts[0 ].Pt ());
1187+ if (isReco[1 ])
1188+ histos.fill (HIST (" V0Building_Configuration_" ) + HIST (index[IndexCnfg]) + HIST (" /" ) + HIST (kV0names [Index]) + HIST (" /hRecoPosDaughterFromV0" ), v0DecayRadius2D, v0DecayProducts[1 ].Pt ());
1189+ }
1190+ });
12011191 }
12021192
12031193 // +-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+
0 commit comments