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
78 changes: 78 additions & 0 deletions PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

using TracksComplete = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA>;
using V0DatasWithoutTrackX = soa::Join<aod::V0Indices, aod::V0Cores>;
using V0DatasWithoutTrackXMC = soa::Join<aod::V0Indices, aod::V0Cores, aod::McV0Labels>;

struct HStrangeCorrelation {
// for efficiency corrections if requested
Expand Down Expand Up @@ -654,6 +655,8 @@
const AxisSpec preAxisPtTrigger{axisPtTrigger, "#it{p}_{T}^{trigger} (GeV/c)"};
const AxisSpec preAxisVtxZ{axisVtxZ, "vertex Z (cm)"};
const AxisSpec preAxisMult{axisMult, "mult percentile"};
const AxisSpec axisPtLambda{axisPtAssoc, "#it{p}_{T}^{#Lambda} (GeV/c)"};
const AxisSpec axisPtCascade{axisPtAssoc, "#it{p}_{T}^{Mother} (GeV/c)"};

// store the original axes in specific TH1Cs for completeness
histos.add("axes/hDeltaPhiAxis", "", kTH1C, {preAxisDeltaPhi});
Expand Down Expand Up @@ -882,6 +885,14 @@
}
histos.add("ClosureTest/hTrigger", "Trigger Tracks", kTH3F, {axisPtQA, axisEta, axisMult});
}
if (doprocessFeedDown) {
histos.add("hLambdaXiMinusFeeddownMatrix", "hLambdaXiMinusFeeddownMatrix", kTH2F, {axisPtLambda, axisPtCascade});
histos.add("hLambdaXiZeroFeeddownMatrix", "hLambdaXiZeroFeeddownMatrix", kTH2F, {axisPtLambda, axisPtCascade});
histos.add("hLambdaOmegaFeeddownMatrix", "hLambdaOmegaFeeddownMatrix", kTH2F, {axisPtLambda, axisPtCascade});
histos.add("hAntiLambdaXiPlusFeeddownMatrix", "hAntiLambdaXiPlusFeeddownMatrix", kTH2F, {axisPtLambda, axisPtCascade});
histos.add("hAntiLambdaXiZeroFeeddownMatrix", "hAntiLambdaXiZeroFeeddownMatrix", kTH2F, {axisPtLambda, axisPtCascade});
histos.add("hAntiLambdaOmegaFeeddownMatrix", "hAntiLambdaOmegaFeeddownMatrix", kTH2F, {axisPtLambda, axisPtCascade});
}

// visual inspection of sizes
histos.print();
Expand Down Expand Up @@ -1458,14 +1469,14 @@
continue;
}
double gpt = mcParticle.pt();
if (std::abs(mcParticle.pdgCode()) == 211 || std::abs(mcParticle.pdgCode()) == 321 || std::abs(mcParticle.pdgCode()) == 2212 || std::abs(mcParticle.pdgCode()) == 11 || std::abs(mcParticle.pdgCode()) == 13) {

Check warning on line 1472 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
if (!doTriggPhysicalPrimary || mcParticle.isPhysicalPrimary()) {
histos.fill(HIST("hGeneratedQAPtTrigger"), gpt, 0.0f); // step 1: before all selections
}
}

if (!doAssocPhysicalPrimary || mcParticle.isPhysicalPrimary()) {
if (mcParticle.pdgCode() == 310 && doCorrelationK0Short) {

Check warning on line 1479 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
histos.fill(HIST("hGeneratedQAPtAssociatedK0"), gpt, 0.0f); // step 1: before all selections
}
}
Expand Down Expand Up @@ -1551,14 +1562,14 @@
continue;
}
double gpt = mcParticle.pt();
if (std::abs(mcParticle.pdgCode()) == 211 || std::abs(mcParticle.pdgCode()) == 321 || std::abs(mcParticle.pdgCode()) == 2212 || std::abs(mcParticle.pdgCode()) == 11 || std::abs(mcParticle.pdgCode()) == 13) {

Check warning on line 1565 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
if (!doTriggPhysicalPrimary || mcParticle.isPhysicalPrimary()) {
histos.fill(HIST("hGeneratedQAPtTrigger"), gpt, 1.0f); // step 2: after event selection
}
}

if (!doAssocPhysicalPrimary || mcParticle.isPhysicalPrimary()) {
if (mcParticle.pdgCode() == 310 && doCorrelationK0Short) {

Check warning on line 1572 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
histos.fill(HIST("hGeneratedQAPtAssociatedK0"), gpt, 1.0f); // step 2: before all selections
}
}
Expand All @@ -1570,7 +1581,7 @@
}
double geta = mcParticle.eta();
double gpt = mcParticle.pt();
if (std::abs(mcParticle.pdgCode()) == 211 || std::abs(mcParticle.pdgCode()) == 321 || std::abs(mcParticle.pdgCode()) == 2212 || std::abs(mcParticle.pdgCode()) == 11 || std::abs(mcParticle.pdgCode()) == 13)

Check warning on line 1584 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
histos.fill(HIST("GeneratedWithPV/hTrigger"), gpt, geta);
static_for<0, 7>([&](auto i) {
constexpr int Index = i.value;
Expand Down Expand Up @@ -1611,14 +1622,14 @@
continue;
}
double gpt = mcParticle.pt();
if (std::abs(mcParticle.pdgCode()) == 211 || std::abs(mcParticle.pdgCode()) == 321 || std::abs(mcParticle.pdgCode()) == 2212 || std::abs(mcParticle.pdgCode()) == 11 || std::abs(mcParticle.pdgCode()) == 13) {

Check warning on line 1625 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
if (!doTriggPhysicalPrimary || mcParticle.isPhysicalPrimary()) {
histos.fill(HIST("hClosureQAPtTrigger"), gpt, 0.0f); // step 1: no event selection whatsoever
}
}

if (!doAssocPhysicalPrimary || mcParticle.isPhysicalPrimary()) {
if (mcParticle.pdgCode() == 310 && doCorrelationK0Short) {

Check warning on line 1632 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
histos.fill(HIST("hClosureQAPtAssociatedK0"), gpt, 0.0f); // step 1: no event selection whatsoever
}
}
Expand Down Expand Up @@ -1670,14 +1681,14 @@
continue;
}
double gpt = mcParticle.pt();
if (std::abs(mcParticle.pdgCode()) == 211 || std::abs(mcParticle.pdgCode()) == 321 || std::abs(mcParticle.pdgCode()) == 2212 || std::abs(mcParticle.pdgCode()) == 11 || std::abs(mcParticle.pdgCode()) == 13) {

Check warning on line 1684 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
if (!doTriggPhysicalPrimary || mcParticle.isPhysicalPrimary()) {
histos.fill(HIST("hClosureQAPtTrigger"), gpt, 1.0f); // step 2: after event selection
}
}

if (!doAssocPhysicalPrimary || mcParticle.isPhysicalPrimary()) {
if (mcParticle.pdgCode() == 310 && doCorrelationK0Short) {

Check warning on line 1691 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
histos.fill(HIST("hClosureQAPtAssociatedK0"), gpt, 1.0f); // step 2: after event selection
}
}
Expand All @@ -1692,7 +1703,7 @@
if (std::abs(geta) > 0.8f) {
continue;
}
if (std::abs(mcParticle.pdgCode()) == 211 || std::abs(mcParticle.pdgCode()) == 321 || std::abs(mcParticle.pdgCode()) == 2212 || std::abs(mcParticle.pdgCode()) == 11 || std::abs(mcParticle.pdgCode()) == 13) {

Check warning on line 1706 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
if (!doTriggPhysicalPrimary || mcParticle.isPhysicalPrimary()) {
triggerIndices.emplace_back(iteratorNum);
histos.fill(HIST("ClosureTest/hTrigger"), gpt, geta, bestCollisionFT0Mpercentile);
Expand Down Expand Up @@ -1780,6 +1791,72 @@
}
}

void processFeedDown(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms, aod::PVMults>::iterator const& collision, aod::AssocV0s const& associatedV0s, aod::McParticles const&, V0DatasWithoutTrackXMC const&, TracksComplete const&, aod::BCsWithTimestamps const&)
{

// ________________________________________________
// Perform basic event selection
if (!isCollisionSelected(collision)) {
return;
}

for (auto const& v0 : associatedV0s) {
auto v0Data = v0.v0Core_as<V0DatasWithoutTrackXMC>();

//---] track quality check [---
auto postrack = v0Data.posTrack_as<TracksComplete>();
auto negtrack = v0Data.negTrack_as<TracksComplete>();
if (postrack.tpcNClsCrossedRows() < systCuts.minTPCNCrossedRowsAssociated || negtrack.tpcNClsCrossedRows() < systCuts.minTPCNCrossedRowsAssociated)
continue;

//---] syst cuts [---
if (v0Data.v0radius() < systCuts.v0RadiusMin || v0Data.v0radius() > systCuts.v0RadiusMax ||
std::abs(v0Data.dcapostopv()) < systCuts.dcapostopv || std::abs(v0Data.dcanegtopv()) < systCuts.dcanegtopv ||
v0Data.v0cosPA() < systCuts.v0cospa || v0Data.dcaV0daughters() > systCuts.dcaV0dau)
continue;

if (v0Data.has_mcParticle()) {
auto v0mcParticle = v0Data.mcParticle_as<aod::McParticles>();
int mcParticlePdg = v0mcParticle.pdgCode();
if (mcParticlePdg == 3122 && !v0mcParticle.isPhysicalPrimary()) {
auto v0mothers = v0mcParticle.mothers_as<aod::McParticles>();
if (!v0mothers.empty()) {
auto& v0mcParticleMother = v0mothers.front(); // First mother
if (v0mcParticleMother.pdgCode() == 3312) // Xi Minus Mother Matched
{
histos.fill(HIST("hLambdaXiMinusFeeddownMatrix"), v0mcParticle.pt(), v0mcParticleMother.pt());
}
if (v0mcParticleMother.pdgCode() == 3322) // Xi Zero Mother Matched
{
histos.fill(HIST("hLambdaXiZeroFeeddownMatrix"), v0mcParticle.pt(), v0mcParticleMother.pt());
}
if (v0mcParticleMother.pdgCode() == 3334) // Omega Mother Matched
{
histos.fill(HIST("hLambdaOmegaFeeddownMatrix"), v0mcParticle.pt(), v0mcParticleMother.pt());
}
}
}
if (mcParticlePdg == -3122 && !v0mcParticle.isPhysicalPrimary()) {
auto v0mothers = v0mcParticle.mothers_as<aod::McParticles>();
if (!v0mothers.empty()) {
auto& v0mcParticleMother = v0mothers.front(); // First mother
if (v0mcParticleMother.pdgCode() == -3312) // Xi Plus Mother Matched
{
histos.fill(HIST("hAntiLambdaXiPlusFeeddownMatrix"), v0mcParticle.pt(), v0mcParticleMother.pt());
}
if (v0mcParticleMother.pdgCode() == -3322) // Anti Xi Zero Mother Matched
{
histos.fill(HIST("hAntiLambdaXiZeroFeeddownMatrix"), v0mcParticle.pt(), v0mcParticleMother.pt());
}
if (v0mcParticleMother.pdgCode() == -3334) // Omega Mother Matched
{
histos.fill(HIST("hAntiLambdaOmegaFeeddownMatrix"), v0mcParticle.pt(), v0mcParticleMother.pt());
}
}
}
}
}
}
PROCESS_SWITCH(HStrangeCorrelation, processSelectEventWithTrigger, "Select events with trigger only", true);
PROCESS_SWITCH(HStrangeCorrelation, processSameEventHV0s, "Process same events, h-V0s", true);
PROCESS_SWITCH(HStrangeCorrelation, processSameEventHCascades, "Process same events, h-Cascades", true);
Expand All @@ -1793,6 +1870,7 @@

PROCESS_SWITCH(HStrangeCorrelation, processMCGenerated, "Process MC generated", false);
PROCESS_SWITCH(HStrangeCorrelation, processClosureTest, "Process Closure Test", false);
PROCESS_SWITCH(HStrangeCorrelation, processFeedDown, "process Feed Down", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
Loading