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
3 changes: 3 additions & 0 deletions PWGHF/HFC/DataModel/CorrelationTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ DECLARE_SOA_COLUMN(MCandHadron, mCandHadron, float); //! I
DECLARE_SOA_COLUMN(PtCombined, ptCombined, float); //! Transverse momentum of combined Lc+Hadron system
DECLARE_SOA_COLUMN(MV0, mV0, float); //! Invariant mass of V0
DECLARE_SOA_COLUMN(MV0Ref, mV0Ref, float); //! Invariant mass of reflected V0
DECLARE_SOA_COLUMN(HadPdg, hadPdg, int); //! PDG code of the MC particle matched to the associated track (0 if not matched)
} // namespace hf_correlation_lc_hadron

DECLARE_SOA_TABLE(PtLcFromScHPair, "AOD", "PTLCSCHPAIR", //! Sc-->Lc pT for paired Sc-proton
Expand Down Expand Up @@ -283,6 +284,8 @@ DECLARE_SOA_TABLE(LcHadronTrkPID, "AOD", "LCHTRKPID", //! Lc-proton details
aod::hf_correlation_lc_hadron::PrNsigmTOF,
aod::hf_correlation_lc_hadron::KaNsigmTOF,
aod::hf_correlation_lc_hadron::PiNsigmTOF);
DECLARE_SOA_TABLE(HadronPdg, "AOD", "HADPDG", //! hadron pdg details
aod::hf_correlation_lc_hadron::HadPdg);

DECLARE_SOA_TABLE(LcHadronGenInfo, "AOD", "LCHGENINFO", //! Lc-Hadrons pairs Generated Information
aod::hf_correlation_lc_hadron::IsPrompt,
Expand Down
22 changes: 22 additions & 0 deletions PWGHF/HFC/TableProducer/correlatorXicHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ struct HfCorrelatorXicHadrons {
Produces<aod::TrkRecInfoLc> entryTrackRecoInfo;
Produces<aod::Lc> entryCand;
Produces<aod::Hadron> entryHadron;
Produces<aod::HadronPdg> entryHadronPdg;
Produces<aod::LcHadronTrkPID> entryTrkPID;
Produces<aod::CandChargePair> entryPairCandCharge;
Produces<aod::CandCharge> entryCandCharge;
Expand Down Expand Up @@ -651,6 +652,18 @@ struct HfCorrelatorXicHadrons {
}
}

/// Fill the PDG code of the MC particle matched to an associated track (0 if not matched, i.e. fake track).
/// To be called once per entryTrkPID entry, so that HadronPdg can be joined with LcHadronTrkPID
template <typename TrackType>
void fillHadronPdg(TrackType const& track)
{
int pdgCodeAssoc = 0;
if (track.has_mcParticle()) {
pdgCodeAssoc = track.template mcParticle_as<aod::McParticles>().pdgCode();
}
entryHadronPdg(pdgCodeAssoc);
}

template <typename TCollision, typename V0>
bool selectionV0(TCollision const& collision, V0 const& candidate)
{
Expand Down Expand Up @@ -773,6 +786,9 @@ struct HfCorrelatorXicHadrons {
if (passV0Sel && std::abs(o2::constants::physics::MassLambda - v0.mLambda()) < cfgV0.cfgHypMassWindow && v0.alpha() > 0) {
entryHadron(v0.mLambda(), trackV0Pos.eta(), trackV0Pos.pt() * trackV0Pos.sign(), 0, 0, v0.pt());
entryTrkPID(trackV0Pos.tpcNSigmaPr(), trackV0Pos.tpcNSigmaKa(), trackV0Pos.tpcNSigmaPi(), trackV0Pos.tofNSigmaPr(), trackV0Pos.tofNSigmaKa(), trackV0Pos.tofNSigmaPi());
if constexpr (IsMc) {
fillHadronPdg(trackV0Pos);
}

if (isSelectedV0Daughter(trackV0Pos, v0, kProton) && isSelectedV0Daughter(trackV0Neg, v0, kPiMinus)) {
registry.fill(HIST("hV0Lambda"), v0.mLambda(), v0.pt(), trackV0Pos.pt());
Expand All @@ -797,6 +813,9 @@ struct HfCorrelatorXicHadrons {
if (passV0Sel && std::abs(o2::constants::physics::MassLambda - v0.mAntiLambda()) < cfgV0.cfgHypMassWindow && v0.alpha() < 0) {
entryHadron(v0.mAntiLambda(), trackV0Neg.eta(), trackV0Neg.pt() * trackV0Neg.sign(), 0, 0, v0.pt());
entryTrkPID(trackV0Neg.tpcNSigmaPr(), trackV0Neg.tpcNSigmaKa(), trackV0Neg.tpcNSigmaPi(), trackV0Neg.tofNSigmaPr(), trackV0Neg.tofNSigmaKa(), trackV0Neg.tofNSigmaPi());
if constexpr (IsMc) {
fillHadronPdg(trackV0Neg);
}

if (isSelectedV0Daughter(trackV0Neg, v0, kProtonBar) && isSelectedV0Daughter(trackV0Pos, v0, kPiPlus)) {
registry.fill(HIST("hV0Lambda"), v0.mAntiLambda(), v0.pt(), trackV0Neg.pt());
Expand Down Expand Up @@ -1432,6 +1451,9 @@ struct HfCorrelatorXicHadrons {
entryHadron(track.phi(), track.eta(), track.pt() * track.sign(), poolBin, gCollisionId, timeStamp);
if (cfgXicCand.fillTrkPID) {
entryTrkPID(track.tpcNSigmaPr(), track.tpcNSigmaKa(), track.tpcNSigmaPi(), track.tofNSigmaPr(), track.tofNSigmaKa(), track.tofNSigmaPi());
if constexpr (IsMcRec) {
fillHadronPdg(track);
}
}
registry.fill(HIST("hTracksBin"), poolBin);
}
Expand Down
Loading