Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions Common/DataModel/Centrality.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@ DECLARE_SOA_COLUMN(CentRun2CL1, centRun2CL1, float); //! Run 2
DECLARE_SOA_COLUMN(CentRun2RefMult5, centRun2RefMult5, float); //! Run 2 cent. from ref. mult. estimator, eta 0.5
DECLARE_SOA_COLUMN(CentRun2RefMult8, centRun2RefMult8, float); //! Run 2 cent. from ref. mult. estimator, eta 0.8

DECLARE_SOA_COLUMN(CentFV0A, centFV0A, float); //! Run 3 cent. from FV0A multiplicities
DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float); //! Run 3 cent. from FT0A+FT0C multiplicities
DECLARE_SOA_COLUMN(CentFT0A, centFT0A, float); //! Run 3 cent. from FT0A multiplicity
DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float); //! Run 3 cent. from FT0C multiplicity
DECLARE_SOA_COLUMN(CentFT0CVariant1, centFT0CVariant1, float); //! Run 3 cent. from FT0C multiplicity
DECLARE_SOA_COLUMN(CentFT0CVariant2, centFT0CVariant2, float); //! Run 3 cent. from FT0C multiplicity, uses classical truncated Nancestors (NOT recommended, cross-check only!)
DECLARE_SOA_COLUMN(CentFDDM, centFDDM, float); //! Run 3 cent. from FDDA+FDDC multiplicity
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(CentFV0A, centFV0A, float); //! Run 3 cent. from FV0A multiplicities
DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float); //! Run 3 cent. from FT0A+FT0C multiplicities
DECLARE_SOA_COLUMN(CentFT0MLightIonAnchorCol, centFT0MLightIonAnchorCol, float); //! Run 3 cent. from FT0A+FT0C multiplicities - light ion only - 90% anchor - collision based (NOT recommended, cross-check only!)
DECLARE_SOA_COLUMN(CentFT0MLightIonAnchorBC, centFT0MLightIonAnchorBC, float); //! Run 3 cent. from FT0A+FT0C multiplicities - light ion only - 90% anchor - bunch crossing based (NOT recommended, cross-check only!)
DECLARE_SOA_COLUMN(CentFT0A, centFT0A, float); //! Run 3 cent. from FT0A multiplicity
DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float); //! Run 3 cent. from FT0C multiplicity
DECLARE_SOA_COLUMN(CentFT0CVariant1, centFT0CVariant1, float); //! Run 3 cent. from FT0C multiplicity
DECLARE_SOA_COLUMN(CentFT0CVariant2, centFT0CVariant2, float); //! Run 3 cent. from FT0C multiplicity, uses classical truncated Nancestors (NOT recommended, cross-check only!)
DECLARE_SOA_COLUMN(CentFDDM, centFDDM, float); //! Run 3 cent. from FDDA+FDDC multiplicity
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
} // namespace cent

// Run 2 tables
Expand All @@ -59,8 +61,10 @@ DECLARE_SOA_TABLE(CentNGlobals, "AOD", "CENTNGLOBAL", cent::CentNGlobal); //! Ru
DECLARE_SOA_TABLE(CentMFTs, "AOD", "CENTMFT", cent::CentMFT); //! Run 3 MFT tracks centrality table

// Run 3 variant tables
DECLARE_SOA_TABLE(CentFT0CVariant1s, "AOD", "CENTFT0Cvar1", cent::CentFT0CVariant1); //! Run 3 FT0C variant 1
DECLARE_SOA_TABLE(CentFT0CVariant2s, "AOD", "CENTFT0Cvar2", cent::CentFT0CVariant2); //! Run 3 FT0C variant 1 - uses truncated Nancestors in glauber fit. Not recommended! for cross-checks only
DECLARE_SOA_TABLE(CentFT0CVariant1s, "AOD", "CENTFT0Cvar1", cent::CentFT0CVariant1); //! Run 3 FT0C variant 1
DECLARE_SOA_TABLE(CentFT0CVariant2s, "AOD", "CENTFT0Cvar2", cent::CentFT0CVariant2); //! Run 3 FT0C variant 1 - uses truncated Nancestors in glauber fit. Not recommended! for cross-checks only
DECLARE_SOA_TABLE(CentFT0MLightIonAnchorCols, "AOD", "CENTFT0MLICOL", cent::CentFT0MLightIonAnchorCol); //! Run 3 Light ions FT0M - Traditional anchor at 90% with Glauber. Colliison based calibration. Not recommended! for cross-checks only
DECLARE_SOA_TABLE(CentFT0MLightIonAnchorBCs, "AOD", "CENTFT0MLIBC", cent::CentFT0MLightIonAnchorBC); //! Run 3 Light ions FT0M - Traditional anchor at 90% with Glauber. Bunch crossing based calibration. Not recommended! for cross-checks only

// 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
Expand Down
67 changes: 44 additions & 23 deletions Common/Tools/Multiplicity/MultModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
static const std::vector<std::string> tableNames{
// multiplicity subcomponent
"FV0Mults",
"FV0AOuterMults",
"FITExtraMults",
"FT0Mults",
"FDDMults",
"ZDCMults",
Expand Down Expand Up @@ -97,9 +97,11 @@
"CentMFTs",
"BCCentFT0Ms",
"BCCentFT0As",
"BCCentFT0Cs"};
"BCCentFT0Cs",
"CentFT0MLightIonAnchorCols",
"CentFT0MLightIonAnchorBCs"};

static constexpr int nTablesConst = 39;
static constexpr int nTablesConst = 41;

static const std::vector<std::string> parameterNames{"enable"};
static const int defaultParameters[nTablesConst][nParameters]{
Expand Down Expand Up @@ -141,6 +143,8 @@
{-1},
{-1},
{-1},
{-1},
{-1},
{-1}};

// table index : match order above
Expand All @@ -166,25 +170,27 @@
kMultsGlobal, // requires track selection task

// centrality subcomponent
kCentRun2V0Ms, // Run 2
kCentRun2V0As, // Run 2
kCentRun2SPDTrks, // Run 2
kCentRun2SPDClss, // Run 2
kCentRun2CL0s, // Run 2
kCentRun2CL1s, // Run 2
kCentFV0As, // standard Run 3
kCentFT0Ms, // standard Run 3
kCentFT0As, // standard Run 3
kCentFT0Cs, // standard Run 3
kCentFT0CVariant1s, // standard Run 3
kCentFT0CVariant2s, // standard Run 3
kCentFDDMs, // standard Run 3
kCentNTPVs, // standard Run 3
kCentNGlobals, // requires track selection task
kCentMFTs, // requires MFT task
kBCCentFT0Ms, // bc centrality
kBCCentFT0As, // bc centrality
kBCCentFT0Cs, // bc centrality
kCentRun2V0Ms, // Run 2
kCentRun2V0As, // Run 2
kCentRun2SPDTrks, // Run 2
kCentRun2SPDClss, // Run 2
kCentRun2CL0s, // Run 2
kCentRun2CL1s, // Run 2
kCentFV0As, // standard Run 3
kCentFT0Ms, // standard Run 3
kCentFT0As, // standard Run 3
kCentFT0Cs, // standard Run 3
kCentFT0CVariant1s, // standard Run 3
kCentFT0CVariant2s, // standard Run 3
kCentFDDMs, // standard Run 3
kCentNTPVs, // standard Run 3
kCentNGlobals, // requires track selection task
kCentMFTs, // requires MFT task
kBCCentFT0Ms, // bc centrality
kBCCentFT0As, // bc centrality
kBCCentFT0Cs, // bc centrality
kCentFT0MLightIonAnchorCols, // light ion specific
kCentFT0MLightIonAnchorBCs, // light ion specific
kNTables };

struct products : o2::framework::ProducesGroup {
Expand Down Expand Up @@ -233,6 +239,8 @@
o2::framework::Produces<aod::BCCentFT0As> bcCentFT0A;
o2::framework::Produces<aod::BCCentFT0Cs> bcCentFT0C;
o2::framework::Produces<aod::BCCentFT0Ms> bcCentFT0M;
o2::framework::Produces<aod::CentFT0MLightIonAnchorCols> centFT0MLightIonAnchorCol;
o2::framework::Produces<aod::CentFT0MLightIonAnchorBCs> centFT0MLightIonAnchorBC;

//__________________________________________________
// centrality tables per BC
Expand Down Expand Up @@ -443,6 +451,8 @@

CalibrationInfo fv0aInfo = CalibrationInfo("FV0");
CalibrationInfo ft0mInfo = CalibrationInfo("FT0");
CalibrationInfo ft0mColInfo = CalibrationInfo("FT0LightIonAncCol");
CalibrationInfo ft0mBcInfo = CalibrationInfo("FT0LightIonAncBc");
CalibrationInfo ft0aInfo = CalibrationInfo("FT0A");
CalibrationInfo ft0cInfo = CalibrationInfo("FT0C");
CalibrationInfo ft0cVariant1Info = CalibrationInfo("FT0Cvar1");
Expand Down Expand Up @@ -599,9 +609,9 @@
if (internalOpts.mEnabledTables[kPVMults]) {
if (std::abs(track.eta()) < 1.0) {
mults.multNContribsEta1++; // pvmults
if (std::abs(track.eta()) < 0.8) {

Check failure on line 612 in Common/Tools/Multiplicity/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multNContribs++; // pvmults
if (std::abs(track.eta()) < 0.5) {

Check failure on line 614 in Common/Tools/Multiplicity/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multNContribsEtaHalf++; // pvmults
}
}
Expand Down Expand Up @@ -705,7 +715,7 @@
auto amplitude = fv0.amplitude()[ii];
auto channel = fv0.channel()[ii];
mults.multFV0A += amplitude;
if (channel > 7) {

Check failure on line 718 in Common/Tools/Multiplicity/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multFV0AOuter += amplitude;
}
}
Expand Down Expand Up @@ -784,7 +794,7 @@
//_______________________________________________________________________
// vertex-Z equalized signals
if (internalOpts.mEnabledTables[kFV0MultZeqs]) {
if (mults.multFV0A > -1.0f && std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {

Check failure on line 797 in Common/Tools/Multiplicity/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multFV0AZeq = hVtxZFV0A->Interpolate(0.0) * mults.multFV0A / hVtxZFV0A->Interpolate(collision.posZ());
} else {
mults.multFV0AZeq = 0.0f;
Expand All @@ -792,12 +802,12 @@
cursors.tableFV0Zeqs(mults.multFV0AZeq);
}
if (internalOpts.mEnabledTables[kFT0MultZeqs]) {
if (mults.multFT0A > -1.0f && std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {

Check failure on line 805 in Common/Tools/Multiplicity/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multFT0AZeq = hVtxZFT0A->Interpolate(0.0) * mults.multFT0A / hVtxZFT0A->Interpolate(collision.posZ());
} else {
mults.multFT0AZeq = 0.0f;
}
if (mults.multFT0C > -1.0f && std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {

Check failure on line 810 in Common/Tools/Multiplicity/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multFT0CZeq = hVtxZFT0C->Interpolate(0.0) * mults.multFT0C / hVtxZFT0C->Interpolate(collision.posZ());
} else {
mults.multFT0CZeq = 0.0f;
Expand All @@ -805,12 +815,12 @@
cursors.tableFT0Zeqs(mults.multFT0AZeq, mults.multFT0CZeq);
}
if (internalOpts.mEnabledTables[kFDDMultZeqs]) {
if (mults.multFDDA > -1.0f && std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {

Check failure on line 818 in Common/Tools/Multiplicity/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multFDDAZeq = hVtxZFDDA->Interpolate(0.0) * mults.multFDDA / hVtxZFDDA->Interpolate(collision.posZ());
} else {
mults.multFDDAZeq = 0.0f;
}
if (mults.multFDDC > -1.0f && std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {

Check failure on line 823 in Common/Tools/Multiplicity/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multFDDCZeq = hVtxZFDDC->Interpolate(0.0) * mults.multFDDC / hVtxZFDDC->Interpolate(collision.posZ());
} else {
mults.multFDDCZeq = 0.0f;
Expand All @@ -835,9 +845,9 @@
if (track.isPVContributor()) {
if (std::abs(track.eta()) < 1.0) {
mults.multNContribsEta1++; // pvmults
if (std::abs(track.eta()) < 0.8) {

Check failure on line 848 in Common/Tools/Multiplicity/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multNContribs++; // pvmults
if (std::abs(track.eta()) < 0.5) {

Check failure on line 850 in Common/Tools/Multiplicity/MultModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mults.multNContribsEtaHalf++; // pvmults
}
}
Expand Down Expand Up @@ -1212,6 +1222,8 @@

fv0aInfo.mCalibrationStored = false;
ft0mInfo.mCalibrationStored = false;
ft0mColInfo.mCalibrationStored = false;
ft0mBcInfo.mCalibrationStored = false;
ft0aInfo.mCalibrationStored = false;
ft0cInfo.mCalibrationStored = false;
ft0cVariant1Info.mCalibrationStored = false;
Expand Down Expand Up @@ -1249,6 +1261,10 @@
getccdb(fv0aInfo, internalOpts.generatorName);
if (internalOpts.mEnabledTables[kCentFT0Ms] || internalOpts.mEnabledTables[kBCCentFT0Ms])
getccdb(ft0mInfo, internalOpts.generatorName);
if (internalOpts.mEnabledTables[kCentFT0MLightIonAnchorCols])
getccdb(ft0mColInfo, internalOpts.generatorName);
if (internalOpts.mEnabledTables[kCentFT0MLightIonAnchorBCs])
getccdb(ft0mBcInfo, internalOpts.generatorName);
if (internalOpts.mEnabledTables[kCentFT0As] || internalOpts.mEnabledTables[kBCCentFT0As])
getccdb(ft0aInfo, internalOpts.generatorName);
if (internalOpts.mEnabledTables[kCentFT0Cs] || internalOpts.mEnabledTables[kBCCentFT0Cs])
Expand Down Expand Up @@ -1286,7 +1302,8 @@
internalOpts.mEnabledTables[kCentFDDMs] ||
internalOpts.mEnabledTables[kCentNTPVs] || internalOpts.mEnabledTables[kCentNGlobals] ||
internalOpts.mEnabledTables[kCentMFTs] || internalOpts.mEnabledTables[kBCCentFT0Ms] ||
internalOpts.mEnabledTables[kBCCentFT0As] || internalOpts.mEnabledTables[kBCCentFT0Cs]) {
internalOpts.mEnabledTables[kBCCentFT0As] || internalOpts.mEnabledTables[kBCCentFT0Cs] ||
internalOpts.mEnabledTables[kCentFT0MLightIonAnchorCols] || internalOpts.mEnabledTables[kCentFT0MLightIonAnchorBCs]) {
// check and update centrality calibration objects for Run 3
const auto& firstbc = bcs.begin();
ConfigureCentralityRun3(ccdb, metadataInfo, firstbc);
Expand Down Expand Up @@ -1332,6 +1349,10 @@
populateTable(cursors.centFV0A, fv0aInfo, mults[iEv].multFV0AZeq, isInelGt0);
if (internalOpts.mEnabledTables[kCentFT0Ms])
populateTable(cursors.centFT0M, ft0mInfo, mults[iEv].multFT0AZeq + mults[iEv].multFT0CZeq, isInelGt0);
if (internalOpts.mEnabledTables[kCentFT0Ms])
populateTable(cursors.centFT0MLightIonAnchorCol, ft0mColInfo, mults[iEv].multFT0AZeq + mults[iEv].multFT0CZeq, isInelGt0);
if (internalOpts.mEnabledTables[kCentFT0Ms])
populateTable(cursors.centFT0MLightIonAnchorBC, ft0mBcInfo, mults[iEv].multFT0AZeq + mults[iEv].multFT0CZeq, isInelGt0);
if (internalOpts.mEnabledTables[kCentFT0As])
populateTable(cursors.centFT0A, ft0aInfo, mults[iEv].multFT0AZeq, isInelGt0);
if (internalOpts.mEnabledTables[kCentFT0Cs])
Expand Down
Loading