Skip to content

Commit c6d549a

Browse files
authored
[Common] Add centrality estimator using FT0C and the outer channels from FT0A (#17525)
1 parent 37a0568 commit c6d549a

4 files changed

Lines changed: 57 additions & 10 deletions

File tree

Common/DataModel/Centrality.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ DECLARE_SOA_COLUMN(CentFDDM, centFDDM, float); //! Run 3 cent.
3838
DECLARE_SOA_COLUMN(CentNTPV, centNTPV, float); //! Run 3 cent. from the number of tracks contributing to the PV
3939
DECLARE_SOA_COLUMN(CentNGlobal, centNGlobal, float); //! Run 3 cent. from the number of global tracks
4040
DECLARE_SOA_COLUMN(CentMFT, centMFT, float); //! Run 3 cent. from the number of tracks in the MFT
41+
DECLARE_SOA_COLUMN(CentFT0MOuterA, centFT0MOuterA, float); //! Run 3 cent. from FT0AOuter+FT0C multiplicity
4142
} // namespace cent
4243

4344
// Run 2 tables
@@ -65,6 +66,7 @@ DECLARE_SOA_TABLE(CentFT0CVariant1s, "AOD", "CENTFT0Cvar1", cent::CentFT0CVarian
6566
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
6667
DECLARE_SOA_TABLE(CentFT0MAnchorCols, "AOD", "CENTFT0MCOL", cent::CentFT0MAnchorCol); //! Run 3 FT0M with anchored Glauber. Colliison based calibration. Not recommended! for cross-checks only
6768
DECLARE_SOA_TABLE(CentFT0MAnchorBCs, "AOD", "CENTFT0MBC", cent::CentFT0MAnchorBC); //! Run 3 FT0M with anchored Glauber. Bunch crossing based calibration. Not recommended! for cross-checks only
69+
DECLARE_SOA_TABLE(CentFT0MOuterAs, "AOD", "CENTFT0Mvar3", cent::CentFT0MOuterA); //! Run 3 FT0MOuterA - excludes FT0A channels that saturates in PbPb (channel id < 31)
6870

6971
// Run 3 centrality per BC (joinable with BC)
7072
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;
8890
using CentNGlobal = CentNGlobals::iterator;
8991
using CentMFT = CentMFTs::iterator;
9092

93+
using CentFT0CVariant1 = CentFT0CVariant1s::iterator;
94+
using CentFT0CVariant2 = CentFT0CVariant2s::iterator;
95+
using CentFT0MOuterA = CentFT0MOuterAs::iterator;
96+
9197
using BCCentFT0M = BCCentFT0Ms::iterator;
9298
using BCCentFT0A = BCCentFT0As::iterator;
9399
using BCCentFT0C = BCCentFT0Cs::iterator;

Common/DataModel/Multiplicity.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ DECLARE_SOA_TABLE(MFTMults, "AOD", "MFTMULT", //! Multiplicity with MFT
143143

144144
DECLARE_SOA_TABLE(FITExtraMults, "AOD", "FITEXTRAMULT", //! Extra information from FIT detectors
145145
mult::MultFV0AOuter,
146+
mult::MultFT0AOuter,
146147
mult::FT0TriggerMask);
147148

148149
using BarrelMults = soa::Join<TrackletMults, TPCMults, PVMults>;

Common/Tasks/centralityQa.cxx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ struct CentralityQa {
207207
} else {
208208
histos.add("hCentFV0A", ";FV0A centrality (%)", kTH1D, {{nBins, 0, 105.}});
209209
histos.add("hCentFT0M", ";FT0M centrality (%)", kTH1D, {{nBins, 0, 105.}});
210+
histos.add("hCentFT0MOuterA", ";FT0M centrality (%)", kTH1D, {{nBins, 0, 105.}});
210211
histos.add("hCentFT0A", ";FT0A centrality (%)", kTH1D, {{nBins, 0, 105.}});
211212
histos.add("hCentFT0C", ";FT0C centrality (%)", kTH1D, {{nBins, 0, 105.}});
212213
histos.add("hCentFT0CVar1", ";FT0CVar1 centrality (%)", kTH1D, {{nBins, 0, 105.}});
@@ -221,6 +222,7 @@ struct CentralityQa {
221222
// profiles of midrapidity multiplicity density
222223
histos.add("hCentProfileFV0A", ";FV0A centrality (%)", kTProfile, {{nBins, 0, 105.}});
223224
histos.add("hCentProfileFT0M", ";FT0M centrality (%)", kTProfile, {{nBins, 0, 105.}});
225+
histos.add("hCentProfileFT0MOuterA", ";FT0M centrality (%)", kTProfile, {{nBins, 0, 105.}});
224226
histos.add("hCentProfileFT0A", ";FT0A centrality (%)", kTProfile, {{nBins, 0, 105.}});
225227
histos.add("hCentProfileFT0C", ";FT0C centrality (%)", kTProfile, {{nBins, 0, 105.}});
226228
histos.add("hCentProfileFT0CVar1", ";FT0CVar1 centrality (%)", kTProfile, {{nBins, 0, 105.}});
@@ -234,6 +236,7 @@ struct CentralityQa {
234236

235237
histos.add("hMultEta05VsCentFV0A", ";FV0A centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV});
236238
histos.add("hMultEta05VsCentFT0M", ";FT0M centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV});
239+
histos.add("hMultEta05VsCentFT0MOuterA", ";FT0M centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV});
237240
histos.add("hMultEta05VsCentFT0A", ";FT0A centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV});
238241
histos.add("hMultEta05VsCentFT0C", ";FT0C centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV});
239242
histos.add("hMultEta05VsCentFT0CVar1", ";FT0CVar1 centrality (%); Multiplicity PV contributors (|#it{#eta}| < 0.5)", kTH2D, {{nBins, 0, 105.}, axisMultiplicityPV});
@@ -326,9 +329,9 @@ struct CentralityQa {
326329

327330
est.hCentrality = dynamic_cast<TH1*>(hCentralityObjects->FindObject(Form("hCalibZeq%s", est.name.c_str())));
328331
if (!est.hCentrality) {
329-
LOGF(info, "Calibration missing for %s", est.name.c_str());
332+
LOGF(debug, "Calibration missing for %s", est.name.c_str());
330333
} else {
331-
LOGF(info, "Calibration loaded for %s", est.name.c_str());
334+
LOGF(debug, "Calibration loaded for %s", est.name.c_str());
332335
}
333336
}
334337

@@ -346,6 +349,7 @@ struct CentralityQa {
346349
requires { collision.centFT0C(); } ||
347350
requires { collision.centFT0CVariant1(); } ||
348351
requires { collision.centFT0CVariant2(); } ||
352+
requires { collision.centFT0MOuterA(); } ||
349353
requires { collision.centFDDM(); } ||
350354
requires { collision.centNTPV(); } ||
351355
requires { collision.centNGlobal(); } ||
@@ -707,7 +711,23 @@ struct CentralityQa {
707711
}
708712
PROCESS_SWITCH(CentralityQa, processRun3_FT0M, "Process with Run 3 FT0M estimator", false);
709713

710-
void processRun3_FT0A(soa::Join<aod::Collisions, aod::EvSels, aod::MultsRun3, aod::CentFT0As>::iterator const& col, aod::BCs const&)
714+
void processRun3_FT0MOuterA(soa::Join<aod::Collisions, aod::EvSels, aod::MultsRun3, aod::FITExtraMults, aod::CentFT0MOuterAs>::iterator const& col, aod::BCs const&)
715+
{
716+
if (!isCollisionAccepted(col)) {
717+
return;
718+
}
719+
720+
Estimator ft0mOuterA = initEstimator(col, "FT0MOuterA");
721+
const float centFT0MOuterA = ft0mOuterA.getCentrality(col.multFT0AOuter() + col.multFT0C(), col.centFT0MOuterA());
722+
723+
LOGF(debug, "centFT0MOuterA=%.0f", centFT0MOuterA);
724+
histos.fill(HIST("hCentFT0MOuterA"), centFT0MOuterA);
725+
histos.fill(HIST("hCentProfileFT0MOuterA"), centFT0MOuterA, col.multNTracksPVetaHalf());
726+
histos.fill(HIST("hMultEta05VsCentFT0MOuterA"), centFT0MOuterA, col.multNTracksPVetaHalf());
727+
}
728+
PROCESS_SWITCH(CentralityQa, processRun3_FT0MOuterA, "Process with Run 3 FT0M estimator", false);
729+
730+
void processRun3_FT0A(soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0As>::iterator const& col)
711731
{
712732
if (!isCollisionAccepted(col)) {
713733
return;

Common/Tools/Multiplicity/MultModule.h

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ static const std::vector<std::string> tableNames{
9999
"BCCentFT0As",
100100
"BCCentFT0Cs",
101101
"CentFT0MAnchorCols",
102-
"CentFT0MAnchorBCs"};
103-
104-
static constexpr int nTablesConst = 41;
102+
"CentFT0MAnchorBCs",
103+
"CentFT0MOuterAs"};
105104

105+
static constexpr int nTablesConst = 42;
106106
static const std::vector<std::string> parameterNames{"enable"};
107107
static const int defaultParameters[nTablesConst][nParameters]{
108108
{-1},
@@ -145,6 +145,7 @@ static const int defaultParameters[nTablesConst][nParameters]{
145145
{-1},
146146
{-1},
147147
{-1},
148+
{-1},
148149
{-1}};
149150

150151
// table index : match order above
@@ -191,6 +192,7 @@ enum tableIndex { kFV0Mults, // standard
191192
kBCCentFT0Cs, // bc centrality
192193
kCentFT0MAnchorCols, // standard Run 3
193194
kCentFT0MAnchorBCs, // standard Run 3
195+
kCentFT0MOuterAs, // standard Run 3
194196
kNTables };
195197

196198
struct products : o2::framework::ProducesGroup {
@@ -228,6 +230,7 @@ struct products : o2::framework::ProducesGroup {
228230
o2::framework::Produces<aod::CentRun2CL1s> centRun2CL1;
229231
o2::framework::Produces<aod::CentFV0As> centFV0A;
230232
o2::framework::Produces<aod::CentFT0Ms> centFT0M;
233+
o2::framework::Produces<aod::CentFT0MOuterAs> centFT0MOuterA;
231234
o2::framework::Produces<aod::CentFT0As> centFT0A;
232235
o2::framework::Produces<aod::CentFT0Cs> centFT0C;
233236
o2::framework::Produces<aod::CentFT0CVariant1s> centFT0CVariant1;
@@ -255,6 +258,7 @@ struct multEntry {
255258
float multFV0C = 0.0f;
256259
float multFV0AOuter = 0.0f;
257260
float multFT0A = 0.0f;
261+
float multFT0AOuter = 0.0f;
258262
float multFT0C = 0.0f;
259263
float multFDDA = 0.0f;
260264
float multFDDC = 0.0f;
@@ -284,6 +288,7 @@ struct multEntry {
284288
float multFV0AZeq = -999.0f;
285289
float multFV0CZeq = -999.0f;
286290
float multFT0AZeq = -999.0f;
291+
float multFT0AOuterZeq = -999.0f;
287292
float multFT0CZeq = -999.0f;
288293
float multFDDAZeq = -999.0f;
289294
float multFDDCZeq = -999.0f;
@@ -453,6 +458,7 @@ class MultModule
453458
CalibrationInfo ft0mInfo = CalibrationInfo("FT0");
454459
CalibrationInfo ft0mColInfo = CalibrationInfo("FT0AnchorCol");
455460
CalibrationInfo ft0mBcInfo = CalibrationInfo("FT0AnchorBc");
461+
CalibrationInfo FT0MOuterAInfo = CalibrationInfo("FT0MOuterA");
456462
CalibrationInfo ft0aInfo = CalibrationInfo("FT0A");
457463
CalibrationInfo ft0cInfo = CalibrationInfo("FT0C");
458464
CalibrationInfo ft0cVariant1Info = CalibrationInfo("FT0Cvar1");
@@ -715,7 +721,7 @@ class MultModule
715721
auto amplitude = fv0.amplitude()[ii];
716722
auto channel = fv0.channel()[ii];
717723
mults.multFV0A += amplitude;
718-
if (channel > 7) {
724+
if (channel > 7) { // Outer ring only
719725
mults.multFV0AOuter += amplitude;
720726
}
721727
}
@@ -726,15 +732,19 @@ class MultModule
726732
if (collision.has_foundFT0()) {
727733
const auto& ft0 = collision.foundFT0();
728734
mults.fitTriggerMask = ft0.triggerMask();
729-
for (const auto& amplitude : ft0.amplitudeA()) {
730-
mults.multFT0A += amplitude;
735+
for (size_t ii = 0; ii < ft0.amplitudeA().size(); ii++) {
736+
mults.multFT0A += ft0.amplitudeA()[ii];
737+
if (ft0.channelA()[ii] > 31) { // Outer ring only
738+
mults.multFT0AOuter += ft0.amplitudeA()[ii];
739+
}
731740
}
732741
for (const auto& amplitude : ft0.amplitudeC()) {
733742
mults.multFT0C += amplitude;
734743
}
735744
} else {
736745
mults.multFT0A = -999.f;
737746
mults.multFT0C = -999.f;
747+
mults.multFT0AOuter = -999.f;
738748
}
739749
if (collision.has_foundFDD()) {
740750
const auto& fdd = collision.foundFDD();
@@ -772,7 +782,7 @@ class MultModule
772782
cursors.tableFV0(mults.multFV0A, mults.multFV0C);
773783
}
774784
if (internalOpts.mEnabledTables[kFITExtraMults]) {
775-
cursors.tableFITExtraMults(mults.multFV0AOuter, mults.fitTriggerMask);
785+
cursors.tableFITExtraMults(mults.multFV0AOuter, mults.multFT0AOuter, mults.fitTriggerMask);
776786
cursors.tableFV0AOuterMults(mults.multFV0AOuter); // Keep for backwards compatibility
777787
}
778788
if (internalOpts.mEnabledTables[kFT0Mults]) {
@@ -807,6 +817,11 @@ class MultModule
807817
} else {
808818
mults.multFT0AZeq = 0.0f;
809819
}
820+
if (mults.multFT0AOuter > -1.0f && std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {
821+
mults.multFT0AOuterZeq = hVtxZFT0A->Interpolate(0.0) * mults.multFT0AOuter / hVtxZFT0A->Interpolate(collision.posZ());
822+
} else {
823+
mults.multFT0AOuterZeq = 0.0f;
824+
}
810825
if (mults.multFT0C > -1.0f && std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {
811826
mults.multFT0CZeq = hVtxZFT0C->Interpolate(0.0) * mults.multFT0C / hVtxZFT0C->Interpolate(collision.posZ());
812827
} else {
@@ -1224,6 +1239,7 @@ class MultModule
12241239
ft0mInfo.mCalibrationStored = false;
12251240
ft0mColInfo.mCalibrationStored = false;
12261241
ft0mBcInfo.mCalibrationStored = false;
1242+
FT0MOuterAInfo.mCalibrationStored = false;
12271243
ft0aInfo.mCalibrationStored = false;
12281244
ft0cInfo.mCalibrationStored = false;
12291245
ft0cVariant1Info.mCalibrationStored = false;
@@ -1265,6 +1281,8 @@ class MultModule
12651281
getccdb(ft0mColInfo, internalOpts.generatorName);
12661282
if (internalOpts.mEnabledTables[kCentFT0MAnchorBCs])
12671283
getccdb(ft0mBcInfo, internalOpts.generatorName);
1284+
if (internalOpts.mEnabledTables[kCentFT0MOuterAs])
1285+
getccdb(FT0MOuterAInfo, internalOpts.generatorName);
12681286
if (internalOpts.mEnabledTables[kCentFT0As] || internalOpts.mEnabledTables[kBCCentFT0As])
12691287
getccdb(ft0aInfo, internalOpts.generatorName);
12701288
if (internalOpts.mEnabledTables[kCentFT0Cs] || internalOpts.mEnabledTables[kBCCentFT0Cs])
@@ -1353,6 +1371,8 @@ class MultModule
13531371
populateTable(cursors.centFT0MAnchorCol, ft0mColInfo, mults[iEv].multFT0AZeq + mults[iEv].multFT0CZeq, isInelGt0);
13541372
if (internalOpts.mEnabledTables[kCentFT0Ms])
13551373
populateTable(cursors.centFT0MAnchorBC, ft0mBcInfo, mults[iEv].multFT0AZeq + mults[iEv].multFT0CZeq, isInelGt0);
1374+
if (internalOpts.mEnabledTables[kCentFT0MOuterAs])
1375+
populateTable(cursors.centFT0MOuterA, FT0MOuterAInfo, mults[iEv].multFT0AOuterZeq + mults[iEv].multFT0CZeq, isInelGt0);
13561376
if (internalOpts.mEnabledTables[kCentFT0As])
13571377
populateTable(cursors.centFT0A, ft0aInfo, mults[iEv].multFT0AZeq, isInelGt0);
13581378
if (internalOpts.mEnabledTables[kCentFT0Cs])

0 commit comments

Comments
 (0)