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
5 changes: 5 additions & 0 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 All @@ -97,6 +97,9 @@
DECLARE_SOA_COLUMN(TPCNSigmaPi, tpcNSigmaPi, float); //! nsigma pion of TPC PID of the pion daughter
DECLARE_SOA_COLUMN(TPCNSigmaDe, tpcNSigmaDe, float); //! nsigma deuteron of TPC PID of the bachelor daughter
DECLARE_SOA_COLUMN(TPCNSigmaPiBach, tpcNSigmaPiBach, float); //! nsigma pion of TPC PID of the bachelor daughter
DECLARE_SOA_COLUMN(TPCSignalPr, tpcSignalPr, float); //! TPC signal of proton daughter
DECLARE_SOA_COLUMN(TPCSignalPi, tpcSignalPi, float); //! TPC signal of pion daughter
DECLARE_SOA_COLUMN(TPCSignalDe, tpcSignalDe, float); //! TPC signal of deuteron daughter
DECLARE_SOA_COLUMN(TOFNSigmaDe, tofNSigmaDe, float); //! nsigma deuteron of TOF PID of the bachelor daughter
DECLARE_SOA_COLUMN(PIDTrackingDe, pidTrackingDe, uint32_t); //! PID during tracking of bachelor daughter

Expand Down Expand Up @@ -231,6 +234,7 @@
vtx3body::DCAVtxToDaughtersAv,
vtx3body::CosPA, vtx3body::Ct,
vtx3body::TPCNSigmaPr, vtx3body::TPCNSigmaPi, vtx3body::TPCNSigmaDe, vtx3body::TPCNSigmaPiBach,
vtx3body::TPCSignalPr, vtx3body::TPCSignalPi, vtx3body::TPCSignalDe,
vtx3body::TOFNSigmaDe,
vtx3body::ITSClSizePr, vtx3body::ITSClSizePi, vtx3body::ITSClSizeDe,
vtx3body::TPCNClTrackPr, vtx3body::TPCNClTrackPi, vtx3body::TPCNClTrackDe,
Expand Down Expand Up @@ -288,6 +292,7 @@
vtx3body::DCAVtxToDaughtersAv,
vtx3body::CosPA, vtx3body::Ct,
vtx3body::TPCNSigmaPr, vtx3body::TPCNSigmaPi, vtx3body::TPCNSigmaDe, vtx3body::TPCNSigmaPiBach,
vtx3body::TPCSignalPr, vtx3body::TPCSignalPi, vtx3body::TPCSignalDe,
vtx3body::TOFNSigmaDe,
vtx3body::ITSClSizePr, vtx3body::ITSClSizePi, vtx3body::ITSClSizeDe,
vtx3body::TPCNClTrackPr, vtx3body::TPCNClTrackPi, vtx3body::TPCNClTrackDe,
Expand Down
3 changes: 3 additions & 0 deletions PWGLF/TableProducer/Nuspex/decay3bodybuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,7 @@ struct decay3bodyBuilder {
-1., // daughterDCAtoSVaverage
-1., -1., // cosPA, ctau
-1., -1., -1., -1., // tpcNsigma: 0 - proton, 1 - pion, 2 - deuteron, 3 - bach with pion hyp
-1., -1., -1., // tpcSignal: 0 - proton, 1 - pion, 2 - deuteron
-1., // tofNsigmaDeuteron
-1., -1., -1., // average ITS cluster sizes: proton, pion, deuteron
-1., -1., -1., // TPCNCl: proton, pion, deuteron
Expand Down Expand Up @@ -1109,6 +1110,7 @@ struct decay3bodyBuilder {
helper.decay3body.daughterDCAtoSVaverage,
helper.decay3body.cosPA, helper.decay3body.ctau,
helper.decay3body.tpcNsigma[0], helper.decay3body.tpcNsigma[1], helper.decay3body.tpcNsigma[2], helper.decay3body.tpcNsigma[3], // 0 - proton, 1 - pion, 2 - deuteron, 3 - bach with pion hyp
helper.decay3body.tpcSignal[0], helper.decay3body.tpcSignal[1], helper.decay3body.tpcSignal[2],
helper.decay3body.tofNsigmaDeuteron,
helper.decay3body.averageITSClSize[0], helper.decay3body.averageITSClSize[1], helper.decay3body.averageITSClSize[2], // 0 - proton, 1 - pion, 2 - deuteron
helper.decay3body.tpcNCl[0], helper.decay3body.tpcNCl[1], helper.decay3body.tpcNCl[2], // 0 - proton, 1 - pion, 2 - deuteron
Expand Down Expand Up @@ -1141,6 +1143,7 @@ struct decay3bodyBuilder {
helper.decay3body.daughterDCAtoSVaverage,
helper.decay3body.cosPA, helper.decay3body.ctau,
helper.decay3body.tpcNsigma[0], helper.decay3body.tpcNsigma[1], helper.decay3body.tpcNsigma[2], helper.decay3body.tpcNsigma[3], // 0 - proton, 1 - pion, 2 - deuteron, 3 - bach with pion hyp
helper.decay3body.tpcSignal[0], helper.decay3body.tpcSignal[1], helper.decay3body.tpcSignal[2],
helper.decay3body.tofNsigmaDeuteron,
helper.decay3body.averageITSClSize[0], helper.decay3body.averageITSClSize[1], helper.decay3body.averageITSClSize[2], // 0 - proton, 1 - pion, 2 - deuteron
helper.decay3body.tpcNCl[0], helper.decay3body.tpcNCl[1], helper.decay3body.tpcNCl[2], // 0 - proton, 1 - pion, 2 - deuteron
Expand Down
69 changes: 51 additions & 18 deletions PWGLF/TableProducer/Nuspex/trackedHypertritonRecoTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@ struct TrackedHypertritonRecoTask {
zorroEvents->GetXaxis()->SetBinLabel(2, "fTracked3Body");
zorroEvents->GetYaxis()->SetBinLabel(1, "before sel8");
zorroEvents->GetYaxis()->SetBinLabel(2, "after sel8");

registry.add("hTrackProtonTPCSignal", "hTrackProtonTPCSignal", HistType::kTH2F, {{100, -10.0f, 10.0f, "p/z (GeV/c)"}, {2000, 0.0f, 2000.0f, "d#it{E}/d#it{x}"}});
registry.add("hTrackPionTPCSignal", "hTrackPionTPCSignal", HistType::kTH2F, {{100, -10.0f, 10.0f, "p/z (GeV/c)"}, {2000, 0.0f, 2000.0f, "d#it{E}/d#it{x}"}});
registry.add("hTrackDeuteronTPCSignal", "hTrackDeuteronTPCSignal", HistType::kTH2F, {{100, -10.0f, 10.0f, "p/z (GeV/c)"}, {2000, 0.0f, 2000.0f, "d#it{E}/d#it{x}"}});
registry.add("hTrackProtonTPCSignalSelected", "hTrackProtonTPCSignalSelected", HistType::kTH2F, {{100, -10.0f, 10.0f, "p/z (GeV/c)"}, {2000, 0.0f, 2000.0f, "d#it{E}/d#it{x}"}});
registry.add("hTrackPionTPCSignalSelected", "hTrackPionTPCSignalSelected", HistType::kTH2F, {{100, -10.0f, 10.0f, "p/z (GeV/c)"}, {2000, 0.0f, 2000.0f, "d#it{E}/d#it{x}"}});
registry.add("hTrackDeuteronTPCSignalSelected", "hTrackDeuteronTPCSignalSelected", HistType::kTH2F, {{100, -10.0f, 10.0f, "p/z (GeV/c)"}, {2000, 0.0f, 2000.0f, "d#it{E}/d#it{x}"}});
}

void initCCDB(aod::BCsWithTimestamps::iterator const& bc)
Expand Down Expand Up @@ -801,6 +808,7 @@ struct TrackedHypertritonRecoTask {
candidate.daughterDCAtoSV[0], candidate.daughterDCAtoSV[1], candidate.daughterDCAtoSV[2],
candidate.daughterDCAtoSVaverage, candidate.cosPA, candidate.ctau,
candidate.tpcNsigma[0], candidate.tpcNsigma[1], candidate.tpcNsigma[2], candidate.tpcNsigma[3],
candidate.tpcSignal[0], candidate.tpcSignal[1], candidate.tpcSignal[2],
static_cast<float>(candidate.tofNsigmaDeuteron),
candidate.averageITSClSize[0], candidate.averageITSClSize[1], candidate.averageITSClSize[2],
static_cast<int>(candidate.tpcNCl[0]), static_cast<int>(candidate.tpcNCl[1]), static_cast<int>(candidate.tpcNCl[2]),
Expand Down Expand Up @@ -828,6 +836,7 @@ struct TrackedHypertritonRecoTask {
candidate.daughterDCAtoSV[0], candidate.daughterDCAtoSV[1], candidate.daughterDCAtoSV[2],
candidate.daughterDCAtoSVaverage, candidate.cosPA, candidate.ctau,
candidate.tpcNsigma[0], candidate.tpcNsigma[1], candidate.tpcNsigma[2], candidate.tpcNsigma[3],
candidate.tpcSignal[0], candidate.tpcSignal[1], candidate.tpcSignal[2],
static_cast<float>(candidate.tofNsigmaDeuteron),
candidate.averageITSClSize[0], candidate.averageITSClSize[1], candidate.averageITSClSize[2],
static_cast<int>(candidate.tpcNCl[0]), static_cast<int>(candidate.tpcNCl[1]), static_cast<int>(candidate.tpcNCl[2]),
Expand All @@ -846,24 +855,25 @@ struct TrackedHypertritonRecoTask {

void fillGeneratedThreeBodyMCTable(ThreeBodyMCInfo const& info)
{
mcVtx3BodyDatas(-1.f,
-1.f, -1.f, // mass, massV0
-1.f, -1.f, -1.f, // position
-1.f, -1.f, -1.f, // momentum
-1.f, -1.f, // chi2, trackedClSize
-1.f, -1.f, -1.f, // proton momentum
-1.f, -1.f, -1.f, // pion momentum
-1.f, -1.f, -1.f, // deuteron momentum
-1.f, -1.f, -1.f, // daughter x at inner update
-1.f, -1.f, -1.f, // track DCAxy to PV
-1.f, -1.f, -1.f, // track DCA to PV
-1.f, -1.f, -1.f, // propagated track DCAxy to PV
-1.f, -1.f, -1.f, // propagated track DCA to PV
-1.f, -1.f, -1.f, // daughter DCA to SV
-1.f, -1.f, -1.f, // average daughter DCA, cosPA, ctau
-1.f, -1.f, -1.f, -1.f,
-1.f,
-1.f, -1.f, -1.f,
mcVtx3BodyDatas(-1.f, // sign
-1.f, -1.f, // mass, massV0
-1.f, -1.f, -1.f, // position
-1.f, -1.f, -1.f, // momentum
-1.f, -1.f, // chi2, trackedClSize
-1.f, -1.f, -1.f, // proton momentum
-1.f, -1.f, -1.f, // pion momentum
-1.f, -1.f, -1.f, // deuteron momentum
-1.f, -1.f, -1.f, // daughter x at inner update
-1.f, -1.f, -1.f, // track DCAxy to PV
-1.f, -1.f, -1.f, // track DCA to PV
-1.f, -1.f, -1.f, // propagated track DCAxy to PV
-1.f, -1.f, -1.f, // propagated track DCA to PV
-1.f, -1.f, -1.f, // daughter DCA to SV
-1.f, -1.f, -1.f, // average daughter DCA, cosPA, ctau
-1.f, -1.f, -1.f, -1.f, // TPC nSigmas
-1.f, 1.f, -1.f, // TPC signals
-1.f, // TOF nSigma deuteron
-1.f, -1.f, -1.f, // average cluster sizes
-1, -1, -1, std::numeric_limits<uint32_t>::max(),
info.genMomentum[0], info.genMomentum[1], info.genMomentum[2],
info.genDecayVertex[0], info.genDecayVertex[1], info.genDecayVertex[2],
Expand All @@ -875,6 +885,20 @@ struct TrackedHypertritonRecoTask {
info.isDeuteronPrimary, static_cast<int>(info.survivedEventSelection));
}

template <typename TTrack>
void fillQAHistograms(TTrack const& trackProton, TTrack const& trackPion, TTrack const& trackDeuteron, bool isSelected)
{
if (!isSelected) {
registry.fill(HIST("hTrackProtonTPCSignal"), trackProton.sign() * trackProton.tpcInnerParam(), trackProton.tpcSignal());
registry.fill(HIST("hTrackPionTPCSignal"), trackPion.sign() * trackPion.tpcInnerParam(), trackPion.tpcSignal());
registry.fill(HIST("hTrackDeuteronTPCSignal"), trackDeuteron.sign() * trackDeuteron.tpcInnerParam(), trackDeuteron.tpcSignal());
} else {
registry.fill(HIST("hTrackProtonTPCSignalSelected"), trackProton.sign() * trackProton.tpcInnerParam(), trackProton.tpcSignal());
registry.fill(HIST("hTrackPionTPCSignalSelected"), trackPion.sign() * trackPion.tpcInnerParam(), trackPion.tpcSignal());
registry.fill(HIST("hTrackDeuteronTPCSignalSelected"), trackDeuteron.sign() * trackDeuteron.tpcInnerParam(), trackDeuteron.tpcSignal());
}
}

void processData(Collisions const& collisions,
aod::V0s const& /*v0s*/,
aod::Decay3Bodys const& /*decay3Bodys*/,
Expand Down Expand Up @@ -931,6 +955,8 @@ struct TrackedHypertritonRecoTask {
const auto trackProton = trackDeuteron.sign() > 0 ? trackPositive : trackNegative;
const auto trackPion = trackDeuteron.sign() > 0 ? trackNegative : trackPositive;

fillQAHistograms(trackProton, trackPion, trackDeuteron, false);

if (builder3Body.buildDecay3BodyCandidate(collision, trackProton, trackPion, trackDeuteron,
decay3Body.globalIndex(), deuteronTOFNSigma(collision, trackDeuteron), tracked3Body.itsClsSize(),
threeBody.useKFParticle, threeBody.setTopologicalConstraint,
Expand All @@ -944,6 +970,7 @@ struct TrackedHypertritonRecoTask {
continue;
}

fillQAHistograms(trackProton, trackPion, trackDeuteron, true);
fillThreeBodyTables();
}
}
Expand Down Expand Up @@ -1022,13 +1049,19 @@ struct TrackedHypertritonRecoTask {
const auto trackDeuteron = decay3Body.track2_as<TracksMC>();
const auto trackProton = trackDeuteron.sign() > 0 ? trackPositive : trackNegative;
const auto trackPion = trackDeuteron.sign() > 0 ? trackNegative : trackPositive;

fillQAHistograms(trackProton, trackPion, trackDeuteron, false);

if (!builder3Body.buildDecay3BodyCandidate(collision, trackProton, trackPion, trackDeuteron,
decay3Body.globalIndex(), deuteronTOFNSigmaMC(collision, trackDeuteron), tracked3Body.itsClsSize(),
threeBody.useKFParticle, threeBody.setTopologicalConstraint,
threeBody.useSelections, threeBody.useChi2Selection, threeBody.useTPCforPion,
threeBody.acceptTPCOnly, threeBody.askOnlyITSMatch, threeBody.calculateCovariance)) {

continue;
}

fillQAHistograms(trackProton, trackPion, trackDeuteron, true);
const auto mcInfo = getThreeBodyMCInfo(trackProton, trackPion, trackDeuteron, collision, mcParticles);
if (mcInfo.motherLabel < 0 && !mc.storeBackground) {
continue;
Expand Down
7 changes: 7 additions & 0 deletions PWGLF/Utils/decay3bodyBuilderHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ struct decay3bodyCandidate {
std::array<float, 3> momProton{};
std::array<float, 3> momPion{};
std::array<float, 3> momDeuteron{};
std::array<float, 3> tpcInnerMomProton{};
std::array<float, 3> tpcInnerMomPion{};
std::array<float, 3> tpcInnerMomDeuteron{};
std::array<float, 3> posProton{};
std::array<float, 3> posPion{};
std::array<float, 3> posDeuteron{};
Expand All @@ -65,6 +68,7 @@ struct decay3bodyCandidate {
std::array<float, 3> trackDCAxyToPVprop{}; // 0 - proton, 1 - pion, 2 - deuteron
std::array<float, 3> trackDCAToPVprop{}; // 0 - proton, 1 - pion, 2 - deuteron
std::array<float, 4> tpcNsigma{}; // 0 - proton, 1 - pion, 2 - deuteron, 3 - bach with pion hyp
std::array<float, 3> tpcSignal{}; // 0 - proton, 1 - pion, 2 - deuteron
double tofNsigmaDeuteron{};
std::array<float, 3> averageITSClSize{}; // 0 - proton, 1 - pion, 2 - deuteron
std::array<float, 3> tpcNCl{}; // 0 - proton, 1 - pion, 2 - deuteron
Expand Down Expand Up @@ -498,6 +502,9 @@ class decay3bodyBuilderHelper
decay3body.tpcNsigma[1] = trackPion.tpcNSigmaPi();
decay3body.tpcNsigma[2] = trackDeuteron.tpcNSigmaDe();
decay3body.tpcNsigma[3] = trackDeuteron.tpcNSigmaPi();
decay3body.tpcSignal[0] = trackProton.tpcSignal();
decay3body.tpcSignal[1] = trackPion.tpcSignal();
decay3body.tpcSignal[2] = trackDeuteron.tpcSignal();
// recalculated bachelor TOF PID
decay3body.tofNsigmaDeuteron = tofNsigmaDeuteron;

Expand Down
Loading