From 5ca30d13c78a00a8e3a28c7305cf22111cfc3784 Mon Sep 17 00:00:00 2001 From: David Dobrigkeit Chinellato Date: Mon, 23 Dec 2024 15:29:30 -0300 Subject: [PATCH] Common: add outer FV0A mult --- Common/DataModel/Multiplicity.h | 29 ++++++++++++---------- Common/TableProducer/multiplicityTable.cxx | 13 +++++++++- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/Common/DataModel/Multiplicity.h b/Common/DataModel/Multiplicity.h index 2547f888691..ce6aa4ba046 100644 --- a/Common/DataModel/Multiplicity.h +++ b/Common/DataModel/Multiplicity.h @@ -18,19 +18,20 @@ namespace o2::aod { namespace mult { -DECLARE_SOA_COLUMN(MultFV0A, multFV0A, float); //! -DECLARE_SOA_COLUMN(MultFV0C, multFV0C, float); //! -DECLARE_SOA_COLUMN(MultFT0A, multFT0A, float); //! -DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); //! -DECLARE_SOA_COLUMN(MultFDDA, multFDDA, float); //! -DECLARE_SOA_COLUMN(MultFDDC, multFDDC, float); //! -DECLARE_SOA_COLUMN(MultZNA, multZNA, float); //! -DECLARE_SOA_COLUMN(MultZNC, multZNC, float); //! -DECLARE_SOA_COLUMN(MultZEM1, multZEM1, float); //! -DECLARE_SOA_COLUMN(MultZEM2, multZEM2, float); //! -DECLARE_SOA_COLUMN(MultZPA, multZPA, float); //! -DECLARE_SOA_COLUMN(MultZPC, multZPC, float); //! -DECLARE_SOA_DYNAMIC_COLUMN(MultFV0M, multFV0M, //! +DECLARE_SOA_COLUMN(MultFV0A, multFV0A, float); //! +DECLARE_SOA_COLUMN(MultFV0AOuter, multFV0AOuter, float); //! +DECLARE_SOA_COLUMN(MultFV0C, multFV0C, float); //! +DECLARE_SOA_COLUMN(MultFT0A, multFT0A, float); //! +DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); //! +DECLARE_SOA_COLUMN(MultFDDA, multFDDA, float); //! +DECLARE_SOA_COLUMN(MultFDDC, multFDDC, float); //! +DECLARE_SOA_COLUMN(MultZNA, multZNA, float); //! +DECLARE_SOA_COLUMN(MultZNC, multZNC, float); //! +DECLARE_SOA_COLUMN(MultZEM1, multZEM1, float); //! +DECLARE_SOA_COLUMN(MultZEM2, multZEM2, float); //! +DECLARE_SOA_COLUMN(MultZPA, multZPA, float); //! +DECLARE_SOA_COLUMN(MultZPC, multZPC, float); //! +DECLARE_SOA_DYNAMIC_COLUMN(MultFV0M, multFV0M, //! [](float multFV0A, float multFV0C) -> float { return multFV0A + multFV0C; }); DECLARE_SOA_DYNAMIC_COLUMN(MultFT0M, multFT0M, //! [](float multFT0A, float multFT0C) -> float { return multFT0A + multFT0C; }); @@ -95,6 +96,8 @@ DECLARE_SOA_COLUMN(TimeToNeNext, timeToNeNext, float); //! DECLARE_SOA_TABLE(FV0Mults, "AOD", "FV0MULT", //! Multiplicity with the FV0 detector mult::MultFV0A, mult::MultFV0C, mult::MultFV0M); +DECLARE_SOA_TABLE(FV0AOuterMults, "AOD", "FVOAOUTERMULT", //! FV0 without innermost ring + mult::MultFV0AOuter); DECLARE_SOA_TABLE(FT0Mults, "AOD", "FT0MULT", //! Multiplicity with the FT0 detector mult::MultFT0A, mult::MultFT0C, mult::MultFT0M); diff --git a/Common/TableProducer/multiplicityTable.cxx b/Common/TableProducer/multiplicityTable.cxx index 908a44e92fb..b696174a5e9 100644 --- a/Common/TableProducer/multiplicityTable.cxx +++ b/Common/TableProducer/multiplicityTable.cxx @@ -79,6 +79,7 @@ static const int defaultParameters[nTables][nParameters]{{-1}, {-1}, {-1}, {-1}, struct MultiplicityTable { SliceCache cache; Produces tableFV0; // 0 + Produces tableFV0AOuter; // 0-bis (produced with FV0) Produces tableFT0; // 1 Produces tableFDD; // 2 Produces tableZDC; // 3 @@ -236,6 +237,7 @@ struct MultiplicityTable { aod::FT0s const&) { float multFV0A = 0.f; + float multFV0Aouter = 0.f; float multFV0C = 0.f; float multFT0A = 0.f; float multFT0C = 0.f; @@ -307,6 +309,7 @@ struct MultiplicityTable { switch (i) { case kFV0Mults: // FV0 tableFV0.reserve(collisions.size()); + tableFV0AOuter.reserve(collisions.size()); break; case kFT0Mults: // FT0 tableFT0.reserve(collisions.size()); @@ -354,6 +357,7 @@ struct MultiplicityTable { // Initializing multiplicity values float multFV0A = 0.f; + float multFV0AOuter = 0.f; float multFV0C = 0.f; float multFT0A = 0.f; float multFT0C = 0.f; @@ -429,18 +433,25 @@ struct MultiplicityTable { case kFV0Mults: // FV0 { multFV0A = 0.f; + multFV0AOuter = 0.f; multFV0C = 0.f; // using FV0 row index from event selection task if (collision.has_foundFV0()) { const auto& fv0 = collision.foundFV0(); - for (auto amplitude : fv0.amplitude()) { + for (size_t ii=0; ii7){ + multFV0AOuter += amplitude; + } } } else { multFV0A = -999.f; multFV0C = -999.f; } tableFV0(multFV0A, multFV0C); + tableFV0AOuter(multFV0AOuter); LOGF(debug, "multFV0A=%5.0f multFV0C=%5.0f", multFV0A, multFV0C); } break; case kFT0Mults: // FT0