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
16 changes: 2 additions & 14 deletions PWGLF/DataModel/Vtx3BodyTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
DECLARE_SOA_INDEX_COLUMN_FULL(TrackPi, trackPi, int, Tracks, "_pi"); //!
DECLARE_SOA_INDEX_COLUMN_FULL(TrackDe, trackDe, int, Tracks, "_de"); //!
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_INDEX_COLUMN(Decay3Body, decay3body); //!

Check failure on line 38 in PWGLF/DataModel/Vtx3BodyTables.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.

// General 3 body Vtx properties
DECLARE_SOA_COLUMN(Mass, mass, float); //! candidate mass (with H3L or Anti-H3L mass hypothesis depending on deuteron charge)
Expand Down Expand Up @@ -64,15 +64,15 @@
DECLARE_SOA_COLUMN(XTrackDe, xTrackDe, float); //! track2 x at IU

// DCAs to PV
DECLARE_SOA_COLUMN(DCAXYTrackPrToPV, dcaXYtrackPrToPv, float); //! DCAXY of proton to PV (computed with KFParticle)

Check failure on line 67 in PWGLF/DataModel/Vtx3BodyTables.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(DCAXYTrackPiToPV, dcaXYtrackPiToPv, float); //! DCAXY of pion to PV (computed with KFParticle)

Check failure on line 68 in PWGLF/DataModel/Vtx3BodyTables.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(DCAXYTrackDeToPV, dcaXYtrackDeToPv, float); //! DCAXY of deuteron to PV (computed with KFParticle)

Check failure on line 69 in PWGLF/DataModel/Vtx3BodyTables.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(DCATrackPrToPV, dcaTrackPrToPv, float); //! DCA of proton to PV (computed with KFParticle)

Check failure on line 70 in PWGLF/DataModel/Vtx3BodyTables.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(DCATrackPiToPV, dcaTrackPiToPv, float); //! DCA of pion to PV (computed with KFParticle)

Check failure on line 71 in PWGLF/DataModel/Vtx3BodyTables.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(DCATrackDeToPV, dcaTrackDeToPv, float); //! DCA of deuteron to PV (computed with KFParticle)

Check failure on line 72 in PWGLF/DataModel/Vtx3BodyTables.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(DCAXYTrackPrToPVProp, dcaXYtrackPrToPvProp, float); //! DCAXY of proton to PV (propagated with O2 Propagator)

Check failure on line 73 in PWGLF/DataModel/Vtx3BodyTables.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(DCAXYTrackPiToPVProp, dcaXYtrackPiToPvProp, float); //! DCAXY of pion to PV (propagated with O2 Propagator)

Check failure on line 74 in PWGLF/DataModel/Vtx3BodyTables.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(DCAXYTrackDeToPVProp, dcaXYtrackDeToPvProp, float); //! DCAXY of deuteron to PV (propagated with O2 Propagator)

Check failure on line 75 in PWGLF/DataModel/Vtx3BodyTables.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(DCATrackPrToPVProp, dcaTrackPrToPvProp, float); //! DCA of proton to PV (propagated with O2 Propagator)
DECLARE_SOA_COLUMN(DCATrackPiToPVProp, dcaTrackPiToPvProp, float); //! DCA of pion to PV (propagated with O2 Propagator)
DECLARE_SOA_COLUMN(DCATrackDeToPVProp, dcaTrackDeToPvProp, float); //! DCA of deuteron to PV (propagated with O2 Propagator)
Expand Down Expand Up @@ -337,11 +337,6 @@

namespace nuclei3body
{
DECLARE_SOA_INDEX_COLUMN_FULL(Helium3Track, helium3Track, int, Tracks, "_He3"); //!
DECLARE_SOA_INDEX_COLUMN_FULL(Daughter1Track, daughter1Track, int, Tracks, "_D1"); //!
DECLARE_SOA_INDEX_COLUMN_FULL(Daughter2Track, daughter2Track, int, Tracks, "_D2"); //!
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!

DECLARE_SOA_COLUMN(SignHe3, signHe3, int8_t); //! He3 charge sign
DECLARE_SOA_COLUMN(SignDaughter1, signDaughter1, int8_t); //! daughter 1 charge sign
DECLARE_SOA_COLUMN(SignDaughter2, signDaughter2, int8_t); //! daughter 2 charge sign
Expand Down Expand Up @@ -388,14 +383,10 @@
DECLARE_SOA_COLUMN(ItsNClsDaughter1, itsNClsDaughter1, uint8_t);
DECLARE_SOA_COLUMN(ItsNClsDaughter2, itsNClsDaughter2, uint8_t);

DECLARE_SOA_COLUMN(McLabelHe3, mcLabelHe3, int);
DECLARE_SOA_COLUMN(McLabelDaughter1, mcLabelDaughter1, int);
DECLARE_SOA_COLUMN(McLabelDaughter2, mcLabelDaughter2, int);
DECLARE_SOA_COLUMN(McPdgHe3, mcPdgHe3, int);
DECLARE_SOA_COLUMN(McPdgDaughter1, mcPdgDaughter1, int);
DECLARE_SOA_COLUMN(McPdgDaughter2, mcPdgDaughter2, int);
DECLARE_SOA_COLUMN(McMatchStatus, mcMatchStatus, uint8_t); //! 0 missing label, 1 no common mother, 2 common mother, 3 configured decay
DECLARE_SOA_COLUMN(McMotherLabel, mcMotherLabel, int);
DECLARE_SOA_COLUMN(McMotherPdg, mcMotherPdg, int);
DECLARE_SOA_COLUMN(GenMotherPt, genMotherPt, float);
DECLARE_SOA_COLUMN(GenMotherEta, genMotherEta, float);
Expand All @@ -404,9 +395,7 @@
} // namespace nuclei3body

#define NUCLEI_THREE_BODY_RECO_COLUMNS \
nuclei3body::Helium3TrackId, nuclei3body::Daughter1TrackId, \
nuclei3body::Daughter2TrackId, nuclei3body::CollisionId, \
nuclei3body::SignHe3, nuclei3body::SignDaughter1, nuclei3body::SignDaughter2, \
nuclei3body::SignHe3, nuclei3body::SignDaughter1, nuclei3body::SignDaughter2, \
nuclei3body::Pt, nuclei3body::Eta, nuclei3body::Phi, \
nuclei3body::PHe3, nuclei3body::PDaughter1, nuclei3body::PDaughter2, \
nuclei3body::Chi2, nuclei3body::DcaDaughters, nuclei3body::CosPA, \
Expand All @@ -433,9 +422,8 @@
DECLARE_SOA_TABLE(McNucleiThreeBodyDatas, "AOD", "MCNUC3BODY",
o2::soa::Index<>,
NUCLEI_THREE_BODY_RECO_COLUMNS,
nuclei3body::McLabelHe3, nuclei3body::McLabelDaughter1, nuclei3body::McLabelDaughter2,
nuclei3body::McPdgHe3, nuclei3body::McPdgDaughter1, nuclei3body::McPdgDaughter2,
nuclei3body::McMatchStatus, nuclei3body::McMotherLabel, nuclei3body::McMotherPdg,
nuclei3body::McMatchStatus, nuclei3body::McMotherPdg,
nuclei3body::GenMotherPt, nuclei3body::GenMotherEta,
nuclei3body::GenMotherPhi, nuclei3body::GenDecayLength);

Expand Down
21 changes: 3 additions & 18 deletions PWGLF/TableProducer/Nuspex/nucleiThreeBodyBuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ struct NucleiThreeBodyBuilder {
std::vector<bool> preselectedTracks;

struct RecoCandidate {
std::array<int, 3> trackIds{InvalidLabel, InvalidLabel, InvalidLabel};
int collisionId = InvalidLabel;
std::array<int8_t, 3> signs{};
float pt = 0.f;
float eta = 0.f;
Expand All @@ -218,10 +216,8 @@ struct NucleiThreeBodyBuilder {
};

struct MCInfo {
std::array<int, 3> labels{InvalidLabel, InvalidLabel, InvalidLabel};
std::array<int, 3> pdgs{};
uint8_t matchStatus = MissingDaughterLabel;
int motherLabel = InvalidLabel;
int motherPdg = 0;
float motherPt = InvalidFloat;
float motherEta = InvalidFloat;
Expand Down Expand Up @@ -472,10 +468,6 @@ struct NucleiThreeBodyBuilder {
}
registry.fill(HIST("triplets"), 1.);

out.trackIds = {static_cast<int>(he3Track.globalIndex()),
static_cast<int>(daughter1Track.globalIndex()),
static_cast<int>(daughter2Track.globalIndex())};
out.collisionId = collision.globalIndex();
out.signs = {static_cast<int8_t>(he3Track.sign() > 0 ? 1 : -1),
static_cast<int8_t>(daughter1Track.sign() > 0 ? 1 : -1),
static_cast<int8_t>(daughter2Track.sign() > 0 ? 1 : -1)};
Expand Down Expand Up @@ -546,8 +538,7 @@ struct NucleiThreeBodyBuilder {

void fillDataTable(RecoCandidate const& c)
{
outputData(c.trackIds[0], c.trackIds[1], c.trackIds[2], c.collisionId,
c.signs[0], c.signs[1], c.signs[2],
outputData(c.signs[0], c.signs[1], c.signs[2],
c.pt, c.eta, c.phi,
c.daughterMomentum[0], c.daughterMomentum[1], c.daughterMomentum[2],
c.chi2, c.dcaDaughters, c.cosPA, c.decayLength,
Expand Down Expand Up @@ -575,9 +566,6 @@ struct NucleiThreeBodyBuilder {
const auto he3Particle = he3Track.template mcParticle_as<aod::McParticles>();
const auto daughter1Particle = daughter1Track.template mcParticle_as<aod::McParticles>();
const auto daughter2Particle = daughter2Track.template mcParticle_as<aod::McParticles>();
info.labels = {static_cast<int>(he3Particle.globalIndex()),
static_cast<int>(daughter1Particle.globalIndex()),
static_cast<int>(daughter2Particle.globalIndex())};
info.pdgs = {he3Particle.pdgCode(), daughter1Particle.pdgCode(), daughter2Particle.pdgCode()};
info.matchStatus = NoCommonImmediateMother;

Expand All @@ -601,7 +589,6 @@ struct NucleiThreeBodyBuilder {

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

void fillMCTable(RecoCandidate const& c, MCInfo const& m)
{
outputMC(c.trackIds[0], c.trackIds[1], c.trackIds[2], c.collisionId,
c.signs[0], c.signs[1], c.signs[2],
outputMC(c.signs[0], c.signs[1], c.signs[2],
c.pt, c.eta, c.phi,
c.daughterMomentum[0], c.daughterMomentum[1], c.daughterMomentum[2],
c.chi2, c.dcaDaughters, c.cosPA, c.decayLength,
Expand All @@ -643,9 +629,8 @@ struct NucleiThreeBodyBuilder {
c.tpcNCls[0], c.tpcNCls[1], c.tpcNCls[2],
c.tpcCrossedRows[0], c.tpcCrossedRows[1], c.tpcCrossedRows[2],
c.itsNCls[0], c.itsNCls[1], c.itsNCls[2],
m.labels[0], m.labels[1], m.labels[2],
m.pdgs[0], m.pdgs[1], m.pdgs[2],
m.matchStatus, m.motherLabel, m.motherPdg,
m.matchStatus, m.motherPdg,
m.motherPt, m.motherEta, m.motherPhi, m.decayLength);
}

Expand Down
Loading