From a7ef9ba94d4e5ffcab918f8669d4b2ae73a4c5a0 Mon Sep 17 00:00:00 2001 From: jesgum Date: Thu, 23 Jul 2026 13:53:11 +0200 Subject: [PATCH 1/3] Add Xi0, Sigma+, and Sigma- to otf decayer --- ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx | 24 ++++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx b/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx index 4340bf9bc33..0fd2ab3aa27 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx @@ -47,13 +47,18 @@ using namespace o2; using namespace o2::framework; -static constexpr int NumDecays = 7; +static constexpr int NumDecays = 12; static constexpr int NumParameters = 1; -static constexpr int DefaultParameters[NumDecays][NumParameters]{{1}, {1}, {1}, {1}, {1}, {1}, {1}}; +static constexpr std::array, NumDecays> DefaultParameters{{{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}}}; static const std::vector parameterNames{"enable"}; static const std::vector particleNames{"K0s", "Lambda", "Anti-Lambda", + "SigmaPlus", + "Anti-SigmaPlus", + "SigmaMinus", + "Anti-SigmaMinus", + "Xi0", "Xi", "Anti-Xi", "Omega", @@ -62,6 +67,11 @@ static const std::vector particleNames{"K0s", static const std::vector pdgCodes{PDG_t::kK0Short, PDG_t::kLambda0, PDG_t::kLambda0Bar, + PDG_t::kSigmaPlus, + PDG_t::kSigmaBarMinus, + PDG_t::kSigmaMinus, + PDG_t::kSigmaBarPlus, + o2::constants::physics::kXi0, PDG_t::kXiMinus, PDG_t::kXiPlusBar, PDG_t::kOmegaMinus, @@ -78,13 +88,13 @@ struct OnTheFlyDecayer { Produces tableOTFDecayerBits; o2::upgrade::Decayer decayer; - Service pdgDB; + Service pdgDB{}; HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; Configurable seed{"seed", 0, "Set seed for particle decayer"}; Configurable magneticField{"magneticField", 20., "Magnetic field (kG)"}; Configurable> enabledDecays{"enabledDecays", - {DefaultParameters[0], NumDecays, NumParameters, particleNames, parameterNames}, + {DefaultParameters[0].data(), NumDecays, NumParameters, particleNames, parameterNames}, "Enable option for particle to be decayed: 0 - no, 1 - yes"}; std::size_t indexOffset = 0; @@ -99,7 +109,7 @@ struct OnTheFlyDecayer { decayer.setSeed(seed); decayer.setBField(magneticField); for (int i = 0; i < NumDecays; ++i) { - if (enabledDecays->get(particleNames[i].c_str(), "enable")) { + if (enabledDecays->get(particleNames[i].c_str(), "enable") != 0) { LOG(info) << " --- Decay enabled: " << pdgCodes[i]; mEnabledDecays.push_back(pdgCodes[i]); } @@ -146,9 +156,9 @@ struct OnTheFlyDecayer { const float decayRadius = decayer.getDecayRadius(); const float trackVelocity = o2::upgrade::computeParticleVelocity(particle.p(), pdgDB->GetParticle(particle.pdgCode())->Mass()); - const int charge = pdgDB->GetParticle(particle.pdgCode())->Charge() / 3; + const int charge = static_cast(pdgDB->GetParticle(particle.pdgCode())->Charge() / 3); float trackLength{-1.f}; - if (!charge) { + if (charge == 0) { const float dx = particle.vx() - decayer.getSecondaryVertexX(); const float dy = particle.vy() - decayer.getSecondaryVertexY(); const float dz = particle.vz() - decayer.getSecondaryVertexZ(); From f5a222a3f500e257871b981ecef857c9f1901e44 Mon Sep 17 00:00:00 2001 From: jesgum Date: Thu, 23 Jul 2026 14:44:03 +0200 Subject: [PATCH 2/3] Add Xi0bar --- ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx b/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx index 0fd2ab3aa27..4e3200c03d2 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx @@ -47,9 +47,9 @@ using namespace o2; using namespace o2::framework; -static constexpr int NumDecays = 12; +static constexpr int NumDecays = 13; static constexpr int NumParameters = 1; -static constexpr std::array, NumDecays> DefaultParameters{{{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}}}; +static constexpr std::array, NumDecays> DefaultParameters{{{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}}}; static const std::vector parameterNames{"enable"}; static const std::vector particleNames{"K0s", "Lambda", @@ -59,6 +59,7 @@ static const std::vector particleNames{"K0s", "SigmaMinus", "Anti-SigmaMinus", "Xi0", + "Anti-Xi0", "Xi", "Anti-Xi", "Omega", @@ -72,6 +73,7 @@ static const std::vector pdgCodes{PDG_t::kK0Short, PDG_t::kSigmaMinus, PDG_t::kSigmaBarPlus, o2::constants::physics::kXi0, + -o2::constants::physics::kXi0, PDG_t::kXiMinus, PDG_t::kXiPlusBar, PDG_t::kOmegaMinus, From 3480fcf9917b6166649ea005a1705c75b106b932 Mon Sep 17 00:00:00 2001 From: jesgum Date: Thu, 23 Jul 2026 14:52:48 +0200 Subject: [PATCH 3/3] indludes --- ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx b/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx index 4e3200c03d2..1b0a1a4fb6f 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx @@ -20,6 +20,7 @@ #include "ALICE3/Core/TrackUtilities.h" #include "ALICE3/DataModel/tracksAlice3.h" +#include #include #include #include