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

std::vector<std::vector<float>> axisRanges;

const float ctauxiPDG = 4.91; // from PDG

Check failure on line 240 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
const float ctauomegaPDG = 2.461; // from PDG

Check failure on line 241 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.

/// Function to aid in calculating delta-phi
/// \param phi1 first phi value
Expand Down Expand Up @@ -485,9 +485,9 @@
return false;
// dcacascdaughters
float ptDepCut = systCuts.dcaCacsDauPar0;
if (casc.pt() > 1 && casc.pt() < 4)

Check failure on line 488 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
ptDepCut = systCuts.dcaCacsDauPar1;
else if (casc.pt() > 4)

Check failure on line 490 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
ptDepCut = systCuts.dcaCacsDauPar2;
if (casc.dcacascdaughters() > ptDepCut)
return false;
Expand Down Expand Up @@ -600,11 +600,11 @@
histos.fill(HIST("sameEvent/LeftBg/") + HIST(kV0names[Index]), deltaphi, deltaeta, ptassoc, pttrigger, pvz, mult, weight);
if (assocCandidate.compatible(Index, systCuts.dEdxCompatibility) && (!doMCassociation || assocCandidate.mcTrue(Index)) && (!doAssocPhysicalPrimary || assocCandidate.mcPhysicalPrimary()) && !mixing && -massWindowConfigurations.maxPeakNSigma < assocCandidate.invMassNSigma(Index) && assocCandidate.invMassNSigma(Index) < +massWindowConfigurations.maxPeakNSigma) {
histos.fill(HIST("sameEvent/Signal/") + HIST(kV0names[Index]), deltaphi, deltaeta, ptassoc, pttrigger, pvz, mult, weight);
if (std::abs(deltaphi) < 0.8 && doITSClustersQA) {

Check failure on line 603 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
histos.fill(HIST("hITSClusters") + HIST(kV0names[Index]) + HIST("NegativeDaughterToward"), ptassoc, negtrack.itsNCls(), assoc.v0radius());
histos.fill(HIST("hITSClusters") + HIST(kV0names[Index]) + HIST("PositiveDaughterToward"), ptassoc, postrack.itsNCls(), assoc.v0radius());
}
if (std::abs(deltaphi) > 1 && std::abs(deltaphi) < 2 && doITSClustersQA) {

Check failure on line 607 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
histos.fill(HIST("hITSClusters") + HIST(kV0names[Index]) + HIST("NegativeDaughterTransverse"), ptassoc, negtrack.itsNCls(), assoc.v0radius());
histos.fill(HIST("hITSClusters") + HIST(kV0names[Index]) + HIST("PositiveDaughterTransverse"), ptassoc, postrack.itsNCls(), assoc.v0radius());
}
Expand Down Expand Up @@ -1073,13 +1073,13 @@
}

bool hStrange = false;
for (int i = 0; i < 9; i++) {

Check failure on line 1076 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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 (TESTBIT(doCorrelation, i)) {
histos.add(fmt::format("h{}EtaVsPtVsPhi", kParticlenames[i]).c_str(), "", kTH3F, {axisPtQA, axisEta, axisPhi});
histos.add(fmt::format("h3d{}Spectrum", kParticlenames[i]).c_str(), fmt::format("h3d{}Spectrum", kParticlenames[i]).c_str(), kTH3F, {axisPtQA, axisMult, axisMassNSigma});
histos.add(fmt::format("h3d{}SpectrumY", kParticlenames[i]).c_str(), fmt::format("h3d{}SpectrumY", kParticlenames[i]).c_str(), kTH3F, {axisPtQA, axisMult, axisMassNSigma});
histos.add(fmt::format("sameEvent/Signal/{}", kParticlenames[i]).c_str(), "", kTHnF, {axisDeltaPhiNDim, axisDeltaEtaNDim, axisPtAssocNDim, axisPtTriggerNDim, axisVtxZNDim, axisMultNDim});
if (i < 7) {

Check failure on line 1082 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
hStrange = true;
histos.add(fmt::format("h{}EtaVsPtVsPhiBg", kParticlenames[i]).c_str(), "", kTH3F, {axisPtQA, axisEta, axisPhi});
if (doITSClustersQA) {
Expand Down Expand Up @@ -1121,16 +1121,20 @@
// MC generated plots
if (doprocessMCGenerated) {
histos.add("Generated/hTrigger", "", kTH2F, {axisPtQA, axisEta});
for (int i = 0; i < 9; i++) {

Check failure on line 1124 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
histos.add(fmt::format("Generated/h{}", kParticlenames[i]).c_str(), "", kTH2F, {axisPtQA, axisEta});
}
histos.addClone("Generated/", "GeneratedWithPV/");

// histograms within |y|<0.5, vs multiplicity
for (int i = 0; i < 8; i++) {

Check failure on line 1130 in PWGLF/Tasks/Strangeness/hStrangeCorrelation.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.
histos.add(fmt::format("GeneratedWithPV/h{}_MidYVsMult", kParticlenames[i]).c_str(), "", kTH2F, {axisPtQA, axisMult});
histos.add(fmt::format("GeneratedWithPV/h{}_MidYVsMult_TwoPVsOrMore", kParticlenames[i]).c_str(), "", kTH2F, {axisPtQA, axisMult});
}
histos.add("GeneratedWithPV/hLambdaFromXiZero", "", kTH2F, {axisPtQA, axisEta});
histos.add("GeneratedWithPV/hLambdaFromXiMinus", "", kTH2F, {axisPtQA, axisEta});
histos.add("GeneratedWithPV/hAntiLambdaFromXiZero", "", kTH2F, {axisPtQA, axisEta});
histos.add("GeneratedWithPV/hAntiLambdaFromXiPlus", "", kTH2F, {axisPtQA, axisEta});
}
if (doprocessClosureTest) {
for (int i = 0; i < 9; i++) {
Expand All @@ -1148,6 +1152,10 @@
histos.add("hAntiLambdaXiPlusFeeddownMatrix", "hAntiLambdaXiPlusFeeddownMatrix", kTH2F, {axisPtLambda, axisPtCascade});
histos.add("hAntiLambdaXiZeroFeeddownMatrix", "hAntiLambdaXiZeroFeeddownMatrix", kTH2F, {axisPtLambda, axisPtCascade});
histos.add("hAntiLambdaOmegaFeeddownMatrix", "hAntiLambdaOmegaFeeddownMatrix", kTH2F, {axisPtLambda, axisPtCascade});
histos.add("hLambdaFromXiMinusEtaVsPtVsPhi", "hLambdaFromXiMinusEtaVsPtVsPhi", kTH3F, {axisPtQA, axisEta, axisPhi});
histos.add("hLambdaFromXiZeroEtaVsPtVsPhi", "hLambdaFromXiZeroEtaVsPtVsPhi", kTH3F, {axisPtQA, axisEta, axisPhi});
histos.add("hAntiLambdaFromXiPlusEtaVsPtVsPhi", "hAntiLambdaFromXiPlusEtaVsPtVsPhi", kTH3F, {axisPtQA, axisEta, axisPhi});
histos.add("hAntiLambdaFromXiZeroEtaVsPtVsPhi", "hAntiLambdaFromXiZeroEtaVsPtVsPhi", kTH3F, {axisPtQA, axisEta, axisPhi});
}

// visual inspection of sizes
Expand Down Expand Up @@ -1944,6 +1952,47 @@
double gpt = mcParticle.pt();
if (std::abs(mcParticle.pdgCode()) == PDG_t::kPiPlus || std::abs(mcParticle.pdgCode()) == PDG_t::kKPlus || std::abs(mcParticle.pdgCode()) == PDG_t::kProton || std::abs(mcParticle.pdgCode()) == PDG_t::kElectron || std::abs(mcParticle.pdgCode()) == PDG_t::kMuonMinus)
histos.fill(HIST("GeneratedWithPV/hTrigger"), gpt, geta);
if (mcParticle.pdgCode() == PDG_t::kLambda0 && !doAssocPhysicalPrimaryInGen && !mcParticle.isPhysicalPrimary()) {
if (std::abs(geta) > etaSel) {
continue;
}
auto lamMothers = mcParticle.mothers_as<aod::McParticles>();
if (lamMothers.size() == 1) {
for (const auto& lamParticleMother : lamMothers) {
if (std::abs(lamParticleMother.eta()) > etaSel) {
continue;
}
if (lamParticleMother.pdgCode() == PDG_t::kXiMinus) // Xi Minus Mother Matched
{
histos.fill(HIST("GeneratedWithPV/hLambdaFromXiMinus"), gpt, geta);
}
if (lamParticleMother.pdgCode() == o2::constants::physics::Pdg::kXi0) // Xi Zero Mother Matched
{
histos.fill(HIST("GeneratedWithPV/hLambdaFromXiZero"), gpt, geta);
}
}
}
}
if (mcParticle.pdgCode() == PDG_t::kLambda0Bar && !doAssocPhysicalPrimaryInGen && !mcParticle.isPhysicalPrimary()) {
if (std::abs(geta) > etaSel) {
continue;
}
auto lamMothers = mcParticle.mothers_as<aod::McParticles>();
if (lamMothers.size() == 1) {
for (const auto& lamParticleMother : lamMothers) {
if (std::abs(lamParticleMother.eta()) > etaSel) {
continue;
}
if (lamParticleMother.pdgCode() == PDG_t::kXiPlusBar) {
histos.fill(HIST("GeneratedWithPV/hAntiLambdaFromXiPlus"), gpt, geta);
}
if (lamParticleMother.pdgCode() == -o2::constants::physics::Pdg::kXi0) // Xi Zero Mother Matched
{
histos.fill(HIST("GeneratedWithPV/hAntiLambdaFromXiZero"), gpt, geta);
}
}
}
}
static_for<0, 7>([&](auto i) {
constexpr int Index = i.value;
if (i == 0 || i == 7) {
Expand Down Expand Up @@ -2196,10 +2245,12 @@
if (v0mcParticleMother.pdgCode() == PDG_t::kXiMinus) // Xi Minus Mother Matched
{
histos.fill(HIST("hLambdaXiMinusFeeddownMatrix"), v0mcParticle.pt(), v0mcParticleMother.pt());
histos.fill(HIST("hLambdaFromXiMinusEtaVsPtVsPhi"), v0mcParticle.pt(), v0mcParticle.eta(), v0mcParticle.phi());
}
if (v0mcParticleMother.pdgCode() == o2::constants::physics::Pdg::kXi0) // Xi Zero Mother Matched
{
histos.fill(HIST("hLambdaXiZeroFeeddownMatrix"), v0mcParticle.pt(), v0mcParticleMother.pt());
histos.fill(HIST("hLambdaFromXiZeroEtaVsPtVsPhi"), v0mcParticle.pt(), v0mcParticle.eta(), v0mcParticle.phi());
}
if (v0mcParticleMother.pdgCode() == PDG_t::kOmegaMinus) // Omega Mother Matched
{
Expand All @@ -2218,10 +2269,12 @@
if (v0mcParticleMother.pdgCode() == PDG_t::kXiPlusBar) // Xi Plus Mother Matched
{
histos.fill(HIST("hAntiLambdaXiPlusFeeddownMatrix"), v0mcParticle.pt(), v0mcParticleMother.pt());
histos.fill(HIST("hAntiLambdaFromXiPlusEtaVsPtVsPhi"), v0mcParticle.pt(), v0mcParticle.eta(), v0mcParticle.phi());
}
if (v0mcParticleMother.pdgCode() == -o2::constants::physics::Pdg::kXi0) // Anti Xi Zero Mother Matched
{
histos.fill(HIST("hAntiLambdaXiZeroFeeddownMatrix"), v0mcParticle.pt(), v0mcParticleMother.pt());
histos.fill(HIST("hAntiLambdaFromXiZeroEtaVsPtVsPhi"), v0mcParticle.pt(), v0mcParticle.eta(), v0mcParticle.phi());
}
if (v0mcParticleMother.pdgCode() == PDG_t::kOmegaPlusBar) // Omega Mother Matched
{
Expand Down
Loading