Skip to content
Closed
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
26 changes: 12 additions & 14 deletions ALICE3/TableProducer/alice3-decayfinder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@

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

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

Check failure on line 132 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 133 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 @@ -229,7 +229,7 @@
std::array<float, 3> negP;
posTrack.getPxPyPzGlo(posP);
negTrack.getPxPyPzGlo(negP);
dmeson.dcaDau = TMath::Sqrt(fitter.getChi2AtPCACandidate());

Check failure on line 232 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 @@ -238,12 +238,12 @@
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 241 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.ptdaugPos = std::hypot(posP[0], posP[1]);
dmeson.ptdaugNeg = std::hypot(negP[0], negP[1]);
dmeson.phi = RecoDecay::phi(array{posP[0] + negP[0], posP[1] + negP[1]});

Check failure on line 245 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 246 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 @@ -300,15 +300,15 @@
t1.getPxPyPzGlo(P1);
t2.getPxPyPzGlo(P2);

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

Check failure on line 303 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 308 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 310 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 311 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 @@ -434,7 +434,7 @@
histos.add("h2dDCAxyVsPtPiMinusFromD", "h2dDCAxyVsPtPiMinusFromD", kTH2F, {axisPt, axisDCA});
histos.add("h2dDCAxyVsPtKaPlusFromD", "h2dDCAxyVsPtKaPlusFromD", kTH2F, {axisPt, axisDCA});
histos.add("h2dDCAxyVsPtKaMinusFromD", "h2dDCAxyVsPtKaMinusFromD", kTH2F, {axisPt, axisDCA});
if (doTopoPlotsForSAndB) {
if (doTopoPlotsForSAndB) {
histos.add("hDCADDaughters_Signal", "hDCADDaughters_Signal", kTH1D, {axisDCADaughters});
histos.add("hDCADDaughters_Bkg", "hDCADDaughters_Bkg", kTH1D, {axisDCADaughters});
histos.add("hDCADbarDaughters_Signal", "hDCADbarDaughters_Signal", kTH1D, {axisDCADaughters});
Expand Down Expand Up @@ -539,7 +539,7 @@
histos.fill(HIST("hDCADDaughters"), dmeson.dcaDau * 1e+4);

if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here)
if (dmeson.mcTruth == 1) { //true D0
if (dmeson.mcTruth == 1) { // true D0
histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA);
histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy);
histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar);
Expand All @@ -549,10 +549,9 @@
histos.fill(HIST("hImpParPi_Signal"), impParXY_daugPos);
histos.fill(HIST("hImpParK_Signal"), impParXY_daugNeg);
histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg);
if (doDCAplotsD)
if (doDCAplotsD)
histos.fill(HIST("hDCADDaughters_Signal"), dmeson.dcaDau * 1e+4);
}
else if (!dmeson.mcTruth) { //bkg D0
} else if (!dmeson.mcTruth) { // bkg D0
histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA);
histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy);
histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar);
Expand All @@ -562,9 +561,9 @@
histos.fill(HIST("hImpParPi_Bkg"), impParXY_daugPos);
histos.fill(HIST("hImpParK_Bkg"), impParXY_daugNeg);
histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg);
if (doDCAplotsD)
if (doDCAplotsD)
histos.fill(HIST("hDCADDaughters_Bkg"), dmeson.dcaDau * 1e+4);
}
}
}

if (dmeson.dcaDau > dcaDaughtersSelection)
Expand Down Expand Up @@ -685,7 +684,7 @@
histos.fill(HIST("hDCADbarDaughters"), dmeson.dcaDau * 1e+4);

if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here)
if (dmeson.mcTruth == 2) { //true D0bar
if (dmeson.mcTruth == 2) { // true D0bar
histos.fill(HIST("hDCosPA_Signal"), dmeson.cosPA);
histos.fill(HIST("hDCosPAxy_Signal"), dmeson.cosPAxy);
histos.fill(HIST("hDCosThetaStar_Signal"), dmeson.cosThetaStar);
Expand All @@ -695,11 +694,10 @@
histos.fill(HIST("hImpParPi_Signal"), impParXY_daugNeg);
histos.fill(HIST("hImpParK_Signal"), impParXY_daugPos);
histos.fill(HIST("hImpParProduct_Signal"), impParXY_daugPos * impParXY_daugNeg);
if (doDCAplotsD)
if (doDCAplotsD)
histos.fill(HIST("hDCADbarDaughters_Signal"), dmeson.dcaDau * 1e+4);
}
else if (!dmeson.mcTruth) { //bkg D0bar
histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA);
} else if (!dmeson.mcTruth) { // bkg D0bar
histos.fill(HIST("hDCosPA_Bkg"), dmeson.cosPA);
histos.fill(HIST("hDCosPAxy_Bkg"), dmeson.cosPAxy);
histos.fill(HIST("hDCosThetaStar_Bkg"), dmeson.cosThetaStar);
histos.fill(HIST("hDDecayLength_Bkg"), decayLength);
Expand All @@ -709,8 +707,8 @@
histos.fill(HIST("hImpParK_Bkg"), impParXY_daugPos);
histos.fill(HIST("hImpParProduct_Bkg"), impParXY_daugPos * impParXY_daugNeg);
}
if (doDCAplotsD)
histos.fill(HIST("hDCADbarDaughters_Bkg"), dmeson.dcaDau * 1e+4);
if (doDCAplotsD)
histos.fill(HIST("hDCADbarDaughters_Bkg"), dmeson.dcaDau * 1e+4);
}

if (dmeson.dcaDau > dcaDaughtersSelection)
Expand Down
Loading