Skip to content
Merged
Show file tree
Hide file tree
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
43 changes: 43 additions & 0 deletions PWGLF/DataModel/LFSlimNucleiTables.h
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/DataModel/LFSlimNucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -12,7 +12,7 @@
///
/// \file LFSlimNucleiTables.h
/// \brief Slim nuclei tables
///

Check failure on line 15 in PWGLF/DataModel/LFSlimNucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

#include "Framework/AnalysisDataModel.h"
#include "Framework/ASoAHelpers.h"
Expand All @@ -28,15 +28,15 @@
DECLARE_SOA_COLUMN(Pt, pt, float);
DECLARE_SOA_COLUMN(Eta, eta, float);
DECLARE_SOA_COLUMN(Phi, phi, float);
DECLARE_SOA_COLUMN(TPCInnerParam, tpcInnerParam, float);

Check failure on line 31 in PWGLF/DataModel/LFSlimNucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Beta, beta, float);
DECLARE_SOA_COLUMN(Zvertex, zVertex, float);

Check failure on line 33 in PWGLF/DataModel/LFSlimNucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(DCAxy, dcaxy, float);

Check failure on line 34 in PWGLF/DataModel/LFSlimNucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(DCAz, dcaz, float);

Check failure on line 35 in PWGLF/DataModel/LFSlimNucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCsignal, tpcSignal, float);

Check failure on line 36 in PWGLF/DataModel/LFSlimNucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(ITSchi2, itsChi2, float);

Check failure on line 37 in PWGLF/DataModel/LFSlimNucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCchi2, tpcChi2, float);

Check failure on line 38 in PWGLF/DataModel/LFSlimNucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TOFchi2, tofChi2, float);

Check failure on line 39 in PWGLF/DataModel/LFSlimNucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Flags, flags, uint16_t);
DECLARE_SOA_COLUMN(TPCfindableCls, tpcFindableCls, uint8_t);
DECLARE_SOA_COLUMN(TPCcrossedRows, tpcCrossedRows, uint8_t);
Expand All @@ -53,6 +53,29 @@
DECLARE_SOA_COLUMN(AbsoDecL, absoDecL, float);

} // namespace NucleiTableNS

namespace NucleiPairTableNS
{
DECLARE_SOA_COLUMN(Pt1, pt1, float); // first particle pt
DECLARE_SOA_COLUMN(Eta1, eta1, float); // first particle eta
DECLARE_SOA_COLUMN(Phi1, phi1, float); // first particle phi
DECLARE_SOA_COLUMN(TPCInnerParam1, tpcInnerParam1, float); // first particle TPC inner param
DECLARE_SOA_COLUMN(TPCsignal1, tpcSignal1, float); // first particle TPC signal
DECLARE_SOA_COLUMN(DCAxy1, dcaxy1, float); // first particle DCA xy
DECLARE_SOA_COLUMN(DCAz1, dcaz1, float); // first particle DCA z
DECLARE_SOA_COLUMN(ClusterSizesITS1, clusterSizesITS1, uint32_t); // first particle ITS cluster sizes
DECLARE_SOA_COLUMN(Flags1, flags1, uint16_t); // first particle flags
DECLARE_SOA_COLUMN(Pt2, pt2, float); // second particle pt
DECLARE_SOA_COLUMN(Eta2, eta2, float); // second particle eta
DECLARE_SOA_COLUMN(Phi2, phi2, float); // second particle phi
DECLARE_SOA_COLUMN(TPCInnerParam2, tpcInnerParam2, float); // second particle TPC inner param
DECLARE_SOA_COLUMN(TPCsignal2, tpcSignal2, float); // second particle TPC signal
DECLARE_SOA_COLUMN(DCAxy2, dcaxy2, float); // second particle DCA xy
DECLARE_SOA_COLUMN(DCAz2, dcaz2, float); // second particle DCA z
DECLARE_SOA_COLUMN(ClusterSizesITS2, clusterSizesITS2, uint32_t); // second particle ITS cluster sizes
DECLARE_SOA_COLUMN(Flags2, flags2, uint16_t); // second particle flags
} // namespace NucleiPairTableNS

namespace NucleiFlowTableNS
{
DECLARE_SOA_COLUMN(CentFV0A, centFV0A, float); // centrality with FT0A estimator
Expand Down Expand Up @@ -136,6 +159,26 @@
NucleiTableNS::SurvivedEventSelection,
NucleiTableNS::AbsoDecL);

DECLARE_SOA_TABLE(NucleiPairTable, "AOD", "NUCLEIPAIRTABLE",
NucleiPairTableNS::Pt1,
NucleiPairTableNS::Eta1,
NucleiPairTableNS::Phi1,
NucleiPairTableNS::TPCInnerParam1,
NucleiPairTableNS::TPCsignal1,
NucleiPairTableNS::DCAxy1,
NucleiPairTableNS::DCAz1,
NucleiPairTableNS::ClusterSizesITS1,
NucleiPairTableNS::Flags1,
NucleiPairTableNS::Pt2,
NucleiPairTableNS::Eta2,
NucleiPairTableNS::Phi2,
NucleiPairTableNS::TPCInnerParam2,
NucleiPairTableNS::TPCsignal2,
NucleiPairTableNS::DCAxy2,
NucleiPairTableNS::DCAz2,
NucleiPairTableNS::ClusterSizesITS2,
NucleiPairTableNS::Flags2);

} // namespace o2::aod

#endif // PWGLF_DATAMODEL_LFSLIMNUCLEITABLES_H_
24 changes: 18 additions & 6 deletions PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ struct nucleiSpectra {
};

Produces<o2::aod::NucleiTable> nucleiTable;
Produces<o2::aod::NucleiPairTable> nucleiPairTable;
Produces<o2::aod::NucleiTableMC> nucleiTableMC;
Produces<o2::aod::NucleiTableFlow> nucleiTableFlow;
Service<o2::ccdb::BasicCCDBManager> ccdb;
Expand Down Expand Up @@ -297,6 +298,7 @@ struct nucleiSpectra {
Configurable<LabeledArray<double>> cfgDCAcut{"cfgDCAcut", {nuclei::DCAcutDefault[0], 5, 2, nuclei::names, nuclei::nDCAConfigName}, "Max DCAxy and DCAz for light nuclei"};
Configurable<LabeledArray<double>> cfgDownscaling{"cfgDownscaling", {nuclei::DownscalingDefault[0], 5, 1, nuclei::names, nuclei::DownscalingConfigName}, "Fraction of kept candidates for light nuclei"};
Configurable<LabeledArray<int>> cfgTreeConfig{"cfgTreeConfig", {nuclei::TreeConfigDefault[0], 5, 2, nuclei::names, nuclei::treeConfigNames}, "Filtered trees configuration"};
Configurable<bool> cfgFillPairTree{"cfgFillPairTree", true, "Fill trees for pairs of light nuclei"};
Configurable<LabeledArray<int>> cfgDCAHists{"cfgDCAHists", {nuclei::DCAHistDefault[0], 5, 2, nuclei::names, nuclei::DCAConfigNames}, "DCA hist configuration"};
Configurable<LabeledArray<int>> cfgFlowHist{"cfgFlowHist", {nuclei::FlowHistDefault[0], 5, 1, nuclei::names, nuclei::flowConfigNames}, "Flow hist configuration"};

Expand Down Expand Up @@ -833,14 +835,24 @@ struct nucleiSpectra {
}

fillDataInfo(collision, tracks);
for (auto& c : nuclei::candidates) {
if (c.fillTree) {
nucleiTable(c.pt, c.eta, c.phi, c.tpcInnerParam, c.beta, c.zVertex, c.DCAxy, c.DCAz, c.TPCsignal, c.ITSchi2, c.TPCchi2, c.TOFchi2, c.flags, c.TPCfindableCls, c.TPCcrossedRows, c.ITSclsMap, c.TPCnCls, c.TPCnClsShared, c.clusterSizesITS);
for (size_t i1{0}; i1 < nuclei::candidates.size(); ++i1) {
auto& c1 = nuclei::candidates[i1];
if (c1.fillTree) {
nucleiTable(c1.pt, c1.eta, c1.phi, c1.tpcInnerParam, c1.beta, c1.zVertex, c1.DCAxy, c1.DCAz, c1.TPCsignal, c1.ITSchi2, c1.TPCchi2, c1.TOFchi2, c1.flags, c1.TPCfindableCls, c1.TPCcrossedRows, c1.ITSclsMap, c1.TPCnCls, c1.TPCnClsShared, c1.clusterSizesITS);
if (cfgFillPairTree) {
for (size_t i2{i1 + 1}; i2 < nuclei::candidates.size(); ++i2) {
auto& c2 = nuclei::candidates[i2];
if (!c2.fillTree || ((c1.flags & c2.flags) & 0x1F) == 0) {
continue;
}
nucleiPairTable(c1.pt, c1.eta, c1.phi, c1.tpcInnerParam, c1.TPCsignal, c1.DCAxy, c1.DCAz, c1.clusterSizesITS, c1.flags, c2.pt, c2.eta, c2.phi, c2.tpcInnerParam, c2.TPCsignal, c2.DCAxy, c2.DCAz, c2.clusterSizesITS, c2.flags);
}
}
}
if (c.fillDCAHist) {
if (c1.fillDCAHist) {
for (int iS{0}; iS < nuclei::species; ++iS) {
if (c.flags & BIT(iS)) {
nuclei::hDCAHists[c.pt < 0][iS]->Fill(std::abs(c.pt), c.DCAxy, c.DCAz, c.nSigmaTPC[iS], c.tofMasses[iS], c.ITSnCls, c.TPCnCls);
if (c1.flags & BIT(iS)) {
nuclei::hDCAHists[c1.pt < 0][iS]->Fill(std::abs(c1.pt), c1.DCAxy, c1.DCAz, c1.nSigmaTPC[iS], c1.tofMasses[iS], c1.ITSnCls, c1.TPCnCls);
}
}
}
Expand Down
Loading