@@ -468,6 +468,8 @@ struct V0ReducedCandProducer {
468468 } lambdaConfigs;
469469 } v0Configs;
470470
471+ Configurable<std::vector<double >> binspTXi{" binspTXi" , {0.8 , 1.2 , 1.6 , 2.0 , 2.5 , 3.0 , 4.0 , 6.0 }, " pT bin limits for Xi" };
472+
471473 // Constants
472474 static constexpr double MassK0S = o2::constants::physics::MassK0Short;
473475 static constexpr double MassLambda = o2::constants::physics::MassLambda0;
@@ -500,12 +502,16 @@ struct V0ReducedCandProducer {
500502 AxisSpec binnedmultAxis{(std::vector<double >)binsMult, " centFT0M" };
501503 AxisSpec binnedpTK0SAxis{(std::vector<double >)v0Configs.k0sConfigs .binspTK0S , " #it{p}_{T} (GeV/#it{c})" };
502504 AxisSpec binnedpTLambdaAxis{(std::vector<double >)v0Configs.lambdaConfigs .binspTLambda , " #it{p}_{T} (GeV/#it{c})" };
505+ AxisSpec binnedpTXiAxis{(std::vector<double >)binspTXi, " #it{p}_{T} (GeV/#it{c})" };
503506 AxisSpec massK0SAxis = {200 , 0 .45f , 0 .55f , " #it{M}_{inv} [GeV/#it{c}^{2}]" };
504507 AxisSpec massLambdaAxis = {200 , 1 .08f , 1 .15f , " #it{M}_{inv} [GeV/#it{c}^{2}]" };
505508
506509 histos.add (" h3K0sCandidatesMass" , " K^{0}_{S} candidate invariant mass" , kTH3F , {binnedmultAxis, binnedpTK0SAxis, massK0SAxis});
507510 histos.add (" h3LambdaCandidatesMass" , " #Lambda candidate invariant mass" , kTH3F , {binnedmultAxis, binnedpTLambdaAxis, massLambdaAxis});
508511 histos.add (" h3AntiLambdaCandidatesMass" , " #bar{#Lambda} candidate invariant mass" , kTH3F , {binnedmultAxis, binnedpTLambdaAxis, massLambdaAxis});
512+
513+ histos.add (" h2LambdaFromXi" , " #Lambda from #Xi" , kTH2F , {binnedpTLambdaAxis, binnedpTXiAxis});
514+ histos.add (" h2AntiLambdaFromXi" , " #bar{#Lambda} from #Xi" , kTH2F , {binnedpTLambdaAxis, binnedpTXiAxis});
509515 }
510516
511517 template <V0Type v0Type>
@@ -641,7 +647,31 @@ struct V0ReducedCandProducer {
641647
642648 const auto & mcParticles = mcParticlesOpt->get ();
643649 const auto & v0McParticle = mcParticles.rawIteratorAt (v0.mcParticleId ());
644- if (v0McParticle.pdgCode () != getPdgCode<v0Type>() || !v0McParticle.isPhysicalPrimary ()) {
650+ // if (v0McParticle.pdgCode() != getPdgCode<v0Type>() || !v0McParticle.isPhysicalPrimary()) {
651+ // return;
652+ // }
653+ if (v0McParticle.pdgCode () != getPdgCode<v0Type>()) {
654+ return ;
655+ }
656+
657+ if constexpr ((v0Type == kLambda || v0Type == kAntiLambda )) {
658+ if (v0.has_mcMotherParticle ()) {
659+ auto v0McMotherParticle = mcParticles.rawIteratorAt (v0.mcMotherParticleId ());
660+ if (std::abs (v0McMotherParticle.y ()) <= v0Configs.yAcceptance ) {
661+ if constexpr (v0Type == kLambda ) {
662+ if (v0McMotherParticle.pdgCode () == PDG_t::kXiMinus || v0McMotherParticle.pdgCode () == o2::constants::physics::Pdg::kXi0 ) {
663+ histos.fill (HIST (" h2LambdaFromXi" ), v0McParticle.pt (), v0McMotherParticle.pt ());
664+ }
665+ } else if constexpr (v0Type == kAntiLambda ) {
666+ if (v0McMotherParticle.pdgCode () == PDG_t::kXiPlusBar || v0McMotherParticle.pdgCode () == o2::constants::physics::Pdg::kXi0 ) {
667+ histos.fill (HIST (" h2AntiLambdaFromXi" ), v0McParticle.pt (), v0McMotherParticle.pt ());
668+ }
669+ }
670+ }
671+ }
672+ }
673+
674+ if (!v0McParticle.isPhysicalPrimary ()) {
645675 return ;
646676 }
647677
0 commit comments