@@ -193,18 +193,20 @@ struct femtoUniversePairTaskTrackCascadeExtended {
193193 }
194194
195195 template <typename T>
196- bool isParticleTPC (const T& part, int id)
196+ bool isParticleTPC (const T& part, int id, float * partSigma = 0 )
197197 {
198198 const float tpcNSigmas[3 ] = {unPackInTable<aod::pidtpc_tiny::binning>(part.tpcNSigmaStorePr ()), unPackInTable<aod::pidtpc_tiny::binning>(part.tpcNSigmaStorePi ()), unPackInTable<aod::pidtpc_tiny::binning>(part.tpcNSigmaStoreKa ())};
199-
199+ if (partSigma)
200+ *partSigma = tpcNSigmas[id];
200201 return isNSigmaTPC (tpcNSigmas[id]);
201202 }
202203
203204 template <typename T>
204- bool isParticleTOF (const T& part, int id)
205+ bool isParticleTOF (const T& part, int id, float * partSigma = 0 )
205206 {
206207 const float tofNSigmas[3 ] = {unPackInTable<aod::pidtof_tiny::binning>(part.tofNSigmaStorePr ()), unPackInTable<aod::pidtof_tiny::binning>(part.tofNSigmaStorePi ()), unPackInTable<aod::pidtof_tiny::binning>(part.tofNSigmaStoreKa ())};
207-
208+ if (partSigma)
209+ *partSigma = tofNSigmas[id];
208210 return isNSigmaTOF (part.p (), tofNSigmas[id], part.tempFitVar ());
209211 }
210212
@@ -251,12 +253,20 @@ struct femtoUniversePairTaskTrackCascadeExtended {
251253 rXiQA.add (" hInvMpTmult" , " hInvMpTmult" , kTH3F , {{ptAxis}, {aXiMassAxis}, {multAxis}});
252254
253255 eventHisto.init (&qaRegistry);
256+ // / nSigma debug histograms for the selected particle species only i.e. not sigmas of all particles mixed together
254257 qaRegistry.add (" Tracks_pos/nSigmaTPC" , " ; #it{p} (GeV/#it{c}); n#sigma_{TPC}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
255258 qaRegistry.add (" Tracks_pos/nSigmaTOF" , " ; #it{p} (GeV/#it{c}); n#sigma_{TOF}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
256259 qaRegistry.add (" Tracks_neg/nSigmaTPC" , " ; #it{p} (GeV/#it{c}); n#sigma_{TPC}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
257260 qaRegistry.add (" Tracks_neg/nSigmaTOF" , " ; #it{p} (GeV/#it{c}); n#sigma_{TOF}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
258261 qaRegistry.add (" MixingQA/hMECollisionBins" , " ;bin;Entries" , kTH1F , {{120 , -0.5 , 119.5 }});
259262
263+ qaRegistry.add (" V0Child_pos/nSigmaTPC" , " ; #it{p} (GeV/#it{c}); n#sigma_{TPC}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
264+ qaRegistry.add (" V0Child_neg/nSigmaTPC" , " ; #it{p} (GeV/#it{c}); n#sigma_{TPC}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
265+ qaRegistry.add (" hBachelor/nSigmaTPC" , " ; #it{p} (GeV/#it{c}); n#sigma_{TPC}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
266+ qaRegistry.add (" V0Child_pos/nSigmaTOF" , " ; #it{p} (GeV/#it{c}); n#sigma_{TOF}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
267+ qaRegistry.add (" V0Child_neg/nSigmaTOF" , " ; #it{p} (GeV/#it{c}); n#sigma_{TOF}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
268+ qaRegistry.add (" hBachelor/nSigmaTOF" , " ; #it{p} (GeV/#it{c}); n#sigma_{TOF}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
269+
260270 // MC gen
261271 registryMCgen.add (" plus/MCgenCasc" , " MC gen cascades;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
262272 registryMCgen.add (" minus/MCgenCasc" , " MC gen cascades;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
@@ -375,30 +385,39 @@ struct femtoUniversePairTaskTrackCascadeExtended {
375385 const auto & bachelor = parts.iteratorAt (part.globalIndex () - 1 - parts.begin ().globalIndex ());
376386 // / Child particles must pass this condition to be selected
377387 if constexpr (std::experimental::is_detected<hasSigma, typename TableType::iterator>::value) {
378- if (!isParticleTPC (posChild, CascChildTable[confCascType1][0 ]) || !isParticleTPC (negChild, CascChildTable[confCascType1][1 ]) || !isParticleTPC (bachelor, CascChildTable[confCascType1][2 ]))
388+ float posChildTPC, negChildTPC, bachelorTPC, posChildTOF, negChildTOF, bachelorTOF;
389+ if (!isParticleTPC (posChild, CascChildTable[confCascType1][0 ], &posChildTPC) || !isParticleTPC (negChild, CascChildTable[confCascType1][1 ], &negChildTPC) || !isParticleTPC (bachelor, CascChildTable[confCascType1][2 ], &bachelorTPC))
379390 continue ;
380391
381- if ((!confCheckTOFBachelorOnly && (!isParticleTOF (posChild, CascChildTable[confCascType1][0 ]) || !isParticleTOF (negChild, CascChildTable[confCascType1][1 ]))) || !isParticleTOF (bachelor, CascChildTable[confCascType1][2 ]))
392+ if ((!confCheckTOFBachelorOnly && (!isParticleTOF (posChild, CascChildTable[confCascType1][0 ], &posChildTOF ) || !isParticleTOF (negChild, CascChildTable[confCascType1][1 ], &negChildTOF ))) || !isParticleTOF (bachelor, CascChildTable[confCascType1][2 ], &bachelorTOF ))
382393 continue ;
383394
384395 posChildHistos.fillQA <false , true >(posChild);
385396 negChildHistos.fillQA <false , true >(negChild);
386397 bachHistos.fillQABase <false , true >(bachelor, HIST (" hBachelor" ));
398+
399+ qaRegistry.fill (HIST (" V0Child_pos/nSigmaTPC" ), posChild.p (), posChildTPC);
400+ qaRegistry.fill (HIST (" V0Child_neg/nSigmaTPC" ), negChild.p (), negChildTPC);
401+ qaRegistry.fill (HIST (" hBachelor/nSigmaTPC" ), bachelor.p (), bachelorTPC);
402+ if (!confCheckTOFBachelorOnly) {
403+ qaRegistry.fill (HIST (" V0Child_pos/nSigmaTOF" ), posChild.p (), posChildTOF);
404+ qaRegistry.fill (HIST (" V0Child_neg/nSigmaTOF" ), negChild.p (), negChildTOF);
405+ }
406+ qaRegistry.fill (HIST (" hBachelor/nSigmaTOF" ), bachelor.p (), bachelorTOF);
407+
408+ cascQAHistos.fillQA <false , true >(part);
409+
387410 } else {
388411 if ((posChild.pidCut () & (1u << CascChildTable[confCascType1][0 ])) == 0 || (negChild.pidCut () & (1u << CascChildTable[confCascType1][1 ])) == 0 || (bachelor.pidCut () & (1u << CascChildTable[confCascType1][2 ])) == 0 )
389412 continue ;
390413
391414 if ((!confCheckTOFBachelorOnly && ((posChild.pidCut () & (8u << CascChildTable[confCascType1][0 ])) == 0 || (negChild.pidCut () & (8u << CascChildTable[confCascType1][1 ])) == 0 )) || (bachelor.pidCut () & (8u << CascChildTable[confCascType1][2 ])) == 0 )
392415 continue ;
393416
394- if constexpr (std::experimental::is_detected<hasSigma, typename TableType::iterator>::value)
395- cascQAHistos.fillQA <false , true >(part);
396- else
397- cascQAHistos.fillQA <false , false >(part);
398-
399417 posChildHistos.fillQA <false , false >(posChild);
400418 negChildHistos.fillQA <false , false >(negChild);
401419 bachHistos.fillQABase <false , false >(bachelor, HIST (" hBachelor" ));
420+ cascQAHistos.fillQA <false , false >(part);
402421 }
403422 rXiQA.fill (HIST (" hInvMpTmult" ), part.pt (), part.mLambda (), multCol);
404423 }
0 commit comments