From 71ed16d4f5bfacea24d2cf9122156fb73e02cdbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 29 Aug 2025 14:37:42 +0200 Subject: [PATCH 1/7] Allow FT0A and FT0C Refactor histogram retrieval and configuration for FT0A and FT0C. --- PWGLF/TableProducer/Common/mcCentrality.cxx | 82 ++++++++++++++------- 1 file changed, 55 insertions(+), 27 deletions(-) diff --git a/PWGLF/TableProducer/Common/mcCentrality.cxx b/PWGLF/TableProducer/Common/mcCentrality.cxx index 690d049af4d..84df0348b38 100644 --- a/PWGLF/TableProducer/Common/mcCentrality.cxx +++ b/PWGLF/TableProducer/Common/mcCentrality.cxx @@ -18,21 +18,25 @@ /// // O2 includes +#include "PWGLF/DataModel/mcCentrality.h" + +#include "TableHelper.h" + +#include "PWGLF/Utils/inelGt.h" + +#include "Common/DataModel/Centrality.h" +#include "Common/DataModel/TrackSelectionTables.h" + #include "CCDB/BasicCCDBManager.h" -#include "ReconstructionDataFormats/Track.h" #include "CCDB/CcdbApi.h" -#include "Common/DataModel/TrackSelectionTables.h" -#include "Framework/AnalysisTask.h" #include "Framework/AnalysisDataModel.h" -#include "Framework/runDataProcessing.h" +#include "Framework/AnalysisTask.h" #include "Framework/HistogramRegistry.h" +#include "Framework/O2DatabasePDGPlugin.h" #include "Framework/RunningWorkflowInfo.h" #include "Framework/StaticFor.h" -#include "TableHelper.h" -#include "Framework/O2DatabasePDGPlugin.h" -#include "Common/DataModel/Centrality.h" -#include "PWGLF/DataModel/mcCentrality.h" -#include "PWGLF/Utils/inelGt.h" +#include "Framework/runDataProcessing.h" +#include "ReconstructionDataFormats/Track.h" using namespace o2; using namespace o2::framework; @@ -58,14 +62,17 @@ struct mcCentrality { Configurable selectPrimaries{"selectPrimaries", true, "Select only primary particles"}; Service pdgDB; ConfigurableAxis binsPercentile{"binsPercentile", {VARIABLE_WIDTH, 0, 0.001, 0.01, 1.0, 5.0, 10.0, 15.0, 20.0, 25.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0}, "Binning of the percentile axis"}; + ConfigurableAxis binsMultiplicity{"binsMultiplicity", {1000, 0, 5000}, "Binning of the multiplicity axis"}; + Configurable fillFt0A{"fillFt0A", false, "Fills the FT0A histogram"}; + Configurable fillFt0C{"fillFt0C", false, "Fills the FT0C histogram"}; HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; TH1F* h1dFT0M; - /*TH1F* h1dFT0A; + TH1F* h1dFT0A; TH1F* h1dFT0C; - TH1F* h1dFDD; - TH1F* h1dNTP;*/ + // TH1F* h1dFDD; + // TH1F* h1dNTP; o2::pwglf::ParticleCounter mCounter; @@ -81,7 +88,15 @@ struct mcCentrality { mCounter.mPdgDatabase = pdgDB.service; mCounter.mSelectPrimaries = selectPrimaries.value; histos.add("FT0M/percentile", "FT0M percentile.", HistType::kTH1D, {{binsPercentile, "FT0M percentile"}}); - histos.add("FT0M/percentilevsMult", "FT0M percentile.", HistType::kTH2D, {{binsPercentile, "FT0M percentile"}, {1000, 0, 5000, "FT0M mult."}}); + histos.add("FT0M/percentilevsMult", "FT0M percentile.", HistType::kTH2D, {{binsPercentile, "FT0M percentile"}, {binsMultiplicity, "FT0M mult."}}); + if (fillFt0A) { + histos.add("FT0A/percentile", "FT0A percentile.", HistType::kTH1D, {{binsPercentile, "FT0A percentile"}}); + histos.add("FT0A/percentilevsMult", "FT0A percentile.", HistType::kTH2D, {{binsPercentile, "FT0A percentile"}, {binsMultiplicity, "FT0A mult."}}); + } + if (fillFt0C) { + histos.add("FT0C/percentile", "FT0C percentile.", HistType::kTH1D, {{binsPercentile, "FT0C percentile"}}); + histos.add("FT0C/percentilevsMult", "FT0C percentile.", HistType::kTH2D, {{binsPercentile, "FT0C percentile"}, {binsMultiplicity, "FT0C mult."}}); + } TList* lOfInput; if (path.value.rfind("ccdb://", 0) == 0) { // Getting post calib. from CCDB @@ -105,11 +120,20 @@ struct mcCentrality { LOG(fatal) << "The input file " << path.value << " does not contain the TList ccdb_object"; } } - h1dFT0M = static_cast(lOfInput->FindObject("h1dFT0M")); - if (!h1dFT0M) { - lOfInput->ls(); - LOG(fatal) << "Could not open histogram h1dFT0M from TList"; - return; + auto getHist = [lOfInput](const char* name) -> TH1F* { + auto hist = static_cast(lOfInput->FindObject(name)); + if (!hist) { + lOfInput->ls(); + LOG(fatal) << "Could not open histogram " << name << " from TList"; + } + return hist; + }; + h1dFT0M = getHist(lOfInput, "h1dFT0M"); + if (fillFt0A) { + h1dFT0A = getHist("h1dFT0A"); + } + if (fillFt0C) { + h1dFT0C = getHist("h1dFT0C"); } } @@ -117,20 +141,24 @@ struct mcCentrality { void process(aod::McCollision const& /*mcCollision*/, aod::McParticles const& mcParticles) { - const float nFT0M = mCounter.countFT0A(mcParticles) + mCounter.countFT0C(mcParticles); - /*const float nFT0A = mCounter.countFT0A(mcParticles); + const float nFT0A = mCounter.countFT0A(mcParticles); const float nFT0C = mCounter.countFT0C(mcParticles); - const float nFV0A = mCounter.countFV0A(mcParticles);*/ + const float nFT0M = nFT0A + nFT0C; + // const float nFV0A = mCounter.countFV0A(mcParticles); const float valueCentFT0M = h1dFT0M->GetBinContent(h1dFT0M->FindBin(nFT0M)); - /*const float valueCentFT0A = h1dFT0M->GetBinContent(h1dFT0M->FindBin(nFT0A)); - const float valueCentFT0C = h1dFT0M->GetBinContent(h1dFT0M->FindBin(nFT0C)); - const float valueCentFV0A = h1dFT0M->GetBinContent(h1dFT0M->FindBin(nFV0A));*/ + if (fillFt0A) { + const float valueCentFT0A = h1dFT0M->GetBinContent(h1dFT0M->FindBin(nFT0A)); + centFT0A(valueCentFT0A); + } + if (fillFt0C) { + const float valueCentFT0C = h1dFT0M->GetBinContent(h1dFT0M->FindBin(nFT0C)); + centFT0C(valueCentFT0C); + } + // const float valueCentFV0A = h1dFT0M->GetBinContent(h1dFT0M->FindBin(nFV0A)); centFT0M(valueCentFT0M); - /*centFT0A(valueCentFT0A); - centFT0C(valueCentFT0C); - centFV0A(valueCentFV0A);*/ + // centFV0A(valueCentFV0A); histos.fill(HIST("FT0M/percentile"), valueCentFT0M); histos.fill(HIST("FT0M/percentilevsMult"), valueCentFT0M, nFT0M); } From bef86a393704674c42b0b06d847f4b206fafd06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 29 Aug 2025 14:45:18 +0200 Subject: [PATCH 2/7] Fix MLinter --- PWGLF/TableProducer/Common/mcCentrality.cxx | 22 +++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/PWGLF/TableProducer/Common/mcCentrality.cxx b/PWGLF/TableProducer/Common/mcCentrality.cxx index 84df0348b38..51f46c8a453 100644 --- a/PWGLF/TableProducer/Common/mcCentrality.cxx +++ b/PWGLF/TableProducer/Common/mcCentrality.cxx @@ -27,16 +27,18 @@ #include "Common/DataModel/Centrality.h" #include "Common/DataModel/TrackSelectionTables.h" -#include "CCDB/BasicCCDBManager.h" -#include "CCDB/CcdbApi.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/AnalysisTask.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/O2DatabasePDGPlugin.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/StaticFor.h" -#include "Framework/runDataProcessing.h" -#include "ReconstructionDataFormats/Track.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include using namespace o2; using namespace o2::framework; From 83af026ed63ef6863632dea6d63633ccec7b5074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 29 Aug 2025 15:21:38 +0200 Subject: [PATCH 3/7] Fix camel case rule for naming --- PWGLF/DataModel/McCentrality.h | 47 +++++++++++++++++++ PWGLF/DataModel/mcCentrality.h | 37 +-------------- PWGLF/TableProducer/Common/CMakeLists.txt | 2 +- .../{mcCentrality.cxx => McCentrality.cxx} | 17 ++++--- 4 files changed, 57 insertions(+), 46 deletions(-) create mode 100644 PWGLF/DataModel/McCentrality.h rename PWGLF/TableProducer/Common/{mcCentrality.cxx => McCentrality.cxx} (91%) diff --git a/PWGLF/DataModel/McCentrality.h b/PWGLF/DataModel/McCentrality.h new file mode 100644 index 00000000000..aff3e63d173 --- /dev/null +++ b/PWGLF/DataModel/McCentrality.h @@ -0,0 +1,47 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +/// +/// \file McCentrality.h +/// \author Nicolò Jacazio nicolo.jacazio@cern.ch +/// \author Francesca Ercolessi francesca.ercolessi@cern.ch +/// \since 2024-06-05 +/// \brief Set of tables for the MC centrality +/// + +#ifndef PWGLF_DATAMODEL_MCCENTRALITY_H_ +#define PWGLF_DATAMODEL_MCCENTRALITY_H_ + +// O2 includes +#include "Framework/ASoA.h" +#include "Framework/AnalysisDataModel.h" +#include "Common/DataModel/Centrality.h" +#include "Framework/Logger.h" + +namespace o2::aod +{ +// DECLARE_SOA_TABLE(CentFV0As, "AOD", "CENTFV0A", cent::CentFV0A); //! Run3 FV0A estimated centrality table +// DECLARE_SOA_TABLE(CentFT0Ms, "AOD", "CENTFT0M", cent::CentFT0M); //! Run3 FT0M estimated centrality table +// DECLARE_SOA_TABLE(CentFT0As, "AOD", "CENTFT0A", cent::CentFT0A); //! Run3 FT0A estimated centrality table +// DECLARE_SOA_TABLE(CentFT0Cs, "AOD", "CENTFT0C", cent::CentFT0C); //! Run3 FT0C estimated centrality table +// DECLARE_SOA_TABLE(CentFDDMs, "AOD", "CENTFDDM", cent::CentFDDM); //! Run3 FDDM estimated centrality table +// DECLARE_SOA_TABLE(CentNTPVs, "AOD", "CENTNTPV", cent::CentNTPV); //! Run3 NTPV estimated centrality table + +DECLARE_SOA_TABLE(McCentFV0As, "AOD", "MCCENTFV0A", o2::soa::Marker<1>, cent::CentFV0A); +DECLARE_SOA_TABLE(McCentFT0Ms, "AOD", "MCCENTFT0M", o2::soa::Marker<2>, cent::CentFT0M); +DECLARE_SOA_TABLE(McCentFT0As, "AOD", "MCCENTFT0A", o2::soa::Marker<3>, cent::CentFT0A); +DECLARE_SOA_TABLE(McCentFT0Cs, "AOD", "MCCENTFT0C", o2::soa::Marker<4>, cent::CentFT0C); +DECLARE_SOA_TABLE(McCentFDDMs, "AOD", "MCCENTFDDM", o2::soa::Marker<5>, cent::CentFDDM); +DECLARE_SOA_TABLE(McCentNTPVs, "AOD", "MCCENTNTPV", o2::soa::Marker<6>, cent::CentNTPV); + +} // namespace o2::aod + +#endif // PWGLF_DATAMODEL_MCCENTRALITY_H_ diff --git a/PWGLF/DataModel/mcCentrality.h b/PWGLF/DataModel/mcCentrality.h index 86e97eb8c33..6f908842d3e 100644 --- a/PWGLF/DataModel/mcCentrality.h +++ b/PWGLF/DataModel/mcCentrality.h @@ -9,39 +9,4 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// -/// \file mcCentrality.h -/// \author Nicolò Jacazio nicolo.jacazio@cern.ch -/// \author Francesca Ercolessi francesca.ercolessi@cern.ch -/// \since 2024-06-05 -/// \brief Set of tables for the MC centrality -/// - -#ifndef PWGLF_DATAMODEL_MCCENTRALITY_H_ -#define PWGLF_DATAMODEL_MCCENTRALITY_H_ - -// O2 includes -#include "Framework/ASoA.h" -#include "Framework/AnalysisDataModel.h" -#include "Common/DataModel/Centrality.h" -#include "Framework/Logger.h" - -namespace o2::aod -{ -// DECLARE_SOA_TABLE(CentFV0As, "AOD", "CENTFV0A", cent::CentFV0A); //! Run3 FV0A estimated centrality table -// DECLARE_SOA_TABLE(CentFT0Ms, "AOD", "CENTFT0M", cent::CentFT0M); //! Run3 FT0M estimated centrality table -// DECLARE_SOA_TABLE(CentFT0As, "AOD", "CENTFT0A", cent::CentFT0A); //! Run3 FT0A estimated centrality table -// DECLARE_SOA_TABLE(CentFT0Cs, "AOD", "CENTFT0C", cent::CentFT0C); //! Run3 FT0C estimated centrality table -// DECLARE_SOA_TABLE(CentFDDMs, "AOD", "CENTFDDM", cent::CentFDDM); //! Run3 FDDM estimated centrality table -// DECLARE_SOA_TABLE(CentNTPVs, "AOD", "CENTNTPV", cent::CentNTPV); //! Run3 NTPV estimated centrality table - -DECLARE_SOA_TABLE(McCentFV0As, "AOD", "MCCENTFV0A", o2::soa::Marker<1>, cent::CentFV0A); -DECLARE_SOA_TABLE(McCentFT0Ms, "AOD", "MCCENTFT0M", o2::soa::Marker<2>, cent::CentFT0M); -DECLARE_SOA_TABLE(McCentFT0As, "AOD", "MCCENTFT0A", o2::soa::Marker<3>, cent::CentFT0A); -DECLARE_SOA_TABLE(McCentFT0Cs, "AOD", "MCCENTFT0C", o2::soa::Marker<4>, cent::CentFT0C); -DECLARE_SOA_TABLE(McCentFDDMs, "AOD", "MCCENTFDDM", o2::soa::Marker<5>, cent::CentFDDM); -DECLARE_SOA_TABLE(McCentNTPVs, "AOD", "MCCENTNTPV", o2::soa::Marker<6>, cent::CentNTPV); - -} // namespace o2::aod - -#endif // PWGLF_DATAMODEL_MCCENTRALITY_H_ +#include "McCentrality.h" // Placeholder diff --git a/PWGLF/TableProducer/Common/CMakeLists.txt b/PWGLF/TableProducer/Common/CMakeLists.txt index 5f1df4b5202..8ee1d7ba2f3 100644 --- a/PWGLF/TableProducer/Common/CMakeLists.txt +++ b/PWGLF/TableProducer/Common/CMakeLists.txt @@ -31,7 +31,7 @@ o2physics_add_dpl_workflow(zdcsp COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(mc-centrality - SOURCES mcCentrality.cxx + SOURCES McCentrality.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) diff --git a/PWGLF/TableProducer/Common/mcCentrality.cxx b/PWGLF/TableProducer/Common/McCentrality.cxx similarity index 91% rename from PWGLF/TableProducer/Common/mcCentrality.cxx rename to PWGLF/TableProducer/Common/McCentrality.cxx index 51f46c8a453..935aed6e6eb 100644 --- a/PWGLF/TableProducer/Common/mcCentrality.cxx +++ b/PWGLF/TableProducer/Common/McCentrality.cxx @@ -10,15 +10,14 @@ // or submit itself to any jurisdiction. /// -/// \file mcCentrality.cxx +/// \file McCentrality.cxx /// \author Nicolò Jacazio nicolo.jacazio@cern.ch /// \author Francesca Ercolessi francesca.ercolessi@cern.ch /// \since 2024-06-05 /// \brief Task to produce the table for the equalized multiplicity into centrality bins /// -// O2 includes -#include "PWGLF/DataModel/mcCentrality.h" +#include "PWGLF/DataModel/McCentrality.h" #include "TableHelper.h" @@ -46,7 +45,7 @@ using namespace o2::framework::expressions; using namespace o2::track; /// Task to produce the response table -struct mcCentrality { +struct McCentrality { // Tables to produce Produces centFV0A; @@ -58,8 +57,8 @@ struct mcCentrality { // Input parameters Service ccdb; - Configurable url{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; - Configurable ccdbTimestamp{"ccdb-timestamp", -1, "timestamp of the object used to query in CCDB the detector response. If 0 the object corresponding to the run number is used, if < 0 the latest object is used"}; + Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; + Configurable ccdbTimestamp{"ccdbTimestamp", -1, "timestamp of the object used to query in CCDB the detector response. If 0 the object corresponding to the run number is used, if < 0 the latest object is used"}; Configurable path{"path", "/tmp/InputCalibMC.root", "path to calib file or ccdb path if begins with ccdb://"}; Configurable selectPrimaries{"selectPrimaries", true, "Select only primary particles"}; Service pdgDB; @@ -81,7 +80,7 @@ struct mcCentrality { void init(o2::framework::InitContext& /*initContext*/) { // Set up the CCDB - ccdb->setURL(url.value); + ccdb->setURL(ccdbUrl.value); ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); ccdb->setCreatedNotAfter(std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count()); @@ -130,7 +129,7 @@ struct mcCentrality { } return hist; }; - h1dFT0M = getHist(lOfInput, "h1dFT0M"); + h1dFT0M = getHist("h1dFT0M"); if (fillFt0A) { h1dFT0A = getHist("h1dFT0A"); } @@ -166,4 +165,4 @@ struct mcCentrality { } }; -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; } +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask(cfgc)}; } From a05216fac8e66c5cbec4b622d83b37907866432f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 29 Aug 2025 15:23:54 +0200 Subject: [PATCH 4/7] Update --- PWGLF/DataModel/McCentrality.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PWGLF/DataModel/McCentrality.h b/PWGLF/DataModel/McCentrality.h index aff3e63d173..54f0c21d749 100644 --- a/PWGLF/DataModel/McCentrality.h +++ b/PWGLF/DataModel/McCentrality.h @@ -21,9 +21,10 @@ #define PWGLF_DATAMODEL_MCCENTRALITY_H_ // O2 includes +#include "Common/DataModel/Centrality.h" + #include "Framework/ASoA.h" #include "Framework/AnalysisDataModel.h" -#include "Common/DataModel/Centrality.h" #include "Framework/Logger.h" namespace o2::aod From 30b0f2bec1e45e9995b8e5874df98c65d23918da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 29 Aug 2025 15:27:11 +0200 Subject: [PATCH 5/7] Fix linter --- PWGLF/DataModel/McCentrality.h | 48 ------------------- PWGLF/DataModel/mcCentrality.h | 38 ++++++++++++++- PWGLF/TableProducer/Common/CMakeLists.txt | 2 +- .../{McCentrality.cxx => mcCentrality.cxx} | 2 +- 4 files changed, 39 insertions(+), 51 deletions(-) delete mode 100644 PWGLF/DataModel/McCentrality.h rename PWGLF/TableProducer/Common/{McCentrality.cxx => mcCentrality.cxx} (99%) diff --git a/PWGLF/DataModel/McCentrality.h b/PWGLF/DataModel/McCentrality.h deleted file mode 100644 index 54f0c21d749..00000000000 --- a/PWGLF/DataModel/McCentrality.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. -// -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -/// -/// \file McCentrality.h -/// \author Nicolò Jacazio nicolo.jacazio@cern.ch -/// \author Francesca Ercolessi francesca.ercolessi@cern.ch -/// \since 2024-06-05 -/// \brief Set of tables for the MC centrality -/// - -#ifndef PWGLF_DATAMODEL_MCCENTRALITY_H_ -#define PWGLF_DATAMODEL_MCCENTRALITY_H_ - -// O2 includes -#include "Common/DataModel/Centrality.h" - -#include "Framework/ASoA.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/Logger.h" - -namespace o2::aod -{ -// DECLARE_SOA_TABLE(CentFV0As, "AOD", "CENTFV0A", cent::CentFV0A); //! Run3 FV0A estimated centrality table -// DECLARE_SOA_TABLE(CentFT0Ms, "AOD", "CENTFT0M", cent::CentFT0M); //! Run3 FT0M estimated centrality table -// DECLARE_SOA_TABLE(CentFT0As, "AOD", "CENTFT0A", cent::CentFT0A); //! Run3 FT0A estimated centrality table -// DECLARE_SOA_TABLE(CentFT0Cs, "AOD", "CENTFT0C", cent::CentFT0C); //! Run3 FT0C estimated centrality table -// DECLARE_SOA_TABLE(CentFDDMs, "AOD", "CENTFDDM", cent::CentFDDM); //! Run3 FDDM estimated centrality table -// DECLARE_SOA_TABLE(CentNTPVs, "AOD", "CENTNTPV", cent::CentNTPV); //! Run3 NTPV estimated centrality table - -DECLARE_SOA_TABLE(McCentFV0As, "AOD", "MCCENTFV0A", o2::soa::Marker<1>, cent::CentFV0A); -DECLARE_SOA_TABLE(McCentFT0Ms, "AOD", "MCCENTFT0M", o2::soa::Marker<2>, cent::CentFT0M); -DECLARE_SOA_TABLE(McCentFT0As, "AOD", "MCCENTFT0A", o2::soa::Marker<3>, cent::CentFT0A); -DECLARE_SOA_TABLE(McCentFT0Cs, "AOD", "MCCENTFT0C", o2::soa::Marker<4>, cent::CentFT0C); -DECLARE_SOA_TABLE(McCentFDDMs, "AOD", "MCCENTFDDM", o2::soa::Marker<5>, cent::CentFDDM); -DECLARE_SOA_TABLE(McCentNTPVs, "AOD", "MCCENTNTPV", o2::soa::Marker<6>, cent::CentNTPV); - -} // namespace o2::aod - -#endif // PWGLF_DATAMODEL_MCCENTRALITY_H_ diff --git a/PWGLF/DataModel/mcCentrality.h b/PWGLF/DataModel/mcCentrality.h index 6f908842d3e..54f0c21d749 100644 --- a/PWGLF/DataModel/mcCentrality.h +++ b/PWGLF/DataModel/mcCentrality.h @@ -9,4 +9,40 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#include "McCentrality.h" // Placeholder +/// +/// \file McCentrality.h +/// \author Nicolò Jacazio nicolo.jacazio@cern.ch +/// \author Francesca Ercolessi francesca.ercolessi@cern.ch +/// \since 2024-06-05 +/// \brief Set of tables for the MC centrality +/// + +#ifndef PWGLF_DATAMODEL_MCCENTRALITY_H_ +#define PWGLF_DATAMODEL_MCCENTRALITY_H_ + +// O2 includes +#include "Common/DataModel/Centrality.h" + +#include "Framework/ASoA.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/Logger.h" + +namespace o2::aod +{ +// DECLARE_SOA_TABLE(CentFV0As, "AOD", "CENTFV0A", cent::CentFV0A); //! Run3 FV0A estimated centrality table +// DECLARE_SOA_TABLE(CentFT0Ms, "AOD", "CENTFT0M", cent::CentFT0M); //! Run3 FT0M estimated centrality table +// DECLARE_SOA_TABLE(CentFT0As, "AOD", "CENTFT0A", cent::CentFT0A); //! Run3 FT0A estimated centrality table +// DECLARE_SOA_TABLE(CentFT0Cs, "AOD", "CENTFT0C", cent::CentFT0C); //! Run3 FT0C estimated centrality table +// DECLARE_SOA_TABLE(CentFDDMs, "AOD", "CENTFDDM", cent::CentFDDM); //! Run3 FDDM estimated centrality table +// DECLARE_SOA_TABLE(CentNTPVs, "AOD", "CENTNTPV", cent::CentNTPV); //! Run3 NTPV estimated centrality table + +DECLARE_SOA_TABLE(McCentFV0As, "AOD", "MCCENTFV0A", o2::soa::Marker<1>, cent::CentFV0A); +DECLARE_SOA_TABLE(McCentFT0Ms, "AOD", "MCCENTFT0M", o2::soa::Marker<2>, cent::CentFT0M); +DECLARE_SOA_TABLE(McCentFT0As, "AOD", "MCCENTFT0A", o2::soa::Marker<3>, cent::CentFT0A); +DECLARE_SOA_TABLE(McCentFT0Cs, "AOD", "MCCENTFT0C", o2::soa::Marker<4>, cent::CentFT0C); +DECLARE_SOA_TABLE(McCentFDDMs, "AOD", "MCCENTFDDM", o2::soa::Marker<5>, cent::CentFDDM); +DECLARE_SOA_TABLE(McCentNTPVs, "AOD", "MCCENTNTPV", o2::soa::Marker<6>, cent::CentNTPV); + +} // namespace o2::aod + +#endif // PWGLF_DATAMODEL_MCCENTRALITY_H_ diff --git a/PWGLF/TableProducer/Common/CMakeLists.txt b/PWGLF/TableProducer/Common/CMakeLists.txt index 8ee1d7ba2f3..5f1df4b5202 100644 --- a/PWGLF/TableProducer/Common/CMakeLists.txt +++ b/PWGLF/TableProducer/Common/CMakeLists.txt @@ -31,7 +31,7 @@ o2physics_add_dpl_workflow(zdcsp COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(mc-centrality - SOURCES McCentrality.cxx + SOURCES mcCentrality.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) diff --git a/PWGLF/TableProducer/Common/McCentrality.cxx b/PWGLF/TableProducer/Common/mcCentrality.cxx similarity index 99% rename from PWGLF/TableProducer/Common/McCentrality.cxx rename to PWGLF/TableProducer/Common/mcCentrality.cxx index 935aed6e6eb..c1d1df8751a 100644 --- a/PWGLF/TableProducer/Common/McCentrality.cxx +++ b/PWGLF/TableProducer/Common/mcCentrality.cxx @@ -10,7 +10,7 @@ // or submit itself to any jurisdiction. /// -/// \file McCentrality.cxx +/// \file mcCentrality.cxx /// \author Nicolò Jacazio nicolo.jacazio@cern.ch /// \author Francesca Ercolessi francesca.ercolessi@cern.ch /// \since 2024-06-05 From f3cc419461cce6544757ba6212a3bfb67d079442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 29 Aug 2025 15:28:13 +0200 Subject: [PATCH 6/7] Fix linter --- PWGLF/DataModel/mcCentrality.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/DataModel/mcCentrality.h b/PWGLF/DataModel/mcCentrality.h index 54f0c21d749..fdbe1426e52 100644 --- a/PWGLF/DataModel/mcCentrality.h +++ b/PWGLF/DataModel/mcCentrality.h @@ -10,7 +10,7 @@ // or submit itself to any jurisdiction. /// -/// \file McCentrality.h +/// \file mcCentrality.h /// \author Nicolò Jacazio nicolo.jacazio@cern.ch /// \author Francesca Ercolessi francesca.ercolessi@cern.ch /// \since 2024-06-05 From e8bfe637b3dbe8b48bca7c55e95ea41ae7feb3c4 Mon Sep 17 00:00:00 2001 From: SCHOTTER Romain <47983209+romainschotter@users.noreply.github.com> Date: Tue, 2 Sep 2025 18:16:03 +0200 Subject: [PATCH 7/7] Fix header --- PWGLF/TableProducer/Common/mcCentrality.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Common/mcCentrality.cxx b/PWGLF/TableProducer/Common/mcCentrality.cxx index c1d1df8751a..1dec9b7fb28 100644 --- a/PWGLF/TableProducer/Common/mcCentrality.cxx +++ b/PWGLF/TableProducer/Common/mcCentrality.cxx @@ -17,7 +17,7 @@ /// \brief Task to produce the table for the equalized multiplicity into centrality bins /// -#include "PWGLF/DataModel/McCentrality.h" +#include "PWGLF/DataModel/mcCentrality.h" #include "TableHelper.h"