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
106 changes: 102 additions & 4 deletions PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include <Math/Vector4D.h>
#include <TFile.h>
#include <TH2D.h>
#include <TLorentzVector.h>

Check failure on line 58 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
#include <TPDGCode.h>
#include <TProfile.h>

Expand Down Expand Up @@ -125,6 +125,7 @@
Configurable<bool> doMCAssociation{"doMCAssociation", true, "if MC, do MC association"};
Configurable<bool> doTreatPiToMuon{"doTreatPiToMuon", false, "Take pi decay into muon into account in MC"};
Configurable<bool> doCollisionAssociationQA{"doCollisionAssociationQA", true, "check collision association"};
Configurable<bool> doSecondaryV0s{"doSecondaryV0s", false, "Look at secondary V0s?"};

struct : ConfigurableGroup {
std::string prefix = "eventSelections"; // JSON group name
Expand Down Expand Up @@ -524,21 +525,21 @@
BITSET(maskTrackProperties, selPosGoodTPCTrack);
BITSET(maskTrackProperties, selPosGoodITSTrack);
// TPC signal is available: ask for positive track PID
if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut

Check failure on line 528 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.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.
BITSET(maskK0ShortSpecific, selTPCPIDPositivePion);
BITSET(maskLambdaSpecific, selTPCPIDPositiveProton);
BITSET(maskAntiLambdaSpecific, selTPCPIDPositivePion);
}
// TOF PID
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 534 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.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.
BITSET(maskK0ShortSpecific, selTOFNSigmaPositivePionK0Short);
BITSET(maskK0ShortSpecific, selTOFDeltaTPositivePionK0Short);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut

Check failure on line 538 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.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.
BITSET(maskLambdaSpecific, selTOFNSigmaPositiveProtonLambda);
BITSET(maskLambdaSpecific, selTOFDeltaTPositiveProtonLambda);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requirePosHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 542 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.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.
BITSET(maskAntiLambdaSpecific, selTOFNSigmaPositivePionLambda);
BITSET(maskAntiLambdaSpecific, selTOFDeltaTPositivePionLambda);
}
Expand All @@ -550,21 +551,21 @@
BITSET(maskTrackProperties, selNegGoodTPCTrack);
BITSET(maskTrackProperties, selNegGoodITSTrack);
// TPC signal is available: ask for negative track PID
if (v0Selections.tpcPidNsigmaCut < 1e+5) { // safeguard for no cut

Check failure on line 554 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.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.
BITSET(maskK0ShortSpecific, selTPCPIDNegativePion);
BITSET(maskLambdaSpecific, selTPCPIDNegativePion);
BITSET(maskAntiLambdaSpecific, selTPCPIDNegativeProton);
}
// TOF PID
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutK0Pi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 560 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.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.
BITSET(maskK0ShortSpecific, selTOFNSigmaNegativePionK0Short);
BITSET(maskK0ShortSpecific, selTOFDeltaTNegativePionK0Short);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPi < 1e+5 || v0Selections.maxDeltaTimePion < 1e+6) { // safeguard for no cut

Check failure on line 564 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.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.
BITSET(maskLambdaSpecific, selTOFNSigmaNegativePionLambda);
BITSET(maskLambdaSpecific, selTOFDeltaTNegativePionLambda);
}
if (v0Selections.requireAtLeastOneHasTOF || v0Selections.requireNegHasTOF || v0Selections.tofPidNsigmaCutLaPr < 1e+5 || v0Selections.maxDeltaTimeProton < 1e+6) { // safeguard for no cut

Check failure on line 568 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.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.
BITSET(maskAntiLambdaSpecific, selTOFNSigmaNegativeProtonLambda);
BITSET(maskAntiLambdaSpecific, selTOFDeltaTNegativeProtonLambda);
}
Expand Down Expand Up @@ -723,7 +724,7 @@
// for QA and test purposes
auto hRawCentrality = histos.add<TH1>("hRawCentrality", "hRawCentrality", kTH1D, {axisConfigurations.axisRawCentrality});

for (int ii = 1; ii < 101; ii++) {

Check failure on line 727 in PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.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.
float value = 100.5f - static_cast<float>(ii);
hRawCentrality->SetBinContent(ii, value);
}
Expand Down Expand Up @@ -1002,10 +1003,18 @@
if (analyseLambda && calculateFeeddownMatrix && (doprocessMonteCarloRun3 || doprocessMonteCarloRun2)) {
histos.add("h3dLambdaFeeddown", "h3dLambdaFeeddown", kTH3D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt, axisConfigurations.axisPtXi});
histos.add("h3dLambdaFeeddownFromXi0", "h3dLambdaFeeddownFromXi0", kTH3D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt, axisConfigurations.axisPtXi});
if (doSecondaryV0s) {
histos.add("h3dMassSecLambdaFromXi", "h3dMassSecLambdaFromXi", kTH3D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt, axisConfigurations.axisLambdaMass});
histos.add("h3dMassSecLambdaFromXiAndXi0", "h3dMassSecLambdaFromXiAndXi0", kTH3D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt, axisConfigurations.axisLambdaMass});
}
}
if (analyseAntiLambda && calculateFeeddownMatrix && (doprocessMonteCarloRun3 || doprocessMonteCarloRun2)) {
histos.add("h3dAntiLambdaFeeddown", "h3dAntiLambdaFeeddown", kTH3D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt, axisConfigurations.axisPtXi});
histos.add("h3dAntiLambdaFeeddownFromXi0", "h3dAntiLambdaFeeddownFromXi0", kTH3D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt, axisConfigurations.axisPtXi});
if (doSecondaryV0s) {
histos.add("h3dMassSecAntiLambdaFromXi", "h3dMassSecAntiLambdaFromXi", kTH3D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt, axisConfigurations.axisLambdaMass});
histos.add("h3dMassSecAntiLambdaFromXiAndXi0", "h3dMassSecAntiLambdaFromXiAndXi0", kTH3D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt, axisConfigurations.axisLambdaMass});
}
}

if (analyseK0Short)
Expand Down Expand Up @@ -1126,6 +1135,29 @@
histos.add("h2dGenXiPlusVsMultMC", "h2dGenXiPlusVsMultMC", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenOmegaMinusVsMultMC", "h2dGenOmegaMinusVsMultMC", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenOmegaPlusVsMultMC", "h2dGenOmegaPlusVsMultMC", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});

if (doSecondaryV0s) {
histos.add("h2dGenSecLambda", "h2dGenSecLambda", kTH2D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt});
histos.add("h2dGenSecAntiLambda", "h2dGenSecAntiLambda", kTH2D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt});
histos.add("h2dGenSecLambdaFromXi", "h2dGenSecLambdaFromXi", kTH2D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt});
histos.add("h2dGenSecAntiLambdaFromXi", "h2dGenSecAntiLambdaFromXi", kTH2D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt});
histos.add("h2dGenSecLambdaFromOmega", "h2dGenSecLambdaFromOmega", kTH2D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt});
histos.add("h2dGenSecAntiLambdaFromOmega", "h2dGenSecAntiLambdaFromOmega", kTH2D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt});

histos.add("h2dGenSecLambda_VsRecoedEvt", "h2dGenSecLambda_VsRecoedEvt", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenSecAntiLambda_VsRecoedEvt", "h2dGenSecAntiLambda_VsRecoedEvt", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenSecLambdaFromXiVsMultMC_VsRecoedEvt", "h2dGenSecLambdaFromXiVsMultMC_VsRecoedEvt", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenSecAntiLambdaFromXiVsMultMC_VsRecoedEvt", "h2dGenSecAntiLambdaFromXiVsMultMC_VsRecoedEvt", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenSecLambdaFromOmegaVsMultMC_VsRecoedEvt", "h2dGenSecLambdaFromOmegaVsMultMC_VsRecoedEvt", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenSecAntiLambdaFromOmegaVsMultMC_VsRecoedEvt", "h2dGenSecAntiLambdaFromOmegaVsMultMC_VsRecoedEvt", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});

histos.add("h2dGenSecLambdaVsMultMC", "h2dGenSecLambdaVsMultMC", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenSecAntiLambdaVsMultMC", "h2dGenSecAntiLambdaVsMultMC", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenSecLambdaFromXiVsMultMC", "h2dGenSecLambdaFromXiVsMultMC", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenSecAntiLambdaFromXiVsMultMC", "h2dGenSecAntiLambdaFromXiVsMultMC", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenSecLambdaFromOmegaVsMultMC", "h2dGenSecLambdaFromOmegaVsMultMC", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
histos.add("h2dGenSecAntiLambdaFromOmegaVsMultMC", "h2dGenSecAntiLambdaFromOmegaVsMultMC", kTH2D, {axisConfigurations.axisNch, axisConfigurations.axisPt});
}
}
if (doprocessBinnedGenerated) {
histos.add("h2dGeneratedK0Short", "h2dGeneratedK0Short", kTH2D, {axisConfigurations.axisCentrality, axisConfigurations.axisPt});
Expand Down Expand Up @@ -2074,18 +2106,34 @@
// __________________________________________
if (verifyMask(selMap, secondaryMaskSelectionLambda) && analyseLambda) {
if (v0mother.isPhysicalPrimary()) {
if (v0mother.pdgCode() == PDG_t::kXiMinus)
if (v0mother.pdgCode() == PDG_t::kXiMinus) {
histos.fill(HIST("h3dLambdaFeeddown"), centrality, pt, std::hypot(v0mother.px(), v0mother.py()));
if (v0mother.pdgCode() == PDG_t::kXiMinus || v0mother.pdgCode() == o2::constants::physics::Pdg::kXi0)
if (doSecondaryV0s) {
histos.fill(HIST("h3dMassSecLambdaFromXi"), centrality, pt, v0.mLambda());
}
}
if (v0mother.pdgCode() == PDG_t::kXiMinus || v0mother.pdgCode() == o2::constants::physics::Pdg::kXi0) {
histos.fill(HIST("h3dLambdaFeeddownFromXi0"), centrality, pt, std::hypot(v0mother.px(), v0mother.py()));
if (doSecondaryV0s) {
histos.fill(HIST("h3dMassSecLambdaFromXiAndXi0"), centrality, pt, v0.mLambda());
}
}
}
}
if (verifyMask(selMap, secondaryMaskSelectionAntiLambda) && analyseAntiLambda) {
if (v0mother.isPhysicalPrimary()) {
if (v0mother.pdgCode() == PDG_t::kXiPlusBar)
if (v0mother.pdgCode() == PDG_t::kXiPlusBar) {
histos.fill(HIST("h3dAntiLambdaFeeddown"), centrality, pt, std::hypot(v0mother.px(), v0mother.py()));
if (v0mother.pdgCode() == PDG_t::kXiPlusBar || v0mother.pdgCode() == -o2::constants::physics::Pdg::kXi0)
if (doSecondaryV0s) {
histos.fill(HIST("h3dMassSecAntiLambdaFromXi"), centrality, pt, v0.mAntiLambda());
}
}
if (v0mother.pdgCode() == PDG_t::kXiPlusBar || v0mother.pdgCode() == -o2::constants::physics::Pdg::kXi0) {
histos.fill(HIST("h3dAntiLambdaFeeddownFromXi0"), centrality, pt, std::hypot(v0mother.px(), v0mother.py()));
if (doSecondaryV0s) {
histos.fill(HIST("h3dMassSecAntiLambdaFromXiAndXi0"), centrality, pt, v0.mAntiLambda());
}
}
}
}
}
Expand Down Expand Up @@ -2902,6 +2950,28 @@
if (cascMC.pdgCode() == PDG_t::kOmegaPlusBar) {
histos.fill(HIST("h2dGenOmegaPlusVsMultMC_RecoedEvt"), mcCollision.multMCNParticlesEta05(), ptmc);
}

if (doSecondaryV0s && std::abs(cascMC.pdgCodeV0()) == kLambda0) {
float v0PtMc = std::hypot(cascMC.pxPosMC() + cascMC.pxNegMC(), cascMC.pyPosMC() + cascMC.pyNegMC());
if (cascMC.pdgCodeV0() == kLambda0) {
histos.fill(HIST("h2dGenSecLambda_VsRecoedEvt"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
if (cascMC.pdgCodeV0() == kLambda0Bar) {
histos.fill(HIST("h2dGenSecAntiLambda_VsRecoedEvt"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
if (cascMC.pdgCode() == PDG_t::kXiMinus && cascMC.pdgCodeV0() == kLambda0) {
histos.fill(HIST("h2dGenSecLambdaFromXiVsMultMC_VsRecoedEvt"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
if (cascMC.pdgCode() == PDG_t::kXiPlusBar && cascMC.pdgCodeV0() == kLambda0Bar) {
histos.fill(HIST("h2dGenSecAntiLambdaFromXiVsMultMC_VsRecoedEvt"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
if (cascMC.pdgCode() == PDG_t::kOmegaMinus && cascMC.pdgCodeV0() == kLambda0) {
histos.fill(HIST("h2dGenSecLambdaFromOmegaVsMultMC_VsRecoedEvt"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
if (cascMC.pdgCode() == PDG_t::kOmegaPlusBar && cascMC.pdgCodeV0() == kLambda0Bar) {
histos.fill(HIST("h2dGenSecAntiLambdaFromOmegaVsMultMC_VsRecoedEvt"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
}
}

if (cascMC.pdgCode() == PDG_t::kXiMinus) {
Expand All @@ -2920,6 +2990,34 @@
histos.fill(HIST("h2dGenOmegaPlus"), centrality, ptmc);
histos.fill(HIST("h2dGenOmegaPlusVsMultMC"), mcCollision.multMCNParticlesEta05(), ptmc);
}

if (doSecondaryV0s && std::abs(cascMC.pdgCodeV0()) == kLambda0) {
float v0PtMc = std::hypot(cascMC.pxPosMC() + cascMC.pxNegMC(), cascMC.pyPosMC() + cascMC.pyNegMC());
if (cascMC.pdgCodeV0() == kLambda0) {
histos.fill(HIST("h2dGenSecLambda"), centrality, v0PtMc);
histos.fill(HIST("h2dGenSecLambdaVsMultMC"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
if (cascMC.pdgCodeV0() == kLambda0Bar) {
histos.fill(HIST("h2dGenSecAntiLambda"), centrality, v0PtMc);
histos.fill(HIST("h2dGenSecAntiLambdaVsMultMC"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
if (cascMC.pdgCode() == PDG_t::kXiMinus && cascMC.pdgCodeV0() == kLambda0) {
histos.fill(HIST("h2dGenSecLambdaFromXi"), centrality, v0PtMc);
histos.fill(HIST("h2dGenSecLambdaFromXiVsMultMC"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
if (cascMC.pdgCode() == PDG_t::kXiPlusBar && cascMC.pdgCodeV0() == kLambda0Bar) {
histos.fill(HIST("h2dGenSecAntiLambdaFromXi"), centrality, v0PtMc);
histos.fill(HIST("h2dGenSecAntiLambdaFromXiVsMultMC"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
if (cascMC.pdgCode() == PDG_t::kOmegaMinus && cascMC.pdgCodeV0() == kLambda0) {
histos.fill(HIST("h2dGenSecLambdaFromOmega"), centrality, v0PtMc);
histos.fill(HIST("h2dGenSecLambdaFromOmegaVsMultMC"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
if (cascMC.pdgCode() == PDG_t::kOmegaPlusBar && cascMC.pdgCodeV0() == kLambda0Bar) {
histos.fill(HIST("h2dGenSecAntiLambdaFromOmega"), centrality, v0PtMc);
histos.fill(HIST("h2dGenSecAntiLambdaFromOmegaVsMultMC"), mcCollision.multMCNParticlesEta05(), v0PtMc);
}
}
}
}

Expand Down
Loading