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
18 changes: 9 additions & 9 deletions PWGDQ/Tasks/quarkoniaToHyperons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <TFile.h>
#include <TH2F.h>
#include <TProfile.h>
#include <TLorentzVector.h>

Check failure on line 43 in PWGDQ/Tasks/quarkoniaToHyperons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
#include <TPDGCode.h>

#include "Framework/runDataProcessing.h"
Expand Down Expand Up @@ -69,8 +69,8 @@
#include "EventFiltering/ZorroSummary.h"

// constants
const float ctauXiPDG = 4.91; // Xi PDG lifetime

Check failure on line 72 in PWGDQ/Tasks/quarkoniaToHyperons.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.
const float ctauOmegaPDG = 2.461; // Omega PDG lifetime

Check failure on line 73 in PWGDQ/Tasks/quarkoniaToHyperons.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.

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -1321,18 +1321,18 @@

if (isXi) {
if (casc.sign() < 0) {
if (cascMC.pdgCode() != 3312 || cascMC.pdgCodePositive() != 2212 || cascMC.pdgCodeNegative() != -211 || cascMC.pdgCodeBachelor() != -211)

Check failure on line 1324 in PWGDQ/Tasks/quarkoniaToHyperons.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 false;
} else {
if (cascMC.pdgCode() != -3312 || cascMC.pdgCodePositive() != 211 || cascMC.pdgCodeNegative() != -2212 || cascMC.pdgCodeBachelor() != 211)

Check failure on line 1327 in PWGDQ/Tasks/quarkoniaToHyperons.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 false;
}
} else {
if (casc.sign() < 0) {
if (cascMC.pdgCode() != 3334 || cascMC.pdgCodePositive() != 2212 || cascMC.pdgCodeNegative() != -211 || cascMC.pdgCodeBachelor() != -321)

Check failure on line 1332 in PWGDQ/Tasks/quarkoniaToHyperons.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 false;
} else {
if (cascMC.pdgCode() != -3334 || cascMC.pdgCodePositive() != 211 || cascMC.pdgCodeNegative() != -2212 || cascMC.pdgCodeBachelor() != 321)

Check failure on line 1335 in PWGDQ/Tasks/quarkoniaToHyperons.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 false;
}
}
Expand All @@ -1349,17 +1349,17 @@
uint64_t bitMap = 0;
// check for specific particle species

if (v0.pdgCode() == 310 && v0.pdgCodePositive() == 211 && v0.pdgCodeNegative() == -211) {

Check failure on line 1352 in PWGDQ/Tasks/quarkoniaToHyperons.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.
BITSET(bitMap, selConsiderK0Short);
if (v0.isPhysicalPrimary())
BITSET(bitMap, selPhysPrimK0Short);
}
if (v0.pdgCode() == 3122 && v0.pdgCodePositive() == 2212 && v0.pdgCodeNegative() == -211) {

Check failure on line 1357 in PWGDQ/Tasks/quarkoniaToHyperons.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.
BITSET(bitMap, selConsiderLambda);
if (v0.isPhysicalPrimary())
BITSET(bitMap, selPhysPrimLambda);
}
if (v0.pdgCode() == -3122 && v0.pdgCodePositive() == 211 && v0.pdgCodeNegative() == -2212) {

Check failure on line 1362 in PWGDQ/Tasks/quarkoniaToHyperons.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.
BITSET(bitMap, selConsiderAntiLambda);
if (v0.isPhysicalPrimary())
BITSET(bitMap, selPhysPrimAntiLambda);
Expand All @@ -1373,7 +1373,7 @@
}

template <typename TV0>
void analyseV0Candidate(TV0 v0, float pt, uint64_t selMap, std::vector<int>& selK0ShortIndices, std::vector<int>& selLambdaIndices, std::vector<int>& selAntiLambdaIndices/*, int v0TableOffset*/)
void analyseV0Candidate(TV0 v0, float pt, uint64_t selMap, std::vector<int>& selK0ShortIndices, std::vector<int>& selLambdaIndices, std::vector<int>& selAntiLambdaIndices /*, int v0TableOffset*/)
// precalculate this information so that a check is one mask operation, not many
{
bool passK0ShortSelections = false;
Expand Down Expand Up @@ -1914,11 +1914,11 @@
void buildHyperonAntiHyperonPairs(TCollision const& collision, THyperons const& fullHyperons, std::vector<int> selHypIndices, std::vector<int> selAntiHypIndices, float centrality, uint8_t gapSide, int type)
{
// 1st loop over all v0s/cascades
for (int iHyp = 0 ; iHyp < selHypIndices.size() ; iHyp++) {
for (int iHyp = 0; iHyp < selHypIndices.size(); iHyp++) {
auto hyperon = fullHyperons.rawIteratorAt(selHypIndices[iHyp]);

// 2nd loop over all v0s/cascade
for (int iAntiHyp = 0 ; iAntiHyp < selAntiHypIndices.size() ; iAntiHyp++) {
for (int iAntiHyp = 0; iAntiHyp < selAntiHypIndices.size(); iAntiHyp++) {
// check we don't look at the same v0s/cascades
if (selHypIndices[iHyp] == selAntiHypIndices[iAntiHyp]) {
continue;
Expand Down Expand Up @@ -2012,7 +2012,7 @@
selK0ShortIndices.clear();
selLambdaIndices.clear();
selAntiLambdaIndices.clear();
for (std::size_t i = 0 ; i < nV0sThisColl ; i++) {
for (std::size_t i = 0; i < nV0sThisColl; i++) {
auto v0 = fullV0s.rawIteratorAt(v0sGrouped[collision.globalIndex()][i]);

if (std::abs(v0.negativeeta()) > v0Selections.daughterEtaCut || std::abs(v0.positiveeta()) > v0Selections.daughterEtaCut)
Expand All @@ -2027,7 +2027,7 @@
selMap = selMap | (static_cast<uint64_t>(1) << selConsiderK0Short) | (static_cast<uint64_t>(1) << selConsiderLambda) | (static_cast<uint64_t>(1) << selConsiderAntiLambda);
selMap = selMap | (static_cast<uint64_t>(1) << selPhysPrimK0Short) | (static_cast<uint64_t>(1) << selPhysPrimLambda) | (static_cast<uint64_t>(1) << selPhysPrimAntiLambda);

analyseV0Candidate(v0, v0.pt(), selMap, selK0ShortIndices, selLambdaIndices, selAntiLambdaIndices/*, fullV0s.offset()*/);
analyseV0Candidate(v0, v0.pt(), selMap, selK0ShortIndices, selLambdaIndices, selAntiLambdaIndices /*, fullV0s.offset()*/);
} // end v0 loop

// count the number of K0s, Lambda and AntiLambdas passsing the selections
Expand Down Expand Up @@ -2072,7 +2072,7 @@
selAntiXiIndices.clear();
selOmIndices.clear();
selAntiOmIndices.clear();
for (std::size_t i = 0 ; i < nCascadesThisColl ; i++) {
for (std::size_t i = 0; i < nCascadesThisColl; i++) {
auto cascade = fullCascades.rawIteratorAt(cascadesGrouped[collision.globalIndex()][i]);

if (std::abs(cascade.negativeeta()) > cascSelections.daughterEtaCut ||
Expand Down Expand Up @@ -2188,7 +2188,7 @@
selK0ShortIndices.clear();
selLambdaIndices.clear();
selAntiLambdaIndices.clear();
for (std::size_t i = 0 ; i < nV0sThisColl ; i++) {
for (std::size_t i = 0; i < nV0sThisColl; i++) {
auto v0 = fullV0s.rawIteratorAt(v0sGrouped[collision.globalIndex()][i]);

if (std::abs(v0.negativeeta()) > v0Selections.daughterEtaCut || std::abs(v0.positiveeta()) > v0Selections.daughterEtaCut)
Expand All @@ -2215,7 +2215,7 @@
selMap = selMap | (static_cast<uint64_t>(1) << selPhysPrimK0Short) | (static_cast<uint64_t>(1) << selPhysPrimLambda) | (static_cast<uint64_t>(1) << selPhysPrimAntiLambda);
}

analyseV0Candidate(v0, ptmc, selMap, selK0ShortIndices, selLambdaIndices, selAntiLambdaIndices/*, fullV0s.offset()*/);
analyseV0Candidate(v0, ptmc, selMap, selK0ShortIndices, selLambdaIndices, selAntiLambdaIndices /*, fullV0s.offset()*/);
} // end v0 loop

/// count the number of K0s, Lambda and AntiLambdas passsing the selections
Expand Down Expand Up @@ -2258,7 +2258,7 @@
selAntiXiIndices.clear();
selOmIndices.clear();
selAntiOmIndices.clear();
for (std::size_t i = 0 ; i < nCascadesThisColl ; i++) {
for (std::size_t i = 0; i < nCascadesThisColl; i++) {
auto cascade = fullCascades.rawIteratorAt(cascadesGrouped[collision.globalIndex()][i]);

if (std::abs(cascade.negativeeta()) > cascSelections.daughterEtaCut ||
Expand Down
Loading