@@ -71,8 +71,8 @@ struct sigma0builder {
7171 Produces<aod::SigmaMCCores> sigma0mccores;
7272
7373 // For manual sliceBy
74- Preslice <V0DerivedMCDatas> perCollisionMCDerived = o2::aod::v0data::straCollisionId;
75- Preslice <V0StandardDerivedDatas> perCollisionSTDDerived = o2::aod::v0data::straCollisionId;
74+ PresliceUnsorted <V0DerivedMCDatas> perCollisionMCDerived = o2::aod::v0data::straCollisionId;
75+ PresliceUnsorted <V0StandardDerivedDatas> perCollisionSTDDerived = o2::aod::v0data::straCollisionId;
7676 PresliceUnsorted<soa::Join<aod::StraCollisions, aod::StraCents, aod::StraEvSels, aod::StraCollLabels>> perMcCollision = aod::v0data::straMCCollisionId;
7777
7878 // pack track quality but separte also afterburner
@@ -256,6 +256,7 @@ struct sigma0builder {
256256 histos.add (" PhotonSel/hPhotonDCAPosToPV" , " hPhotonDCAPosToPV" , kTH1F , {axisDCAtoPV});
257257 histos.add (" PhotonSel/hPhotonDCADau" , " hPhotonDCADau" , kTH1F , {axisDCAdau});
258258 histos.add (" PhotonSel/hPhotonRadius" , " hPhotonRadius" , kTH1F , {axisRadius});
259+ histos.add (" PhotonSel/h3dPhotonMass" , " h3dPhotonMass" , kTH3D , {axisCentrality, axisPt, axisPhotonMass});
259260
260261 histos.add (" LambdaSel/hSelectionStatistics" , " hSelectionStatistics" , kTH1D , {axisCandSel});
261262 histos.get <TH1>(HIST (" LambdaSel/hSelectionStatistics" ))->GetXaxis ()->SetBinLabel (1 , " No Sel" );
@@ -274,6 +275,8 @@ struct sigma0builder {
274275 histos.add (" LambdaSel/hLambdaDCAPosToPV" , " hLambdaDCAPosToPV" , kTH1F , {axisDCAtoPV});
275276 histos.add (" LambdaSel/hLambdaDCADau" , " hLambdaDCADau" , kTH1F , {axisDCAdau});
276277 histos.add (" LambdaSel/hLambdaRadius" , " hLambdaRadius" , kTH1F , {axisRadius});
278+ histos.add (" LambdaSel/h3dLambdaMass" , " h3dLambdaMass" , kTH3D , {axisCentrality, axisPt, axisLambdaMass});
279+ histos.add (" LambdaSel/h3dALambdaMass" , " h3dALambdaMass" , kTH3D , {axisCentrality, axisPt, axisLambdaMass});
277280
278281 histos.add (" SigmaSel/hSelectionStatistics" , " hSelectionStatistics" , kTH1D , {axisCandSel});
279282 histos.get <TH1>(HIST (" SigmaSel/hSelectionStatistics" ))->GetXaxis ()->SetBinLabel (1 , " No Sel" );
@@ -286,7 +289,7 @@ struct sigma0builder {
286289 histos.add (" SigmaSel/hSigmaMassWindow" , " hSigmaMassWindow" , kTH1F , {{200 , -0 .09f , 0 .11f }});
287290 histos.add (" SigmaSel/hSigmaY" , " hSigmaY" , kTH1F , {axisRapidity});
288291 histos.add (" SigmaSel/hSigmaMassSelected" , " hSigmaMassSelected" , kTH1F , {axisSigmaMass});
289- histos.add (" SigmaSel/h3dMassSigma0AfterSel" , " h3dMassSigma0AfterSel" , kTH3F , {axisCentrality, axisPt, axisSigmaMass});
292+ histos.add (" SigmaSel/h3dMassSigma0AfterSel" , " h3dMassSigma0AfterSel" , kTH3D , {axisCentrality, axisPt, axisSigmaMass});
290293
291294 if (fillQAhistos) {
292295 histos.add (" GeneralQA/h2dMassGammaVsK0S" , " h2dMassGammaVsK0S" , kTH2D , {axisPhotonMass, axisK0SMass});
@@ -347,10 +350,10 @@ struct sigma0builder {
347350
348351 // For Pi0 QA
349352 if (doPi0QA) {
350- histos.add (" Pi0QA/h2dPtVsMassPi0BeforeSel_MCAssoc " , " h2dPtVsMassPi0BeforeSel_MCAssoc " , kTH2D , {axisPt, axisPi0Mass});
351- histos.add (" Pi0QA/h2dPtVsMassPi0AfterSel_MCAssoc " , " h2dPtVsMassPi0AfterSel_MCAssoc " , kTH2D , {axisPt, axisPi0Mass});
352- histos.add (" Pi0QA/h2dPtVsMassPi0BeforeSel_Candidates " , " h2dPtVsMassPi0BeforeSel_Candidates " , kTH2D , {axisPt, axisPi0Mass});
353- histos.add (" Pi0QA/h2dPtVsMassPi0AfterSel_Candidates " , " h2dPtVsMassPi0AfterSel_Candidates " , kTH2D , {axisPt, axisPi0Mass});
353+ histos.add (" Pi0QA/h3dMassPi0BeforeSel_MCAssoc " , " h3dMassPi0BeforeSel_MCAssoc " , kTH3D , {axisCentrality, axisPt, axisPi0Mass});
354+ histos.add (" Pi0QA/h3dMassPi0AfterSel_MCAssoc " , " h3dMassPi0AfterSel_MCAssoc " , kTH3D , {axisCentrality, axisPt, axisPi0Mass});
355+ histos.add (" Pi0QA/h3dMassPi0BeforeSel_Candidates " , " h3dMassPi0BeforeSel_Candidates " , kTH3D , {axisCentrality, axisPt, axisPi0Mass});
356+ histos.add (" Pi0QA/h3dMassPi0AfterSel_Candidates " , " h3dMassPi0AfterSel_Candidates " , kTH3D , {axisCentrality, axisPt, axisPi0Mass});
354357 }
355358
356359 if (doprocessGeneratedRun3) {
@@ -500,6 +503,8 @@ struct sigma0builder {
500503 if (fillHists)
501504 histos.fill (HIST (" hEventSelection" ), 19 /* Above max IR */ );
502505
506+ float centrality = doPPAnalysis ? collision.centFT0M () : collision.centFT0C ();
507+ histos.fill (HIST (" hEventCentrality" ), centrality);
503508 return true ;
504509 }
505510
@@ -731,8 +736,8 @@ struct sigma0builder {
731736 }
732737 }
733738
734- template <typename TV0Object>
735- void runPi0QA (TV0Object const & gamma1, TV0Object const & gamma2)
739+ template <typename TV0Object, typename TCollision >
740+ void runPi0QA (TV0Object const & gamma1, TV0Object const & gamma2, TCollision collision )
736741 {
737742 // Check if both V0s are made of the same tracks
738743 if (gamma1.posTrackExtraId () == gamma2.posTrackExtraId () ||
@@ -747,6 +752,7 @@ struct sigma0builder {
747752 float pi0Mass = RecoDecay::m (arrpi0, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassPhoton});
748753 float pi0Pt = RecoDecay::pt (std::array{gamma1.px () + gamma2.px (), gamma1.py () + gamma2.py ()});
749754 float pi0Y = RecoDecay::y (std::array{gamma1.px () + gamma2.px (), gamma1.py () + gamma2.py (), gamma1.pz () + gamma2.pz ()}, o2::constants::physics::MassPi0);
755+ float centrality = doPPAnalysis ? collision.centFT0M () : collision.centFT0C ();
750756
751757 // MC-specific variables
752758 bool fIsPi0 = false , fIsMC = false ;
@@ -762,12 +768,12 @@ struct sigma0builder {
762768 gamma1MC.pdgCodeMother () == 111 && gamma2MC.pdgCodeMother () == 111 &&
763769 gamma1.motherMCPartId () == gamma2.motherMCPartId ()) {
764770 fIsPi0 = true ;
765- histos.fill (HIST (" Pi0QA/h2dPtVsMassPi0BeforeSel_MCAssoc " ) , pi0Pt, pi0Mass);
771+ histos.fill (HIST (" Pi0QA/h3dMassPi0BeforeSel_MCAssoc " ), centrality , pi0Pt, pi0Mass);
766772 }
767773 }
768774 }
769775
770- histos.fill (HIST (" Pi0QA/h2dPtVsMassPi0BeforeSel_Candidates " ) , pi0Pt, pi0Mass);
776+ histos.fill (HIST (" Pi0QA/h3dMassPi0BeforeSel_Candidates " ), centrality , pi0Pt, pi0Mass);
771777
772778 // Photon-specific selections
773779 auto posTrackGamma1 = gamma1.template posTrackExtra_as <dauTracks>();
@@ -776,8 +782,8 @@ struct sigma0builder {
776782 auto negTrackGamma2 = gamma2.template negTrackExtra_as <dauTracks>();
777783
778784 // Gamma1 Selection
779- bool passedTPCGamma1 = (posTrackGamma1. tpcNSigmaEl () == - 999 . f || TMath::Abs (posTrackGamma1.tpcNSigmaEl ()) < Pi0PhotonMaxTPCNSigmas) &&
780- (negTrackGamma1. tpcNSigmaEl () == - 999 . f || TMath::Abs (negTrackGamma1.tpcNSigmaEl ()) < Pi0PhotonMaxTPCNSigmas);
785+ bool passedTPCGamma1 = (TMath::Abs (posTrackGamma1.tpcNSigmaEl ()) < Pi0PhotonMaxTPCNSigmas) ||
786+ (TMath::Abs (negTrackGamma1.tpcNSigmaEl ()) < Pi0PhotonMaxTPCNSigmas);
781787
782788 if (TMath::Abs (gamma1.mGamma ()) > Pi0PhotonMaxMass ||
783789 gamma1.qtarm () >= Pi0PhotonMaxQt ||
@@ -797,8 +803,8 @@ struct sigma0builder {
797803 }
798804
799805 // Gamma2 Selection
800- bool passedTPCGamma2 = (posTrackGamma2. tpcNSigmaEl () == - 999 . f || TMath::Abs (posTrackGamma2.tpcNSigmaEl ()) < Pi0PhotonMaxTPCNSigmas) &&
801- (negTrackGamma2. tpcNSigmaEl () == - 999 . f || TMath::Abs (negTrackGamma2.tpcNSigmaEl ()) < Pi0PhotonMaxTPCNSigmas);
806+ bool passedTPCGamma2 = (TMath::Abs (posTrackGamma2.tpcNSigmaEl ()) < Pi0PhotonMaxTPCNSigmas) ||
807+ (TMath::Abs (negTrackGamma2.tpcNSigmaEl ()) < Pi0PhotonMaxTPCNSigmas);
802808
803809 if (TMath::Abs (gamma2.mGamma ()) > Pi0PhotonMaxMass ||
804810 gamma2.qtarm () >= Pi0PhotonMaxQt ||
@@ -823,14 +829,14 @@ struct sigma0builder {
823829 }
824830
825831 // Fill histograms
826- histos.fill (HIST (" Pi0QA/h2dPtVsMassPi0AfterSel_Candidates " ) , pi0Pt, pi0Mass);
832+ histos.fill (HIST (" Pi0QA/h3dMassPi0AfterSel_Candidates " ), centrality , pi0Pt, pi0Mass);
827833 if (fIsMC && fIsPi0 )
828- histos.fill (HIST (" Pi0QA/h2dPtVsMassPi0AfterSel_MCAssoc " ) , pi0Pt, pi0Mass);
834+ histos.fill (HIST (" Pi0QA/h3dMassPi0AfterSel_MCAssoc " ), centrality , pi0Pt, pi0Mass);
829835 }
830836
831837 // Process photon candidate
832- template <typename TV0Object>
833- bool processPhotonCandidate (TV0Object const & gamma)
838+ template <typename TV0Object, typename TCollision >
839+ bool processPhotonCandidate (TV0Object const & gamma, TCollision collision )
834840 {
835841 if (gamma.v0Type () == 0 )
836842 return false ;
@@ -869,12 +875,14 @@ struct sigma0builder {
869875 return false ;
870876 histos.fill (HIST (" PhotonSel/hSelectionStatistics" ), 6 .);
871877 }
878+ float centrality = doPPAnalysis ? collision.centFT0M () : collision.centFT0C ();
879+ histos.fill (HIST (" PhotonSel/h3dPhotonMass" ), centrality, gamma.pt (), gamma.mGamma ());
872880 return true ;
873881 }
874882
875883 // Process photon candidate
876- template <typename TV0Object>
877- bool processLambdaCandidate (TV0Object const & lambda)
884+ template <typename TV0Object, typename TCollision >
885+ bool processLambdaCandidate (TV0Object const & lambda, TCollision collision )
878886 {
879887 if (lambda.v0Type () != 1 )
880888 return false ;
@@ -912,12 +920,16 @@ struct sigma0builder {
912920 histos.fill (HIST (" LambdaSel/hSelectionStatistics" ), 6 .);
913921 }
914922
923+ float centrality = doPPAnalysis ? collision.centFT0M () : collision.centFT0C ();
924+ histos.fill (HIST (" LambdaSel/h3dLambdaMass" ), centrality, lambda.pt (), lambda.mLambda ());
925+ histos.fill (HIST (" LambdaSel/h3dALambdaMass" ), centrality, lambda.pt (), lambda.mAntiLambda ());
926+
915927 return true ;
916928 }
917929 // /////////
918930 // Process sigma candidate and store properties in object
919- template <typename TV0Object>
920- bool buildSigma0 (TV0Object const & lambda, TV0Object const & gamma)
931+ template <typename TV0Object, typename TCollision >
932+ bool buildSigma0 (TV0Object const & lambda, TV0Object const & gamma, TCollision collision )
921933 {
922934 // Checking if both V0s are made of the very same tracks
923935 if (gamma.posTrackExtraId () == lambda.posTrackExtraId () ||
@@ -929,31 +941,36 @@ struct sigma0builder {
929941 std::array<float , 3 > pVecPhotons{gamma.px (), gamma.py (), gamma.pz ()};
930942 std::array<float , 3 > pVecLambda{lambda.px (), lambda.py (), lambda.pz ()};
931943 auto arrMom = std::array{pVecPhotons, pVecLambda};
932- float sigmamass = RecoDecay::m (arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0});
933- float sigmarap = RecoDecay::y (std::array{gamma.px () + lambda.px (), gamma.py () + lambda.py (), gamma.pz () + lambda.pz ()}, o2::constants::physics::MassSigma0);
944+ float sigmaMass = RecoDecay::m (arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0});
945+ float sigmaY = RecoDecay::y (std::array{gamma.px () + lambda.px (), gamma.py () + lambda.py (), gamma.pz () + lambda.pz ()}, o2::constants::physics::MassSigma0);
946+ float SigmapT = RecoDecay::pt (array{gamma.px () + lambda.px (), gamma.py () + lambda.py ()});
947+ float centrality = doPPAnalysis ? collision.centFT0M () : collision.centFT0C ();
948+
949+ // Before any selection
950+ histos.fill (HIST (" SigmaSel/h3dMassSigma0BeforeSel" ), centrality, SigmapT, sigmaMass);
934951
935952 histos.fill (HIST (" SigmaSel/hSelectionStatistics" ), 1 .);
936- histos.fill (HIST (" SigmaSel/hSigmaMass" ), sigmamass );
937- histos.fill (HIST (" SigmaSel/hSigmaMassWindow" ), sigmamass - 1.192642 );
953+ histos.fill (HIST (" SigmaSel/hSigmaMass" ), sigmaMass );
954+ histos.fill (HIST (" SigmaSel/hSigmaMassWindow" ), sigmaMass - 1.192642 );
938955
939956 if (fillQAhistos) {
940957 histos.fill (HIST (" GeneralQA/h2dMassGammaVsK0S" ), gamma.mGamma (), gamma.mK0Short ());
941958 histos.fill (HIST (" GeneralQA/h2dMassLambdaVsK0S" ), lambda.mLambda (), lambda.mK0Short ());
942959 histos.fill (HIST (" GeneralQA/h2dMassGammaVsLambda" ), gamma.mGamma (), gamma.mLambda ());
943960 histos.fill (HIST (" GeneralQA/h2dMassLambdaVsGamma" ), lambda.mLambda (), lambda.mGamma ());
944- histos.fill (HIST (" GeneralQA/h3dMassSigma0VsDaupTs" ), gamma.pt (), lambda.pt (), sigmamass );
961+ histos.fill (HIST (" GeneralQA/h3dMassSigma0VsDaupTs" ), gamma.pt (), lambda.pt (), sigmaMass );
945962 }
946963
947- if (TMath::Abs (sigmamass - 1.192642 ) > Sigma0Window)
964+ if (TMath::Abs (sigmaMass - 1.192642 ) > Sigma0Window)
948965 return false ;
949966
950- histos.fill (HIST (" SigmaSel/hSigmaY" ), sigmarap );
967+ histos.fill (HIST (" SigmaSel/hSigmaY" ), sigmaY );
951968 histos.fill (HIST (" SigmaSel/hSelectionStatistics" ), 2 .);
952969
953- if (TMath::Abs (sigmarap ) > SigmaMaxRap)
970+ if (TMath::Abs (sigmaY ) > SigmaMaxRap)
954971 return false ;
955972
956- histos.fill (HIST (" SigmaSel/hSigmaMassSelected" ), sigmamass );
973+ histos.fill (HIST (" SigmaSel/hSigmaMassSelected" ), sigmaMass );
957974 histos.fill (HIST (" SigmaSel/hSelectionStatistics" ), 3 .);
958975
959976 if (fillQAhistos) {
@@ -963,6 +980,8 @@ struct sigma0builder {
963980 histos.fill (HIST (" GeneralQA/h2dV0XY" ), gamma.x (), gamma.y ());
964981 }
965982
983+ histos.fill (HIST (" SigmaSel/h3dMassSigma0AfterSel" ), centrality, SigmapT, sigmaMass);
984+
966985 return true ;
967986 }
968987
@@ -1127,9 +1146,7 @@ struct sigma0builder {
11271146 // Do analysis with collision-grouped V0s, retain full collision information
11281147 const uint64_t collIdx = coll.globalIndex ();
11291148 auto V0s = fullV0s.sliceBy (perCollisionMCDerived, collIdx);
1130-
1131- float centrality = coll.centFT0C ();
1132- histos.fill (HIST (" hEventCentrality" ), centrality);
1149+ float centrality = doPPAnalysis ? coll.centFT0M () : coll.centFT0C ();
11331150
11341151 bool fhasMCColl = false ;
11351152 if (coll.has_straMCCollision ())
@@ -1140,7 +1157,6 @@ struct sigma0builder {
11401157 float interactionRate = -1 ;
11411158 if (fGetIR ) {
11421159 interactionRate = rateFetcher.fetch (ccdb.service , coll.timestamp (), coll.runNumber (), irSource, fIRCrashOnNull ) * 1 .e -3 ;
1143-
11441160 if (interactionRate < 0 )
11451161 histos.get <TH1>(HIST (" GeneralQA/hRunNumberNegativeIR" ))->Fill (Form (" %d" , coll.runNumber ()), 1 );
11461162
@@ -1175,10 +1191,10 @@ struct sigma0builder {
11751191 histos.fill (HIST (" MC/h2dPtVsCentralityBeforeSel_MCAssocALambda" ), centrality, v0.pt ());
11761192 }
11771193
1178- if (processPhotonCandidate (v0)) // selecting photons
1194+ if (processPhotonCandidate (v0, coll)) // selecting photons
11791195 bestGammasArray.push_back (v0.globalIndex ()); // Save indices of best gamma candidates
11801196
1181- if (processLambdaCandidate (v0)) // selecting lambdas
1197+ if (processLambdaCandidate (v0, coll)) // selecting lambdas
11821198 bestLambdasArray.push_back (v0.globalIndex ()); // Save indices of best lambda candidates
11831199 }
11841200
@@ -1189,7 +1205,7 @@ struct sigma0builder {
11891205 auto gamma1 = fullV0s.rawIteratorAt (bestGammasArray[i]);
11901206 for (size_t j = i + 1 ; j < bestGammasArray.size (); ++j) {
11911207 auto gamma2 = fullV0s.rawIteratorAt (bestGammasArray[j]);
1192- runPi0QA (gamma1, gamma2);
1208+ runPi0QA (gamma1, gamma2, coll );
11931209 }
11941210 }
11951211 }
@@ -1218,7 +1234,7 @@ struct sigma0builder {
12181234 }
12191235
12201236 for (size_t j = 0 ; j < bestLambdasArray.size (); ++j) {
1221- auto lambda = fullV0s.iteratorAt (bestLambdasArray[j]);
1237+ auto lambda = fullV0s.rawIteratorAt (bestLambdasArray[j]);
12221238
12231239 if (!lambda.has_v0MCCore ())
12241240 continue ;
@@ -1269,15 +1285,10 @@ struct sigma0builder {
12691285 histos.fill (HIST (" MC/h2dPtVsCentralityBeforeSel_MCAssocASigma0" ), centrality, SigmaMCpT);
12701286 }
12711287
1272- histos.fill (HIST (" SigmaSel/h3dMassSigma0BeforeSel" ), centrality, SigmapT, SigmaMass);
1273-
12741288 // Build sigma0 candidate, please
1275- if (!buildSigma0 (lambda, gamma))
1289+ if (!buildSigma0 (lambda, gamma, coll ))
12761290 continue ;
12771291
1278- // Filling histos and tables
1279- histos.fill (HIST (" SigmaSel/h3dMassSigma0AfterSel" ), centrality, SigmapT, SigmaMass);
1280-
12811292 if (SigmaY < 0.5 ) {
12821293 if (fIsSigma )
12831294 histos.fill (HIST (" MC/h2dPtVsCentralityAfterSel_MCAssocSigma0" ), centrality, SigmaMCpT);
@@ -1293,7 +1304,8 @@ struct sigma0builder {
12931304 PhotonCandPDGCode, PhotonCandPDGCodeMother, fIsPhotonPrimary , PhotonMCpT, fIsPhotonCorrectlyAssign ,
12941305 LambdaCandPDGCode, LambdaCandPDGCodeMother, fIsLambdaPrimary , LambdaMCpT, fIsLambdaCorrectlyAssign );
12951306
1296- fillTables (lambda, gamma, coll); // filling tables with accepted candidates
1307+ // Filling tables with accepted candidates
1308+ fillTables (lambda, gamma, coll);
12971309
12981310 nSigmaCandidates++;
12991311 if (nSigmaCandidates % 10000 == 0 )
@@ -1313,16 +1325,13 @@ struct sigma0builder {
13131325 // Do analysis with collision-grouped V0s, retain full collision information
13141326 const uint64_t collIdx = coll.globalIndex ();
13151327 auto V0s = fullV0s.sliceBy (perCollisionSTDDerived, collIdx);
1316-
1317- float centrality = coll.centFT0C ();
1318- histos.fill (HIST (" hEventCentrality" ), centrality);
1328+ float centrality = doPPAnalysis ? coll.centFT0M () : coll.centFT0C ();
13191329
13201330 // _______________________________________________
13211331 // Retrieving IR info
13221332 float interactionRate = -1 ;
13231333 if (fGetIR ) {
13241334 interactionRate = rateFetcher.fetch (ccdb.service , coll.timestamp (), coll.runNumber (), irSource, fIRCrashOnNull ) * 1 .e -3 ;
1325-
13261335 if (interactionRate < 0 )
13271336 histos.get <TH1>(HIST (" GeneralQA/hRunNumberNegativeIR" ))->Fill (Form (" %d" , coll.runNumber ()), 1 );
13281337
@@ -1336,10 +1345,10 @@ struct sigma0builder {
13361345 // _______________________________________________
13371346 // V0s loop
13381347 for (auto & v0 : V0s) {
1339- if (processPhotonCandidate (v0)) // selecting photons
1348+ if (processPhotonCandidate (v0, coll)) // selecting photons
13401349 bestGammasArray.push_back (v0.globalIndex ()); // Save indices of best gamma candidates
13411350
1342- if (processLambdaCandidate (v0)) // selecting lambdas
1351+ if (processLambdaCandidate (v0, coll)) // selecting lambdas
13431352 bestLambdasArray.push_back (v0.globalIndex ()); // Save indices of best lambda candidates
13441353 }
13451354
@@ -1350,7 +1359,7 @@ struct sigma0builder {
13501359 auto gamma1 = fullV0s.rawIteratorAt (bestGammasArray[i]);
13511360 for (size_t j = i + 1 ; j < bestGammasArray.size (); ++j) {
13521361 auto gamma2 = fullV0s.rawIteratorAt (bestGammasArray[j]);
1353- runPi0QA (gamma1, gamma2);
1362+ runPi0QA (gamma1, gamma2, coll );
13541363 }
13551364 }
13561365 }
@@ -1361,24 +1370,14 @@ struct sigma0builder {
13611370 auto gamma = fullV0s.rawIteratorAt (bestGammasArray[i]);
13621371
13631372 for (size_t j = 0 ; j < bestLambdasArray.size (); ++j) {
1364- auto lambda = fullV0s.iteratorAt (bestLambdasArray[j]);
1365-
1366- // Sigma0 candidate properties
1367- std::array<float , 3 > pVecPhotons{gamma.px (), gamma.py (), gamma.pz ()};
1368- std::array<float , 3 > pVecLambda{lambda.px (), lambda.py (), lambda.pz ()};
1369- auto arrMom = std::array{pVecPhotons, pVecLambda};
1370- float SigmaMass = RecoDecay::m (arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0});
1371- float SigmapT = RecoDecay::pt (array{gamma.px () + lambda.px (), gamma.py () + lambda.py ()});
1372-
1373- histos.fill (HIST (" SigmaSel/h3dMassSigma0BeforeSel" ), centrality, SigmapT, SigmaMass);
1373+ auto lambda = fullV0s.rawIteratorAt (bestLambdasArray[j]);
13741374
13751375 // Building sigma0 candidate
1376- if (!buildSigma0 (lambda, gamma))
1376+ if (!buildSigma0 (lambda, gamma, coll ))
13771377 continue ;
13781378
1379- fillTables (lambda, gamma, coll); // filling tables with accepted candidates
1380-
1381- histos.fill (HIST (" SigmaSel/h3dMassSigma0AfterSel" ), centrality, SigmapT, SigmaMass);
1379+ // Filling tables with accepted candidates
1380+ fillTables (lambda, gamma, coll);
13821381
13831382 nSigmaCandidates++;
13841383 if (nSigmaCandidates % 10000 == 0 )
0 commit comments