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
38 changes: 30 additions & 8 deletions PWGLF/DataModel/Vtx3BodyTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef PWGLF_DATAMODEL_VTX3BODYTABLES_H_
#define PWGLF_DATAMODEL_VTX3BODYTABLES_H_

#include "PWGLF/DataModel/LFHypernucleiTables.h"

#include "Common/Core/RecoDecay.h"

#include <CommonConstants/PhysicsConstants.h>
Expand All @@ -35,7 +37,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 40 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 +66,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 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(DCAXYTrackPiToPV, dcaXYtrackPiToPv, float); //! DCAXY of pion 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(DCAXYTrackDeToPV, dcaXYtrackDeToPv, float); //! DCAXY of deuteron 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(DCATrackPrToPV, dcaTrackPrToPv, float); //! DCA of proton 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(DCATrackPiToPV, dcaTrackPiToPv, float); //! DCA of pion to PV (computed with KFParticle)

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(DCATrackDeToPV, dcaTrackDeToPv, float); //! DCA of deuteron to PV (computed with KFParticle)

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(DCAXYTrackPrToPVProp, dcaXYtrackPrToPvProp, float); //! DCAXY of proton 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(DCAXYTrackPiToPVProp, dcaXYtrackPiToPvProp, float); //! DCAXY of pion to PV (propagated with O2 Propagator)

Check failure on line 76 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 77 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 @@ -128,12 +130,15 @@
DECLARE_SOA_COLUMN(GenPhi, genPhi, float); // generated Phi of the hypertriton
DECLARE_SOA_COLUMN(GenEta, genEta, float); // Eta of the hypertriton
DECLARE_SOA_COLUMN(GenRap, genRap, float); // generated rapidity of the hypertriton
DECLARE_SOA_COLUMN(GenPPr, genPPr, float); //! generated momentum proton daughter particle
DECLARE_SOA_COLUMN(GenPPi, genPPi, float); //! generated momentum pion daughter particle
DECLARE_SOA_COLUMN(GenPDe, genPDe, float); //! generated momentum deuteron daughter particle
DECLARE_SOA_COLUMN(GenPtPr, genPtPr, float); //! generated transverse momentum proton daughter particle
DECLARE_SOA_COLUMN(GenPtPi, genPtPi, float); //! generated transverse momentum pion daughter particle
DECLARE_SOA_COLUMN(GenPtDe, genPtDe, float); //! generated transverse momentum deuteron daughter particle
DECLARE_SOA_COLUMN(GenPxPr, genPxPr, float); //! generated Px of proton daughter particle
DECLARE_SOA_COLUMN(GenPyPr, genPyPr, float); //! generated Py of proton daughter particle
DECLARE_SOA_COLUMN(GenPzPr, genPzPr, float); //! generated Pz of proton daughter particle
DECLARE_SOA_COLUMN(GenPxPi, genPxPi, float); //! generated Px of pion daughter particle
DECLARE_SOA_COLUMN(GenPyPi, genPyPi, float); //! generated Py of pion daughter particle
DECLARE_SOA_COLUMN(GenPzPi, genPzPi, float); //! generated Pz of pion daughter particle
DECLARE_SOA_COLUMN(GenPxDe, genPxDe, float); //! generated Px of deuteron daughter particle
DECLARE_SOA_COLUMN(GenPyDe, genPyDe, float); //! generated Py of deuteron daughter particle
DECLARE_SOA_COLUMN(GenPzDe, genPzDe, float); //! generated Pz of deuteron daughter particle
DECLARE_SOA_COLUMN(MotherPdgCode, motherPdgCode, int); //! PDG code of the mother particle
DECLARE_SOA_COLUMN(PrPdgCode, prPdgCode, int); //! MC particle proton PDG code
DECLARE_SOA_COLUMN(PiPdgCode, piPdgCode, int); //! MC particle pion PDG code
Expand Down Expand Up @@ -271,6 +276,22 @@
vtx3body::ITSTrackDCAXYToSV,
vtx3body::ITSTrackDCAZToSV);

// collision info table
DECLARE_SOA_TABLE(Vtx3BodyCollision, "AOD", "VTX3BODYCOLL", //!
o2::soa::Index<>,
hyperrec::CentralityFT0A, hyperrec::CentralityFT0C, hyperrec::CentralityFT0M,
hyperrec::TrackOccupancyInTimeRange, hyperrec::Ft0cOccupancyInTimeRange,
hyperrec::XPrimVtx, hyperrec::YPrimVtx, hyperrec::ZPrimVtx,
hyperrec::RunNumber);

DECLARE_SOA_TABLE(McVtx3BodyCollision, "AOD", "MCVTX3BODYCOLL", //!
o2::soa::Index<>,
hyperrec::IsRecoMCCollision,
hyperrec::CentralityFT0A, hyperrec::CentralityFT0C, hyperrec::CentralityFT0M,
hyperrec::TrackOccupancyInTimeRange, hyperrec::Ft0cOccupancyInTimeRange,
hyperrec::XPrimVtx, hyperrec::YPrimVtx, hyperrec::ZPrimVtx,
hyperrec::RunNumber);

// MC candidate table for analysis
DECLARE_SOA_TABLE(McVtx3BodyDatas, "AOD", "MC3BODYDATA", //!
o2::soa::Index<>,
Expand Down Expand Up @@ -303,8 +324,9 @@
vtx3body::GenX, vtx3body::GenY, vtx3body::GenZ,
vtx3body::GenCt,
vtx3body::GenPhi, vtx3body::GenEta, vtx3body::GenRap,
vtx3body::GenPPr, vtx3body::GenPPi, vtx3body::GenPDe,
vtx3body::GenPtPr, vtx3body::GenPtPi, vtx3body::GenPtDe,
vtx3body::GenPxPr, vtx3body::GenPyPr, vtx3body::GenPzPr,
vtx3body::GenPxPi, vtx3body::GenPyPi, vtx3body::GenPzPi,
vtx3body::GenPxDe, vtx3body::GenPyDe, vtx3body::GenPzDe,
vtx3body::IsReco,
vtx3body::MotherLabel,
vtx3body::MotherPdgCode,
Expand Down
42 changes: 18 additions & 24 deletions PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,9 @@ struct decay3bodyBuilder {
float genPhi;
float genEta;
float genRapidity;
float genMomProton;
float genMomPion;
float genMomDeuteron;
float genPtProton;
float genPtPion;
float genPtDeuteron;
std::array<float, 3> genMomProton{0.f};
std::array<float, 3> genMomPion{0.f};
std::array<float, 3> genMomDeuteron{0.f};
bool isReco;
int motherLabel;
int motherPdgCode;
Expand Down Expand Up @@ -822,12 +819,9 @@ struct decay3bodyBuilder {
this3BodyMCInfo.daughterPiPdgCode = mcTrackPion.pdgCode();
this3BodyMCInfo.daughterDePdgCode = mcTrackDeuteron.pdgCode();
this3BodyMCInfo.isDeuteronPrimary = mcTrackDeuteron.isPhysicalPrimary();
this3BodyMCInfo.genMomProton = mcTrackProton.p();
this3BodyMCInfo.genMomPion = mcTrackPion.p();
this3BodyMCInfo.genMomDeuteron = mcTrackDeuteron.p();
this3BodyMCInfo.genPtProton = mcTrackProton.pt();
this3BodyMCInfo.genPtPion = mcTrackPion.pt();
this3BodyMCInfo.genPtDeuteron = mcTrackDeuteron.pt();
this3BodyMCInfo.genMomProton = {mcTrackProton.px(), mcTrackProton.py(), mcTrackProton.pz()};
this3BodyMCInfo.genMomPion = {mcTrackPion.px(), mcTrackPion.py(), mcTrackPion.pz()};
this3BodyMCInfo.genMomDeuteron = {mcTrackDeuteron.px(), mcTrackDeuteron.py(), mcTrackDeuteron.pz()};

// daughters are matched to MC, now we check if reco mother is true H3L/Anti-H3l and decayed via three-body decay
this3BodyMCInfo.motherLabel = checkH3LTruth(mcTrackProton, mcTrackPion, mcTrackDeuteron); // returns global index of mother if true H3L/Anti-H3L mother decaying via three-body decay, otherwise negative value for background
Expand Down Expand Up @@ -905,17 +899,14 @@ struct decay3bodyBuilder {
// get daughters
for (const auto& mcparticleDaughter : mcparticle.template daughters_as<aod::McParticles>()) {
if (std::abs(mcparticleDaughter.pdgCode()) == PDG_t::kProton) { // proton
this3BodyMCInfo.genMomProton = mcparticleDaughter.p();
this3BodyMCInfo.genPtProton = mcparticleDaughter.pt();
this3BodyMCInfo.genMomProton = {mcparticleDaughter.px(), mcparticleDaughter.py(), mcparticleDaughter.pz()};
this3BodyMCInfo.daughterPrPdgCode = mcparticleDaughter.pdgCode();
this3BodyMCInfo.genDecVtx = {mcparticleDaughter.vx(), mcparticleDaughter.vy(), mcparticleDaughter.vz()};
} else if (std::abs(mcparticleDaughter.pdgCode()) == PDG_t::kPiPlus) { // pion
this3BodyMCInfo.genMomPion = mcparticleDaughter.p();
this3BodyMCInfo.genPtPion = mcparticleDaughter.pt();
this3BodyMCInfo.genMomPion = {mcparticleDaughter.px(), mcparticleDaughter.py(), mcparticleDaughter.pz()};
this3BodyMCInfo.daughterPiPdgCode = mcparticleDaughter.pdgCode();
} else if (std::abs(mcparticleDaughter.pdgCode()) == o2::constants::physics::Pdg::kDeuteron) { // deuteron
this3BodyMCInfo.genMomDeuteron = mcparticleDaughter.p();
this3BodyMCInfo.genPtDeuteron = mcparticleDaughter.pt();
this3BodyMCInfo.genMomDeuteron = {mcparticleDaughter.px(), mcparticleDaughter.py(), mcparticleDaughter.pz()};
this3BodyMCInfo.daughterDePdgCode = mcparticleDaughter.pdgCode();
this3BodyMCInfo.isDeuteronPrimary = mcparticleDaughter.isPhysicalPrimary();
}
Expand Down Expand Up @@ -957,8 +948,9 @@ struct decay3bodyBuilder {
this3BodyMCInfo.genDecVtx[0], this3BodyMCInfo.genDecVtx[1], this3BodyMCInfo.genDecVtx[2],
this3BodyMCInfo.genCt,
mcparticle.phi(), mcparticle.eta(), mcparticle.y(),
this3BodyMCInfo.genMomProton, this3BodyMCInfo.genMomPion, this3BodyMCInfo.genMomDeuteron,
this3BodyMCInfo.genPtProton, this3BodyMCInfo.genPtPion, this3BodyMCInfo.genPtDeuteron,
this3BodyMCInfo.genMomProton[0], this3BodyMCInfo.genMomProton[1], this3BodyMCInfo.genMomProton[2],
this3BodyMCInfo.genMomPion[0], this3BodyMCInfo.genMomPion[1], this3BodyMCInfo.genMomPion[2],
this3BodyMCInfo.genMomDeuteron[0], this3BodyMCInfo.genMomDeuteron[1], this3BodyMCInfo.genMomDeuteron[2],
this3BodyMCInfo.isReco,
mcparticle.globalIndex(), // motherLabel
mcparticle.pdgCode(), // motherPdgCode
Expand Down Expand Up @@ -1153,8 +1145,9 @@ struct decay3bodyBuilder {
this3BodyMCInfo.genDecVtx[0], this3BodyMCInfo.genDecVtx[1], this3BodyMCInfo.genDecVtx[2],
this3BodyMCInfo.genCt,
this3BodyMCInfo.genPhi, this3BodyMCInfo.genEta, this3BodyMCInfo.genRapidity,
this3BodyMCInfo.genMomProton, this3BodyMCInfo.genMomPion, this3BodyMCInfo.genMomDeuteron,
this3BodyMCInfo.genPtProton, this3BodyMCInfo.genPtPion, this3BodyMCInfo.genPtDeuteron,
this3BodyMCInfo.genMomProton[0], this3BodyMCInfo.genMomProton[1], this3BodyMCInfo.genMomProton[2],
this3BodyMCInfo.genMomPion[0], this3BodyMCInfo.genMomPion[1], this3BodyMCInfo.genMomPion[2],
this3BodyMCInfo.genMomDeuteron[0], this3BodyMCInfo.genMomDeuteron[1], this3BodyMCInfo.genMomDeuteron[2],
this3BodyMCInfo.isReco,
this3BodyMCInfo.motherLabel,
this3BodyMCInfo.motherPdgCode,
Expand Down Expand Up @@ -1280,8 +1273,9 @@ struct decay3bodyBuilder {
mcInfo.genDecVtx[0] = -1., mcInfo.genDecVtx[1] = -1., mcInfo.genDecVtx[2] = -1.;
mcInfo.genCt = -1.;
mcInfo.genPhi = -1., mcInfo.genEta = -1., mcInfo.genRapidity = -1.;
mcInfo.genMomProton = -1., mcInfo.genMomPion = -1., mcInfo.genMomDeuteron = -1.;
mcInfo.genPtProton = -1., mcInfo.genPtPion = -1., mcInfo.genPtDeuteron = -1.;
mcInfo.genMomProton[0] = -1., mcInfo.genMomProton[1] = -1., mcInfo.genMomProton[2] = -1.;
mcInfo.genMomPion[0] = -1., mcInfo.genMomPion[1] = -1., mcInfo.genMomPion[2] = -1.;
mcInfo.genMomDeuteron[0] = -1., mcInfo.genMomDeuteron[1] = -1., mcInfo.genMomDeuteron[2] = -1.;
mcInfo.isReco = false;
mcInfo.motherPdgCode = 0;
mcInfo.daughterPrPdgCode = -1, mcInfo.daughterPiPdgCode = -1, mcInfo.daughterDePdgCode = -1;
Expand Down
Loading
Loading