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
17 changes: 14 additions & 3 deletions PWGLF/DataModel/Vtx3BodyTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ DECLARE_SOA_COLUMN(Z, z, float); //! decay position Z

// Saved from finding: DCAs
DECLARE_SOA_COLUMN(DCAVtxDaughters, dcaVtxdaughters, float); //! DCA among daughters
DECLARE_SOA_COLUMN(DCAXYTrack0ToPV, dcaXYtrack0topv, float); //! DCAXY of prong0 to PV
DECLARE_SOA_COLUMN(DCAXYTrack1ToPV, dcaXYtrack1topv, float); //! DCAXY of prong1 to PV
DECLARE_SOA_COLUMN(DCAXYTrack2ToPV, dcaXYtrack2topv, float); //! DCAXY of prong2 to PV
DECLARE_SOA_COLUMN(DCATrack0ToPV, dcatrack0topv, float); //! DCA of prong0 to PV
DECLARE_SOA_COLUMN(DCATrack1ToPV, dcatrack1topv, float); //! DCA of prong1 to PV
DECLARE_SOA_COLUMN(DCATrack2ToPV, dcatrack2topv, float); //! DCA of prong2 to PV
Expand Down Expand Up @@ -132,6 +135,7 @@ DECLARE_SOA_TABLE_FULL(StoredVtx3BodyDatas, "Vtx3BodyDatas", "AOD", "Vtx3BodyDAT
vtx3body::PxTrack1, vtx3body::PyTrack1, vtx3body::PzTrack1,
vtx3body::PxTrack2, vtx3body::PyTrack2, vtx3body::PzTrack2,
vtx3body::DCAVtxDaughters,
vtx3body::DCAXYTrack0ToPV, vtx3body::DCAXYTrack1ToPV, vtx3body::DCAXYTrack2ToPV,
vtx3body::DCATrack0ToPV, vtx3body::DCATrack1ToPV, vtx3body::DCATrack2ToPV,
vtx3body::TOFNSigmaBachDe,

Expand Down Expand Up @@ -246,15 +250,19 @@ DECLARE_SOA_COLUMN(TPCNSigmaPion, tpcNSigmaPion, float); //! nsigma of T
DECLARE_SOA_COLUMN(TPCNSigmaBachelor, tpcNSigmaBachelor, float); //! nsigma of TPC PID of the bachelor daughter
DECLARE_SOA_COLUMN(TOFNSigmaBachelor, tofNSigmaBachelor, float); //! nsigma of TOF PID of the bachelor daughter
// DCA to PV
DECLARE_SOA_COLUMN(DCAProtonToPV, dcaProtontoPV, float); //! DCA of the proton daughter to pv
DECLARE_SOA_COLUMN(DCAPionToPV, dcaPiontoPV, float); //! DCA of the pion daughter to pv
DECLARE_SOA_COLUMN(DCABachelorToPV, dcaBachelortoPV, float); //! DCA of the bachelor daughter to pv
DECLARE_SOA_COLUMN(DCAXYProtonToPV, dcaxyProtontoPV, float); //! DCAXY of the proton daughter to pv
DECLARE_SOA_COLUMN(DCAXYPionToPV, dcaxyPiontoPV, float); //! DCAXY of the pion daughter to pv
DECLARE_SOA_COLUMN(DCAXYBachelorToPV, dcaxyBachelortoPV, float); //! DCAXY of the bachelor daughter to pv
DECLARE_SOA_COLUMN(DCAProtonToPV, dcaProtontoPV, float); //! DCA of the proton daughter to pv
DECLARE_SOA_COLUMN(DCAPionToPV, dcaPiontoPV, float); //! DCA of the pion daughter to pv
DECLARE_SOA_COLUMN(DCABachelorToPV, dcaBachelortoPV, float); //! DCA of the bachelor daughter to pv
// for MC
DECLARE_SOA_COLUMN(GenP, genP, float); // P of the hypertriton
DECLARE_SOA_COLUMN(GenPt, genPt, float); // pT of the hypertriton
DECLARE_SOA_COLUMN(GenCt, genCt, float); // ct of the hypertriton
DECLARE_SOA_COLUMN(GenPhi, genPhi, float); // Phi of the hypertriton
DECLARE_SOA_COLUMN(GenEta, genEta, float); // Eta of the hypertriton
DECLARE_SOA_COLUMN(GenRapidity, genRapidity, float); // Rapidity of the hypertriton
DECLARE_SOA_COLUMN(IsReco, isReco, bool); // bool: true for reco
DECLARE_SOA_COLUMN(IsSignal, isSignal, bool); // bool: true for signal
DECLARE_SOA_COLUMN(PdgCode, pdgCode, int); // pdgCode of the mcparticle, -1 for fake pair
Expand Down Expand Up @@ -284,6 +292,7 @@ DECLARE_SOA_TABLE(Hyp3BodyCands, "AOD", "HYP3BODYCANDS",
hyp3body::ITSNclusSizeProton, hyp3body::ITSNclusSizePion, hyp3body::ITSNclusSizeBachelor,
hyp3body::TPCNSigmaProton, hyp3body::TPCNSigmaPion, hyp3body::TPCNSigmaBachelor,
hyp3body::TOFNSigmaBachelor,
hyp3body::DCAXYProtonToPV, hyp3body::DCAXYPionToPV, hyp3body::DCAXYBachelorToPV,
hyp3body::DCAProtonToPV, hyp3body::DCAPionToPV, hyp3body::DCABachelorToPV);

// output table for MC
Expand All @@ -309,13 +318,15 @@ DECLARE_SOA_TABLE(MCHyp3BodyCands, "AOD", "MCHYP3BODYCANDS",
hyp3body::ITSNclusSizeProton, hyp3body::ITSNclusSizePion, hyp3body::ITSNclusSizeBachelor,
hyp3body::TPCNSigmaProton, hyp3body::TPCNSigmaPion, hyp3body::TPCNSigmaBachelor,
hyp3body::TOFNSigmaBachelor,
hyp3body::DCAXYProtonToPV, hyp3body::DCAXYPionToPV, hyp3body::DCAXYBachelorToPV,
hyp3body::DCAProtonToPV, hyp3body::DCAPionToPV, hyp3body::DCABachelorToPV,
// MC information
hyp3body::GenP,
hyp3body::GenPt,
hyp3body::GenCt,
hyp3body::GenPhi,
hyp3body::GenEta,
hyp3body::GenRapidity,
hyp3body::IsSignal,
hyp3body::IsReco,
hyp3body::PdgCode,
Expand Down
6 changes: 3 additions & 3 deletions PWGLF/DataModel/pidTOFGeneric.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#ifndef PIDTOFGENERIC_H_
#define PIDTOFGENERIC_H_
#ifndef PWGLF_DATAMODEL_PIDTOFGENERIC_H_
#define PWGLF_DATAMODEL_PIDTOFGENERIC_H_
#include "CommonDataFormat/InteractionRecord.h"
#include "Common/Core/PID/PIDTOF.h"

Expand Down Expand Up @@ -155,4 +155,4 @@ class TofPidNewCollision
} // namespace pidtofgeneric
} // namespace o2::aod

#endif
#endif // PWGLF_DATAMODEL_PIDTOFGENERIC_H_
4 changes: 4 additions & 0 deletions PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -454,14 +454,17 @@ struct decay3bodyBuilder {
auto Track0Par = getTrackPar(t0);
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, Track0Par, 2.f, fitter3body.getMatCorrType(), &dcaInfo);
auto Track0dcaXY = dcaInfo[0];
auto Track0dca = std::sqrt(Track0dcaXY * Track0dcaXY + dcaInfo[1] * dcaInfo[1]);

auto Track1Par = getTrackPar(t1);
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, Track1Par, 2.f, fitter3body.getMatCorrType(), &dcaInfo);
auto Track1dcaXY = dcaInfo[0];
auto Track1dca = std::sqrt(Track1dcaXY * Track1dcaXY + dcaInfo[1] * dcaInfo[1]);

auto Track2Par = getTrackPar(t2);
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, Track2Par, 2.f, fitter3body.getMatCorrType(), &dcaInfo);
auto Track2dcaXY = dcaInfo[0];
auto Track2dca = std::sqrt(Track2dcaXY * Track2dcaXY + dcaInfo[1] * dcaInfo[1]);

auto Track0 = getTrackParCov(t0);
auto Track1 = getTrackParCov(t1);
Expand Down Expand Up @@ -517,6 +520,7 @@ struct decay3bodyBuilder {
p0[0], p0[1], p0[2], p1[0], p1[1], p1[2], p2[0], p2[1], p2[2],
fitter3body.getChi2AtPCACandidate(),
Track0dcaXY, Track1dcaXY, Track2dcaXY,
Track0dca, Track1dca, Track2dca,
tofNsigmaDe);
}
}
Expand Down
4 changes: 4 additions & 0 deletions PWGLF/TableProducer/Nuspex/hypertriton3bodyfinder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -687,14 +687,17 @@ struct hypertriton3bodyFinder {
auto Track0Par = getTrackPar(dPtrack);
o2::base::Propagator::Instance()->propagateToDCABxByBz({dCollision.posX(), dCollision.posY(), dCollision.posZ()}, Track0Par, 2.f, fitter3body.getMatCorrType(), &dcaInfo);
auto Track0dcaXY = dcaInfo[0];
auto Track0dca = std::sqrt(Track0dcaXY * Track0dcaXY + dcaInfo[1] * dcaInfo[1]);

auto Track1Par = getTrackPar(dNtrack);
o2::base::Propagator::Instance()->propagateToDCABxByBz({dCollision.posX(), dCollision.posY(), dCollision.posZ()}, Track1Par, 2.f, fitter3body.getMatCorrType(), &dcaInfo);
auto Track1dcaXY = dcaInfo[0];
auto Track1dca = std::sqrt(Track1dcaXY * Track1dcaXY + dcaInfo[1] * dcaInfo[1]);

auto Track2Par = getTrackPar(dBachtrack);
o2::base::Propagator::Instance()->propagateToDCABxByBz({dCollision.posX(), dCollision.posY(), dCollision.posZ()}, Track2Par, 2.f, fitter3body.getMatCorrType(), &dcaInfo);
auto Track2dcaXY = dcaInfo[0];
auto Track2dca = std::sqrt(Track2dcaXY * Track2dcaXY + dcaInfo[1] * dcaInfo[1]);

// H3L DCA Check
// auto track3B = o2::track::TrackParCov(vertexXYZ, p3B, fitter3body.calcPCACovMatrixFlat(), t2.sign());
Expand All @@ -712,6 +715,7 @@ struct hypertriton3bodyFinder {
p0[0], p0[1], p0[2], p1[0], p1[1], p1[2], p2[0], p2[1], p2[2],
fitter3body.getChi2AtPCACandidate(),
Track0dcaXY, Track1dcaXY, Track2dcaXY,
Track0dca, Track1dca, Track2dca,
0); // To be fixed
}
//------------------------------------------------------------------
Expand Down
28 changes: 24 additions & 4 deletions PWGLF/TableProducer/Nuspex/threebodyRecoTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ struct Candidate3body {
// 0 - proton, 1 - pion, 2 - bachelor
uint8_t dautpcNclusters[3];
uint8_t dauitsclussize[3];
uint8_t daudcaxytopv[3];
uint8_t daudcatopv[3];
float dautpcNsigma[3];
bool isMatter;
Expand All @@ -65,6 +66,7 @@ struct Candidate3body {
float bachelortofNsigma;
TLorentzVector lgencand = {0, 0, 0, 0};
float genct = -1;
float genrapidity = -999;
bool isSignal = false;
bool isReco = false;
int pdgCode = -1;
Expand Down Expand Up @@ -112,6 +114,7 @@ struct threebodyRecoTask {
"registry",
{
{"hEventCounter", "hEventCounter", {HistType::kTH1F, {{4, 0.0f, 4.0f}}}},
{"hCentFT0C", "hCentFT0C", {HistType::kTH1F, {{100, 0.0f, 100.0f, "FT0C Centrality"}}}},
{"hCandidatesCounter", "hCandidatesCounter", {HistType::kTH1F, {{12, 0.0f, 12.0f}}}},
{"hMassHypertriton", "hMassHypertriton", {HistType::kTH1F, {{80, 2.96f, 3.04f}}}},
{"hMassAntiHypertriton", "hMassAntiHypertriton", {HistType::kTH1F, {{80, 2.96f, 3.04f}}}},
Expand All @@ -122,6 +125,9 @@ struct threebodyRecoTask {
{"hPtAntiProton", "hPtAntiProton", {HistType::kTH1F, {{200, 0.0f, 10.0f}}}},
{"hPtPionPlus", "hPtPionPlus", {HistType::kTH1F, {{200, 0.0f, 10.0f}}}},
{"hPtAntiDeuteron", "hPtAntiDeuteron", {HistType::kTH1F, {{200, 0.0f, 10.0f}}}},
{"hDCAXYProtonToPV", "hDCAXYProtonToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}},
{"hDCAXYPionToPV", "hDCAXYPionToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}},
{"hDCAXYDeuteronToPV", "hDCAXYDeuteronToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}},
{"hDCAProtonToPV", "hDCAProtonToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}},
{"hDCAPionToPV", "hDCAPionToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}},
{"hDCADeuteronToPV", "hDCADeuteronToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}},
Expand Down Expand Up @@ -351,6 +357,8 @@ struct threebodyRecoTask {
registry.fill(HIST("hPtProton"), trackProton.pt());
registry.fill(HIST("hPtPionMinus"), trackPion.pt());
registry.fill(HIST("hPtDeuteron"), trackDeuteron.pt());
registry.fill(HIST("hDCAXYProtonToPV"), candData.dcaXYtrack0topv());
registry.fill(HIST("hDCAXYPionToPV"), candData.dcaXYtrack1topv());
registry.fill(HIST("hDCAProtonToPV"), candData.dcatrack0topv());
registry.fill(HIST("hDCAPionToPV"), candData.dcatrack1topv());

Expand Down Expand Up @@ -379,6 +387,8 @@ struct threebodyRecoTask {
registry.fill(HIST("hPtAntiProton"), trackProton.pt());
registry.fill(HIST("hPtPionPlus"), trackPion.pt());
registry.fill(HIST("hPtAntiDeuteron"), trackDeuteron.pt());
registry.fill(HIST("hDCAXYProtonToPV"), candData.dcaXYtrack1topv());
registry.fill(HIST("hDCAXYPionToPV"), candData.dcaXYtrack0topv());
registry.fill(HIST("hDCAProtonToPV"), candData.dcatrack1topv());
registry.fill(HIST("hDCAPionToPV"), candData.dcatrack0topv());

Expand Down Expand Up @@ -409,10 +419,15 @@ struct threebodyRecoTask {
cand3body.dautpcNclusters[0] = trackProton.tpcNClsFound();
cand3body.dautpcNclusters[1] = trackPion.tpcNClsFound();
cand3body.dautpcNclusters[2] = trackDeuteron.tpcNClsFound();
cand3body.dauitsclussize[0] = trackPion.itsClusterSizes();
cand3body.dauitsclussize[0] = trackProton.itsClusterSizes();
cand3body.dauitsclussize[1] = trackPion.itsClusterSizes();
cand3body.dauitsclussize[2] = trackDeuteron.itsClusterSizes();
cand3body.dautpcNsigma[0] = trackProton.tpcNSigmaPr();
cand3body.dautpcNsigma[1] = trackPion.tpcNSigmaPi();
cand3body.dautpcNsigma[2] = trackDeuteron.tpcNSigmaDe();
cand3body.daudcaxytopv[0] = cand3body.isMatter ? candData.dcaXYtrack0topv() : candData.dcaXYtrack1topv();
cand3body.daudcaxytopv[1] = cand3body.isMatter ? candData.dcaXYtrack1topv() : candData.dcaXYtrack0topv();
cand3body.daudcaxytopv[2] = candData.dcaXYtrack2topv();
cand3body.daudcatopv[0] = cand3body.isMatter ? candData.dcatrack0topv() : candData.dcatrack1topv();
cand3body.daudcatopv[1] = cand3body.isMatter ? candData.dcatrack1topv() : candData.dcatrack0topv();
cand3body.daudcatopv[2] = candData.dcatrack2topv();
Expand All @@ -426,6 +441,7 @@ struct threebodyRecoTask {
cand3body.mcmotherId = lLabel;
cand3body.lgencand = lmother;
cand3body.genct = MClifetime;
cand3body.genrapidity = lmother.Rapidity();
cand3body.isSignal = true;
cand3body.isReco = true;
cand3body.pdgCode = cand3body.isMatter ? motherPdgCode : -motherPdgCode;
Expand Down Expand Up @@ -514,6 +530,7 @@ struct threebodyRecoTask {
return;
}
registry.fill(HIST("hEventCounter"), 2.5);
registry.fill(HIST("hCentFT0C"), collision.centFT0C());

bool if_hasvtx = false;

Expand All @@ -537,6 +554,7 @@ struct threebodyRecoTask {
cand3body.dautpcNclusters[0], cand3body.dautpcNclusters[1], cand3body.dautpcNclusters[2],
cand3body.dauitsclussize[0], cand3body.dauitsclussize[1], cand3body.dauitsclussize[2],
cand3body.dautpcNsigma[0], cand3body.dautpcNsigma[1], cand3body.dautpcNsigma[2], cand3body.bachelortofNsigma,
cand3body.daudcaxytopv[0], cand3body.daudcaxytopv[1], cand3body.daudcaxytopv[2],
cand3body.daudcatopv[0], cand3body.daudcatopv[1], cand3body.daudcatopv[2]);
}
}
Expand Down Expand Up @@ -587,7 +605,7 @@ struct threebodyRecoTask {
for (auto& lMother2 : lMCTrack2.mothers_as<aod::McParticles>()) {
if (lMother0.globalIndex() == lMother1.globalIndex() && lMother0.globalIndex() == lMother2.globalIndex()) {
lLabel = lMother0.globalIndex();
lPDG = lMother1.pdgCode();
lPDG = lMother0.pdgCode();
if ((lPDG == motherPdgCode && lMCTrack0.pdgCode() == 2212 && lMCTrack1.pdgCode() == -211 && lMCTrack2.pdgCode() == bachelorPdgCode) ||
(lPDG == -motherPdgCode && lMCTrack0.pdgCode() == 211 && lMCTrack1.pdgCode() == -2212 && lMCTrack2.pdgCode() == -bachelorPdgCode)) {
isTrueCand = true;
Expand Down Expand Up @@ -620,8 +638,9 @@ struct threebodyRecoTask {
cand3body.dautpcNclusters[0], cand3body.dautpcNclusters[1], cand3body.dautpcNclusters[2],
cand3body.dauitsclussize[0], cand3body.dauitsclussize[1], cand3body.dauitsclussize[2],
cand3body.dautpcNsigma[0], cand3body.dautpcNsigma[1], cand3body.dautpcNsigma[2], cand3body.bachelortofNsigma,
cand3body.daudcaxytopv[0], cand3body.daudcaxytopv[1], cand3body.daudcaxytopv[2],
cand3body.daudcatopv[0], cand3body.daudcatopv[1], cand3body.daudcatopv[2],
cand3body.lgencand.P(), cand3body.lgencand.Pt(), cand3body.genct, cand3body.lgencand.Phi(), cand3body.lgencand.Eta(),
cand3body.lgencand.P(), cand3body.lgencand.Pt(), cand3body.genct, cand3body.lgencand.Phi(), cand3body.lgencand.Eta(), cand3body.lgencand.Rapidity(),
cand3body.isSignal, cand3body.isReco, cand3body.pdgCode, cand3body.SurvivedEventSelection);
}
}
Expand Down Expand Up @@ -653,7 +672,8 @@ struct threebodyRecoTask {
-1, -1, -1,
-1, -1, -1, -1,
-1, -1, -1,
mcparticle.p(), mcparticle.pt(), MClifetime, mcparticle.phi(), mcparticle.eta(),
-1, -1, -1,
mcparticle.p(), mcparticle.pt(), MClifetime, mcparticle.phi(), mcparticle.eta(), mcparticle.y(),
true, false, mcparticle.pdgCode(), isSurEvSelection);
}
}
Expand Down
Loading