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
16 changes: 16 additions & 0 deletions PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <optional>
#include <string>

using namespace o2::framework; // o2-linter: disable=using-directive

Check failure on line 31 in PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.

namespace o2::analysis::femto_universe // o2-linter: disable=name/namespace
{
Expand Down Expand Up @@ -142,6 +142,10 @@
mHistogramRegistry->add((folderName + folderSuffix + "/hOrigin_MC").c_str(), "; Origin; Entries", kTH1I, {{100, 0, 100}});
mHistogramRegistry->add((folderName + folderSuffix + "/hNoMCtruthCounter").c_str(), "; Counter; Entries", kTH1I, {{1, 0, 1}});

mHistogramRegistry->add((folderName + folderSuffix + "/hTrueRecoMomPart1").c_str(), "; #it{p}_{reco} (GeV/#it{c}); #it{p}_{truth} - #it{p}_{reco} (GeV/#it{c})", kTH2F, {tempFitVarpTAxis, tempFitVarAxis});
mHistogramRegistry->add((folderName + folderSuffix + "/hTrueRecoThetaPart1").c_str(), "; #it{p}_{reco} (GeV/#it{c}); #it{#theta}_{truth} - #it{#theta}_{reco} (GeV/#it{c})", kTH2F, {tempFitVarpTAxis, tempFitVarAxis});
mHistogramRegistry->add((folderName + folderSuffix + "/hTrueRecoMomPart1").c_str(), "; #it{p}_{reco} (GeV/#it{c}); #it{#phi}_{truth} - #it{#phi}_{reco} (GeV/#it{c})", kTH2F, {tempFitVarpTAxis, tempFitVarAxis});

if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) {
/// Track histograms
if (isDebug) {
Expand Down Expand Up @@ -247,6 +251,7 @@
if (isMC) {
init_base<o2::aod::femtouniverse_mc_particle::MCType::kTruth>(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis);
init_MC(folderName, tempFitVarAxisTitle, tempFitVarpTAxis, tempFitVarAxis, isDebug);
// init_MC_reso(folderName, tempFitVarAxisTitle, tempFitVarpTAxis);
}
}
}
Expand Down Expand Up @@ -343,6 +348,17 @@

if (std::abs(pdgcode) == mPDG) { // fill this histogramm only for TRUE protons (independently of their origin) for the track purity estimation
mHistogramRegistry->fill(histFolder + HIST("_MC/hPt_ReconNoFake"), part.pt());
if (part.has_fdMCParticle()) {

float part_p = part.pt() * std::cosh(part.eta());
float part_MC_p = part.fdMCParticle().pt() * std::cosh(part.fdMCParticle().eta());
float part_theta = 2.0 * std::atan(std::exp(-part.eta()));
float part_MC_theta = 2.0 * std::atan(std::exp(-part.fdMCParticle().eta()));

mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoMomPion"), part_p, (part_MC_p - part_p));
mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoThetaPion"), part_p, (part_MC_theta - part_theta));
mHistogramRegistry->fill(histFolder + HIST("_MC/hTrueRecoMomPion"), part_p, part.fdMCParticle().phi() - part.phi());
}
}

if constexpr (mParticleType == o2::aod::femtouniverseparticle::ParticleType::kTrack || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kV0Child || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kCascadeBachelor || mParticleType == o2::aod::femtouniverseparticle::ParticleType::kMCTruthTrack) {
Expand Down Expand Up @@ -440,17 +456,17 @@
} else if (confPDG == mConfPDGCodePart[1]) {
binPDG = 1;
} else if (confPDG == mConfPDGCodePart[2]) {
binPDG = 2; // o2-linter: disable=pdg/explicit-code

Check failure on line 459 in PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h

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.
} else {
binPDG = 3; // o2-linter: disable=pdg/explicit-code

Check failure on line 461 in PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h

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.
}
if (std::abs(pdgcode) == 211) {

Check failure on line 463 in PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h

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.

Check failure on line 463 in PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h

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.
mHistogramRegistry->fill(histFolder + HIST("_MC/hMisidentification"),
binPDG, 0, part.pt());
} else if (std::abs(pdgcode) == 321) {

Check failure on line 466 in PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h

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.

Check failure on line 466 in PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h

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.
mHistogramRegistry->fill(histFolder + HIST("_MC/hMisidentification"),
binPDG, 1, part.pt());
} else if (std::abs(pdgcode) == 2212) {

Check failure on line 469 in PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h

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.

Check failure on line 469 in PWGCF/FemtoUniverse/Core/FemtoUniverseParticleHisto.h

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.
mHistogramRegistry->fill(histFolder + HIST("_MC/hMisidentification"),
binPDG, 2, part.pt());
} else {
Expand Down
Loading