@@ -115,6 +115,8 @@ struct sigmaminustask {
115115 rFindable.add (" hFilterIndex" , " hFilterIndex" , {HistType::kTH1F , {filtersAxis}});
116116 rFindable.add (" h2MCRadiusFilterIndex" , " h2MCRadiusFilterIndex" , {HistType::kTH2F , {filtersAxis, radiusAxis}});
117117 rFindable.add (" h2RecRadiusFilterIndex" , " h2RecRadiusFilterIndex" , {HistType::kTH2F , {filtersAxis, radiusAxis}});
118+ rFindable.add (" h2MCRadiusFilter_protonkink" , " h2MCRadiusFilter_protonkink" , {HistType::kTH2F , {filtersAxis, radiusAxis}});
119+ rFindable.add (" h2MCRadiusFilter_pikink" , " h2MCRadiusFilter_pikink" , {HistType::kTH2F , {filtersAxis, radiusAxis}});
118120 }
119121 }
120122
@@ -297,6 +299,18 @@ struct sigmaminustask {
297299
298300 PROCESS_SWITCH (sigmaminustask, processMC, " MC processing" , false );
299301
302+ void fillFindableHistograms (int filterIndex, float mcRadius, float recRadius, bool isPiDaughter) {
303+ rFindable.fill (HIST (" hFilterIndex" ), filterIndex);
304+ rFindable.fill (HIST (" h2MCRadiusFilterIndex" ), filterIndex, mcRadius);
305+ rFindable.fill (HIST (" h2RecRadiusFilterIndex" ), filterIndex, recRadius);
306+
307+ if (isPiDaughter) {
308+ rFindable.fill (HIST (" h2MCRadiusFilter_pikink" ), filterIndex, mcRadius);
309+ } else {
310+ rFindable.fill (HIST (" h2MCRadiusFilter_protonkink" ), filterIndex, mcRadius);
311+ }
312+ }
313+
300314 void processFindable (aod::KinkCands const & kinkCands, aod::McTrackLabels const & trackLabelsMC, aod::McParticles const & particlesMC,
301315 TracksFull const & tracks, CollisionsFullMC const & mcCollisions){
302316 // A - generated findable track pairs map: mcMother.globalIndex() -> (motherTrack.globalIndex(), daughterTrack.globalIndex())
@@ -382,6 +396,7 @@ struct sigmaminustask {
382396 // Compute mass and radii
383397 float mcMass = std::sqrt (mcMother.e () * mcMother.e () - mcMother.p () * mcMother.p ());
384398 int sigmaSign = mcMother.pdgCode () > 0 ? 1 : -1 ;
399+ bool isPiDaughter = std::abs (mcDaughter.pdgCode ()) == 211 ;
385400 float mcRadius = std::sqrt ((mcMother.vx () - mcDaughter.vx ()) * (mcMother.vx () - mcDaughter.vx ()) +
386401 (mcMother.vy () - mcDaughter.vy ()) * (mcMother.vy () - mcDaughter.vy ()));
387402 float recRadius = -1.0 ;
@@ -394,17 +409,14 @@ struct sigmaminustask {
394409
395410 // Define filter index and progressively apply kinkbuilder cuts to track pairs
396411 int filterIndex = 0 ;
397- rFindable.fill (HIST (" hFilterIndex" ), filterIndex);
398- rFindable.fill (HIST (" h2MCRadiusFilterIndex" ), filterIndex, mcRadius);
399- rFindable.fill (HIST (" h2RecRadiusFilterIndex" ), filterIndex, recRadius);
412+ fillFindableHistograms (filterIndex, mcRadius, recRadius, isPiDaughter);
400413
401414 // 1 - tracks with right ITS, TPC, TOF signals
402415 if (motherTrack.has_collision () && motherTrack.hasITS () && !motherTrack.hasTPC () && !motherTrack.hasTOF () &&
403416 daughterTrack.hasITS () && daughterTrack.hasTPC ()) {
404417 filterIndex += 1 ;
405- rFindable.fill (HIST (" hFilterIndex" ), filterIndex);
406- rFindable.fill (HIST (" h2MCRadiusFilterIndex" ), filterIndex, mcRadius);
407- rFindable.fill (HIST (" h2RecRadiusFilterIndex" ), filterIndex, recRadius);
418+ fillFindableHistograms (filterIndex, mcRadius, recRadius, isPiDaughter);
419+
408420 } else {
409421 continue ;
410422 }
@@ -413,18 +425,16 @@ struct sigmaminustask {
413425 if (motherTrack.itsNCls () < 6 &&
414426 motherTrack.itsNClsInnerBarrel () == 3 && motherTrack.itsChi2NCl () < 36 ) {
415427 filterIndex += 1 ;
416- rFindable.fill (HIST (" hFilterIndex" ), filterIndex);
417- rFindable.fill (HIST (" h2MCRadiusFilterIndex" ), filterIndex, mcRadius);
418- rFindable.fill (HIST (" h2RecRadiusFilterIndex" ), filterIndex, recRadius);
428+ fillFindableHistograms (filterIndex, mcRadius, recRadius, isPiDaughter);
429+
419430 } else {
420431 continue ;
421432 }
422433
423434 if (motherTrack.pt () > KBminPtMoth) {
424435 filterIndex += 1 ;
425- rFindable.fill (HIST (" hFilterIndex" ), filterIndex);
426- rFindable.fill (HIST (" h2MCRadiusFilterIndex" ), filterIndex, mcRadius);
427- rFindable.fill (HIST (" h2RecRadiusFilterIndex" ), filterIndex, recRadius);
436+ fillFindableHistograms (filterIndex, mcRadius, recRadius, isPiDaughter);
437+
428438 } else {
429439 continue ;
430440 }
@@ -433,39 +443,35 @@ struct sigmaminustask {
433443 if (daughterTrack.itsNClsInnerBarrel () == 0 && daughterTrack.itsNCls () < 4 &&
434444 daughterTrack.tpcNClsCrossedRows () > 0.8 * daughterTrack.tpcNClsFindable () && daughterTrack.tpcNClsFound () > KBnTPCClusMinDaug) {
435445 filterIndex += 1 ;
436- rFindable.fill (HIST (" hFilterIndex" ), filterIndex);
437- rFindable.fill (HIST (" h2MCRadiusFilterIndex" ), filterIndex, mcRadius);
438- rFindable.fill (HIST (" h2RecRadiusFilterIndex" ), filterIndex, recRadius);
446+ fillFindableHistograms (filterIndex, mcRadius, recRadius, isPiDaughter);
447+
439448 } else {
440449 continue ;
441450 }
442451
443452 // 5 - geometric cuts: eta
444453 if (std::abs (motherTrack.eta ()) < KBetaMax && std::abs (daughterTrack.eta ()) < KBetaMax) {
445454 filterIndex += 1 ;
446- rFindable.fill (HIST (" hFilterIndex" ), filterIndex);
447- rFindable.fill (HIST (" h2MCRadiusFilterIndex" ), filterIndex, mcRadius);
448- rFindable.fill (HIST (" h2RecRadiusFilterIndex" ), filterIndex, recRadius);
455+ fillFindableHistograms (filterIndex, mcRadius, recRadius, isPiDaughter);
456+
449457 } else {
450458 continue ;
451459 }
452460
453461 // 6 - geometric cuts: phi difference
454462 if (std::abs (motherTrack.phi () - daughterTrack.phi ()) * radToDeg < KBmaxPhiDiff) {
455463 filterIndex += 1 ;
456- rFindable.fill (HIST (" hFilterIndex" ), filterIndex);
457- rFindable.fill (HIST (" h2MCRadiusFilterIndex" ), filterIndex, mcRadius);
458- rFindable.fill (HIST (" h2RecRadiusFilterIndex" ), filterIndex, recRadius);
464+ fillFindableHistograms (filterIndex, mcRadius, recRadius, isPiDaughter);
465+
459466 } else {
460467 continue ;
461468 }
462469
463470 // 7 - radius cut
464471 if (recRadius > KBradiusCut) {
465472 filterIndex += 1 ;
466- rFindable.fill (HIST (" hFilterIndex" ), filterIndex);
467- rFindable.fill (HIST (" h2MCRadiusFilterIndex" ), filterIndex, mcRadius);
468- rFindable.fill (HIST (" h2RecRadiusFilterIndex" ), filterIndex, recRadius);
473+ fillFindableHistograms (filterIndex, mcRadius, recRadius, isPiDaughter);
474+
469475 } else {
470476 continue ;
471477 }
@@ -474,11 +480,16 @@ struct sigmaminustask {
474480 auto collision = motherTrack.template collision_as <CollisionsFullMC>();
475481 if (!(std::abs (collision.posZ ()) > cutzvertex || !collision.sel8 ())) {
476482 filterIndex += 1 ;
477- rFindable.fill (HIST (" hFilterIndex" ), filterIndex);
478- rFindable.fill (HIST (" h2MCRadiusFilterIndex" ), filterIndex, mcRadius);
479- rFindable.fill (HIST (" h2RecRadiusFilterIndex" ), filterIndex, recRadius);
483+ fillFindableHistograms (filterIndex, mcRadius, recRadius, isPiDaughter);
484+
480485 }
481486
487+ // 9 - TOF daughter presence
488+ if (daughterTrack.hasTOF ()) {
489+ filterIndex += 1 ;
490+ fillFindableHistograms (filterIndex, mcRadius, recRadius, isPiDaughter);
491+
492+ }
482493 }
483494 }
484495
@@ -492,10 +503,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
492503}
493504
494505// Next steps:
495- // 0. Resolution histograms should have relative values, not absolute: OK
496- // 1. New h2 with genRadius (recRadius) vs FilterIndex: OK
497- // 2. Get recRadius through a map on kinkCands, put a negative value if the candidate is not reconstructed: OK
498- // 2.1 Consider adding step in filters with the cuts on radius: OK
499- // 2.2 Add h2 of radius resolution vs pt: OK
500- // 3. Rewrite the findable method using maps to avoid the nested loop: OK
501506// 4. For generated h2, avoid mass axis, use a bool axis to easily distinguish sigma minus and sigma plus
0 commit comments