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
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 o2::aod
{
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 Down Expand Up @@ -100,6 +99,10 @@ DECLARE_SOA_COLUMN(TimeToPrevious, timeToPrevious, float); //!
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); //!

} // namespace mult
DECLARE_SOA_TABLE(FV0Mults, "AOD", "FV0MULT", //! Multiplicity with the FV0 detector
mult::MultFV0A, mult::MultFV0C,
Expand All @@ -126,6 +129,11 @@ DECLARE_SOA_TABLE(PVMults, "AOD", "PVMULT", //! Multiplicity from the PV contrib
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
34 changes: 28 additions & 6 deletions Common/Tasks/centralityStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@ struct centralityStudy {
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 @@ struct centralityStudy {
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 @@ struct centralityStudy {
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 @@ -608,7 +618,7 @@ struct centralityStudy {
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 @@ struct centralityStudy {
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 @@ struct centralityStudy {
}
}

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 Down
10 changes: 6 additions & 4 deletions Common/Tools/Multiplicity/MultModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static const int defaultParameters[nTablesConst][nParameters]{

// 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,7 @@ struct products : o2::framework::ProducesGroup {
//__________________________________________________
// multiplicity tables
o2::framework::Produces<aod::FV0Mults> tableFV0;
o2::framework::Produces<aod::FV0AOuterMults> tableFV0AOuter;
o2::framework::Produces<aod::FITExtraMults> tableFITExtraMults;
o2::framework::Produces<aod::FT0Mults> tableFT0;
o2::framework::Produces<aod::FDDMults> tableFDD;
o2::framework::Produces<aod::ZDCMults> tableZDC;
Expand Down Expand Up @@ -256,6 +256,7 @@ struct multEntry {
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 @@ -705,6 +706,7 @@ class MultModule
}
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 +752,8 @@ class MultModule
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);
}
if (internalOpts.mEnabledTables[kFT0Mults]) {
cursors.tableFT0(mults.multFT0A, mults.multFT0C);
Expand Down
Loading