@@ -381,13 +381,13 @@ struct spectraKinkPiKa {
381381 Configurable<int > centestimator{" centestimator" , 0 , " Select multiplicity estimator: 0 - FT0C, 1 - FT0A, 2 - FT0M, 3 - FV0A, 4 - PVTracks" };
382382 Configurable<int > pid{" pidMother" , 321 , " " };
383383 Configurable<int > dpid{" pidDaughter" , 13 , " " };
384- Configurable<bool > d0pid{" dopid" , 0 , " " };
385384 Configurable<bool > dptCut{" dptCut" , 0 , " " };
386385 Configurable<bool > qa{" qa" , 0 , " " };
387386 Configurable<int > maxtpcncle{" maxtpcncle" , 0 , " max tpc find ncle" };
388387 Configurable<int > mintpcncle{" mintpcncle" , 0 , " min tpc find ncle" };
389388 Configurable<bool > onlykaon{" onlykaon" , 0 , " kaon" };
390389 Configurable<bool > onlypion{" onlypion" , 0 , " pion" };
390+ Configurable<bool > additionalhist{" additionalhist" , 1 , " additional histogram" };
391391
392392 ConfigurableAxis ptAxis{" ptAxis" , {150 , 0 , 15 }, " " };
393393 ConfigurableAxis qtAxis{" qtAxis" , {2000 , 0.0 , 2.0 }, " " };
@@ -470,6 +470,9 @@ struct spectraKinkPiKa {
470470 rpiKkink.add (" tr_tpcnclfindM_m" , " tpcnclfindm" , {HistType::kTH1F , {{300 , 0.0 , 300.0 }}});
471471 rpiKkink.add (" tr_tpcnclfindD_m" , " tpcnclfindd" , {HistType::kTH1F , {{300 , 0.0 , 300.0 }}});
472472 rpiKkink.add (" tr_itsChi2NClM_m" , " itsChi2NClm" , {HistType::kTH1F , {{200 , 0.0 , 200.0 }}});
473+
474+ rpiKkink.add (" h2_kinkradius_vs_pt_m" , " kinkradius_vs_pt" , {HistType::kTH2F , {{250 , 0.0 , 250.0 }, ptAxis}});
475+ rpiKkink.add (" h2_kinkradius_vs_ncl_m" , " kinkradius_vs_ncl" , {HistType::kTH2F , {{250 , 0.0 , 250.0 }, {300 , 0.0 , 300.0 }}});
473476 }
474477 if (doprocessMC) {
475478 rpiKkink.add (" h2_dau_pt_vs_eta_gen" , " pt_vs_eta_dau" , {HistType::kTH2F , {ptAxis, etaAxis}});
@@ -489,8 +492,6 @@ struct spectraKinkPiKa {
489492 rpiKkink.add (" h2_kink_angle_m" , " kink angle" , {HistType::kTH2F , {kinkAxis, multAxis}});
490493 rpiKkink.add (" h2_invmass_kaon_m" , " Inv mass vs Pt" , {HistType::kTH3F , {massAxis, ptAxis, ptAxis}});
491494 rpiKkink.add (" h2_kaon_mc_rec_m" , " h2_kaon_mc_rec_m" , HistType::kTHnSparseF , {massAxis, ptAxis, etaAxis, qtAxis, multAxis}, true );
492-
493- // qa
494495 }
495496 }
496497
@@ -576,14 +577,14 @@ struct spectraKinkPiKa {
576577
577578 rpiKkink.fill (HIST (" tr_chi2nclM" ), mothTrack.tpcChi2NCl ());
578579 rpiKkink.fill (HIST (" tr_chi2nclD" ), dauTrack.tpcChi2NCl ());
579- rpiKkink.fill (HIST (" tr_tpcnclfindM" ), mothTrack.tpcNClsFindable ());
580- rpiKkink.fill (HIST (" tr_tpcnclfindD" ), dauTrack.tpcNClsFindable ());
580+ rpiKkink.fill (HIST (" tr_tpcnclfindM" ), mothTrack.tpcNClsFound ());
581+ rpiKkink.fill (HIST (" tr_tpcnclfindD" ), dauTrack.tpcNClsFound ());
581582 rpiKkink.fill (HIST (" tr_itsChi2NClM" ), mothTrack.itsChi2NCl ());
582583 }
583584 if (mothTrack.tpcChi2NCl () > tpcChi2Cut)
584585 continue ;
585586
586- if (mothTrack.tpcNClsFindable () > maxtpcncle || mothTrack.tpcNClsFindable () < mintpcncle)
587+ if (mothTrack.tpcNClsFound () > maxtpcncle || mothTrack.tpcNClsFound () < mintpcncle)
587588 continue ;
588589
589590 if (std::abs (mothTrack.tpcNSigmaKa ()) < cutNSigmaKa) {
@@ -610,9 +611,9 @@ struct spectraKinkPiKa {
610611 rpiKkink.fill (HIST (" h2_kinkradius_vs_vz" ), kinkCand.zDecVtx (), radiusxy);
611612 rpiKkink.fill (HIST (" h2_kink_vx_vs_vy" ), kinkCand.xDecVtx (), kinkCand.yDecVtx ());
612613 rpiKkink.fill (HIST (" h2_kinkradius_vs_pt" ), radiusxy, v0.Pt ());
613- rpiKkink.fill (HIST (" h2_kinkradius_vs_ncl" ), radiusxy, mothTrack.tpcNClsFindable ());
614+ rpiKkink.fill (HIST (" h2_kinkradius_vs_ncl" ), radiusxy, mothTrack.tpcNClsFound ());
614615 }
615- if (kinkCand.dcaMothPv () > dcaXYcut)
616+ if (std::abs ( kinkCand.dcaMothPv () ) > dcaXYcut)
616617 continue ;
617618
618619 if (kinkCand.dcaKinkTopo () > dcaXYcutkink)
@@ -632,12 +633,14 @@ struct spectraKinkPiKa {
632633
633634 if (kaon && onlykaon && std::abs (v0.Rapidity ()) < rapCut) {
634635 v0.SetCoordinates (mothTrack.px (), mothTrack.py (), mothTrack.pz (), o2::constants::physics::MassKaonCharged);
635- rpiKkink.fill (HIST (" h2_moth_pt_vs_eta_rec" ), v0.Pt (), v0.Eta (), multiplicity);
636- rpiKkink.fill (HIST (" h2_dau_pt_vs_eta_rec" ), v1.Pt (), v1.Eta (), multiplicity);
637- rpiKkink.fill (HIST (" h2_pt_moth_vs_dau_rec" ), v0.Pt (), v1.Pt ());
638- rpiKkink.fill (HIST (" h2_kink_angle" ), kinkangle, multiplicity);
636+ if (additionalhist) {
637+ rpiKkink.fill (HIST (" h2_moth_pt_vs_eta_rec" ), v0.Pt (), v0.Eta (), multiplicity);
638+ rpiKkink.fill (HIST (" h2_dau_pt_vs_eta_rec" ), v1.Pt (), v1.Eta (), multiplicity);
639+ rpiKkink.fill (HIST (" h2_pt_moth_vs_dau_rec" ), v0.Pt (), v1.Pt ());
640+ rpiKkink.fill (HIST (" h2_kink_angle" ), kinkangle, multiplicity);
641+ rpiKkink.fill (HIST (" h2_qt_vs_pt" ), ptd, v1.Pt ());
642+ }
639643 double mass = computeMotherMass (v0, v1);
640- rpiKkink.fill (HIST (" h2_qt_vs_pt" ), ptd, v1.Pt ());
641644 rpiKkink.fill (HIST (" h2_kaon_data" ), mass, v0.Pt (), v0.Rapidity (), ptd, multiplicity);
642645
643646 if (qa && ptd > minqt && ptd < maxqt) {
@@ -650,26 +653,28 @@ struct spectraKinkPiKa {
650653
651654 rpiKkink.fill (HIST (" tr_chi2nclM_m" ), mothTrack.tpcChi2NCl ());
652655 rpiKkink.fill (HIST (" tr_chi2nclD_m" ), dauTrack.tpcChi2NCl ());
653- rpiKkink.fill (HIST (" tr_tpcnclfindM_m" ), mothTrack.tpcNClsFindable ());
654- rpiKkink.fill (HIST (" tr_tpcnclfindD_m" ), dauTrack.tpcNClsFindable ());
656+ rpiKkink.fill (HIST (" tr_tpcnclfindM_m" ), mothTrack.tpcNClsFound ());
657+ rpiKkink.fill (HIST (" tr_tpcnclfindD_m" ), dauTrack.tpcNClsFound ());
655658 rpiKkink.fill (HIST (" tr_itsChi2NClM_m" ), mothTrack.itsChi2NCl ());
656659
657660 rpiKkink.fill (HIST (" tr_dcaxyM_m" ), kinkCand.dcaMothPv ());
658661 rpiKkink.fill (HIST (" tr_dcaxyD_m" ), kinkCand.dcaDaugPv ());
659662 rpiKkink.fill (HIST (" tr_dcaxykink_topo_m" ), kinkCand.dcaKinkTopo ());
660663
661664 rpiKkink.fill (HIST (" h2_kinkradius_vs_pt" ), radiusxy, v0.Pt ());
662- rpiKkink.fill (HIST (" h2_kinkradius_vs_ncl" ), radiusxy, mothTrack.tpcNClsFindable ());
665+ rpiKkink.fill (HIST (" h2_kinkradius_vs_ncl" ), radiusxy, mothTrack.tpcNClsFound ());
663666 }
664667 }
665668 if (pion && onlypion && std::abs (v0.Rapidity ()) < rapCut) {
666- rpiKkink.fill (HIST (" h2_moth_pt_vs_eta_rec_pion" ), v0.Pt (), v0.Eta (), multiplicity);
667- rpiKkink.fill (HIST (" h2_dau_pt_vs_eta_rec_pion" ), v1.Pt (), v1.Eta (), multiplicity);
668- rpiKkink.fill (HIST (" h2_pt_moth_vs_dau_rec_pion" ), v0.Pt (), v1.Pt ());
669- rpiKkink.fill (HIST (" h2_kink_angle_pion" ), kinkangle, multiplicity);
670669 v0.SetCoordinates (mothTrack.px (), mothTrack.py (), mothTrack.pz (), o2::constants::physics::MassPionCharged);
670+ if (additionalhist) {
671+ rpiKkink.fill (HIST (" h2_moth_pt_vs_eta_rec_pion" ), v0.Pt (), v0.Eta (), multiplicity);
672+ rpiKkink.fill (HIST (" h2_dau_pt_vs_eta_rec_pion" ), v1.Pt (), v1.Eta (), multiplicity);
673+ rpiKkink.fill (HIST (" h2_pt_moth_vs_dau_rec_pion" ), v0.Pt (), v1.Pt ());
674+ rpiKkink.fill (HIST (" h2_kink_angle_pion" ), kinkangle, multiplicity);
675+ rpiKkink.fill (HIST (" h2_qt_vs_ptpion" ), ptd, v1.Pt ());
676+ }
671677 double mass = computeMotherMass (v0, v1);
672- rpiKkink.fill (HIST (" h2_qt_vs_ptpion" ), ptd, v1.Pt ());
673678 rpiKkink.fill (HIST (" h2_pion_data" ), mass, v0.Pt (), v0.Rapidity (), ptd, multiplicity);
674679 }
675680 }
@@ -724,14 +729,14 @@ struct spectraKinkPiKa {
724729
725730 rpiKkink.fill (HIST (" tr_chi2nclM" ), mothTrack.tpcChi2NCl ());
726731 rpiKkink.fill (HIST (" tr_chi2nclD" ), dauTrack.tpcChi2NCl ());
727- rpiKkink.fill (HIST (" tr_tpcnclfindM" ), mothTrack.tpcNClsFindable ());
728- rpiKkink.fill (HIST (" tr_tpcnclfindD" ), dauTrack.tpcNClsFindable ());
732+ rpiKkink.fill (HIST (" tr_tpcnclfindM" ), mothTrack.tpcNClsFound ());
733+ rpiKkink.fill (HIST (" tr_tpcnclfindD" ), dauTrack.tpcNClsFound ());
729734 rpiKkink.fill (HIST (" tr_itsChi2NClM" ), mothTrack.itsChi2NCl ());
730735 }
731736 if (mothTrack.tpcChi2NCl () > tpcChi2Cut)
732737 continue ;
733738
734- if (mothTrack.tpcNClsFindable () > maxtpcncle || mothTrack.tpcNClsFindable () < mintpcncle)
739+ if (mothTrack.tpcNClsFound () > maxtpcncle || mothTrack.tpcNClsFound () < mintpcncle)
735740 continue ;
736741
737742 bool kaon = false ;
@@ -756,9 +761,9 @@ struct spectraKinkPiKa {
756761 rpiKkink.fill (HIST (" h2_kink_vx_vs_vy" ), kinkCand.xDecVtx (), kinkCand.yDecVtx ());
757762
758763 rpiKkink.fill (HIST (" h2_kinkradius_vs_pt" ), radiusxy, v0.Pt ());
759- rpiKkink.fill (HIST (" h2_kinkradius_vs_ncl" ), radiusxy, mothTrack.tpcNClsFindable ());
764+ rpiKkink.fill (HIST (" h2_kinkradius_vs_ncl" ), radiusxy, mothTrack.tpcNClsFound ());
760765 }
761- if (kinkCand.dcaMothPv () > dcaXYcut)
766+ if (std::abs ( kinkCand.dcaMothPv () ) > dcaXYcut)
762767 continue ;
763768
764769 if (kinkCand.dcaKinkTopo () > dcaXYcutkink)
@@ -771,12 +776,12 @@ struct spectraKinkPiKa {
771776 float radToDeg = o2::constants::math::Rad2Deg;
772777 if (kinkangle * radToDeg < kinkanglecut)
773778 continue ;
774-
775- rpiKkink.fill (HIST (" h2_moth_pt_vs_eta_rec" ), v0.Pt (), v0.Eta (), multiplicity);
776- rpiKkink.fill (HIST (" h2_dau_pt_vs_eta_rec" ), v1.Pt (), v1.Eta (), multiplicity);
777- rpiKkink.fill (HIST (" h2_pt_moth_vs_dau_rec" ), v0.Pt (), v1.Pt ());
778- rpiKkink.fill (HIST (" h2_kink_angle" ), kinkangle, multiplicity);
779-
779+ if (additionalhist) {
780+ rpiKkink.fill (HIST (" h2_moth_pt_vs_eta_rec" ), v0.Pt (), v0.Eta (), multiplicity);
781+ rpiKkink.fill (HIST (" h2_dau_pt_vs_eta_rec" ), v1.Pt (), v1.Eta (), multiplicity);
782+ rpiKkink.fill (HIST (" h2_pt_moth_vs_dau_rec" ), v0.Pt (), v1.Pt ());
783+ rpiKkink.fill (HIST (" h2_kink_angle" ), kinkangle, multiplicity);
784+ }
780785 TVector3 pdlab (v1.Px (), v1.Py (), v1.Pz ());
781786 // Compute transverse component
782787 TVector3 motherDir (v0.Px (), v0.Py (), v0.Pz ());
@@ -796,6 +801,7 @@ struct spectraKinkPiKa {
796801
797802 auto mcTrackMoth = mcLabMoth.mcParticle_as <aod::McParticles>();
798803 auto mcTrackDau = mcLabDau.mcParticle_as <aod::McParticles>();
804+
799805 if (!mcTrackDau.has_mothers ()) {
800806 continue ;
801807 }
@@ -806,10 +812,12 @@ struct spectraKinkPiKa {
806812 if (std::abs (mcTrackMoth.pdgCode ()) != pid || std::abs (mcTrackDau.pdgCode ()) != dpid) {
807813 continue ;
808814 }
809- rpiKkink.fill (HIST (" h2_moth_pt_vs_eta_rec_m" ), v0.Pt (), v0.Eta (), multiplicity);
810- rpiKkink.fill (HIST (" h2_dau_pt_vs_eta_rec_m" ), v1.Pt (), v1.Eta (), multiplicity);
811- rpiKkink.fill (HIST (" h2_pt_moth_vs_dau_rec_m" ), v0.Pt (), v1.Pt ());
812- rpiKkink.fill (HIST (" h2_kink_angle_m" ), kinkangle, multiplicity);
815+ if (additionalhist) {
816+ rpiKkink.fill (HIST (" h2_moth_pt_vs_eta_rec_m" ), v0.Pt (), v0.Eta (), multiplicity);
817+ rpiKkink.fill (HIST (" h2_dau_pt_vs_eta_rec_m" ), v1.Pt (), v1.Eta (), multiplicity);
818+ rpiKkink.fill (HIST (" h2_pt_moth_vs_dau_rec_m" ), v0.Pt (), v1.Pt ());
819+ rpiKkink.fill (HIST (" h2_kink_angle_m" ), kinkangle, multiplicity);
820+ }
813821 rpiKkink.fill (HIST (" h2_kaon_mc_rec_m" ), mass, v0.Pt (), v0.Rapidity (), ptd, multiplicity);
814822
815823 if (qa && ptd > minqt && ptd < maxqt) {
@@ -822,16 +830,16 @@ struct spectraKinkPiKa {
822830
823831 rpiKkink.fill (HIST (" tr_chi2nclM_m" ), mothTrack.tpcChi2NCl ());
824832 rpiKkink.fill (HIST (" tr_chi2nclD_m" ), dauTrack.tpcChi2NCl ());
825- rpiKkink.fill (HIST (" tr_tpcnclfindM_m" ), mothTrack.tpcNClsFindable ());
826- rpiKkink.fill (HIST (" tr_tpcnclfindD_m" ), dauTrack.tpcNClsFindable ());
833+ rpiKkink.fill (HIST (" tr_tpcnclfindM_m" ), mothTrack.tpcNClsFound ());
834+ rpiKkink.fill (HIST (" tr_tpcnclfindD_m" ), dauTrack.tpcNClsFound ());
827835 rpiKkink.fill (HIST (" tr_itsChi2NClM_m" ), mothTrack.itsChi2NCl ());
828836
829837 rpiKkink.fill (HIST (" tr_dcaxyM_m" ), kinkCand.dcaMothPv ());
830838 rpiKkink.fill (HIST (" tr_dcaxyD_m" ), kinkCand.dcaDaugPv ());
831839 rpiKkink.fill (HIST (" tr_dcaxykink_topo_m" ), kinkCand.dcaKinkTopo ());
832840
833841 rpiKkink.fill (HIST (" h2_kinkradius_vs_pt_m" ), radiusxy, v0.Pt ());
834- rpiKkink.fill (HIST (" h2_kinkradius_vs_ncl_m" ), radiusxy, mothTrack.tpcNClsFindable ());
842+ rpiKkink.fill (HIST (" h2_kinkradius_vs_ncl_m" ), radiusxy, mothTrack.tpcNClsFound ());
835843 }
836844 }
837845 }
@@ -842,13 +850,10 @@ struct spectraKinkPiKa {
842850 ROOT::Math::PxPyPzMVector v0;
843851 ROOT::Math::PxPyPzMVector v1;
844852
845- if (!d0pid && (std::abs (mcPart.pdgCode ()) != pid || std::abs (mcPart.eta ()) > etaCut)) {
846- continue ;
847- }
848- bool isDmeson = std::abs (mcPart.pdgCode ()) == kD0 || std::abs (mcPart.pdgCode ()) == kDPlus || std::abs (mcPart.pdgCode ()) == kDStar ;
849- if (d0pid && (!isDmeson || std::abs (mcPart.eta ()) > etaCut)) {
853+ if (std::abs (mcPart.pdgCode ()) != pid) {
850854 continue ;
851855 }
856+
852857 if (!mcPart.has_daughters ()) {
853858 continue ; // Skip if no daughters
854859 }
@@ -863,27 +868,27 @@ struct spectraKinkPiKa {
863868 if (!hasKaonpionDaughter) {
864869 continue ; // Skip if no muon daughter found
865870 }
866- if (!d0pid && pid == kKPlus ) {
871+ if (pid == kKPlus ) {
867872 v0.SetCoordinates (mcPart.px (), mcPart.py (), mcPart.pz (), o2::constants::physics::MassKaonCharged);
868873 }
869874
870- if (!d0pid && pid == kPiPlus ) {
875+ if (pid == kPiPlus ) {
871876 v0.SetCoordinates (mcPart.px (), mcPart.py (), mcPart.pz (), o2::constants::physics::MassPionCharged);
872877 }
873- if (d0pid) {
874- v0.SetCoordinates (mcPart.px (), mcPart.py (), mcPart.pz (), o2::constants::physics::MassD0);
875- }
878+
876879 float pMoth = v0.P ();
877880 float pDaug = v1.P ();
878881 float spKink = v0.Px () * v1.Px () + v0.Py () * v1.Py () + v0.Pz () * v1.Pz ();
879882 float kinkangle = std::acos (spKink / (pMoth * pDaug));
880883 float radToDeg = o2::constants::math::Rad2Deg;
881884 if (kinkangle * radToDeg < kinkanglecut)
882885 continue ;
883- rpiKkink.fill (HIST (" h2_moth_pt_vs_eta_gen" ), v0.Pt (), v0.Eta ());
884- rpiKkink.fill (HIST (" h2_dau_pt_vs_eta_gen" ), v1.Pt (), v1.Eta ());
885- rpiKkink.fill (HIST (" h2_pt_moth_vs_dau_gen" ), v0.Pt (), v1.Pt ());
886- rpiKkink.fill (HIST (" h2_kink_angle_gen" ), kinkangle);
886+ if (additionalhist) {
887+ rpiKkink.fill (HIST (" h2_moth_pt_vs_eta_gen" ), v0.Pt (), v0.Eta ());
888+ rpiKkink.fill (HIST (" h2_dau_pt_vs_eta_gen" ), v1.Pt (), v1.Eta ());
889+ rpiKkink.fill (HIST (" h2_pt_moth_vs_dau_gen" ), v0.Pt (), v1.Pt ());
890+ rpiKkink.fill (HIST (" h2_kink_angle_gen" ), kinkangle);
891+ }
887892 TVector3 pdlab (v1.Px (), v1.Py (), v1.Pz ());
888893 // Compute transverse component
889894 TVector3 motherDir (v0.Px (), v0.Py (), v0.Pz ());
0 commit comments