diff --git a/PWGLF/Tasks/QC/mcParticlePrediction.cxx b/PWGLF/Tasks/QC/mcParticlePrediction.cxx index 2f506ba14e5..c190fe5a525 100644 --- a/PWGLF/Tasks/QC/mcParticlePrediction.cxx +++ b/PWGLF/Tasks/QC/mcParticlePrediction.cxx @@ -57,7 +57,7 @@ using namespace o2::pwglf; // Particles static const std::vector parameterNames{"Enable"}; static constexpr int nParameters = 1; -static const int defaultParticles[PIDExtended::NIDsTot][nParameters]{{0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {1}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}}; +static const int defaultParticles[PIDExtended::NIDsTot][nParameters]{{0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {1}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}}; bool enabledParticlesArray[PIDExtended::NIDsTot]; // Estimators @@ -158,7 +158,7 @@ std::array, Estimators::nEstimators> hvertexPosZ; std::array, PIDExtended::NIDsTot>, Estimators::nEstimators> hpt; std::array, PIDExtended::NIDsTot>, Estimators::nEstimators> hyield; -struct mcParticlePrediction { +struct McParticlePrediction { // Histograms HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; @@ -195,6 +195,8 @@ struct mcParticlePrediction { Configurable enableVsEta05Histograms{"enableVsEta05Histograms", true, "Enables the correlation between ETA05 and other estimators"}; Configurable enableVsEta08Histograms{"enableVsEta08Histograms", true, "Enables the correlation between ETA08 and other estimators"}; Configurable enableVsImpactParameterHistograms{"enableVsImpactParameterHistograms", true, "Enables the correlation between impact parameter and other estimators"}; + Configurable cfgEvtZvtxCut{"cfgEvtZvtxCut", 10.0f, "Evt sel: Max. z-Vertex (cm)"}; + Configurable chargetolerance{"chargetolerance", 1e-3, "Tolerance to consider a particle as charged based on its charge"}; Service pdgDB; o2::pwglf::ParticleCounter mCounter; @@ -456,7 +458,7 @@ struct mcParticlePrediction { } histos.fill(HIST("collisions/generated"), 1); - if (std::abs(mcCollision.posZ()) > 10.f) { + if (std::abs(mcCollision.posZ()) > cfgEvtZvtxCut) { return; } histos.fill(HIST("collisions/generated"), 2); @@ -500,7 +502,7 @@ struct mcParticlePrediction { TParticlePDG* p = pdgDB->GetParticle(particle.pdgCode()); if (p) { - if (std::abs(p->Charge()) > 1e-3) { + if (std::abs(p->Charge()) > chargetolerance) { histos.fill(HIST("particles/eta/charged"), particle.eta()); } else { histos.fill(HIST("particles/eta/neutral"), particle.eta()); @@ -721,7 +723,7 @@ struct mcParticlePrediction { hestimatorsRecoEvVsBCId[i]->Fill(foundBCid, nMultReco[i]); } } - PROCESS_SWITCH(mcParticlePrediction, processReco, "Process the reco info", true); + PROCESS_SWITCH(McParticlePrediction, processReco, "Process the reco info", true); }; -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; } +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; } diff --git a/PWGLF/Utils/mcParticle.h b/PWGLF/Utils/mcParticle.h index 657e696ec9a..745fcd94fbf 100644 --- a/PWGLF/Utils/mcParticle.h +++ b/PWGLF/Utils/mcParticle.h @@ -134,7 +134,8 @@ class PIDExtended static constexpr ID KstarPM = PIDCounts + 40; static constexpr ID Kshort = PIDCounts + 41; static constexpr ID Xi1530 = PIDCounts + 42; - static constexpr ID NIDsTot = PIDCounts + 43; + static constexpr ID Lambda1520 = PIDCounts + 43; + static constexpr ID NIDsTot = PIDCounts + 44; static constexpr const char* sNames[NIDsTot + 1] = { o2::track::pid_constants::sNames[Electron], // Electron @@ -199,6 +200,7 @@ class PIDExtended "KstarPM", // KstarPM "Kshort", // Kshort "Xi1530", // Xi1530 + "Lambda1520", // Lambda1520 nullptr}; static std::vector arrayNames() @@ -341,6 +343,8 @@ class PIDExtended return Kshort; case 3324: return Xi1530; + case 3124: + return Lambda1520; default: LOG(debug) << "Cannot identify particle with PDG code " << particle.pdgCode(); break;