Skip to content

Commit 98b3b98

Browse files
authored
[PWGLF] Add TOF chi2 to the nuclei slim derived (AliceO2Group#8303)
1 parent 4e0bfdf commit 98b3b98

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

PWGLF/DataModel/LFSlimNucleiTables.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ DECLARE_SOA_COLUMN(DCAz, dcaz, float);
3636
DECLARE_SOA_COLUMN(TPCsignal, tpcSignal, float);
3737
DECLARE_SOA_COLUMN(ITSchi2, itsChi2, float);
3838
DECLARE_SOA_COLUMN(TPCchi2, tpcChi2, float);
39+
DECLARE_SOA_COLUMN(TOFchi2, tofChi2, float);
3940
DECLARE_SOA_COLUMN(Flags, flags, uint16_t);
4041
DECLARE_SOA_COLUMN(TPCfindableCls, tpcFindableCls, uint8_t);
4142
DECLARE_SOA_COLUMN(TPCcrossedRows, tpcCrossedRows, uint8_t);
@@ -79,6 +80,7 @@ DECLARE_SOA_TABLE(NucleiTable, "AOD", "NUCLEITABLE",
7980
NucleiTableNS::TPCsignal,
8081
NucleiTableNS::ITSchi2,
8182
NucleiTableNS::TPCchi2,
83+
NucleiTableNS::TOFchi2,
8284
NucleiTableNS::Flags,
8385
NucleiTableNS::TPCfindableCls,
8486
NucleiTableNS::TPCcrossedRows,
@@ -113,6 +115,7 @@ DECLARE_SOA_TABLE(NucleiTableMC, "AOD", "NUCLEITABLEMC",
113115
NucleiTableNS::TPCsignal,
114116
NucleiTableNS::ITSchi2,
115117
NucleiTableNS::TPCchi2,
118+
NucleiTableNS::TOFchi2,
116119
NucleiTableNS::Flags,
117120
NucleiTableNS::TPCfindableCls,
118121
NucleiTableNS::TPCcrossedRows,

PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
// o2-analysis-pid-tof-base, o2-analysis-multiplicity-table, o2-analysis-event-selection
2020
// (to add flow: o2-analysis-qvector-table, o2-analysis-centrality-table)
2121

22+
#include <algorithm>
2223
#include <cmath>
24+
#include <memory>
25+
#include <string>
26+
#include <vector>
2327

2428
#include "Math/Vector4D.h"
2529

@@ -79,6 +83,7 @@ struct NucleusCandidate {
7983
float TPCsignal;
8084
float ITSchi2;
8185
float TPCchi2;
86+
float TOFchi2;
8287
std::array<float, 5> nSigmaTPC;
8388
std::array<float, 5> tofMasses;
8489
bool fillTree;
@@ -700,7 +705,7 @@ struct nucleiSpectra {
700705
}
701706
nuclei::candidates.emplace_back(NucleusCandidate{
702707
static_cast<int>(track.globalIndex()), static_cast<int>(track.collisionId()), (1 - 2 * iC) * mTrackParCov.getPt(), mTrackParCov.getEta(), mTrackParCov.getPhi(),
703-
correctedTpcInnerParam, beta, collision.posZ(), dcaInfo[0], dcaInfo[1], track.tpcSignal(), track.itsChi2NCl(), track.tpcChi2NCl(),
708+
correctedTpcInnerParam, beta, collision.posZ(), dcaInfo[0], dcaInfo[1], track.tpcSignal(), track.itsChi2NCl(), track.tpcChi2NCl(), track.tofChi2(),
704709
nSigmaTPC, tofMasses, fillTree, fillDCAHist, correctPV, isSecondary, fromWeakDecay, flag, track.tpcNClsFindable(), static_cast<uint8_t>(track.tpcNClsCrossedRows()), track.itsClusterMap(),
705710
static_cast<uint8_t>(track.tpcNClsFound()), static_cast<uint8_t>(track.tpcNClsShared()), static_cast<uint8_t>(track.itsNCls()), static_cast<uint32_t>(track.itsClusterSizes())});
706711
}
@@ -720,7 +725,7 @@ struct nucleiSpectra {
720725
fillDataInfo(collision, tracks);
721726
for (auto& c : nuclei::candidates) {
722727
if (c.fillTree) {
723-
nucleiTable(c.pt, c.eta, c.phi, c.tpcInnerParam, c.beta, c.zVertex, c.DCAxy, c.DCAz, c.TPCsignal, c.ITSchi2, c.TPCchi2, c.flags, c.TPCfindableCls, c.TPCcrossedRows, c.ITSclsMap, c.TPCnCls, c.TPCnClsShared, c.clusterSizesITS);
728+
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);
724729
}
725730
if (c.fillDCAHist) {
726731
for (int iS{0}; iS < nuclei::species; ++iS) {
@@ -746,7 +751,7 @@ struct nucleiSpectra {
746751
fillDataInfo(collision, tracks);
747752
for (auto& c : nuclei::candidates) {
748753
if (c.fillTree) {
749-
nucleiTable(c.pt, c.eta, c.phi, c.tpcInnerParam, c.beta, c.zVertex, c.DCAxy, c.DCAz, c.TPCsignal, c.ITSchi2, c.TPCchi2, c.flags, c.TPCfindableCls, c.TPCcrossedRows, c.ITSclsMap, c.TPCnCls, c.TPCnClsShared, c.clusterSizesITS);
754+
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);
750755
}
751756
if (c.fillDCAHist) {
752757
for (int iS{0}; iS < nuclei::species; ++iS) {
@@ -775,7 +780,7 @@ struct nucleiSpectra {
775780
fillDataInfo(collision, tracks);
776781
for (auto& c : nuclei::candidates) {
777782
if (c.fillTree) {
778-
nucleiTable(c.pt, c.eta, c.phi, c.tpcInnerParam, c.beta, c.zVertex, c.DCAxy, c.DCAz, c.TPCsignal, c.ITSchi2, c.TPCchi2, c.flags, c.TPCfindableCls, c.TPCcrossedRows, c.ITSclsMap, c.TPCnCls, c.TPCnClsShared, c.clusterSizesITS);
783+
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);
779784
}
780785
if (c.fillDCAHist) {
781786
for (int iS{0}; iS < nuclei::species; ++iS) {
@@ -849,7 +854,7 @@ struct nucleiSpectra {
849854
c.flags |= kIsSecondaryFromMaterial;
850855
}
851856
float absoDecL = computeAbsoDecL(particle);
852-
nucleiTableMC(c.pt, c.eta, c.phi, c.tpcInnerParam, c.beta, c.zVertex, c.DCAxy, c.DCAz, c.TPCsignal, c.ITSchi2, c.TPCchi2, c.flags, c.TPCfindableCls, c.TPCcrossedRows, c.ITSclsMap, c.TPCnCls, c.TPCnClsShared, c.clusterSizesITS, particle.pt(), particle.eta(), particle.phi(), particle.pdgCode(), goodCollisions[particle.mcCollisionId()], absoDecL);
857+
nucleiTableMC(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, particle.pt(), particle.eta(), particle.phi(), particle.pdgCode(), goodCollisions[particle.mcCollisionId()], absoDecL);
853858
}
854859

855860
int index{0};
@@ -870,7 +875,7 @@ struct nucleiSpectra {
870875

871876
if (!isReconstructed[index] && (cfgTreeConfig->get(iS, 0u) || cfgTreeConfig->get(iS, 1u))) {
872877
float absDecL = computeAbsoDecL(particle);
873-
nucleiTableMC(999., 999., 999., 0., 0., 999., 999., 999., -1, -1, -1, flags, 0, 0, 0, 0, 0, 0, particle.pt(), particle.eta(), particle.phi(), particle.pdgCode(), goodCollisions[particle.mcCollisionId()], absDecL);
878+
nucleiTableMC(999., 999., 999., 0., 0., 999., 999., 999., -1, -1, -1, -1, flags, 0, 0, 0, 0, 0, 0, particle.pt(), particle.eta(), particle.phi(), particle.pdgCode(), goodCollisions[particle.mcCollisionId()], absDecL);
874879
}
875880
break;
876881
}

0 commit comments

Comments
 (0)