Skip to content
Merged
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
35 changes: 17 additions & 18 deletions PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
/// \date 2025-04-10

#include "PWGCF/Femto/FemtoNuclei/DataModel/PionNucleiTables.h"
#include "PWGCF/FemtoWorld/Core/FemtoWorldMath.h"
#include "PWGLF/DataModel/EPCalibrationTables.h"
#include "PWGLF/DataModel/LFHypernucleiTables.h"
#include "PWGLF/Utils/svPoolCreator.h"
#include "PWGCF/FemtoWorld/Core/FemtoWorldMath.h"

#include "Common/Core/PID/PIDTOF.h"
#include "Common/Core/PID/TPCPIDResponse.h"
Expand Down Expand Up @@ -149,7 +149,7 @@

// collision information
int32_t collisionID = 0;
float cent =1.f;
float cent = 1.f;
};

struct PiNucleiFemto {
Expand Down Expand Up @@ -283,7 +283,7 @@
{"hkStaVsmTVsCent_US_M", ";kStar (GeV/c);mT (GeV/#it{c}^{2});Centrality", {HistType::kTH3F, {{300, 0.0f, 3.0f}, {100, 0.2f, 3.2f}, {100, 0.0f, 100.0f}}}},
{"hkStaVsmTVsCent_US_A", ";kStar (GeV/c);mT (GeV/#it{c}^{2});Centrality", {HistType::kTH3F, {{300, 0.0f, 3.0f}, {100, 0.2f, 3.2f}, {100, 0.0f, 100.0f}}}},
{"hCollIDVsCentEachPion", ";CollisionID;Centrality", {HistType::kTH2F, {{4000, 0.0f, 4000.0f}, {100, 0.0f, 100.0f}}}},
{"hNHypsPerPrevColl", "Number of V0Hypers in previous collision used for mixing;N_{V0Hypers};Entries",{HistType::kTH2F, {{4000, 0.0f, 4000.0f}, {50, -0.5, 49.5}}}},
{"hNHypsPerPrevColl", "Number of V0Hypers in previous collision used for mixing;N_{V0Hypers};Entries", {HistType::kTH2F, {{4000, 0.0f, 4000.0f}, {50, -0.5, 49.5}}}},
{"hkStar_LS_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
{"hkStar_LS_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
{"hkStar_US_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
Expand All @@ -295,12 +295,11 @@
false,
true};


int numOfCentBins = 40;
int numOfVertexZBins = 30;
float Vz_low = -10.0f;

Check failure on line 300 in PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
float Vz_high = 10.0f;

Check failure on line 301 in PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
float Vz_step = (Vz_high - Vz_low) / numOfVertexZBins;

Check failure on line 302 in PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

struct EventRef {
int64_t collisionId;
Expand All @@ -310,7 +309,7 @@
std::deque<EventRef> events;
};

std::vector<PoolBin> All_Event_pool;

Check failure on line 312 in PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
bool isInitialized = false;

int nPoolBins() const { return numOfVertexZBins * numOfCentBins; }
Expand All @@ -322,9 +321,9 @@
isInitialized = true;
}

int where_pool(float vz, float v0Centr) const

Check failure on line 324 in PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
{
float CentBinWidth = 100.0 / numOfCentBins; // = 2.5

Check failure on line 326 in PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

int iy = static_cast<int>(std::floor(v0Centr / CentBinWidth));
if (iy < 0)
Expand Down Expand Up @@ -478,21 +477,21 @@
template <typename Ttrack>
bool selectionPIDPion(const Ttrack& candidate)
{
if (abs(candidate.dcaXY()) > settingCutPiDCAxyMin || abs(candidate.dcaZ()) > settingCutPiDCAzMin)

Check failure on line 480 in PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;

auto tpcNSigmaPi = candidate.tpcNSigmaPi();
mQaRegistry.fill(HIST("h2NsigmaPiTPC_preselection"), candidate.tpcInnerParam(), tpcNSigmaPi);
if (std::abs(candidate.pt()) < settingCutPiptMin || std::abs(candidate.pt()) > settingCutPiptMax)
return false;
//reject protons
// reject protons
if (std::abs(candidate.tpcNSigmaPr()) < settingCutNsigTPCPrMin)
return false;
mQaRegistry.fill(HIST("h2NsigmaPiPrTPC"), candidate.tpcNSigmaPr());
if (candidate.hasTOF() && std::abs(candidate.tofNSigmaPr()) < settingCutNsigTOFPrMin)
return false;
mQaRegistry.fill(HIST("h2NsigmaPiPrTOF"), candidate.tofNSigmaPr());

if (candidate.hasTOF() && candidate.tpcInnerParam() >= settingCutPinMinTOFPi) {
auto tofNSigmaPi = candidate.tofNSigmaPi();
auto combNsigma = std::sqrt(tofNSigmaPi * tofNSigmaPi + tpcNSigmaPi * tpcNSigmaPi);
Expand Down Expand Up @@ -528,9 +527,9 @@
{
float tpcInnerParam = candidate.tpcInnerParam();
mQaRegistry.fill(HIST("h2dEdx"), candidate.sign() * tpcInnerParam, candidate.tpcSignal());

float DeDCAxyMin = 0.015 + 0.0305 / TMath::Power(candidate.pt(), 1.1);

Check failure on line 531 in PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (abs(candidate.dcaXY()) > DeDCAxyMin || abs(candidate.dcaXY()) > settingCutDeDCAzMin)

Check failure on line 532 in PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;

if (std::abs(tpcInnerParam) < settingCutPinMinDe) {
Expand Down Expand Up @@ -804,7 +803,7 @@
bool filledAllOnce = false;
// LOG(info) << "Number of tracks: " << tracks.size();
for (const auto& track0 : tracks) {

mQaRegistry.fill(HIST("hTrackSel"), Selections::kNoCuts);

if (!selectTrack(track0)) {
Expand Down Expand Up @@ -835,7 +834,7 @@
if (!selectTrack(track1) || !selectionPIDPion(track1)) {
continue;
}

if (!filledAllOnce) {
mQaRegistry.fill(HIST("hCollIDVsCentEachPion"), track1.collisionId(), cent);
mQaRegistry.fill(HIST("hSinglePiPt"), track1.pt() * track1.sign());
Expand All @@ -849,7 +848,7 @@
trackPair.collBracket = collBracket;
mTrackPairs.push_back(trackPair);
}
filledAllOnce = true;
filledAllOnce = true;
}
}

Expand Down Expand Up @@ -1024,7 +1023,7 @@
mQaRegistry.fill(HIST("hNuPitInvMass"), piNucand.invMass);
mQaRegistry.fill(HIST("hdcaxyNu"), piNucand.dcaxyNu);
mQaRegistry.fill(HIST("hdcazNu"), piNucand.dcazNu);
mQaRegistry.fill(HIST("hdcazNu_min"), (abs(piNucand.dcazNu) - settingCutDeDCAzMin));

Check failure on line 1026 in PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
mQaRegistry.fill(HIST("hNClsNuITS"), piNucand.nClsItsNu);
mQaRegistry.fill(HIST("hNClsPiITS"), piNucand.nClsItsPi);
mQaRegistry.fill(HIST("hisBkgEM"), piNucand.isBkgEM);
Expand Down Expand Up @@ -1237,23 +1236,23 @@
mQaRegistry.fill(HIST("hSkipReasons"), 0);
continue;
}

auto hypdTablepreviousCollision = V0Hypers.sliceBy(hypPerCol, c2.globalIndex());
hypdTablepreviousCollision.bindExternalIndices(&V0Hypers);

if (hypdTablepreviousCollision.size() == 0) {
mQaRegistry.fill(HIST("hSkipReasons"), 1);
continue;
}

auto firstHyp = hypdTablepreviousCollision.iteratorAt(0);
int poolIndexHyp = where_pool(firstHyp.zPrimVtx(), firstHyp.centralityFT0C());

if (poolIndexHyp != poolIndexPi) {
mQaRegistry.fill(HIST("hSkipReasons"), 2);
continue;
mQaRegistry.fill(HIST("hSkipReasons"), 2);
continue;
}

auto trackTableThisCollision = pitracks.sliceBy(mPerCol, collision.globalIndex());
trackTableThisCollision.bindExternalIndices(&pitracks);

Expand All @@ -1265,7 +1264,7 @@
pool.events.pop_front();
}
pool.events.push_back({collision.globalIndex()});
}
}
fillPairsHyper(collisions, pitracks, V0Hypers, /*isMixedEvent*/ true);
}
PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyperPool, "Process Mixed event", false);
Expand Down
Loading