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
6 changes: 3 additions & 3 deletions PWGHF/D2H/Tasks/taskCharmPolarisation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
Configurable<int> minCent{"minCent", 30, "Minimum centrality (0-100) to be considered in the analysis"};
Configurable<int> maxCent{"maxCent", 50, "Maximum centrality (0-100) to be considered in the analysis"};

ConfigurableAxis configThnAxisInvMass{"configThnAxisInvMass", {200, 0.139f, 0.179f}, "#it{M} (GeV/#it{c}^{2})"};

Check failure on line 137 in PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-mass]

Avoid hard-coded particle masses. Use o2::constants::physics::Mass... instead.
ConfigurableAxis configThnAxisPt{"configThnAxisPt", {100, 0.f, 100.f}, "#it{p}_{T} (GeV/#it{c})"};
ConfigurableAxis configThnAxisY{"configThnAxisY", {20, -1.f, 1.f}, "#it{y}"};
ConfigurableAxis configThnAxisCosThetaStarHelicity{"configThnAxisCosThetaStarHelicity", {20, -1.f, 1.f}, "cos(#vartheta_{helicity})"};
Expand Down Expand Up @@ -372,7 +372,7 @@
}
if (doprocessLcToPKPiMc || doprocessLcToPKPiMcWithMl || doprocessLcToPKPiBackgroundMcWithMl) { // Lc->pKpi MC
std::vector<AxisSpec> hRecoHelicityAxes(hHelicityaxes);
if (doprocessLcToPKPiMc) { // Lc->pKpi MC without ML, have one more axis for rotated candidates
if (doprocessLcToPKPiMc) { // Lc->pKpi MC without ML, have one more axis for rotated candidates
hRecoHelicityAxes.insert(hRecoHelicityAxes.end(), {thnAxisResoChannelLc, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisIsRotatedCandidate, thnAxisCharge});
} else {
hRecoHelicityAxes.insert(hRecoHelicityAxes.end(), {thnAxisResoChannelLc, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisCharge});
Expand Down Expand Up @@ -447,7 +447,7 @@
}
if (doprocessLcToPKPiMc || doprocessLcToPKPiMcWithMl || doprocessLcToPKPiBackgroundMcWithMl) {
std::vector<AxisSpec> hRecoProductionAxes(hProductionaxes);
if (doprocessLcToPKPiMc) {
if (doprocessLcToPKPiMc) {
hRecoProductionAxes.insert(hRecoProductionAxes.end(), {thnAxisResoChannelLc, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisIsRotatedCandidate, thnAxisCharge});
} else {
hRecoProductionAxes.insert(hRecoProductionAxes.end(), {thnAxisResoChannelLc, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisCharge});
Expand Down Expand Up @@ -520,7 +520,7 @@
}
if (doprocessLcToPKPiMc || doprocessLcToPKPiMcWithMl || doprocessLcToPKPiBackgroundMcWithMl) {
std::vector<AxisSpec> hRecoBeamAxes(hBeamaxes);
if (doprocessLcToPKPiMc) {
if (doprocessLcToPKPiMc) {
hRecoBeamAxes.insert(hRecoBeamAxes.end(), {thnAxisResoChannelLc, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisIsRotatedCandidate, thnAxisCharge});
} else {
hRecoBeamAxes.insert(hRecoBeamAxes.end(), {thnAxisResoChannelLc, thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin, thnAxisCharge});
Expand Down Expand Up @@ -631,7 +631,7 @@
hEPaxes.insert(hEPaxes.end(), {thnAxisAbsEtaTrackMin, thnAxisNumItsClsMin, thnAxisNumTpcClsMin});
}
if (doprocessDstarMc || doprocessDstarMcWithMl || doprocessDstarMcInPbPb || doprocessDstarMcWithMlInPbPb) {
std::vector<AxisSpec> RecoPromptEPAxes(hEPaxes);

Check failure on line 634 in PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
RecoPromptEPAxes.insert(RecoPromptEPAxes.end(), {thnAxisDauToMuons});
std::vector<AxisSpec> hRecoNonPromptEPAxes(hEPaxes);
hRecoNonPromptEPAxes.insert(hRecoNonPromptEPAxes.end(), {thnAxisDauToMuons, thnAxisPtB});
Expand Down Expand Up @@ -1697,11 +1697,11 @@
bool isInSignalRegion(float invMass)
{
if constexpr (channel == charm_polarisation::DecayChannel::DstarToDzeroPi) { // D*+
if (0.142f < invMass && invMass < 0.15f) {

Check failure on line 1700 in PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

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.
return true;
}
} else if constexpr (channel == charm_polarisation::DecayChannel::LcToPKPi) { // Lc+ (to be tuned!)
if (2.25f < invMass && invMass < 2.35f) {

Check failure on line 1704 in PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

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.
return true;
}
}
Expand Down Expand Up @@ -1832,7 +1832,7 @@
ptBhadMother = candidate.ptBhadMotherPart();
int pdgBhadMother = candidate.pdgBhadMotherPart();
// For unknown reasons there are charm hadrons coming directly from beauty diquarks without an intermediate B-hadron which have an unreasonable correlation between the pT of the charm hadron and the beauty mother. We also remove charm hadrons from quarkonia.
if (origin == RecoDecay::OriginType::NonPrompt && (pdgBhadMother == 5101 || pdgBhadMother == 5103 || pdgBhadMother == 5201 || pdgBhadMother == 5203 || pdgBhadMother == 5301 || pdgBhadMother == 5303 || pdgBhadMother == 5401 || pdgBhadMother == 5403 || pdgBhadMother == 5503 || pdgBhadMother == 553 || pdgBhadMother == 555 || pdgBhadMother == 553 || pdgBhadMother == 557)) {

Check failure on line 1835 in PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

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 1835 in PWGHF/D2H/Tasks/taskCharmPolarisation.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 isCandidateInSignalRegion;
}
} else if constexpr (channel == charm_polarisation::DecayChannel::LcToPKPi) {
Expand Down Expand Up @@ -1978,7 +1978,7 @@
invMassCharmHadForSparse = hfHelper.invMassLcToPKPi(candidate);
}
if constexpr (withMl) {
if (candidate.mlProbLcToPKPi().size() == 3) {

Check failure on line 1981 in PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

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.
// protect from empty vectors
// the BDT output score might be empty if no preselections were enabled (selectionFlag null)
// !!! NB: each rotated candidates inherits the BDT scores of the original candidate, even if the candidate pt changed after the rotation of the kaon-track pt !!!
Expand Down Expand Up @@ -2012,7 +2012,7 @@
invMassCharmHadForSparse = hfHelper.invMassLcToPiKP(candidate);
}
if constexpr (withMl) {
if (candidate.mlProbLcToPiKP().size() == 3) {

Check failure on line 2015 in PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

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.
// protect from empty vectors
// the BDT output score might be empty if no preselections were enabled (selectionFlag null)
// !!! NB: each rotated candidates inherits the BDT scores of the original candidate, even if the candidate pt changed after the rotation of the kaon-track pt !!!
Expand Down Expand Up @@ -2370,7 +2370,7 @@
auto bHadMother = mcParticles.rawIteratorAt(mcParticle.idxBhadMotherPart() - mcParticles.offset());
int pdgBhadMother = std::abs(bHadMother.pdgCode());
// For unknown reasons there are charm hadrons coming directly from beauty diquarks without an intermediate B-hadron which have an unreasonable correlation between the pT of the charm hadron and the beauty mother. We also remove charm hadrons from quarkonia.
if (pdgBhadMother == 5101 || pdgBhadMother == 5103 || pdgBhadMother == 5201 || pdgBhadMother == 5203 || pdgBhadMother == 5301 || pdgBhadMother == 5303 || pdgBhadMother == 5401 || pdgBhadMother == 5403 || pdgBhadMother == 5503 || pdgBhadMother == 553 || pdgBhadMother == 555 || pdgBhadMother == 553 || pdgBhadMother == 557) {

Check failure on line 2373 in PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

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 2373 in PWGHF/D2H/Tasks/taskCharmPolarisation.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;
}
ptBhadMother = bHadMother.pt();
Expand Down
Loading