Skip to content

Commit b81a350

Browse files
authored
[PWGCF] lambda R2 correlation update for on the fly MC (#18415)
1 parent b6e8f90 commit b81a350

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

‎PWGCF/TwoParticleCorrelations/Tasks/lambdaR2Correlation.cxx‎

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,34 @@ struct LambdaTableProducer {
926926

927927
void processMCGen(aod::McCollisions::iterator const& mcCollision, aod::McParticles const& mcParticles)
928928
{
929-
fillLambdaMcGenTables(mcCollision, mcParticles);
929+
// Fill McGen Collision Table
930+
lambdaMCGenCollisionTable(cent, mcCollision.posX(), mcCollision.posY(), mcCollision.posZ());
931+
932+
// initialize track objects
933+
ParticleType partType = kLambda;
934+
935+
// Loop over MC particles
936+
for (auto const& mcpart : mcParticles) {
937+
// Check for Primary Lambda/Anti-Lambda
938+
if (mcpart.isPhysicalPrimary() && mcpart.pdgCode() == kLambda0) {
939+
partType = kLambda;
940+
} else if (mcpart.isPhysicalPrimary() && mcpart.pdgCode() == kLambda0Bar) {
941+
partType = kAntiLambda;
942+
} else {
943+
continue;
944+
}
945+
946+
// Kinematic selection
947+
if (mcpart.pt() <= cLambdaMinPt || mcpart.pt() >= cLambdaMaxPt || std::abs(mcpart.y()) >= cLambdaRapCut) {
948+
continue;
949+
}
950+
951+
histos.fill(HIST("Tracks/h1f_lambda_info"), kGenTotAccLambda);
952+
953+
// Fill table
954+
lambdaMCGenTrackTable(lambdaMCGenCollisionTable.lastIndex(), mcpart.pt(), mcpart.eta(), mcpart.phi(), mcpart.y(), mcpart.px(), mcpart.py(), mcpart.pz(), RecoDecay::m(mcpart.p(), mcpart.e()),
955+
-1, -1, (int8_t)partType, 1.);
956+
}
930957
}
931958

932959
PROCESS_SWITCH(LambdaTableProducer, processMCGen, "Process for MC Gen", false);

0 commit comments

Comments
 (0)