diff --git a/Common/DataModel/Centrality.h b/Common/DataModel/Centrality.h index 69c1a1e40e3..3bdf839eed8 100644 --- a/Common/DataModel/Centrality.h +++ b/Common/DataModel/Centrality.h @@ -38,6 +38,7 @@ DECLARE_SOA_COLUMN(CentFDDM, centFDDM, float); //! Run 3 cent. DECLARE_SOA_COLUMN(CentNTPV, centNTPV, float); //! Run 3 cent. from the number of tracks contributing to the PV DECLARE_SOA_COLUMN(CentNGlobal, centNGlobal, float); //! Run 3 cent. from the number of global tracks DECLARE_SOA_COLUMN(CentMFT, centMFT, float); //! Run 3 cent. from the number of tracks in the MFT +DECLARE_SOA_COLUMN(CentFT0MOuterA, centFT0MOuterA, float); //! Run 3 cent. from FT0AOuter+FT0C multiplicity } // namespace cent // Run 2 tables @@ -65,6 +66,7 @@ DECLARE_SOA_TABLE(CentFT0CVariant1s, "AOD", "CENTFT0Cvar1", cent::CentFT0CVarian DECLARE_SOA_TABLE(CentFT0CVariant2s, "AOD", "CENTFT0Cvar2", cent::CentFT0CVariant2); //! Run 3 FT0C variant 2 - uses truncated Nancestors in glauber fit. Not recommended! for cross-checks only DECLARE_SOA_TABLE(CentFT0MAnchorCols, "AOD", "CENTFT0MCOL", cent::CentFT0MAnchorCol); //! Run 3 FT0M with anchored Glauber. Colliison based calibration. Not recommended! for cross-checks only DECLARE_SOA_TABLE(CentFT0MAnchorBCs, "AOD", "CENTFT0MBC", cent::CentFT0MAnchorBC); //! Run 3 FT0M with anchored Glauber. Bunch crossing based calibration. Not recommended! for cross-checks only +DECLARE_SOA_TABLE(CentFT0MOuterAs, "AOD", "CENTFT0Mvar3", cent::CentFT0MOuterA); //! Run 3 FT0MOuterA - excludes FT0A channels that saturates in PbPb (channel id < 31) // Run 3 centrality per BC (joinable with BC) DECLARE_SOA_TABLE(BCCentFT0Ms, "AOD", "BCCENTFT0M", cent::CentFT0M, o2::soa::Marker<1>); //! Run 3 FT0M BC centrality table @@ -88,6 +90,10 @@ using CentNTPV = CentNTPVs::iterator; using CentNGlobal = CentNGlobals::iterator; using CentMFT = CentMFTs::iterator; +using CentFT0CVariant1 = CentFT0CVariant1s::iterator; +using CentFT0CVariant2 = CentFT0CVariant2s::iterator; +using CentFT0MOuterA = CentFT0MOuterAs::iterator; + using BCCentFT0M = BCCentFT0Ms::iterator; using BCCentFT0A = BCCentFT0As::iterator; using BCCentFT0C = BCCentFT0Cs::iterator; diff --git a/Common/DataModel/Multiplicity.h b/Common/DataModel/Multiplicity.h index 713c4f2f67b..c258fd0c426 100644 --- a/Common/DataModel/Multiplicity.h +++ b/Common/DataModel/Multiplicity.h @@ -143,6 +143,7 @@ DECLARE_SOA_TABLE(MFTMults, "AOD", "MFTMULT", //! Multiplicity with MFT DECLARE_SOA_TABLE(FITExtraMults, "AOD", "FITEXTRAMULT", //! Extra information from FIT detectors mult::MultFV0AOuter, + mult::MultFT0AOuter, mult::FT0TriggerMask); using BarrelMults = soa::Join; diff --git a/Common/Tasks/centralityQa.cxx b/Common/Tasks/centralityQa.cxx index 38155cb10e5..107f8b26416 100644 --- a/Common/Tasks/centralityQa.cxx +++ b/Common/Tasks/centralityQa.cxx @@ -206,6 +206,7 @@ struct CentralityQa { } else { histos.add("hCentFV0A", ";FV0A centrality (%)", kTH1D, {{nBins, 0, 105.}}); histos.add("hCentFT0M", ";FT0M centrality (%)", kTH1D, {{nBins, 0, 105.}}); + histos.add("hCentFT0MOuterA", ";FT0M centrality (%)", kTH1D, {{nBins, 0, 105.}}); histos.add("hCentFT0A", ";FT0A centrality (%)", kTH1D, {{nBins, 0, 105.}}); histos.add("hCentFT0C", ";FT0C centrality (%)", kTH1D, {{nBins, 0, 105.}}); histos.add("hCentFT0CVar1", ";FT0CVar1 centrality (%)", kTH1D, {{nBins, 0, 105.}}); @@ -220,6 +221,7 @@ struct CentralityQa { // profiles of midrapidity multiplicity density histos.add("hCentProfileFV0A", ";FV0A centrality (%)", kTProfile, {{nBins, 0, 105.}}); histos.add("hCentProfileFT0M", ";FT0M centrality (%)", kTProfile, {{nBins, 0, 105.}}); + histos.add("hCentProfileFT0MOuterA", ";FT0M centrality (%)", kTProfile, {{nBins, 0, 105.}}); histos.add("hCentProfileFT0A", ";FT0A centrality (%)", kTProfile, {{nBins, 0, 105.}}); histos.add("hCentProfileFT0C", ";FT0C centrality (%)", kTProfile, {{nBins, 0, 105.}}); histos.add("hCentProfileFT0CVar1", ";FT0CVar1 centrality (%)", kTProfile, {{nBins, 0, 105.}}); @@ -233,6 +235,7 @@ struct CentralityQa { histos.add("hMultEta05VsCentFV0A", ";FV0A centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV}); histos.add("hMultEta05VsCentFT0M", ";FT0M centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV}); + histos.add("hMultEta05VsCentFT0MOuterA", ";FT0M centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV}); histos.add("hMultEta05VsCentFT0A", ";FT0A centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV}); histos.add("hMultEta05VsCentFT0C", ";FT0C centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV}); histos.add("hMultEta05VsCentFT0CVar1", ";FT0CVar1 centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV}); @@ -303,9 +306,9 @@ struct CentralityQa { est.hCentrality = dynamic_cast(hCentralityObjects->FindObject(Form("hCalibZeq%s", est.name.c_str()))); if (!est.hCentrality) { - LOGF(info, "Calibration missing for %s", est.name.c_str()); + LOGF(debug, "Calibration missing for %s", est.name.c_str()); } else { - LOGF(info, "Calibration loaded for %s", est.name.c_str()); + LOGF(debug, "Calibration loaded for %s", est.name.c_str()); } } @@ -323,6 +326,7 @@ struct CentralityQa { requires { collision.centFT0C(); } || requires { collision.centFT0CVariant1(); } || requires { collision.centFT0CVariant2(); } || + requires { collision.centFT0MOuterA(); } || requires { collision.centFDDM(); } || requires { collision.centNTPV(); } || requires { collision.centNGlobal(); } || @@ -684,7 +688,23 @@ struct CentralityQa { } PROCESS_SWITCH(CentralityQa, processRun3_FT0M, "Process with Run 3 FT0M estimator", false); - void processRun3_FT0A(soa::Join::iterator const& col, aod::BCs const&) + void processRun3_FT0MOuterA(soa::Join::iterator const& col, aod::BCs const&) + { + if (!isCollisionAccepted(col)) { + return; + } + + Estimator ft0mOuterA = initEstimator(col, "FT0MOuterA"); + const float centFT0MOuterA = ft0mOuterA.getCentrality(col.multFT0AOuter() + col.multFT0C(), col.centFT0MOuterA()); + + LOGF(debug, "centFT0MOuterA=%.0f", centFT0MOuterA); + histos.fill(HIST("hCentFT0MOuterA"), centFT0MOuterA); + histos.fill(HIST("hCentProfileFT0MOuterA"), centFT0MOuterA, col.multNTracksPVetaHalf()); + histos.fill(HIST("hMultEta05VsCentFT0MOuterA"), centFT0MOuterA, col.multNTracksPVetaHalf()); + } + PROCESS_SWITCH(CentralityQa, processRun3_FT0MOuterA, "Process with Run 3 FT0M estimator", false); + + void processRun3_FT0A(soa::Join::iterator const& col) { if (!isCollisionAccepted(col)) { return; diff --git a/Common/Tools/Multiplicity/MultModule.h b/Common/Tools/Multiplicity/MultModule.h index 9d67f81c45a..beb1274b7a4 100644 --- a/Common/Tools/Multiplicity/MultModule.h +++ b/Common/Tools/Multiplicity/MultModule.h @@ -99,10 +99,10 @@ static const std::vector tableNames{ "BCCentFT0As", "BCCentFT0Cs", "CentFT0MAnchorCols", - "CentFT0MAnchorBCs"}; - -static constexpr int nTablesConst = 41; + "CentFT0MAnchorBCs", + "CentFT0MOuterAs"}; +static constexpr int nTablesConst = 42; static const std::vector parameterNames{"enable"}; static const int defaultParameters[nTablesConst][nParameters]{ {-1}, @@ -145,6 +145,7 @@ static const int defaultParameters[nTablesConst][nParameters]{ {-1}, {-1}, {-1}, + {-1}, {-1}}; // table index : match order above @@ -191,6 +192,7 @@ enum tableIndex { kFV0Mults, // standard kBCCentFT0Cs, // bc centrality kCentFT0MAnchorCols, // standard Run 3 kCentFT0MAnchorBCs, // standard Run 3 + kCentFT0MOuterAs, // standard Run 3 kNTables }; struct products : o2::framework::ProducesGroup { @@ -228,6 +230,7 @@ struct products : o2::framework::ProducesGroup { o2::framework::Produces centRun2CL1; o2::framework::Produces centFV0A; o2::framework::Produces centFT0M; + o2::framework::Produces centFT0MOuterA; o2::framework::Produces centFT0A; o2::framework::Produces centFT0C; o2::framework::Produces centFT0CVariant1; @@ -255,6 +258,7 @@ struct multEntry { float multFV0C = 0.0f; float multFV0AOuter = 0.0f; float multFT0A = 0.0f; + float multFT0AOuter = 0.0f; float multFT0C = 0.0f; float multFDDA = 0.0f; float multFDDC = 0.0f; @@ -284,6 +288,7 @@ struct multEntry { float multFV0AZeq = -999.0f; float multFV0CZeq = -999.0f; float multFT0AZeq = -999.0f; + float multFT0AOuterZeq = -999.0f; float multFT0CZeq = -999.0f; float multFDDAZeq = -999.0f; float multFDDCZeq = -999.0f; @@ -453,6 +458,7 @@ class MultModule CalibrationInfo ft0mInfo = CalibrationInfo("FT0"); CalibrationInfo ft0mColInfo = CalibrationInfo("FT0AnchorCol"); CalibrationInfo ft0mBcInfo = CalibrationInfo("FT0AnchorBc"); + CalibrationInfo FT0MOuterAInfo = CalibrationInfo("FT0MOuterA"); CalibrationInfo ft0aInfo = CalibrationInfo("FT0A"); CalibrationInfo ft0cInfo = CalibrationInfo("FT0C"); CalibrationInfo ft0cVariant1Info = CalibrationInfo("FT0Cvar1"); @@ -715,7 +721,7 @@ class MultModule auto amplitude = fv0.amplitude()[ii]; auto channel = fv0.channel()[ii]; mults.multFV0A += amplitude; - if (channel > 7) { + if (channel > 7) { // Outer ring only mults.multFV0AOuter += amplitude; } } @@ -726,8 +732,11 @@ class MultModule if (collision.has_foundFT0()) { const auto& ft0 = collision.foundFT0(); mults.fitTriggerMask = ft0.triggerMask(); - for (const auto& amplitude : ft0.amplitudeA()) { - mults.multFT0A += amplitude; + for (size_t ii = 0; ii < ft0.amplitudeA().size(); ii++) { + mults.multFT0A += ft0.amplitudeA()[ii]; + if (ft0.channelA()[ii] > 31) { // Outer ring only + mults.multFT0AOuter += ft0.amplitudeA()[ii]; + } } for (const auto& amplitude : ft0.amplitudeC()) { mults.multFT0C += amplitude; @@ -735,6 +744,7 @@ class MultModule } else { mults.multFT0A = -999.f; mults.multFT0C = -999.f; + mults.multFT0AOuter = -999.f; } if (collision.has_foundFDD()) { const auto& fdd = collision.foundFDD(); @@ -772,7 +782,7 @@ class MultModule cursors.tableFV0(mults.multFV0A, mults.multFV0C); } if (internalOpts.mEnabledTables[kFITExtraMults]) { - cursors.tableFITExtraMults(mults.multFV0AOuter, mults.fitTriggerMask); + cursors.tableFITExtraMults(mults.multFV0AOuter, mults.multFT0AOuter, mults.fitTriggerMask); cursors.tableFV0AOuterMults(mults.multFV0AOuter); // Keep for backwards compatibility } if (internalOpts.mEnabledTables[kFT0Mults]) { @@ -807,6 +817,11 @@ class MultModule } else { mults.multFT0AZeq = 0.0f; } + if (mults.multFT0AOuter > -1.0f && std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) { + mults.multFT0AOuterZeq = hVtxZFT0A->Interpolate(0.0) * mults.multFT0AOuter / hVtxZFT0A->Interpolate(collision.posZ()); + } else { + mults.multFT0AOuterZeq = 0.0f; + } if (mults.multFT0C > -1.0f && std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) { mults.multFT0CZeq = hVtxZFT0C->Interpolate(0.0) * mults.multFT0C / hVtxZFT0C->Interpolate(collision.posZ()); } else { @@ -1224,6 +1239,7 @@ class MultModule ft0mInfo.mCalibrationStored = false; ft0mColInfo.mCalibrationStored = false; ft0mBcInfo.mCalibrationStored = false; + FT0MOuterAInfo.mCalibrationStored = false; ft0aInfo.mCalibrationStored = false; ft0cInfo.mCalibrationStored = false; ft0cVariant1Info.mCalibrationStored = false; @@ -1265,6 +1281,8 @@ class MultModule getccdb(ft0mColInfo, internalOpts.generatorName); if (internalOpts.mEnabledTables[kCentFT0MAnchorBCs]) getccdb(ft0mBcInfo, internalOpts.generatorName); + if (internalOpts.mEnabledTables[kCentFT0MOuterAs]) + getccdb(FT0MOuterAInfo, internalOpts.generatorName); if (internalOpts.mEnabledTables[kCentFT0As] || internalOpts.mEnabledTables[kBCCentFT0As]) getccdb(ft0aInfo, internalOpts.generatorName); if (internalOpts.mEnabledTables[kCentFT0Cs] || internalOpts.mEnabledTables[kBCCentFT0Cs]) @@ -1353,6 +1371,8 @@ class MultModule populateTable(cursors.centFT0MAnchorCol, ft0mColInfo, mults[iEv].multFT0AZeq + mults[iEv].multFT0CZeq, isInelGt0); if (internalOpts.mEnabledTables[kCentFT0Ms]) populateTable(cursors.centFT0MAnchorBC, ft0mBcInfo, mults[iEv].multFT0AZeq + mults[iEv].multFT0CZeq, isInelGt0); + if (internalOpts.mEnabledTables[kCentFT0MOuterAs]) + populateTable(cursors.centFT0MOuterA, FT0MOuterAInfo, mults[iEv].multFT0AOuterZeq + mults[iEv].multFT0CZeq, isInelGt0); if (internalOpts.mEnabledTables[kCentFT0As]) populateTable(cursors.centFT0A, ft0aInfo, mults[iEv].multFT0AZeq, isInelGt0); if (internalOpts.mEnabledTables[kCentFT0Cs])