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
30 changes: 15 additions & 15 deletions PWGHF/HFC/DataModel/DMesonPairsTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,22 @@ DECLARE_SOA_COLUMN(TimestampHad, timestampHad, int64_t); //! Timestamp of the as
} // namespace hf_correlation_d_meson_had

// Definition of the D meson table for D-had correlations. Contains the info needed at Data level.
DECLARE_SOA_TABLE(DMesonCandInfo, "AOD", "DMESONCANDINFO", \
hf_correlation_d_meson_had::PtD, \
hf_correlation_d_meson_had::EtaD, \
hf_correlation_d_meson_had::PhiD, \
hf_correlation_d_meson_had::MD, \
hf_correlation_d_meson_had::PoolBinD, \
hf_correlation_d_meson_had::GIndexColD, \
hf_correlation_d_meson_had::TimestampD);
DECLARE_SOA_TABLE(DMesonCandInfo, "AOD", "DMESONCANDINFO",
hf_correlation_d_meson_had::PtD,
hf_correlation_d_meson_had::EtaD,
hf_correlation_d_meson_had::PhiD,
hf_correlation_d_meson_had::MD,
hf_correlation_d_meson_had::PoolBinD,
hf_correlation_d_meson_had::GIndexColD,
hf_correlation_d_meson_had::TimestampD);

DECLARE_SOA_TABLE(AssocHadInfo, "AOD", "ASSOCHADINFO", \
hf_correlation_d_meson_had::PtHad, \
hf_correlation_d_meson_had::EtaHad, \
hf_correlation_d_meson_had::PhiHad, \
hf_correlation_d_meson_had::PoolBinHad, \
hf_correlation_d_meson_had::GIndexColHad, \
hf_correlation_d_meson_had::TimestampHad);
DECLARE_SOA_TABLE(AssocHadInfo, "AOD", "ASSOCHADINFO",
hf_correlation_d_meson_had::PtHad,
hf_correlation_d_meson_had::EtaHad,
hf_correlation_d_meson_had::PhiHad,
hf_correlation_d_meson_had::PoolBinHad,
hf_correlation_d_meson_had::GIndexColHad,
hf_correlation_d_meson_had::TimestampHad);

} // namespace o2::aod

Expand Down
51 changes: 28 additions & 23 deletions PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ struct HfCorrelatorD0HadronsSelection {

// Process function to select collisions with at least one D0 candidate passing the selection criteria
void processD0SelectionData(SelCollisions::iterator const& collision,
CandidatesD0Data const& candidates)
CandidatesD0Data const& candidates)
{
bool isSel8 = !useSel8 || collision.sel8();
bool isNoSameBunchPileUp = !selNoSameBunchPileUpColl ||
collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup);
collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup);
bool isD0Found = !doSelD0Collision;

if (doSelD0Collision) {
Expand Down Expand Up @@ -804,27 +804,32 @@ struct HfCorrelatorDMesonPairs {
if (applyMixedEvent) {
// Loop on the associated tracks for offline event mixing
for (const auto& track : tracks) {
// apply track selection
if (track.collisionId() != gCollisionId) continue;

// Manual trackFilter check
if (std::abs(track.eta()) >= etaTrackMax) continue;
if (track.pt() <= ptTrackMin) continue;
if (std::abs(track.dcaXY()) >= dcaXYTrackMax) continue;
if (std::abs(track.dcaZ()) >= dcaZTrackMax) continue;
// Removing D0 daughters by checking track indices
if (daughterTracksCutFlag) {
if ((candidate1.prong0Id() == track.globalIndex()) || (candidate1.prong1Id() == track.globalIndex())) {
continue;
}
}
if (cntD0 == 0) {
entryAssocHad(track.pt(), track.eta(), track.phi(), poolBin, gCollisionId, timeStamp);
registry.fill(HIST("hTracksBin"), poolBin);
registry.fill(HIST("hDcaXYVsPt"), track.dcaXY(), track.pt());
// apply track selection
if (track.collisionId() != gCollisionId)
continue;

// Manual trackFilter check
if (std::abs(track.eta()) >= etaTrackMax)
continue;
if (track.pt() <= ptTrackMin)
continue;
if (std::abs(track.dcaXY()) >= dcaXYTrackMax)
continue;
if (std::abs(track.dcaZ()) >= dcaZTrackMax)
continue;
// Removing D0 daughters by checking track indices
if (daughterTracksCutFlag) {
if ((candidate1.prong0Id() == track.globalIndex()) || (candidate1.prong1Id() == track.globalIndex())) {
continue;
}
} // Hadron Tracks loop
cntD0++;
}
if (cntD0 == 0) {
entryAssocHad(track.pt(), track.eta(), track.phi(), poolBin, gCollisionId, timeStamp);
registry.fill(HIST("hTracksBin"), poolBin);
registry.fill(HIST("hDcaXYVsPt"), track.dcaXY(), track.pt());
}
} // Hadron Tracks loop
cntD0++;
}

// Loop on the second D0 candidate
Expand Down Expand Up @@ -886,7 +891,7 @@ struct HfCorrelatorDMesonPairs {
entryD0PairMl(outputMlD0Cand1, outputMlD0barCand1, outputMlD0Cand2, outputMlD0barCand2);
} else {
// Fill entries
fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, HfHelper::yD0(candidate1), HfHelper::yD0(candidate2),
fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, HfHelper::yD0(candidate1), HfHelper::yD0(candidate2),
candidate1.eta(), candidate2.eta(), candidate1.phi(), candidate2.phi(),
candidate1.pt(), candidate2.pt(), HfHelper::invMassD0ToPiK(candidate1), HfHelper::invMassD0barToKPi(candidate1),
HfHelper::invMassD0ToPiK(candidate2), HfHelper::invMassD0barToKPi(candidate2));
Expand Down