From 4be3a84a60541f1c011f3aaaf48b8daec25a753e Mon Sep 17 00:00:00 2001 From: ZFederica Date: Mon, 13 May 2024 11:17:10 +0200 Subject: [PATCH 1/3] Add TF and ITSROF borders cut --- PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx index a7dd54f4445..15a796ce6ee 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx @@ -670,6 +670,7 @@ struct HfCandidateCreatorXic0Omegac0Mc { Produces rowMCMatchRecToOmegaK; Produces rowMCMatchGenToOmegaK; + Configurable rejGenTFAndITSROFBorders{"rejGenTFAndITSROFBorders", true, "Reject generated particles coming from bc close to TF and ITSROF borders"}; float zPvPosMax{1000.f}; // inspect for which zPvPosMax cut was set for reconstructed @@ -890,6 +891,15 @@ struct HfCandidateCreatorXic0Omegac0Mc { debugGenLambda = 0; origin = RecoDecay::OriginType::None; + // accept only mc particles coming from bc that are far away from TF border and ITSROFrame + if (rejGenTFAndITSROFBorders) { + auto coll = particle.mcCollision_as(); + auto bc = coll.bc_as(); + if (!bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) || !bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + rowMCMatchGen(flag, debugGenCharmBar, debugGenXi, debugGenLambda, ptCharmBaryonGen, etaCharmBaryonGen, origin);; + } + } + auto mcCollision = particle.mcCollision(); float zPv = mcCollision.posZ(); if (zPv < -zPvPosMax || zPv > zPvPosMax) { // to avoid counting particles in collisions with Zvtx larger than the maximum, we do not match them From 0e14813d8cb4f601d1cdbb20d83f70c8be1407d8 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 13 May 2024 09:19:30 +0000 Subject: [PATCH 2/3] Please consider the following formatting changes --- PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx index 15a796ce6ee..885a5a3e383 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx @@ -896,7 +896,8 @@ struct HfCandidateCreatorXic0Omegac0Mc { auto coll = particle.mcCollision_as(); auto bc = coll.bc_as(); if (!bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) || !bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { - rowMCMatchGen(flag, debugGenCharmBar, debugGenXi, debugGenLambda, ptCharmBaryonGen, etaCharmBaryonGen, origin);; + rowMCMatchGen(flag, debugGenCharmBar, debugGenXi, debugGenLambda, ptCharmBaryonGen, etaCharmBaryonGen, origin); + ; } } From 5349846fd1cd62b24dbfe290632cf8d0d2cc4ec8 Mon Sep 17 00:00:00 2001 From: ZFederica Date: Mon, 13 May 2024 13:50:43 +0200 Subject: [PATCH 3/3] Fix build error --- .../candidateCreatorXic0Omegac0.cxx | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx index 885a5a3e383..d1698f55c85 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx @@ -673,6 +673,8 @@ struct HfCandidateCreatorXic0Omegac0Mc { Configurable rejGenTFAndITSROFBorders{"rejGenTFAndITSROFBorders", true, "Reject generated particles coming from bc close to TF and ITSROF borders"}; float zPvPosMax{1000.f}; + using BCsInfo = soa::Join; + // inspect for which zPvPosMax cut was set for reconstructed void init(InitContext& initContext) { @@ -695,7 +697,8 @@ struct HfCandidateCreatorXic0Omegac0Mc { aod::TracksWMc const&, aod::McParticles const& mcParticles, aod::McCollisions const&, - aod::McCollisionLabels const&) + aod::McCollisionLabels const&, + BCsInfo const&) { float ptCharmBaryonGen = -999.; float etaCharmBaryonGen = -999.; @@ -896,8 +899,15 @@ struct HfCandidateCreatorXic0Omegac0Mc { auto coll = particle.mcCollision_as(); auto bc = coll.bc_as(); if (!bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) || !bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { - rowMCMatchGen(flag, debugGenCharmBar, debugGenXi, debugGenLambda, ptCharmBaryonGen, etaCharmBaryonGen, origin); - ; + if constexpr (decayChannel == aod::hf_cand_xic0_omegac0::DecayType::XiczeroToXiPi) { + rowMCMatchGenXicToXiPi(flag, debugGenCharmBar, debugGenCasc, debugGenLambda, ptCharmBaryonGen, etaCharmBaryonGen, origin); + } else if constexpr (decayChannel == aod::hf_cand_xic0_omegac0::DecayType::OmegaczeroToXiPi) { + rowMCMatchGenOmegacToXiPi(flag, debugGenCharmBar, debugGenCasc, debugGenLambda, ptCharmBaryonGen, etaCharmBaryonGen, origin); + } else if constexpr (decayChannel == aod::hf_cand_xic0_omegac0::DecayType::OmegaczeroToOmegaPi) { + rowMCMatchGenToOmegaPi(flag, debugGenCharmBar, debugGenCasc, debugGenLambda, ptCharmBaryonGen, etaCharmBaryonGen, origin); + } else if constexpr (decayChannel == aod::hf_cand_xic0_omegac0::DecayType::OmegaczeroToOmegaK) { + rowMCMatchGenToOmegaK(flag, debugGenCharmBar, debugGenCasc, debugGenLambda, ptCharmBaryonGen, etaCharmBaryonGen, origin); + } } } @@ -1057,9 +1067,10 @@ struct HfCandidateCreatorXic0Omegac0Mc { aod::TracksWMc const& tracks, aod::McParticles const& mcParticles, aod::McCollisions const& mcColls, - aod::McCollisionLabels const& mcLabels) + aod::McCollisionLabels const& mcLabels, + BCsInfo const& bcs) { - runXic0Omegac0Mc(candidates, tracks, mcParticles, mcColls, mcLabels); + runXic0Omegac0Mc(candidates, tracks, mcParticles, mcColls, mcLabels, bcs); } PROCESS_SWITCH(HfCandidateCreatorXic0Omegac0Mc, processMcXicToXiPi, "Run Xic0 to xi pi MC process function", false); @@ -1067,9 +1078,10 @@ struct HfCandidateCreatorXic0Omegac0Mc { aod::TracksWMc const& tracks, aod::McParticles const& mcParticles, aod::McCollisions const& mcColls, - aod::McCollisionLabels const& mcLabels) + aod::McCollisionLabels const& mcLabels, + BCsInfo const& bcs) { - runXic0Omegac0Mc(candidates, tracks, mcParticles, mcColls, mcLabels); + runXic0Omegac0Mc(candidates, tracks, mcParticles, mcColls, mcLabels, bcs); } PROCESS_SWITCH(HfCandidateCreatorXic0Omegac0Mc, processMcOmegacToXiPi, "Run Omegac0 to xi pi MC process function", false); @@ -1077,9 +1089,10 @@ struct HfCandidateCreatorXic0Omegac0Mc { aod::TracksWMc const& tracks, aod::McParticles const& mcParticles, aod::McCollisions const& mcColls, - aod::McCollisionLabels const& mcLabels) + aod::McCollisionLabels const& mcLabels, + BCsInfo const& bcs) { - runXic0Omegac0Mc(candidates, tracks, mcParticles, mcColls, mcLabels); + runXic0Omegac0Mc(candidates, tracks, mcParticles, mcColls, mcLabels, bcs); } PROCESS_SWITCH(HfCandidateCreatorXic0Omegac0Mc, processMcOmegacToOmegaPi, "Run Omegac0 to omega pi MC process function", false); @@ -1087,9 +1100,10 @@ struct HfCandidateCreatorXic0Omegac0Mc { aod::TracksWMc const& tracks, aod::McParticles const& mcParticles, aod::McCollisions const& mcColls, - aod::McCollisionLabels const& mcLabels) + aod::McCollisionLabels const& mcLabels, + BCsInfo const& bcs) { - runXic0Omegac0Mc(candidates, tracks, mcParticles, mcColls, mcLabels); + runXic0Omegac0Mc(candidates, tracks, mcParticles, mcColls, mcLabels, bcs); } PROCESS_SWITCH(HfCandidateCreatorXic0Omegac0Mc, processMcOmegacToOmegaK, "Run Omegac0 to omega K MC process function", false);