Skip to content
Open
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
8 changes: 4 additions & 4 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 @@ -141,8 +141,8 @@
DECLARE_SOA_COLUMN(MotherLabel, motherLabel, int); //! label of the mother particle (signal: MC index, bkg: negative value)

// strangeness tracking information
DECLARE_SOA_COLUMN(ITSTrackDCAXYToSVXY, itsTrackDcaXYToSv, float); //! DCAxy of ITS track to SV
DECLARE_SOA_COLUMN(ITSTrackDCAZToSVXY, itsTrackDcaZToSv, float); //! DCAz of ITS track to SV
DECLARE_SOA_COLUMN(ITSTrackDCAXYToSV, itsTrackDcaXYToSv, float); //! DCAxy of ITS track to SV
DECLARE_SOA_COLUMN(ITSTrackDCAZToSV, itsTrackDcaZToSv, float); //! DCAz of ITS track to SV

// Derived expressions
// Momenta
Expand Down Expand Up @@ -264,8 +264,8 @@

// strangeness tracked extra table
DECLARE_SOA_TABLE(Vtx3BodyTrackedInfo, "AOD", "VTX3BODYTR", //!
vtx3body::ITSTrackDCAXYToSVXY,
vtx3body::ITSTrackDCAZToSVXY);
vtx3body::ITSTrackDCAXYToSV,
vtx3body::ITSTrackDCAZToSV);

// MC candidate table for analysis
DECLARE_SOA_TABLE(McVtx3BodyDatas, "AOD", "MC3BODYDATA", //!
Expand Down
26 changes: 22 additions & 4 deletions PWGLF/TableProducer/Nuspex/trackedHypertritonRecoTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,16 @@ struct TrackedHypertritonRecoTask {
return deuteronTOFPIDMC.GetTOFNSigma(tofResponse, track, originalCollision, collision);
}

template <class TTracksTo, typename TTracked3body>
std::array<float, 2> getItsTrackDCAToSV(TTracked3body tracked3Body)
{
const auto itsTrack = tracked3Body.template itsTrack_as<TTracksTo>();
auto itsTrackParCov = getTrackParCov(itsTrack);
std::array<float, 2> dcaInfo{};
o2::base::Propagator::Instance()->propagateToDCABxByBz({builder3Body.decay3body.position[0], builder3Body.decay3body.position[1], builder3Body.decay3body.position[2]}, itsTrackParCov, 2.f, fitter2Body.getMatCorrType(), &dcaInfo);
return dcaInfo;
}

void fillThreeBodyTables()
{
const auto& candidate = builder3Body.decay3body;
Expand Down Expand Up @@ -831,6 +841,8 @@ struct TrackedHypertritonRecoTask {
static_cast<int>(info.isReco), info.motherLabel, info.motherPdgCode,
info.protonPdgCode, info.pionPdgCode, info.deuteronPdgCode,
info.isDeuteronPrimary, static_cast<int>(info.survivedEventSelection));
vtx3BodyCovs(candidate.covProton.data(), candidate.covPion.data(), candidate.covDeuteron.data(), candidate.covariance.data());
vtx3BodyTrackedInfo(candidate.itsTrackDCAToSV[0], candidate.itsTrackDCAToSV[1]);
}

void fillGeneratedThreeBodyMCTable(ThreeBodyMCInfo const& info)
Expand Down Expand Up @@ -926,10 +938,7 @@ struct TrackedHypertritonRecoTask {
threeBody.useSelections, threeBody.useChi2Selection, threeBody.useTPCforPion,
threeBody.acceptTPCOnly, threeBody.askOnlyITSMatch, threeBody.calculateCovariance)) {
// get DCA of ITS track to SV
const auto itsTrack = tracked3Body.itsTrack_as<Tracks>();
auto itsTrackParCov = getTrackParCov(itsTrack);
std::array<float, 2> dcaInfoItsTrack{};
o2::base::Propagator::Instance()->propagateToDCABxByBz({builder3Body.decay3body.position[0], builder3Body.decay3body.position[1], builder3Body.decay3body.position[2]}, itsTrackParCov, 2.f, fitter2Body.getMatCorrType(), &dcaInfoItsTrack);
std::array<float, 2> dcaInfoItsTrack = getItsTrackDCAToSV<Tracks>(tracked3Body);
builder3Body.decay3body.itsTrackDCAToSV[0] = dcaInfoItsTrack[0];
builder3Body.decay3body.itsTrackDCAToSV[1] = dcaInfoItsTrack[1];
if (threeBody.useSelections && (std::abs(builder3Body.decay3body.itsTrackDCAToSV[0]) > threeBody.maxITSDCAxytrackToSV || std::abs(builder3Body.decay3body.itsTrackDCAToSV[1]) > threeBody.maxITSDCAztrackToSV)) {
Expand Down Expand Up @@ -1025,6 +1034,15 @@ struct TrackedHypertritonRecoTask {
if (mcInfo.motherLabel < 0 && !mc.storeBackground) {
continue;
}

// get DCA of ITS track to SV
std::array<float, 2> dcaInfoItsTrack = getItsTrackDCAToSV<TracksMC>(tracked3Body);
builder3Body.decay3body.itsTrackDCAToSV[0] = dcaInfoItsTrack[0];
builder3Body.decay3body.itsTrackDCAToSV[1] = dcaInfoItsTrack[1];
if (threeBody.useSelections && (std::abs(builder3Body.decay3body.itsTrackDCAToSV[0]) > threeBody.maxITSDCAxytrackToSV || std::abs(builder3Body.decay3body.itsTrackDCAToSV[1]) > threeBody.maxITSDCAztrackToSV)) {
continue;
}

fillThreeBodyMCTable(mcInfo);
if (mcInfo.motherLabel >= 0) {
reconstructedThreeBody[mcInfo.motherLabel] = true;
Expand Down
Loading