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
14 changes: 8 additions & 6 deletions PWGEM/Dilepton/Tasks/taggingHFE.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

#include <algorithm>
#include <array>
#include <iostream>

Check failure on line 45 in PWGEM/Dilepton/Tasks/taggingHFE.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <string>
#include <utility>
#include <vector>
Expand Down Expand Up @@ -320,7 +320,7 @@
fRegistry.addClone("Prefilter/before/", "Prefilter/after/");

// electron-related histograms
fRegistry.add("Data/electron/hs", "hs;p_{T,e} (GeV/c);#eta_{e};#varphi_{e} (rad.);DCA_{e}^{3D} (#sigma);", kTHnSparseF, {{100, 0, 10}, {20, -1, +1}, {90, 0, 2 * M_PI}, {100, 0, 10}}, false);

Check failure on line 323 in PWGEM/Dilepton/Tasks/taggingHFE.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

Check failure on line 323 in PWGEM/Dilepton/Tasks/taggingHFE.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
fRegistry.addClone("Data/electron/", "MC/eFromPromptLF/");
fRegistry.addClone("Data/electron/", "MC/eFromNonPromptLF/");
fRegistry.addClone("Data/electron/", "MC/eFromPromptJpsi/");
Expand All @@ -347,7 +347,7 @@

// for V0 (Lambda)
fRegistry.add("Data/V0/hPt", "pT of V0;p_{T} (GeV/c)", kTH1F, {{100, 0, 10}}, false);
fRegistry.add("Data/V0/hYPhi", "rapidity vs. #varphi of V0;#varphi (rad.);rapidity_{#Lambda}", kTH2F, {{90, 0, 2 * M_PI}, {80, -2, +2}}, false);

Check failure on line 350 in PWGEM/Dilepton/Tasks/taggingHFE.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

Check failure on line 350 in PWGEM/Dilepton/Tasks/taggingHFE.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
fRegistry.add("Data/V0/hAP", "Ap plot;#alpha;q_{T} (GeV/c)", kTH2F, {{200, -1, 1}, {250, 0, 0.25}}, false);
fRegistry.add("Data/V0/hLxy", "decay length from PV;L_{xy} (cm)", kTH1F, {{100, 0, 10}}, false);
fRegistry.add("Data/V0/hCosPA", "cosPA;cosine of pointing angle", kTH1F, {{200, -1, 1}}, false);
Expand All @@ -358,7 +358,7 @@

// for cascade
fRegistry.add("Data/Cascade/hPt", "pT of V0;p_{T} (GeV/c)", kTH1F, {{100, 0, 10}}, false);
fRegistry.add("Data/Cascade/hYPhi", "rapidity vs. #varphi of V0;#varphi (rad.);rapidity_{#Lambda}", kTH2F, {{90, 0, 2 * M_PI}, {80, -2, +2}}, false);

Check failure on line 361 in PWGEM/Dilepton/Tasks/taggingHFE.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

Check failure on line 361 in PWGEM/Dilepton/Tasks/taggingHFE.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
fRegistry.add("Data/Cascade/hCosPA", "cosPA;cosine of pointing angle", kTH1F, {{200, -1, 1}}, false);
fRegistry.add("Data/Cascade/hDCA2Legs", "distance between 2 legs at PCA;distance between 2 legs (cm)", kTH1F, {{100, 0, 1}}, false);
fRegistry.add("Data/Cascade/hV0CosPA", "cosPA of V0 in cascade;cosine of pointing angle", kTH1F, {{100, 0.99, 1}}, false);
Expand Down Expand Up @@ -692,7 +692,7 @@

if constexpr (isMC) {
const auto& mctrack = track.template mcParticle_as<aod::McParticles>();
if (std::abs(mctrack.pdgCode()) != 11) {

Check failure on line 695 in PWGEM/Dilepton/Tasks/taggingHFE.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.
return;
}
if (!(mctrack.isPhysicalPrimary() || mctrack.producedByGenerator())) {
Expand All @@ -701,13 +701,13 @@
const auto& mcmother = mctrack.template mothers_first_as<aod::McParticles>(); // mother particle of electron
int pdg_mother = std::abs(mcmother.pdgCode());

if (pdg_mother == 111 || pdg_mother == 221 || pdg_mother == 331 || pdg_mother == 113 || pdg_mother == 223 || pdg_mother == 333) { // LF

Check failure on line 704 in PWGEM/Dilepton/Tasks/taggingHFE.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.
if (IsFromCharm(mcmother, mcParticles) < 0 && IsFromBeauty(mcmother, mcParticles) < 0) {
fRegistry.fill(HIST("MC/eFromPromptLF/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
} else {
fRegistry.fill(HIST("MC/eFromNonPromptLF/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
}
} else if (pdg_mother == 443) { // Jpsi

Check failure on line 710 in PWGEM/Dilepton/Tasks/taggingHFE.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.
if (IsFromBeauty(mcmother, mcParticles) < 0) {
fRegistry.fill(HIST("MC/eFromPromptJpsi/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
} else {
Expand Down Expand Up @@ -818,8 +818,9 @@
eLpair.ptepv = trackParCov.getPt();
eLpair.dca3dinsigma = dca3DinSigma;

const std::array<float, 3> vertex = {v0.x(), v0.y(), v0.z()};
const std::array<float, 3> momentum = {v0.px(), v0.py(), v0.pz()};
const std::array<float, 3> vertex = {collision.posX(), collision.posY(), collision.posZ()};
const std::array<float, 3> vertexV0 = {v0.x(), v0.y(), v0.z()};
const std::array<float, 3> momV0 = {v0.px(), v0.py(), v0.pz()};
std::array<float, 21> covV0 = {0.f};

constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
Expand All @@ -828,7 +829,7 @@
covV0[i] = v0.positionCovMat()[i];
}

auto v0ParCov = o2::track::TrackParCov(vertex, momentum, covV0, 0, true);
auto v0ParCov = o2::track::TrackParCov(vertexV0, momV0, covV0, 0, true);
v0ParCov.setAbsCharge(0);
v0ParCov.setPID(o2::track::PID::Lambda);

Expand Down Expand Up @@ -887,8 +888,9 @@
eCascPair.ptepv = trackParCov.getPt();
eCascPair.dca3dinsigma = dca3DinSigma;

const std::array<float, 3> vertex = {cascade.x(), cascade.y(), cascade.z()};
const std::array<float, 3> momentum = {cascade.px(), cascade.py(), cascade.pz()};
const std::array<float, 3> vertex = {collision.posX(), collision.posY(), collision.posZ()};
const std::array<float, 3> vertexCasc = {cascade.x(), cascade.y(), cascade.z()};
const std::array<float, 3> momCasc = {cascade.px(), cascade.py(), cascade.pz()};

std::array<float, 21> covCasc = {0.};
constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
Expand All @@ -897,7 +899,7 @@
covCasc[i] = cascade.positionCovMat()[i];
}

auto cascParCov = o2::track::TrackParCov(vertex, momentum, covCasc, cascade.sign(), true);
auto cascParCov = o2::track::TrackParCov(vertexCasc, momCasc, covCasc, cascade.sign(), true);
cascParCov.setAbsCharge(1);
if constexpr (cascType == 0) {
cascParCov.setPID(o2::track::PID::XiMinus);
Expand Down
Loading