Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,10 @@
hFindable->GetXaxis()->SetBinLabel(6, "Cascades with collId -1");
}

auto hPrimaryV0s = histos.add<TH1>("hPrimaryV0s", "hPrimaryV0s", kTH1D, {{2, -0.5f, 1.5f}});
hPrimaryV0s->GetXaxis()->SetBinLabel(1, "All V0s");
hPrimaryV0s->GetXaxis()->SetBinLabel(2, "Primary V0s");

mRunNumber = 0;

mEnabledTables.resize(nTables, 0);
Expand Down Expand Up @@ -899,10 +903,10 @@

bool trackIsInteresting = false;
if (
(originParticle.pdgCode() == 310 && v0BuilderOpts.mc_addGeneratedK0Short.value > 0) ||

Check failure on line 906 in PWGLF/TableProducer/Strangeness/strangenessbuilder.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.
(originParticle.pdgCode() == 3122 && v0BuilderOpts.mc_addGeneratedLambda.value > 0) ||

Check failure on line 907 in PWGLF/TableProducer/Strangeness/strangenessbuilder.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.
(originParticle.pdgCode() == -3122 && v0BuilderOpts.mc_addGeneratedAntiLambda.value > 0) ||

Check failure on line 908 in PWGLF/TableProducer/Strangeness/strangenessbuilder.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.
(originParticle.pdgCode() == 22 && v0BuilderOpts.mc_addGeneratedGamma.value > 0)) {

Check failure on line 909 in PWGLF/TableProducer/Strangeness/strangenessbuilder.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.
trackIsInteresting = true;
}
if (!trackIsInteresting) {
Expand Down Expand Up @@ -952,7 +956,7 @@
currentV0Entry.pdgCode = positiveTrackIndex.pdgCode;
currentV0Entry.particleId = positiveTrackIndex.originId;
currentV0Entry.isCollinearV0 = false;
if (v0BuilderOpts.mc_addGeneratedGammaMakeCollinear.value && currentV0Entry.pdgCode == 22) {

Check failure on line 959 in PWGLF/TableProducer/Strangeness/strangenessbuilder.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.
currentV0Entry.isCollinearV0 = true;
}
currentV0Entry.found = false;
Expand All @@ -974,7 +978,7 @@
currentV0Entry.pdgCode = positiveTrackIndex.pdgCode;
currentV0Entry.particleId = positiveTrackIndex.originId;
currentV0Entry.isCollinearV0 = false;
if (v0BuilderOpts.mc_addGeneratedGammaMakeCollinear.value && currentV0Entry.pdgCode == 22) {

Check failure on line 981 in PWGLF/TableProducer/Strangeness/strangenessbuilder.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.
currentV0Entry.isCollinearV0 = true;
}
currentV0Entry.found = false;
Expand Down Expand Up @@ -1050,9 +1054,9 @@

bool trackIsInteresting = false;
if (
(originParticle.pdgCode() == 3312 && cascadeBuilderOpts.mc_addGeneratedXiMinus.value > 0) ||

Check failure on line 1057 in PWGLF/TableProducer/Strangeness/strangenessbuilder.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.
(originParticle.pdgCode() == -3312 && cascadeBuilderOpts.mc_addGeneratedXiPlus.value > 0) ||

Check failure on line 1058 in PWGLF/TableProducer/Strangeness/strangenessbuilder.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.
(originParticle.pdgCode() == 3334 && cascadeBuilderOpts.mc_addGeneratedOmegaMinus.value > 0) ||

Check failure on line 1059 in PWGLF/TableProducer/Strangeness/strangenessbuilder.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.
(originParticle.pdgCode() == -3334 && cascadeBuilderOpts.mc_addGeneratedOmegaPlus.value > 0)) {
trackIsInteresting = true;
}
Expand Down Expand Up @@ -1332,7 +1336,7 @@
straHelper.v0.daughterDCA,
straHelper.v0.positiveDCAxy,
straHelper.v0.negativeDCAxy,
TMath::Cos(straHelper.v0.pointingAngle),

Check failure on line 1339 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
straHelper.v0.dcaToPV,
v0.v0Type);
products.v0dataLink(products.v0cores.lastIndex(), -1);
Expand Down Expand Up @@ -1462,6 +1466,9 @@
thisInfo.negP[0], thisInfo.negP[1], thisInfo.negP[2],
thisInfo.momentum[0], thisInfo.momentum[1], thisInfo.momentum[2]);
histos.fill(HIST("hTableBuildingStatistics"), kV0MCCores);
histos.fill(HIST("hPrimaryV0s"), 0);
if (thisInfo.isPhysicalPrimary)
histos.fill(HIST("hPrimaryV0s"), 1);
}
if (mEnabledTables[kV0MCCollRefs]) {
products.v0mccollref(thisInfo.mcCollision);
Expand Down Expand Up @@ -1593,6 +1600,9 @@
info.negP[0], info.negP[1], info.negP[2],
info.momentum[0], info.momentum[1], info.momentum[2]);
histos.fill(HIST("hTableBuildingStatistics"), kV0MCCores);
histos.fill(HIST("hPrimaryV0s"), 0);
if (thisInfo.isPhysicalPrimary)
histos.fill(HIST("hPrimaryV0s"), 1);
}
if (mEnabledTables[kV0MCCollRefs]) {
products.v0mccollref(info.mcCollision);
Expand Down
7 changes: 7 additions & 0 deletions PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,10 @@ struct derivedlambdakzeroanalysis {
hRawCentrality->SetBinContent(ii, value);
}

auto hPrimaryV0s = histos.add<TH1>("hPrimaryV0s", "hPrimaryV0s", kTH1D, {{2, -0.5f, 1.5f}});
hPrimaryV0s->GetXaxis()->SetBinLabel(1, "All V0s");
hPrimaryV0s->GetXaxis()->SetBinLabel(2, "Primary V0s");

// histograms versus mass
if (analyseK0Short) {
histos.add("h2dNbrOfK0ShortVsCentrality", "h2dNbrOfK0ShortVsCentrality", kTH2F, {axisCentrality, {10, -0.5f, 9.5f}});
Expand Down Expand Up @@ -2299,9 +2303,12 @@ struct derivedlambdakzeroanalysis {
if (!v0MC.has_straMCCollision())
continue;

histos.fill(HIST("hPrimaryV0s"), 0);
if (!v0MC.isPhysicalPrimary())
continue;

histos.fill(HIST("hPrimaryV0s"), 1);

float ptmc = v0MC.ptMC();
float ymc = 1e3;
if (v0MC.pdgCode() == 310)
Expand Down
Loading