Skip to content
Open
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
6 changes: 6 additions & 0 deletions Common/DataModel/Centrality.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down
1 change: 1 addition & 0 deletions Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
[](int multPveta1) -> bool { return multPveta1 > 1; });

// forward track counters
DECLARE_SOA_COLUMN(MFTNalltracks, mftNalltracks, int); //! overall counter, uses AO2D coll assoc

Check failure on line 58 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(MFTNtracks, mftNtracks, int); //! reassigned, uses mult group software

Check failure on line 59 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

// MC
DECLARE_SOA_COLUMN(MultMCFT0A, multMCFT0A, int); //!
Expand Down Expand Up @@ -100,7 +100,7 @@
DECLARE_SOA_COLUMN(TimeToNeNext, timeToNeNext, float); //!

// Extra information from FIT detectors
DECLARE_SOA_COLUMN(FT0TriggerMask, ft0TriggerMask, uint8_t); //!

Check failure on line 103 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(MultFV0AOuter, multFV0AOuter, float); //! FV0 without innermost ring
DECLARE_SOA_COLUMN(MultFT0AOuter, multFT0AOuter, float); //! FT0A without innermost ring

Expand Down Expand Up @@ -143,6 +143,7 @@

DECLARE_SOA_TABLE(FITExtraMults, "AOD", "FITEXTRAMULT", //! Extra information from FIT detectors
mult::MultFV0AOuter,
mult::MultFT0AOuter,
mult::FT0TriggerMask);

using BarrelMults = soa::Join<TrackletMults, TPCMults, PVMults>;
Expand Down Expand Up @@ -349,7 +350,7 @@
}
namespace multBC
{
DECLARE_SOA_INDEX_COLUMN(FT0Mult, ft0Mult);

Check failure on line 353 in Common/DataModel/Multiplicity.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
}

// for QA purposes
Expand Down
26 changes: 23 additions & 3 deletions Common/Tasks/centralityQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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.}});
Expand All @@ -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.}});
Expand All @@ -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});
Expand Down Expand Up @@ -303,9 +306,9 @@ struct CentralityQa {

est.hCentrality = dynamic_cast<TH1*>(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());
}
}

Expand All @@ -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(); } ||
Expand Down Expand Up @@ -684,7 +688,23 @@ struct CentralityQa {
}
PROCESS_SWITCH(CentralityQa, processRun3_FT0M, "Process with Run 3 FT0M estimator", false);

void processRun3_FT0A(soa::Join<aod::Collisions, aod::EvSels, aod::MultsRun3, aod::CentFT0As>::iterator const& col, aod::BCs const&)
void processRun3_FT0MOuterA(soa::Join<aod::Collisions, aod::EvSels, aod::MultsRun3, aod::FITExtraMults, aod::CentFT0MOuterAs>::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<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0As>::iterator const& col)
{
if (!isCollisionAccepted(col)) {
return;
Expand Down
34 changes: 27 additions & 7 deletions Common/Tools/Multiplicity/MultModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@
"BCCentFT0As",
"BCCentFT0Cs",
"CentFT0MAnchorCols",
"CentFT0MAnchorBCs"};

static constexpr int nTablesConst = 41;
"CentFT0MAnchorBCs",
"CentFT0MOuterAs"};

static constexpr int nTablesConst = 42;
static const std::vector<std::string> parameterNames{"enable"};
static const int defaultParameters[nTablesConst][nParameters]{
{-1},
Expand Down Expand Up @@ -145,6 +145,7 @@
{-1},
{-1},
{-1},
{-1},
{-1}};

// table index : match order above
Expand Down Expand Up @@ -191,6 +192,7 @@
kBCCentFT0Cs, // bc centrality
kCentFT0MAnchorCols, // standard Run 3
kCentFT0MAnchorBCs, // standard Run 3
kCentFT0MOuterAs, // standard Run 3
kNTables };

struct products : o2::framework::ProducesGroup {
Expand Down Expand Up @@ -228,6 +230,7 @@
o2::framework::Produces<aod::CentRun2CL1s> centRun2CL1;
o2::framework::Produces<aod::CentFV0As> centFV0A;
o2::framework::Produces<aod::CentFT0Ms> centFT0M;
o2::framework::Produces<aod::CentFT0MOuterAs> centFT0MOuterA;
o2::framework::Produces<aod::CentFT0As> centFT0A;
o2::framework::Produces<aod::CentFT0Cs> centFT0C;
o2::framework::Produces<aod::CentFT0CVariant1s> centFT0CVariant1;
Expand Down Expand Up @@ -255,6 +258,7 @@
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;
Expand Down Expand Up @@ -284,6 +288,7 @@
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;
Expand Down Expand Up @@ -453,6 +458,7 @@
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");
Expand Down Expand Up @@ -609,9 +615,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 618 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 620 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 @@ -715,7 +721,7 @@
auto amplitude = fv0.amplitude()[ii];
auto channel = fv0.channel()[ii];
mults.multFV0A += amplitude;
if (channel > 7) {
if (channel > 7) { // Outer ring only

Check failure on line 724 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 All @@ -726,15 +732,19 @@
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

Check failure on line 737 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.multFT0AOuter += ft0.amplitudeA()[ii];
}
}
for (const auto& amplitude : ft0.amplitudeC()) {
mults.multFT0C += amplitude;
}
} else {
mults.multFT0A = -999.f;
mults.multFT0C = -999.f;
mults.multFT0AOuter = -999.f;
}
if (collision.has_foundFDD()) {
const auto& fdd = collision.foundFDD();
Expand Down Expand Up @@ -772,7 +782,7 @@
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]) {
Expand All @@ -794,7 +804,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 807 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 @@ -802,11 +812,16 @@
cursors.tableFV0Zeqs(mults.multFV0AZeq);
}
if (internalOpts.mEnabledTables[kFT0MultZeqs]) {
if (mults.multFT0A > -1.0f && std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {

Check failure on line 815 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.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 {
Expand Down Expand Up @@ -1224,6 +1239,7 @@
ft0mInfo.mCalibrationStored = false;
ft0mColInfo.mCalibrationStored = false;
ft0mBcInfo.mCalibrationStored = false;
FT0MOuterAInfo.mCalibrationStored = false;
ft0aInfo.mCalibrationStored = false;
ft0cInfo.mCalibrationStored = false;
ft0cVariant1Info.mCalibrationStored = false;
Expand Down Expand Up @@ -1265,6 +1281,8 @@
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])
Expand Down Expand Up @@ -1353,6 +1371,8 @@
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])
Expand Down
Loading