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
16 changes: 10 additions & 6 deletions PWGLF/TableProducer/Strangeness/doubleCascTreeCreator.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/TableProducer/Strangeness/doubleCascTreeCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -35,7 +35,7 @@
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"

#include "TDatabasePDG.h"

Check failure on line 38 in PWGLF/TableProducer/Strangeness/doubleCascTreeCreator.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 <random>
#include <utility>
Expand Down Expand Up @@ -86,25 +86,25 @@
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

Configurable<bool> cfgSkimmedProcessing{"cfgSkimmedProcessing", false, "Skimmed dataset processing"};
Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Check failure on line 89 in PWGLF/TableProducer/Strangeness/doubleCascTreeCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

ConfigurableAxis centAxis{"centAxis", {106, 0, 106}, "binning for the centrality"};
ConfigurableAxis zVtxAxis{"zVtxBins", {100, -20.f, 20.f}, "Binning for the vertex z in cm"};

Check failure on line 92 in PWGLF/TableProducer/Strangeness/doubleCascTreeCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

// binning of (anti)lambda mass QA histograms
ConfigurableAxis massOmegaAxis{"massLambdaAxis", {400, o2::constants::physics::MassOmegaMinus - 0.05f, o2::constants::physics::MassOmegaMinus + 0.035}, "binning for the Omega invariant-mass"};
ConfigurableAxis massOmegaAxis{"massOmegaAxis", {400, o2::constants::physics::MassOmegaMinus - 0.05f, o2::constants::physics::MassOmegaMinus + 0.05}, "binning for the Omega invariant-mass"};
ConfigurableAxis massXiAxis{"massXiAxis", {400, o2::constants::physics::MassXiMinus - 0.05f, o2::constants::physics::MassXiMinus + 0.05f}, "binning for the Xi invariant-mass"};

Configurable<float> zVtxMax{"zVtxMax", 10.0f, "maximum z position of the primary vertex"};
Configurable<float> etaMax{"etaMax", 0.9f, "maximum eta"};
ConfigurableAxis momAxis{"momAxisFine", {5.e2, 0.f, 5.f}, "momentum axis binning"};

Check failure on line 100 in PWGLF/TableProducer/Strangeness/doubleCascTreeCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

Configurable<float> cascPtMin{"cascPtMin", 1.f, "minimum (anti)casc pT (GeV/c)"};
Configurable<float> cascPtMax{"cascPtMax", 4.f, "maximum (anti)casc pT (GeV/c)"};
Configurable<float> cascPtMax{"cascPtMax", 5.f, "maximum (anti)casc pT (GeV/c)"};

Configurable<float> minNCrossedRows{"minNCrossedRows", 100, "Minimum number of crossed TPC rows"};
Configurable<float> minNITSClus{"minNITSClus", 0., "Minimum number of ITS clusters"};
Configurable<float> minNTPCClus{"minNTPCClus", 100, "Minimum number of TPC clusters"};
Configurable<float> minNTPCClus{"minNTPCClus", 80, "Minimum number of TPC clusters"};
Configurable<float> maxNSharedTPCClus{"maxNSharedTPCClus", 5, "Maximum number of shared TPC clusters"};

Configurable<double> minCascCosPA{"minCascCosPA", 0.99f, "Minimum cosine of the pointing angle of the cascade"};
Expand All @@ -125,7 +125,7 @@
if (track.itsNCls() < minNITSClus ||
track.tpcNClsFound() < minNTPCClus ||
track.tpcNClsCrossedRows() < minNCrossedRows ||
track.tpcNClsCrossedRows() < 0.8 * track.tpcNClsFindable() ||

Check failure on line 128 in PWGLF/TableProducer/Strangeness/doubleCascTreeCreator.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.tpcNClsShared() > maxNSharedTPCClus) {
return false;
}
Expand Down Expand Up @@ -159,8 +159,10 @@

// event QA
histos.add<TH1>("QA/zVtx", ";#it{z}_{vtx} (cm);Entries", HistType::kTH1F, {zVtxAxis});
histos.add<TH2>("QA/massXi", ";#it{p}_{T} (GeV/#it{c});#it{M}(#Lambda + #pi^{-}) (GeV/#it{c}^{2});Entries", HistType::kTH2F, {momAxis, massXiAxis});
histos.add<TH2>("QA/massOmega", ";#it{p}_{T} (GeV/#it{c});#it{M}(#Omega + #pi^{-}) (GeV/#it{c}^{2});Entries", HistType::kTH2F, {momAxis, massOmegaAxis});
histos.add<TH2>("QA/massXi1", ";#it{p}_{T} (GeV/#it{c});#it{M}(#Lambda + #pi^{-}) (GeV/#it{c}^{2});Entries", HistType::kTH2F, {momAxis, massXiAxis});
histos.add<TH2>("QA/massOmega1", ";#it{p}_{T} (GeV/#it{c});#it{M}(#Omega + #pi^{-}) (GeV/#it{c}^{2});Entries", HistType::kTH2F, {momAxis, massOmegaAxis});
histos.add<TH2>("QA/massXi2", ";#it{p}_{T} (GeV/#it{c});#it{M}(#Lambda + #pi^{-}) (GeV/#it{c}^{2});Entries", HistType::kTH2F, {momAxis, massXiAxis});
histos.add<TH2>("QA/massOmega2", ";#it{p}_{T} (GeV/#it{c});#it{M}(#Omega + #pi^{-}) (GeV/#it{c}^{2});Entries", HistType::kTH2F, {momAxis, massOmegaAxis});
}

template <class C, class T>
Expand Down Expand Up @@ -210,7 +212,7 @@
};

template <class T>
bool doubleOmegaMass(T const&, FullCascades::iterator const& casc1, FullCascades::iterator const& casc2)
float doubleOmegaMass(T const&, FullCascades::iterator const& casc1, FullCascades::iterator const& casc2)
{
// the fake omega decay is the one with the smaller radius
auto& fakeOmega = casc1.cascradius() < casc2.cascradius() ? casc1 : casc2;
Expand All @@ -233,11 +235,13 @@
{
doubleCascCands.clear();

for (auto& casc1 : cascades) {

Check failure on line 238 in PWGLF/TableProducer/Strangeness/doubleCascTreeCreator.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 (!isSelectedCasc(collision, tracks, casc1)) {
continue;
}
histos.fill(HIST("QA/massXi"), casc1.pt(), casc1.mXi());
histos.fill(HIST("QA/massOmega"), casc1.pt(), casc1.mOmega());
for (auto& casc2 : cascades) {

Check failure on line 244 in PWGLF/TableProducer/Strangeness/doubleCascTreeCreator.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 (!isSelectedCasc(collision, tracks, casc2)) {
continue;
}
Expand Down Expand Up @@ -299,7 +303,7 @@
histos.fill(HIST("QA/zVtx"), collision.posZ());
fillDoubleCasc(collision, tracks, cascades);

for (auto& cand : doubleCascCands) {

Check failure on line 306 in PWGLF/TableProducer/Strangeness/doubleCascTreeCreator.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.
doubleCascTable(
cand.ptCasc1,
cand.etaCasc1,
Expand Down
Loading