Skip to content

Commit

Permalink
[PWGHF] Fix derived data issue for HF correlations (AliceO2Group#8608)
Browse files Browse the repository at this point in the history
  • Loading branch information
scattaru authored Nov 26, 2024
1 parent eb44a5c commit 58f18a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float); //! Event multiplicity
DECLARE_SOA_COLUMN(PosZ, posZ, float); //! Primary vertex z position

} // namespace hf_collisions_reduced

DECLARE_SOA_TABLE(HfcRedCollisions, "AOD", "HFCREDCOLLISION", //! Table with collision info
soa::Index<>,
aod::hf_collisions_reduced::Multiplicity,
Expand All @@ -44,7 +45,7 @@ DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candida
DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate
DECLARE_SOA_COLUMN(InvMassDs, invMassDs, float); //! Invariant mass of Ds candidate
} // namespace hf_candidate_reduced
DECLARE_SOA_TABLE(DsCandReduced, "AOD", "DSCANDREDUCED", //! Table with Ds candidate info (rectangular selection)
DECLARE_SOA_TABLE(DsCandReduceds, "AOD", "DSCANDREDUCED", //! Table with Ds candidate info (rectangular selection)
soa::Index<>,
aod::hf_candidate_reduced::HfcRedCollisionId,
aod::hf_candidate_reduced::PhiCand,
Expand All @@ -59,7 +60,7 @@ DECLARE_SOA_COLUMN(EtaAssocTrack, etaAssocTrack, float); //! Eta of the track
DECLARE_SOA_COLUMN(PhiAssocTrack, phiAssocTrack, float); //! Phi of the track
DECLARE_SOA_COLUMN(PtAssocTrack, ptAssocTrack, float); //! Pt of the track
} // namespace hf_assoc_track_reduced
DECLARE_SOA_TABLE(AssocTrackRed, "AOD", "ASSOCTRACKRED", //! Table with associated track info
DECLARE_SOA_TABLE(AssocTrackReds, "AOD", "ASSOCTRACKRED", //! Table with associated track info
soa::Index<>,
aod::hf_candidate_reduced::HfcRedCollisionId,
aod::hf_assoc_track_reduced::PhiAssocTrack,
Expand Down
7 changes: 5 additions & 2 deletions PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct HfCorrelatorDsHadronsSelCollision {
bool isSel8 = true;
bool isNosameBunchPileUp = true;
if (doSelDsCollision) {
isDsFound = false; // if candidate table is empty for-loop is not performed
for (const auto& candidate : candidates) {
if (std::abs(hfHelper.yDs(candidate)) > yCandMax || candidate.pt() < ptCandMin) {
isDsFound = false;
Expand All @@ -89,9 +90,11 @@ struct HfCorrelatorDsHadronsSelCollision {
}
}
if (useSel8) {
isSel8 = false;
isSel8 = collision.sel8();
}
if (selNoSameBunchPileUpColl) {
isNosameBunchPileUp = false;
isNosameBunchPileUp = static_cast<bool>(collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup));
}
isSelColl = isDsFound && isSel8 && isNosameBunchPileUp;
Expand Down Expand Up @@ -139,8 +142,8 @@ struct HfCorrelatorDsHadrons {
Produces<aod::DsCandGenInfo> entryDsCandGenInfo;
Produces<aod::TrackRecoInfo> entryTrackRecoInfo;
Produces<aod::HfcRedCollisions> collReduced;
Produces<aod::DsCandReduced> candReduced;
Produces<aod::AssocTrackRed> assocTrackReduced;
Produces<aod::DsCandReduceds> candReduced;
Produces<aod::AssocTrackReds> assocTrackReduced;

Configurable<bool> fillHistoData{"fillHistoData", true, "Flag for filling histograms in data processes"};
Configurable<bool> fillHistoMcRec{"fillHistoMcRec", true, "Flag for filling histograms in MC Rec processes"};
Expand Down

0 comments on commit 58f18a6

Please sign in to comment.