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
36 changes: 22 additions & 14 deletions Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,19 @@
{
namespace mult
{
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, //!
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, //!
[](float multFV0A, float multFV0C) -> float { return multFV0A + multFV0C; });
DECLARE_SOA_DYNAMIC_COLUMN(MultFT0M, multFT0M, //!
[](float multFT0A, float multFT0C) -> float { return multFT0A + multFT0C; });
Expand All @@ -56,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,6 +99,10 @@
DECLARE_SOA_COLUMN(TimeToNext, timeToNext, float); //!
DECLARE_SOA_COLUMN(TimeToNeNext, timeToNeNext, float); //!

// Extra information from FIT detectors
DECLARE_SOA_COLUMN(MultFV0AOuter, multFV0AOuter, float); //! FV0 without innermost ring
DECLARE_SOA_COLUMN(FT0TriggerMask, ft0TriggerMask, uint8_t); //!

Check failure on line 104 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.

} // namespace mult
DECLARE_SOA_TABLE(FV0Mults, "AOD", "FV0MULT", //! Multiplicity with the FV0 detector
mult::MultFV0A, mult::MultFV0C,
Expand All @@ -126,6 +129,11 @@
mult::IsInelGt1<mult::MultNTracksPVeta1>);
DECLARE_SOA_TABLE(MFTMults, "AOD", "MFTMULT", //! Multiplicity with MFT
mult::MFTNalltracks, mult::MFTNtracks);

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

using BarrelMults = soa::Join<TrackletMults, TPCMults, PVMults>;
using Mults = soa::Join<BarrelMults, FV0Mults, FT0Mults, FDDMults, ZDCMults>;
using MultsRun3 = soa::Join<TPCMults, PVMults, FV0Mults, FT0Mults, FDDMults, ZDCMults>;
Expand Down Expand Up @@ -284,7 +292,7 @@
}
namespace multBC
{
DECLARE_SOA_INDEX_COLUMN(FT0Mult, ft0Mult);

Check failure on line 295 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
34 changes: 28 additions & 6 deletions Common/Tasks/centralityStudy.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in Common/Tasks/centralityStudy.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -20,6 +20,7 @@
#include "Common/DataModel/Multiplicity.h"

#include <CCDB/BasicCCDBManager.h>
#include <DataFormatsFIT/Triggers.h>
#include <DataFormatsParameters/GRPECSObject.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
Expand Down Expand Up @@ -91,6 +92,7 @@
Configurable<bool> requireIsVertexTOFmatched{"requireIsVertexTOFmatched", false, "require events with at least one of vertex contributors matched to TOF"};
Configurable<bool> requireIsVertexTRDmatched{"requireIsVertexTRDmatched", false, "require events with at least one of vertex contributors matched to TRD"};
Configurable<bool> rejectSameBunchPileup{"rejectSameBunchPileup", true, "reject collisions in case of pileup with another collision in the same foundBC"};
Configurable<bool> rejectIsFlangeEvent{"rejectIsFlangeEvent", false, "At least one channel with -350 TDC < time < -450 TDC"};

Configurable<bool> rejectITSinROFpileupStandard{"rejectITSinROFpileupStandard", false, "reject collisions in case of in-ROF ITS pileup (standard)"};
Configurable<bool> rejectITSinROFpileupStrict{"rejectITSinROFpileupStrict", false, "reject collisions in case of in-ROF ITS pileup (strict)"};
Expand Down Expand Up @@ -201,8 +203,12 @@
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(11, "Neighbour rejection");
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(12, "no ITS in-ROF pileup (standard)");
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(13, "no ITS in-ROF pileup (strict)");
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(14, "is UPC event");
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(15, "rejectCollInTimeRangeNarrow");
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(16, "em/upc rejection");
histos.get<TH1>(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(17, "isFlangeEvent");

histos.add("hFT0A_Collisions", "hFT0C_Collisions", kTH1D, {axisMultUltraFineFT0A});
histos.add("hFT0A_Collisions", "hFT0A_Collisions", kTH1D, {axisMultUltraFineFT0A});
histos.add("hFT0C_Collisions", "hFT0C_Collisions", kTH1D, {axisMultUltraFineFT0C});
histos.add("hFT0M_Collisions", "hFT0M_Collisions", kTH1D, {axisMultUltraFineFT0M});
histos.add("hFV0A_Collisions", "hFV0A_Collisions", kTH1D, {axisMultUltraFineFV0A});
Expand Down Expand Up @@ -372,6 +378,10 @@
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(11, "Neighbour rejection");
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(12, "no ITS in-ROF pileup (standard)");
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(13, "no ITS in-ROF pileup (strict)");
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(14, "is UPC event");
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(15, "rejectCollInTimeRangeNarrow");
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(16, "em/upc rejection");
getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(17, "isFlangeEvent");

histPointers.insert({histPath + "hFT0C_Collisions", histos.add((histPath + "hFT0C_Collisions").c_str(), "hFT0C_Collisions", {kTH1D, {{axisMultUltraFineFT0C}}})});
histPointers.insert({histPath + "hFT0A_Collisions", histos.add((histPath + "hFT0A_Collisions").c_str(), "hFT0A_Collisions", {kTH1D, {{axisMultUltraFineFT0A}}})});
Expand Down Expand Up @@ -525,7 +535,7 @@

// _______________________________________________________

if (applyVtxZ && TMath::Abs(collision.multPVz()) > 10)

Check failure on line 538 in Common/Tasks/centralityStudy.cxx

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.
return;
histos.fill(HIST("hCollisionSelection"), 2);
getHist(TH1, histPath + "hCollisionSelection")->Fill(2);
Expand Down Expand Up @@ -608,7 +618,7 @@
if (!passRejectCollInTimeRangeNarrow) {
return;
}
histos.fill(HIST("hCollisionSelection"), 14 /* Not ITS ROF pileup (strict) */);
histos.fill(HIST("hCollisionSelection"), 14 /* Reject collision in narrow time range */);
getHist(TH1, histPath + "hCollisionSelection")->Fill(14);

if (collision.multFT0C() < upcRejection.maxFT0CforZNACselection &&
Expand All @@ -627,6 +637,18 @@
histos.fill(HIST("hCollisionSelection"), 15 /* pass em/upc rejection */);
getHist(TH1, histPath + "hCollisionSelection")->Fill(15);

if (rejectIsFlangeEvent) {
if constexpr (requires { collision.ft0TriggerMask(); }) {
constexpr int IsFlangeEventId = 7;
std::bitset<8> ft0TriggerMask = collision.ft0TriggerMask();
if (ft0TriggerMask[IsFlangeEventId]) {
return;
}
}
}
histos.fill(HIST("hCollisionSelection"), 16 /* reject flange events */);
getHist(TH1, histPath + "hCollisionSelection")->Fill(16);

// if we got here, we also finally fill the FT0C histogram, please
histos.fill(HIST("hNPVContributors"), collision.multNTracksPV());
histos.fill(HIST("hFT0A_Collisions"), collision.multFT0A() * scaleSignalFT0C);
Expand Down Expand Up @@ -789,22 +811,22 @@
}
}

void processCollisions(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC, aod::FV0AOuterMults>::iterator const& collision, aod::MultBCs const&)
void processCollisions(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC, aod::FITExtraMults>::iterator const& collision, aod::MultBCs const&)
{
genericProcessCollision(collision);
}

void processCollisionsWithResolutionStudy(soa::Join<aod::MultsRun3, aod::MFTMults, aod::Mult2MCExtras, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC, aod::FV0AOuterMults>::iterator const& collision, soa::Join<aod::MultMCExtras, aod::MultHepMCHIs> const&)
void processCollisionsWithResolutionStudy(soa::Join<aod::MultsRun3, aod::MFTMults, aod::Mult2MCExtras, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC, aod::FITExtraMults>::iterator const& collision, soa::Join<aod::MultMCExtras, aod::MultHepMCHIs> const&)
{
genericProcessCollision(collision);
}

void processCollisionsWithCentrality(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::Mults2BC, aod::FV0AOuterMults>::iterator const& collision, aod::MultBCs const&)
void processCollisionsWithCentrality(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::Mults2BC, aod::FITExtraMults>::iterator const& collision, aod::MultBCs const&)
{
genericProcessCollision(collision);
}

void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs, aod::FV0AOuterMults>::iterator const& collision)
void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs, aod::FITExtraMults>::iterator const& collision)
{
genericProcessCollision(collision);
}
Expand All @@ -823,7 +845,7 @@
if (selectFV0OrA && !multbc.multFV0OrA())
return;
histos.fill(HIST("hBCSelection"), 3); // FV0OrA
if (vertexZwithT0 < 100.0f) {

Check failure on line 848 in Common/Tasks/centralityStudy.cxx

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.
if (!multbc.multFT0PosZValid())
return;
if (TMath::Abs(multbc.multFT0PosZ()) > vertexZwithT0)
Expand Down
12 changes: 8 additions & 4 deletions Common/Tools/Multiplicity/MultModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@

// table index : match order above
enum tableIndex { kFV0Mults, // standard
kFV0AOuterMults, // standard
kFITExtraMults, // standard
kFT0Mults, // standard
kFDDMults, // standard
kZDCMults, // standard
Expand Down Expand Up @@ -191,7 +191,8 @@
//__________________________________________________
// multiplicity tables
o2::framework::Produces<aod::FV0Mults> tableFV0;
o2::framework::Produces<aod::FV0AOuterMults> tableFV0AOuter;
o2::framework::Produces<aod::FITExtraMults> tableFITExtraMults;
o2::framework::Produces<aod::FV0AOuterMults> tableFV0AOuterMults;
o2::framework::Produces<aod::FT0Mults> tableFT0;
o2::framework::Produces<aod::FDDMults> tableFDD;
o2::framework::Produces<aod::ZDCMults> tableZDC;
Expand Down Expand Up @@ -256,6 +257,7 @@
float multZPA = 0.0f;
float multZPC = 0.0f;
int multTracklets = 0;
uint8_t fitTriggerMask{};

int multNContribs = 0; // PVMult 0.8
int multNContribsEta1 = 0; // PVMult 1.0
Expand Down Expand Up @@ -589,9 +591,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 594 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 596 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 @@ -695,7 +697,7 @@
auto amplitude = fv0.amplitude()[ii];
auto channel = fv0.channel()[ii];
mults.multFV0A += amplitude;
if (channel > 7) {

Check failure on line 700 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 @@ -705,6 +707,7 @@
}
if (collision.has_foundFT0()) {
const auto& ft0 = collision.foundFT0();
mults.fitTriggerMask = ft0.triggerMask();
for (const auto& amplitude : ft0.amplitudeA()) {
mults.multFT0A += amplitude;
}
Expand Down Expand Up @@ -750,8 +753,9 @@
if (internalOpts.mEnabledTables[kFV0Mults]) {
cursors.tableFV0(mults.multFV0A, mults.multFV0C);
}
if (internalOpts.mEnabledTables[kFV0AOuterMults]) {
cursors.tableFV0AOuter(mults.multFV0AOuter);
if (internalOpts.mEnabledTables[kFITExtraMults]) {
cursors.tableFITExtraMults(mults.multFV0AOuter, mults.fitTriggerMask);
cursors.tableFV0AOuterMults(mults.multFV0AOuter); // Keep for backwards compatibility
}
if (internalOpts.mEnabledTables[kFT0Mults]) {
cursors.tableFT0(mults.multFT0A, mults.multFT0C);
Expand Down
Loading