From 0c38d2957ddfb4b568e5404ce7cecceea106d01e Mon Sep 17 00:00:00 2001 From: Yash Patley <52608802+yashpatley@users.noreply.github.com> Date: Thu, 22 Oct 2026 20:07:25 +0530 Subject: [PATCH] [PWGCF] lambda R2 correlation update for on the fly MC Removed daughter particle check from MC Gen process --- .../Tasks/lambdaR2Correlation.cxx | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx b/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx index 0b25d067843..1cddee698c9 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx @@ -926,7 +926,34 @@ struct LambdaTableProducer { void processMCGen(aod::McCollisions::iterator const& mcCollision, aod::McParticles const& mcParticles) { - fillLambdaMcGenTables(mcCollision, mcParticles); + // Fill McGen Collision Table + lambdaMCGenCollisionTable(cent, mcCollision.posX(), mcCollision.posY(), mcCollision.posZ()); + + // initialize track objects + ParticleType partType = kLambda; + + // Loop over MC particles + for (auto const& mcpart : mcParticles) { + // Check for Primary Lambda/Anti-Lambda + if (mcpart.isPhysicalPrimary() && mcpart.pdgCode() == kLambda0) { + partType = kLambda; + } else if (mcpart.isPhysicalPrimary() && mcpart.pdgCode() == kLambda0Bar) { + partType = kAntiLambda; + } else { + continue; + } + + // Kinematic selection + if (mcpart.pt() <= cLambdaMinPt || mcpart.pt() >= cLambdaMaxPt || std::abs(mcpart.y()) >= cLambdaRapCut) { + continue; + } + + histos.fill(HIST("Tracks/h1f_lambda_info"), kGenTotAccLambda); + + // Fill table + lambdaMCGenTrackTable(lambdaMCGenCollisionTable.lastIndex(), mcpart.pt(), mcpart.eta(), mcpart.phi(), mcpart.y(), mcpart.px(), mcpart.py(), mcpart.pz(), RecoDecay::m(mcpart.p(), mcpart.e()), + -1, -1, (int8_t)partType, 1.); + } } PROCESS_SWITCH(LambdaTableProducer, processMCGen, "Process for MC Gen", false);