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
24 changes: 12 additions & 12 deletions ALICE3/TableProducer/alice3-decayfinder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@

HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};

Partition<aod::McParticles> trueD = aod::mcparticle::pdgCode == 421;

Check failure on line 120 in ALICE3/TableProducer/alice3-decayfinder.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.
Partition<aod::McParticles> trueDbar = aod::mcparticle::pdgCode == -421;

Check failure on line 121 in ALICE3/TableProducer/alice3-decayfinder.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.
Partition<aod::McParticles> trueLc = aod::mcparticle::pdgCode == 4122;
Partition<aod::McParticles> trueLcbar = aod::mcparticle::pdgCode == -4122;

Expand Down Expand Up @@ -215,7 +215,7 @@
std::array<float, 3> negP;
posTrack.getPxPyPzGlo(posP);
negTrack.getPxPyPzGlo(negP);
dmeson.dcaDau = TMath::Sqrt(fitter.getChi2AtPCACandidate());

Check failure on line 218 in ALICE3/TableProducer/alice3-decayfinder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
dmeson.Pdaug[0] = posP[0];
dmeson.Pdaug[1] = posP[1];
dmeson.Pdaug[2] = posP[2];
Expand All @@ -224,10 +224,10 @@
dmeson.Ndaug[2] = negP[2];

// return mass and kinematic variables
dmeson.mass = RecoDecay::m(array{array{posP[0], posP[1], posP[2]}, array{negP[0], negP[1], negP[2]}}, array{posMass, negMass});

Check failure on line 227 in ALICE3/TableProducer/alice3-decayfinder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
dmeson.pt = std::hypot(posP[0] + negP[0], posP[1] + negP[1]);
dmeson.phi = RecoDecay::phi(array{posP[0] + negP[0], posP[1] + negP[1]});

Check failure on line 229 in ALICE3/TableProducer/alice3-decayfinder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
dmeson.eta = RecoDecay::eta(array{posP[0] + negP[0], posP[1] + negP[1], posP[2] + negP[2]});

Check failure on line 230 in ALICE3/TableProducer/alice3-decayfinder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
dmeson.y = RecoDecay::y(std::array{posP[0] + negP[0], posP[1] + negP[1], posP[2] + negP[2]}, dmeson.mass);
const auto posSV = fitter.getPCACandidate();
dmeson.posSV[0] = posSV[0];
Expand Down Expand Up @@ -284,15 +284,15 @@
t1.getPxPyPzGlo(P1);
t2.getPxPyPzGlo(P2);

lcbaryon.dcaDau = TMath::Sqrt(fitter3.getChi2AtPCACandidate());

Check failure on line 287 in ALICE3/TableProducer/alice3-decayfinder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (lcbaryon.dcaDau > dcaDaughtersSelection)
return false;

// return mass
lcbaryon.mass = RecoDecay::m(array{array{P0[0], P0[1], P0[2]}, array{P1[0], P1[1], P1[2]}, array{P2[0], P2[1], P2[2]}}, array{p0mass, p1mass, p2mass});

Check failure on line 292 in ALICE3/TableProducer/alice3-decayfinder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
lcbaryon.pt = std::hypot(P0[0] + P1[0] + P2[0], P0[1] + P1[1] + P2[1]);
lcbaryon.phi = RecoDecay::phi(array{P0[0] + P1[0] + P2[0], P0[1] + P1[1] + P2[1]});

Check failure on line 294 in ALICE3/TableProducer/alice3-decayfinder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
lcbaryon.eta = RecoDecay::eta(array{P0[0] + P1[0] + P2[0], P0[1] + P1[1] + P2[1], P0[2] + P1[2] + P2[2]});

Check failure on line 295 in ALICE3/TableProducer/alice3-decayfinder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return true;
}

Expand Down Expand Up @@ -356,8 +356,8 @@
histos.add("h3dRecDbarRefl", "h3dRecDbarRefl", kTH3F, {axisPt, axisEta, axisDMass});
histos.add("h3dRecDbarBkg", "h3dRecDbarBkg", kTH3F, {axisPt, axisEta, axisDMass});

histos.add("hDGenForEfficiency", "hDGenForEfficiency", kTH2F, {axisPt, axisY}); //2D vs pT, Y, filling generated D0 and D0bar
histos.add("hDRecForEfficiency", "hDRecForEfficiency", kTH2F, {axisPt, axisY}); //2D vs pT, Y, filling reconstructed D0 and D0bar with correct MC matching
histos.add("hDGenForEfficiency", "hDGenForEfficiency", kTH2F, {axisPt, axisY}); // 2D vs pT, Y, filling generated D0 and D0bar
histos.add("hDRecForEfficiency", "hDRecForEfficiency", kTH2F, {axisPt, axisY}); // 2D vs pT, Y, filling reconstructed D0 and D0bar with correct MC matching

histos.add("hMassD", "hMassD", kTH1F, {axisDMass});
histos.add("hMassDSig", "hMassDSig", kTH1F, {axisDMass});
Expand Down Expand Up @@ -411,11 +411,11 @@
if (doprocessFindDmesons) {
for (auto const& mcParticle : trueD) {
histos.fill(HIST("h2dGenD"), mcParticle.pt(), mcParticle.eta());
histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); //in common for D and Dbar
histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); // in common for D and Dbar
}
for (auto const& mcParticle : trueDbar) {
histos.fill(HIST("h2dGenDbar"), mcParticle.pt(), mcParticle.eta());
histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); //in common for D and Dbar
histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); // in common for D and Dbar
}
}
if (doprocessFindLcBaryons) {
Expand Down Expand Up @@ -491,14 +491,14 @@
histos.fill(HIST("hDCADDaughters"), dmeson.dcaDau * 1e+4);
histos.fill(HIST("hMassD"), dmeson.mass);
histos.fill(HIST("h3dRecD"), dmeson.pt, dmeson.eta, dmeson.mass);
if (dmeson.mcTruth == 1) { //true D0 meson, reco as D0 (= correct matching)
if (dmeson.mcTruth == 1) { // true D0 meson, reco as D0 (= correct matching)
histos.fill(HIST("h3dRecDSig"), dmeson.pt, dmeson.eta, dmeson.mass);
histos.fill(HIST("hMassDSig"), dmeson.mass);
histos.fill(HIST("hDRecForEfficiency"), dmeson.pt, dmeson.y); //for efficiency
} else if (dmeson.mcTruth == 2) { //true D0bar meson, reco as D0 (= reflection)
histos.fill(HIST("hDRecForEfficiency"), dmeson.pt, dmeson.y); // for efficiency
} else if (dmeson.mcTruth == 2) { // true D0bar meson, reco as D0 (= reflection)
histos.fill(HIST("hMassDRefl"), dmeson.mass);
histos.fill(HIST("h3dRecDRefl"), dmeson.pt, dmeson.eta, dmeson.mass);
} else { //background, reco as D0
} else { // background, reco as D0
histos.fill(HIST("hMassDBkg"), dmeson.mass);
histos.fill(HIST("h3dRecDBkg"), dmeson.pt, dmeson.eta, dmeson.mass);
}
Expand Down Expand Up @@ -562,14 +562,14 @@
histos.fill(HIST("hDCADbarDaughters"), dmeson.dcaDau * 1e+4);
histos.fill(HIST("hMassDbar"), dmeson.mass);
histos.fill(HIST("h3dRecDbar"), dmeson.pt, dmeson.eta, dmeson.mass);
if (dmeson.mcTruth == 2) { //true D0bar meson, reco as D0bar (= correct matching)
if (dmeson.mcTruth == 2) { // true D0bar meson, reco as D0bar (= correct matching)
histos.fill(HIST("h3dRecDbarSig"), dmeson.pt, dmeson.eta, dmeson.mass);
histos.fill(HIST("hMassDbarSig"), dmeson.mass);
histos.fill(HIST("hDRecForEfficiency"), dmeson.pt, dmeson.y); //for efficiency
} else if (dmeson.mcTruth == 1) { //true D0 meson, reco as D0bar (= reflection)
histos.fill(HIST("hDRecForEfficiency"), dmeson.pt, dmeson.y); // for efficiency
} else if (dmeson.mcTruth == 1) { // true D0 meson, reco as D0bar (= reflection)
histos.fill(HIST("hMassDbarRefl"), dmeson.mass);
histos.fill(HIST("h3dRecDbarRefl"), dmeson.pt, dmeson.eta, dmeson.mass);
} else { //background, reco as D0
} else { // background, reco as D0
histos.fill(HIST("hMassDbarBkg"), dmeson.mass);
histos.fill(HIST("h3dRecDbarBkg"), dmeson.pt, dmeson.eta, dmeson.mass);
}
Expand Down
Loading