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: 7 additions & 9 deletions PWGLF/DataModel/LFKinkDecayTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ DECLARE_SOA_COLUMN(NSigmaTOFPr, nSigmaTOFPr, float); //! Number of sigmas for th
DECLARE_SOA_COLUMN(NSigmaTOFKa, nSigmaTOFKa, float); //! Number of sigmas for the kaon candidate from Sigma kink in TOF

// MC Columns
DECLARE_SOA_COLUMN(MothPdgCode, mothPdgCode, int); //! PDG code of the Sigma daughter
DECLARE_SOA_COLUMN(DaugPdgCode, daugPdgCode, int); //! PDG code of the kink daughter
DECLARE_SOA_COLUMN(PtMC, ptMC, float); //! pT of the candidate in MC
DECLARE_SOA_COLUMN(MassMC, massMC, float); //! Invariant mass of the candidate in MC
DECLARE_SOA_COLUMN(MothPdgCode, mothPdgCode, int); //! PDG code of the Sigma daughter
DECLARE_SOA_COLUMN(DaugPdgCode, daugPdgCode, int); //! PDG code of the kink daughter
DECLARE_SOA_COLUMN(PtMC, ptMC, float); //! pT of the candidate in MC
DECLARE_SOA_COLUMN(MassMC, massMC, float); //! Invariant mass of the candidate in MC
DECLARE_SOA_COLUMN(DecayRadiusMC, decayRadiusMC, float); //! Decay radius of the candidate in MC

// DYNAMIC COLUMNS
Expand Down Expand Up @@ -134,16 +134,16 @@ DECLARE_SOA_TABLE(KinkCandsUnbound, "AOD", "UBKINKCANDS",
kinkcand::MSigmaPlus<kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug>,
kinkcand::MXiMinus<kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug>);

DECLARE_SOA_TABLE(SlimKinkCands, "AOD", "SLIMKINKCANDS",
DECLARE_SOA_TABLE(SlimKinkCands, "AOD", "SLIMKINKCANDS",
kinkcand::XDecVtx, kinkcand::YDecVtx, kinkcand::ZDecVtx,
kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth,
kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug,
kinkcand::DcaMothPv, kinkcand::DcaDaugPv, kinkcand::DcaKinkTopo,
kinkcand::MothSign,
kinkcand::MothSign,
kinkcand::NSigmaTPCPi, kinkcand::NSigmaTPCPr, kinkcand::NSigmaTPCKa,
kinkcand::NSigmaTOFPi, kinkcand::NSigmaTOFPr, kinkcand::NSigmaTOFKa);

DECLARE_SOA_TABLE(SlimKinkCandsMC, "AOD", "SLIMKINKCANDSMC",
DECLARE_SOA_TABLE(SlimKinkCandsMC, "AOD", "SLIMKINKCANDSMC",
kinkcand::XDecVtx, kinkcand::YDecVtx, kinkcand::ZDecVtx,
kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth,
kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug,
Expand All @@ -154,8 +154,6 @@ DECLARE_SOA_TABLE(SlimKinkCandsMC, "AOD", "SLIMKINKCANDSMC",
kinkcand::MothPdgCode, kinkcand::DaugPdgCode,
kinkcand::PtMC, kinkcand::MassMC, kinkcand::DecayRadiusMC);



} // namespace o2::aod

#endif // PWGLF_DATAMODEL_LFKINKDECAYTABLES_H_
35 changes: 17 additions & 18 deletions PWGLF/Tasks/Strangeness/sigmaminustask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;

using TracksFull = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU,
using TracksFull = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU,
aod::pidTPCFullPi, aod::pidTPCFullPr, aod::pidTPCFullKa,
aod::pidTOFFullPi, aod::pidTOFFullPr, aod::pidTOFFullKa>;
using CollisionsFull = soa::Join<aod::Collisions, aod::EvSel>;
Expand All @@ -47,7 +47,7 @@ struct sigmaminustask {
Configurable<float> cutNSigmaPi{"cutNSigmaPi", 4, "NSigmaTPCPion"};

Configurable<bool> fillOutputTree{"fillOutputTree", true, "If true, fill the output tree with Kink candidates"};

Preslice<aod::KinkCands> mPerCol = aod::track::collisionId;

void init(InitContext const&)
Expand All @@ -62,7 +62,7 @@ struct sigmaminustask {

const AxisSpec ptResolutionAxis{100, -0.5, 0.5, "#it{p}_{T}^{rec} - #it{p}_{T}^{gen} (GeV/#it{c})"};
const AxisSpec massResolutionAxis{100, -0.1, 0.1, "m_{rec} - m_{gen} (GeV/#it{c}^{2})"};

// Event selection
rEventSelection.add("hVertexZRec", "hVertexZRec", {HistType::kTH1F, {vertexZAxis}});
// Sigma-minus reconstruction
Expand Down Expand Up @@ -99,17 +99,16 @@ struct sigmaminustask {
rSigmaMinus.fill(HIST("h2MassSigmaMinusPt"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.mSigmaMinus());
rSigmaMinus.fill(HIST("h2SigmaMassVsXiMass"), kinkCand.mXiMinus(), kinkCand.mSigmaMinus());
rSigmaMinus.fill(HIST("h2NSigmaPiPt"), kinkCand.mothSign() * kinkCand.ptMoth(), dauTrack.tpcNSigmaPi());
if(fillOutputTree) {

if (fillOutputTree) {
outputDataTable(kinkCand.xDecVtx(), kinkCand.yDecVtx(), kinkCand.zDecVtx(),
kinkCand.pxMoth(), kinkCand.pyMoth(), kinkCand.pzMoth(),
kinkCand.pxDaug(), kinkCand.pyDaug(), kinkCand.pzDaug(),
kinkCand.dcaMothPv(), kinkCand.dcaDaugPv(), kinkCand.dcaKinkTopo(),
kinkCand.mothSign(),
kinkCand.mothSign(),
dauTrack.tpcNSigmaPi(), dauTrack.tpcNSigmaPr(), dauTrack.tpcNSigmaKa(),
dauTrack.tofNSigmaPi(), dauTrack.tofNSigmaPr(), dauTrack.tofNSigmaKa());
}

}
}
PROCESS_SWITCH(sigmaminustask, processData, "Data processing", true);
Expand Down Expand Up @@ -139,7 +138,7 @@ struct sigmaminustask {
rSigmaMinus.fill(HIST("h2MassSigmaMinusPt"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.mSigmaMinus());
rSigmaMinus.fill(HIST("h2SigmaMassVsXiMass"), kinkCand.mXiMinus(), kinkCand.mSigmaMinus());
rSigmaMinus.fill(HIST("h2NSigmaPiPt"), kinkCand.mothSign() * kinkCand.ptMoth(), dauTrack.tpcNSigmaPi());

// do MC association
auto mcLabSigma = trackLabelsMC.rawIteratorAt(mothTrack.globalIndex());
auto mcLabPiDau = trackLabelsMC.rawIteratorAt(dauTrack.globalIndex());
Expand All @@ -159,7 +158,7 @@ struct sigmaminustask {
if (std::abs(mcTrackPiDau.pdgCode()) != 211 && std::abs(mcTrackPiDau.pdgCode()) != 2212) {
continue;
}

float MotherMassMC = std::sqrt(piMother.e() * piMother.e() - piMother.p() * piMother.p());
float MotherpTMC = piMother.pt();
float decayRadiusMC = std::sqrt(mcTrackPiDau.vx() * mcTrackPiDau.vx() + mcTrackPiDau.vy() * mcTrackPiDau.vy());
Expand All @@ -176,14 +175,14 @@ struct sigmaminustask {
// fill the output table with Mc information
if (fillOutputTree) {
outputDataTableMC(kinkCand.xDecVtx(), kinkCand.yDecVtx(), kinkCand.zDecVtx(),
kinkCand.pxMoth(), kinkCand.pyMoth(), kinkCand.pzMoth(),
kinkCand.pxDaug(), kinkCand.pyDaug(), kinkCand.pzDaug(),
kinkCand.dcaMothPv(), kinkCand.dcaDaugPv(), kinkCand.dcaKinkTopo(),
kinkCand.mothSign(),
dauTrack.tpcNSigmaPi(), dauTrack.tpcNSigmaPr(), dauTrack.tpcNSigmaKa(),
dauTrack.tofNSigmaPi(), dauTrack.tofNSigmaPr(), dauTrack.tofNSigmaKa(),
mcTrackSigma.pdgCode(), mcTrackPiDau.pdgCode(),
MotherpTMC, MotherMassMC, decayRadiusMC);
kinkCand.pxMoth(), kinkCand.pyMoth(), kinkCand.pzMoth(),
kinkCand.pxDaug(), kinkCand.pyDaug(), kinkCand.pzDaug(),
kinkCand.dcaMothPv(), kinkCand.dcaDaugPv(), kinkCand.dcaKinkTopo(),
kinkCand.mothSign(),
dauTrack.tpcNSigmaPi(), dauTrack.tpcNSigmaPr(), dauTrack.tpcNSigmaKa(),
dauTrack.tofNSigmaPi(), dauTrack.tofNSigmaPr(), dauTrack.tofNSigmaKa(),
mcTrackSigma.pdgCode(), mcTrackPiDau.pdgCode(),
MotherpTMC, MotherMassMC, decayRadiusMC);
}
}
} // MC association and selection
Expand Down Expand Up @@ -224,7 +223,7 @@ struct sigmaminustask {
outputDataTableMC(-999, -999, -999,
-999, -999, -999,
-999, -999, -999,
-999, -999, -999,
-999, -999, -999,
sigmaSign,
-999, -999, -999,
-999, -999, -999,
Expand Down