Skip to content

Commit

Permalink
Merge branch 'AliceO2Group:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Archita-Dash authored Dec 24, 2024
2 parents 5713f91 + f2168b9 commit 5b5fe9c
Show file tree
Hide file tree
Showing 38 changed files with 941 additions and 1,226 deletions.
29 changes: 16 additions & 13 deletions Common/DataModel/Multiplicity.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,20 @@ namespace o2::aod
{
namespace mult
{
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, //!
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, //!
[](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 @@ -95,6 +96,8 @@ DECLARE_SOA_COLUMN(TimeToNeNext, timeToNeNext, float); //!
DECLARE_SOA_TABLE(FV0Mults, "AOD", "FV0MULT", //! Multiplicity with the FV0 detector
mult::MultFV0A, mult::MultFV0C,
mult::MultFV0M<mult::MultFV0A, mult::MultFV0C>);
DECLARE_SOA_TABLE(FV0AOuterMults, "AOD", "FVOAOUTERMULT", //! FV0 without innermost ring
mult::MultFV0AOuter);
DECLARE_SOA_TABLE(FT0Mults, "AOD", "FT0MULT", //! Multiplicity with the FT0 detector
mult::MultFT0A, mult::MultFT0C,
mult::MultFT0M<mult::MultFT0A, mult::MultFT0C>);
Expand Down
12 changes: 11 additions & 1 deletion Common/TableProducer/multiplicityTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ static const int defaultParameters[nTables][nParameters]{{-1}, {-1}, {-1}, {-1},
struct MultiplicityTable {
SliceCache cache;
Produces<aod::FV0Mults> tableFV0; // 0
Produces<aod::FV0AOuterMults> tableFV0AOuter; // 0-bis (produced with FV0)
Produces<aod::FT0Mults> tableFT0; // 1
Produces<aod::FDDMults> tableFDD; // 2
Produces<aod::ZDCMults> tableZDC; // 3
Expand Down Expand Up @@ -307,6 +308,7 @@ struct MultiplicityTable {
switch (i) {
case kFV0Mults: // FV0
tableFV0.reserve(collisions.size());
tableFV0AOuter.reserve(collisions.size());
break;
case kFT0Mults: // FT0
tableFT0.reserve(collisions.size());
Expand Down Expand Up @@ -354,6 +356,7 @@ struct MultiplicityTable {

// Initializing multiplicity values
float multFV0A = 0.f;
float multFV0AOuter = 0.f;
float multFV0C = 0.f;
float multFT0A = 0.f;
float multFT0C = 0.f;
Expand Down Expand Up @@ -429,18 +432,25 @@ struct MultiplicityTable {
case kFV0Mults: // FV0
{
multFV0A = 0.f;
multFV0AOuter = 0.f;
multFV0C = 0.f;
// using FV0 row index from event selection task
if (collision.has_foundFV0()) {
const auto& fv0 = collision.foundFV0();
for (auto amplitude : fv0.amplitude()) {
for (size_t ii = 0; ii < fv0.amplitude().size(); ii++) {
auto amplitude = fv0.amplitude()[ii];
auto channel = fv0.channel()[ii];
multFV0A += amplitude;
if (channel > 7) {
multFV0AOuter += amplitude;
}
}
} else {
multFV0A = -999.f;
multFV0C = -999.f;
}
tableFV0(multFV0A, multFV0C);
tableFV0AOuter(multFV0AOuter);
LOGF(debug, "multFV0A=%5.0f multFV0C=%5.0f", multFV0A, multFV0C);
} break;
case kFT0Mults: // FT0
Expand Down
18 changes: 14 additions & 4 deletions Common/Tasks/centralityStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ struct centralityStudy {
ConfigurableAxis axisMultFDDC{"axisMultFDDC", {1000, 0, 100000}, "FDDC amplitude"};
ConfigurableAxis axisMultPVContributors{"axisMultPVContributors", {200, 0, 6000}, "Number of PV Contributors"};
ConfigurableAxis axisMultGlobalTracks{"axisMultGlobalTracks", {500, 0, 5000}, "Number of global tracks"};
ConfigurableAxis axisMultMFTTracks{"axisMultMFTTracks", {500, 0, 5000}, "Number of MFT tracks"};

ConfigurableAxis axisTrackOccupancy{"axisTrackOccupancy", {50, 0, 5000}, "Track occupancy"};
ConfigurableAxis axisFT0COccupancy{"axisFT0COccupancy", {50, 0, 80000}, "FT0C occupancy"};
Expand All @@ -102,6 +103,7 @@ struct centralityStudy {
ConfigurableAxis axisMultUltraFineFT0C{"axisMultUltraFineFT0C", {60000, 0, 60000}, "FT0C amplitude"};
ConfigurableAxis axisMultUltraFinePVContributors{"axisMultUltraFinePVContributors", {10000, 0, 10000}, "Number of PV Contributors"};
ConfigurableAxis axisMultUltraFineGlobalTracks{"axisMultUltraFineGlobalTracks", {5000, 0, 5000}, "Number of global tracks"};
ConfigurableAxis axisMultUltraFineMFTTracks{"axisMultUltraFineMFTTracks", {5000, 0, 5000}, "Number of MFT tracks"};

ConfigurableAxis axisMultITSOnly{"axisMultITSOnly", {200, 0, 6000}, "Number of ITS only tracks"};
ConfigurableAxis axisMultITSTPC{"axisMultITSTPC", {200, 0, 6000}, "Number of ITSTPC matched tracks"};
Expand Down Expand Up @@ -139,12 +141,14 @@ struct centralityStudy {
histos.add("hFT0M_Collisions", "hFT0M_Collisions", kTH1D, {axisMultUltraFineFT0M});
histos.add("hFV0A_Collisions", "hFV0A_Collisions", kTH1D, {axisMultUltraFineFV0A});
histos.add("hNGlobalTracks", "hNGlobalTracks", kTH1D, {axisMultUltraFineGlobalTracks});
histos.add("hNMFTTracks", "hNMFTTracks", kTH1D, {axisMultUltraFineMFTTracks});
histos.add("hNPVContributors", "hNPVContributors", kTH1D, {axisMultUltraFinePVContributors});

histos.add("hFT0CvsPVz_Collisions_All", "hFT0CvsPVz_Collisions_All", kTProfile, {axisPVz});
histos.add("hFT0CvsPVz_Collisions", "hFT0CvsPVz_Collisions", kTProfile, {axisPVz});
histos.add("hFV0AvsPVz_Collisions", "hFV0AvsPVz_Collisions", kTProfile, {axisPVz});
histos.add("hNGlobalTracksvsPVz_Collisions", "hNGlobalTracksvsPVz_Collisions", kTProfile, {axisPVz});
histos.add("hNMFTTracksvsPVz_Collisions", "hNMFTTracksvsPVz_Collisions", kTProfile, {axisPVz});
}

if (doprocessBCs) {
Expand Down Expand Up @@ -179,6 +183,7 @@ struct centralityStudy {
histos.add("hNGlobalTracksVsFDDC", "hNGlobalTracksVsFDDC", kTH2F, {axisMultFDDC, axisMultGlobalTracks});
histos.add("hNGlobalTracksVsZNA", "hNGlobalTracksVsZNA", kTH2F, {axisZN, axisMultGlobalTracks});
histos.add("hNGlobalTracksVsZNC", "hNGlobalTracksVsZNC", kTH2F, {axisZN, axisMultGlobalTracks});
histos.add("hNGlobalTracksVsNMFTTracks", "hNGlobalTracksVsNMFTTracks", kTH2F, {axisMultMFTTracks, axisMultGlobalTracks});
}

if (doOccupancyStudyVsRawValues2d) {
Expand All @@ -202,6 +207,7 @@ struct centralityStudy {
histos.add("hNITSTPCTracksVsCentrality", "hNITSTPCTracksVsCentrality", kTH2F, {axisCentrality, axisMultPVContributors});
histos.add("hNITSOnlyTracksVsCentrality", "hNITSOnlyTracksVsCentrality", kTH2F, {axisCentrality, axisMultPVContributors});
histos.add("hNGlobalTracksVsCentrality", "hNGlobalTracksVsCentrality", kTH2F, {axisCentrality, axisMultPVContributors});
histos.add("hNMFTVsCentrality", "hNMFTVsCentrality", kTH2F, {axisCentrality, axisMultMFTTracks});
histos.add("hPVChi2VsCentrality", "hPVChi2VsCentrality", kTH2F, {axisCentrality, axisPVChi2});
histos.add("hDeltaTimeVsCentrality", "hDeltaTimeVsCentrality", kTH2F, {axisCentrality, axisDeltaTime});

Expand Down Expand Up @@ -324,9 +330,11 @@ struct centralityStudy {
histos.fill(HIST("hFT0M_Collisions"), (collision.multFT0A() + collision.multFT0C()) * scaleSignalFT0M);
histos.fill(HIST("hFV0A_Collisions"), collision.multFV0A() * scaleSignalFV0A);
histos.fill(HIST("hNGlobalTracks"), collision.multNTracksGlobal());
histos.fill(HIST("hNMFTTracks"), collision.mftNtracks());
histos.fill(HIST("hFT0CvsPVz_Collisions_All"), collision.multPVz(), collision.multFT0C() * scaleSignalFT0C);
histos.fill(HIST("hFV0AvsPVz_Collisions"), collision.multPVz(), collision.multFV0A() * scaleSignalFV0A);
histos.fill(HIST("hNGlobalTracksvsPVz_Collisions"), collision.multPVz(), collision.multNTracksGlobal());
histos.fill(HIST("hNMFTTracksvsPVz_Collisions"), collision.multPVz(), collision.mftNtracks());
if (collision.multFT0C() > minFT0CforVertexZ) {
histos.fill(HIST("hFT0CvsPVz_Collisions"), collision.multPVz(), collision.multFT0C() * scaleSignalFT0C);
}
Expand Down Expand Up @@ -364,6 +372,7 @@ struct centralityStudy {
histos.fill(HIST("hNGlobalTracksVsFDDC"), collision.multFDDC(), collision.multNTracksGlobal());
histos.fill(HIST("hNGlobalTracksVsZNA"), collision.multZNA(), collision.multNTracksGlobal());
histos.fill(HIST("hNGlobalTracksVsZNC"), collision.multZNC(), collision.multNTracksGlobal());
histos.fill(HIST("hNMFTTracksVsZNC"), collision.mftNtracks(), collision.multNTracksGlobal());
}

// if the table has centrality information
Expand All @@ -374,6 +383,7 @@ struct centralityStudy {
histos.fill(HIST("hNITSTPCTracksVsCentrality"), collision.centFT0C(), collision.multNTracksITSTPC());
histos.fill(HIST("hNITSOnlyTracksVsCentrality"), collision.centFT0C(), collision.multNTracksITSOnly());
histos.fill(HIST("hNGlobalTracksVsCentrality"), collision.centFT0C(), collision.multNTracksGlobal());
histos.fill(HIST("hNMFTTracksVsCentrality"), collision.centFT0C(), collision.mftNtracks());
histos.fill(HIST("hPVChi2VsCentrality"), collision.centFT0C(), collision.multPVChi2());

if (doOccupancyStudyVsCentrality2d) {
Expand All @@ -392,22 +402,22 @@ struct centralityStudy {
}
}

void processCollisions(soa::Join<aod::Mults, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections>::iterator const& collision)
void processCollisions(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections>::iterator const& collision)
{
genericProcessCollision(collision);
}

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

void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::Mults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs>::iterator const& collision)
void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs>::iterator const& collision)
{
genericProcessCollision(collision);
}

void processBCs(soa::Join<aod::BC2Mults, aod::MultBCs>::iterator const& multbc, soa::Join<aod::Mults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal> const&)
void processBCs(soa::Join<aod::BC2Mults, aod::MultBCs>::iterator const& multbc, soa::Join<aod::Mults, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal> const&)
{
// process BCs, calculate FT0C distribution
// conditionals suggested by FIT team (Jacek O. et al)
Expand Down
8 changes: 7 additions & 1 deletion PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,13 @@ class FemtoUniverseAngularContainer
deltaEta = part1.eta() - part2.eta();

deltaPhi = part1.phi() - part2.phi();
deltaPhi = RecoDecay::constrainAngle(deltaPhi, 0);

while (deltaPhi < mPhiLow) {
deltaPhi += o2::constants::math::TwoPI;
}
while (deltaPhi > mPhiHigh) {
deltaPhi -= o2::constants::math::TwoPI;
}

mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/DeltaEtaDeltaPhi"), deltaPhi, deltaEta, weight);
if (use3dplots) {
Expand Down
12 changes: 6 additions & 6 deletions PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class FemtoUniverseCascadeSelection
}

/// Initializes histograms for the task
template <o2::aod::femtouniverseparticle::ParticleType part, o2::aod::femtouniverseparticle::ParticleType daugh, o2::aod::femtouniverseparticle::ParticleType bach, typename cutContainerType>
template <o2::aod::femtouniverseparticle::ParticleType part, o2::aod::femtouniverseparticle::ParticleType daugh, o2::aod::femtouniverseparticle::ParticleType bach, typename CutContainerType>
void init(HistogramRegistry* registry, bool isSelectCascOmega = false);

template <typename Col, typename Casc, typename Track>
Expand Down Expand Up @@ -285,7 +285,7 @@ class FemtoUniverseCascadeSelection

}; // namespace femto_universe

template <o2::aod::femtouniverseparticle::ParticleType part, o2::aod::femtouniverseparticle::ParticleType daugh, o2::aod::femtouniverseparticle::ParticleType bach, typename cutContainerType>
template <o2::aod::femtouniverseparticle::ParticleType part, o2::aod::femtouniverseparticle::ParticleType daugh, o2::aod::femtouniverseparticle::ParticleType bach, typename CutContainerType>
void FemtoUniverseCascadeSelection::init(HistogramRegistry* registry, bool isSelectCascOmega)
{

Expand All @@ -308,22 +308,22 @@ void FemtoUniverseCascadeSelection::init(HistogramRegistry* registry, bool isSel
/// \todo this should be an automatic check in the parent class, and the
/// return type should be templated
size_t nSelections = getNSelections();
if (nSelections > 17 * sizeof(cutContainerType)) {
if (nSelections > 17 * sizeof(CutContainerType)) {
LOG(fatal) << "FemtoUniverseCascadeCuts: Number of selections to large for your "
"container - quitting!";
}

posDaughTrack.init<aod::femtouniverseparticle::ParticleType::kV0Child,
aod::femtouniverseparticle::TrackType::kPosChild,
aod::femtouniverseparticle::cutContainerType>(
aod::femtouniverseparticle::CutContainerType>(
mHistogramRegistry);
negDaughTrack.init<aod::femtouniverseparticle::ParticleType::kV0Child,
aod::femtouniverseparticle::TrackType::kNegChild,
aod::femtouniverseparticle::cutContainerType>(
aod::femtouniverseparticle::CutContainerType>(
mHistogramRegistry);
bachTrackSel.init<aod::femtouniverseparticle::ParticleType::kCascadeBachelor,
aod::femtouniverseparticle::TrackType::kBachelor,
aod::femtouniverseparticle::cutContainerType>(
aod::femtouniverseparticle::CutContainerType>(
mHistogramRegistry);

// V0 (Lambda)
Expand Down
10 changes: 5 additions & 5 deletions PWGCF/FemtoUniverse/Core/FemtoUniverseCutculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class FemtoUniverseCutculator
/// \param selectionType Selection type under investigation, as defined in the
/// selection class
template <typename T1, typename T2>
void checkForSelection(aod::femtouniverseparticle::cutContainerType& output,
void checkForSelection(aod::femtouniverseparticle::CutContainerType& output,
size_t& counter, T1 objectSelection, T2 selectionType,
bool SysChecks, float sign)
{
Expand Down Expand Up @@ -294,9 +294,9 @@ class FemtoUniverseCutculator
/// container that will be put to the user task incorporating the user choice
/// of selections
template <typename T>
aod::femtouniverseparticle::cutContainerType iterateSelection(T objectSelection, bool SysChecks, float sign)
aod::femtouniverseparticle::CutContainerType iterateSelection(T objectSelection, bool SysChecks, float sign)
{
aod::femtouniverseparticle::cutContainerType output = 0;
aod::femtouniverseparticle::CutContainerType output = 0;
size_t counter = 0;
auto selectionVariables = objectSelection.getSelectionVariables();
for (auto selVarIt : selectionVariables) {
Expand All @@ -309,7 +309,7 @@ class FemtoUniverseCutculator
/// selection bit-wise container incorporating the user choice of selections
void analyseCuts(std::string choice, bool SysChecks = false, float sign = 1)
{
aod::femtouniverseparticle::cutContainerType output = -1;
aod::femtouniverseparticle::CutContainerType output = -1;
if (choice == std::string("T")) {
output = iterateSelection(mTrackSel, SysChecks, sign);
} else if (choice == std::string("V")) {
Expand All @@ -319,7 +319,7 @@ class FemtoUniverseCutculator
std::cout << "Option " << choice << " not recognized - available options are (T/V)" << std::endl;
return;
}
std::bitset<8 * sizeof(aod::femtouniverseparticle::cutContainerType)>
std::bitset<8 * sizeof(aod::femtouniverseparticle::CutContainerType)>
bitOutput = output;
// LOGF(info, "+++++++++++++++++++++++++++++++++");
// LOGF(info, "CutCulator has spoken - your selection bit is");
Expand Down
Loading

0 comments on commit 5b5fe9c

Please sign in to comment.