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
1 change: 0 additions & 1 deletion PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <TRandom.h>
#include <TVector2.h>
#include <TVector3.h>
#include <TDatabasePDG.h>

Check failure on line 21 in PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
Expand Down Expand Up @@ -74,10 +74,10 @@
Configurable<int> nbin_dca = {"nbin_dca", 50, "number of DCA bins"};
Configurable<bool> saveHelium{"saveHelium", false, "Save helium candidates"};

int AntideuteronPDG = -1000010020;

Check failure on line 77 in PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.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.
int AntihePDG = -1000020030;

Check failure on line 78 in PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.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.
int AntiHypertritonPDG = -1010010030;

Check failure on line 79 in PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.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.
int AntiHyperHelium4PDG = -1010020040;

Check failure on line 80 in PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.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.

void init(InitContext const&)
{
Expand Down Expand Up @@ -110,7 +110,7 @@
for (const auto& mcparticle : mcParticles) {
if (((mcparticle.pdgCode() == AntiHypertritonPDG || mcparticle.pdgCode() == AntiHyperHelium4PDG) && mcparticle.has_daughters()) || mcparticle.pdgCode() == selectedPDG) {
if (mcparticle.pdgCode() == AntiHypertritonPDG) {
for (auto& daughter : mcparticle.daughters_as<aod::McParticles>()) {

Check failure on line 113 in PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (daughter.pdgCode() == selectedPDG) {
registryMC.fill(HIST("hypertritonPtGen"), mcparticle.pt());
if (saveHelium) {
Expand All @@ -118,12 +118,11 @@
} else {
registryMC.fill(HIST("deutSecPtGen_from_hypertriton"), daughter.pt());
}

}
}
}
if (mcparticle.pdgCode() == AntiHyperHelium4PDG) {
for (auto& daughter : mcparticle.daughters_as<aod::McParticles>()) {

Check failure on line 125 in PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (daughter.pdgCode() == selectedPDG) {
registryMC.fill(HIST("hyperHe4PtGen"), mcparticle.pt());
if (saveHelium) {
Expand Down Expand Up @@ -155,8 +154,8 @@
track.itsNClsInnerBarrel() > max_ITS_InnerBarrel_nClusters ||
track.tpcNClsFound() < min_TPC_nClusters ||
track.tpcNClsCrossedRows() < min_TPC_nCrossedRows ||
track.tpcNClsCrossedRows() < 0.8 * track.tpcNClsFindable() ||

Check failure on line 157 in PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.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.
track.tpcChi2NCl() > 4.f ||

Check failure on line 158 in PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.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.
track.tpcChi2NCl() < min_chi2_TPC ||
track.eta() < min_eta || track.eta() > max_eta ||
track.dcaXY() > max_dcaxy || track.dcaXY() < -max_dcaxy ||
Expand All @@ -171,7 +170,7 @@
registryMC.fill(HIST("he3PtRec"), 2 * track.pt());
}

for (auto& motherparticle : mcparticle.mothers_as<aod::McParticles>()) {

Check failure on line 173 in PWGLF/Tasks/Nuspex/nucleiFromHypertritonMap.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (motherparticle.pdgCode() == AntiHypertritonPDG || motherparticle.pdgCode() == AntiHyperHelium4PDG) {
if (motherparticle.pdgCode() == AntiHypertritonPDG) {
if (mcparticle.pdgCode() == AntihePDG) {
Expand Down
Loading