Skip to content

Commit c33f338

Browse files
authored
[PWGLF] remove daughter indices (#17224)
1 parent 85847df commit c33f338

2 files changed

Lines changed: 5 additions & 32 deletions

File tree

PWGLF/DataModel/Vtx3BodyTables.h

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,6 @@ using Vtx3BodyDatasCovsIndexed = soa::Join<Vtx3BodyDatas, Vtx3BodyCovs, Decay3Bo
337337

338338
namespace nuclei3body
339339
{
340-
DECLARE_SOA_INDEX_COLUMN_FULL(Helium3Track, helium3Track, int, Tracks, "_He3"); //!
341-
DECLARE_SOA_INDEX_COLUMN_FULL(Daughter1Track, daughter1Track, int, Tracks, "_D1"); //!
342-
DECLARE_SOA_INDEX_COLUMN_FULL(Daughter2Track, daughter2Track, int, Tracks, "_D2"); //!
343-
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
344-
345340
DECLARE_SOA_COLUMN(SignHe3, signHe3, int8_t); //! He3 charge sign
346341
DECLARE_SOA_COLUMN(SignDaughter1, signDaughter1, int8_t); //! daughter 1 charge sign
347342
DECLARE_SOA_COLUMN(SignDaughter2, signDaughter2, int8_t); //! daughter 2 charge sign
@@ -388,14 +383,10 @@ DECLARE_SOA_COLUMN(ItsNClsHe3, itsNClsHe3, uint8_t);
388383
DECLARE_SOA_COLUMN(ItsNClsDaughter1, itsNClsDaughter1, uint8_t);
389384
DECLARE_SOA_COLUMN(ItsNClsDaughter2, itsNClsDaughter2, uint8_t);
390385

391-
DECLARE_SOA_COLUMN(McLabelHe3, mcLabelHe3, int);
392-
DECLARE_SOA_COLUMN(McLabelDaughter1, mcLabelDaughter1, int);
393-
DECLARE_SOA_COLUMN(McLabelDaughter2, mcLabelDaughter2, int);
394386
DECLARE_SOA_COLUMN(McPdgHe3, mcPdgHe3, int);
395387
DECLARE_SOA_COLUMN(McPdgDaughter1, mcPdgDaughter1, int);
396388
DECLARE_SOA_COLUMN(McPdgDaughter2, mcPdgDaughter2, int);
397389
DECLARE_SOA_COLUMN(McMatchStatus, mcMatchStatus, uint8_t); //! 0 missing label, 1 no common mother, 2 common mother, 3 configured decay
398-
DECLARE_SOA_COLUMN(McMotherLabel, mcMotherLabel, int);
399390
DECLARE_SOA_COLUMN(McMotherPdg, mcMotherPdg, int);
400391
DECLARE_SOA_COLUMN(GenMotherPt, genMotherPt, float);
401392
DECLARE_SOA_COLUMN(GenMotherEta, genMotherEta, float);
@@ -404,9 +395,7 @@ DECLARE_SOA_COLUMN(GenDecayLength, genDecayLength, float);
404395
} // namespace nuclei3body
405396

406397
#define NUCLEI_THREE_BODY_RECO_COLUMNS \
407-
nuclei3body::Helium3TrackId, nuclei3body::Daughter1TrackId, \
408-
nuclei3body::Daughter2TrackId, nuclei3body::CollisionId, \
409-
nuclei3body::SignHe3, nuclei3body::SignDaughter1, nuclei3body::SignDaughter2, \
398+
nuclei3body::SignHe3, nuclei3body::SignDaughter1, nuclei3body::SignDaughter2, \
410399
nuclei3body::Pt, nuclei3body::Eta, nuclei3body::Phi, \
411400
nuclei3body::PHe3, nuclei3body::PDaughter1, nuclei3body::PDaughter2, \
412401
nuclei3body::Chi2, nuclei3body::DcaDaughters, nuclei3body::CosPA, \
@@ -433,9 +422,8 @@ DECLARE_SOA_TABLE(NucleiThreeBodyDatas, "AOD", "NUC3BODYDATA",
433422
DECLARE_SOA_TABLE(McNucleiThreeBodyDatas, "AOD", "MCNUC3BODY",
434423
o2::soa::Index<>,
435424
NUCLEI_THREE_BODY_RECO_COLUMNS,
436-
nuclei3body::McLabelHe3, nuclei3body::McLabelDaughter1, nuclei3body::McLabelDaughter2,
437425
nuclei3body::McPdgHe3, nuclei3body::McPdgDaughter1, nuclei3body::McPdgDaughter2,
438-
nuclei3body::McMatchStatus, nuclei3body::McMotherLabel, nuclei3body::McMotherPdg,
426+
nuclei3body::McMatchStatus, nuclei3body::McMotherPdg,
439427
nuclei3body::GenMotherPt, nuclei3body::GenMotherEta,
440428
nuclei3body::GenMotherPhi, nuclei3body::GenDecayLength);
441429

PWGLF/TableProducer/Nuspex/nucleiThreeBodyBuilder.cxx

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ struct NucleiThreeBodyBuilder {
195195
std::vector<bool> preselectedTracks;
196196

197197
struct RecoCandidate {
198-
std::array<int, 3> trackIds{InvalidLabel, InvalidLabel, InvalidLabel};
199-
int collisionId = InvalidLabel;
200198
std::array<int8_t, 3> signs{};
201199
float pt = 0.f;
202200
float eta = 0.f;
@@ -218,10 +216,8 @@ struct NucleiThreeBodyBuilder {
218216
};
219217

220218
struct MCInfo {
221-
std::array<int, 3> labels{InvalidLabel, InvalidLabel, InvalidLabel};
222219
std::array<int, 3> pdgs{};
223220
uint8_t matchStatus = MissingDaughterLabel;
224-
int motherLabel = InvalidLabel;
225221
int motherPdg = 0;
226222
float motherPt = InvalidFloat;
227223
float motherEta = InvalidFloat;
@@ -472,10 +468,6 @@ struct NucleiThreeBodyBuilder {
472468
}
473469
registry.fill(HIST("triplets"), 1.);
474470

475-
out.trackIds = {static_cast<int>(he3Track.globalIndex()),
476-
static_cast<int>(daughter1Track.globalIndex()),
477-
static_cast<int>(daughter2Track.globalIndex())};
478-
out.collisionId = collision.globalIndex();
479471
out.signs = {static_cast<int8_t>(he3Track.sign() > 0 ? 1 : -1),
480472
static_cast<int8_t>(daughter1Track.sign() > 0 ? 1 : -1),
481473
static_cast<int8_t>(daughter2Track.sign() > 0 ? 1 : -1)};
@@ -546,8 +538,7 @@ struct NucleiThreeBodyBuilder {
546538

547539
void fillDataTable(RecoCandidate const& c)
548540
{
549-
outputData(c.trackIds[0], c.trackIds[1], c.trackIds[2], c.collisionId,
550-
c.signs[0], c.signs[1], c.signs[2],
541+
outputData(c.signs[0], c.signs[1], c.signs[2],
551542
c.pt, c.eta, c.phi,
552543
c.daughterMomentum[0], c.daughterMomentum[1], c.daughterMomentum[2],
553544
c.chi2, c.dcaDaughters, c.cosPA, c.decayLength,
@@ -575,9 +566,6 @@ struct NucleiThreeBodyBuilder {
575566
const auto he3Particle = he3Track.template mcParticle_as<aod::McParticles>();
576567
const auto daughter1Particle = daughter1Track.template mcParticle_as<aod::McParticles>();
577568
const auto daughter2Particle = daughter2Track.template mcParticle_as<aod::McParticles>();
578-
info.labels = {static_cast<int>(he3Particle.globalIndex()),
579-
static_cast<int>(daughter1Particle.globalIndex()),
580-
static_cast<int>(daughter2Particle.globalIndex())};
581569
info.pdgs = {he3Particle.pdgCode(), daughter1Particle.pdgCode(), daughter2Particle.pdgCode()};
582570
info.matchStatus = NoCommonImmediateMother;
583571

@@ -601,7 +589,6 @@ struct NucleiThreeBodyBuilder {
601589

602590
const auto selectedMother = mcParticles.rawIteratorAt(commonMotherLabel);
603591
info.matchStatus = CommonImmediateMother;
604-
info.motherLabel = commonMotherLabel;
605592
info.motherPdg = selectedMother.pdgCode();
606593
const int he3Sign = he3Track.sign() > 0 ? 1 : -1;
607594
const bool expectedDaughters = info.pdgs[0] == he3Sign * He3Pdg &&
@@ -627,8 +614,7 @@ struct NucleiThreeBodyBuilder {
627614

628615
void fillMCTable(RecoCandidate const& c, MCInfo const& m)
629616
{
630-
outputMC(c.trackIds[0], c.trackIds[1], c.trackIds[2], c.collisionId,
631-
c.signs[0], c.signs[1], c.signs[2],
617+
outputMC(c.signs[0], c.signs[1], c.signs[2],
632618
c.pt, c.eta, c.phi,
633619
c.daughterMomentum[0], c.daughterMomentum[1], c.daughterMomentum[2],
634620
c.chi2, c.dcaDaughters, c.cosPA, c.decayLength,
@@ -643,9 +629,8 @@ struct NucleiThreeBodyBuilder {
643629
c.tpcNCls[0], c.tpcNCls[1], c.tpcNCls[2],
644630
c.tpcCrossedRows[0], c.tpcCrossedRows[1], c.tpcCrossedRows[2],
645631
c.itsNCls[0], c.itsNCls[1], c.itsNCls[2],
646-
m.labels[0], m.labels[1], m.labels[2],
647632
m.pdgs[0], m.pdgs[1], m.pdgs[2],
648-
m.matchStatus, m.motherLabel, m.motherPdg,
633+
m.matchStatus, m.motherPdg,
649634
m.motherPt, m.motherEta, m.motherPhi, m.decayLength);
650635
}
651636

0 commit comments

Comments
 (0)