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
22 changes: 14 additions & 8 deletions PWGHF/HFC/DataModel/DMesonPairsTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ DECLARE_SOA_COLUMN(YD, yD, float); //! Rapidity of the D meson
DECLARE_SOA_COLUMN(EtaD, etaD, float); //! Pseudorapidity of the D meson
DECLARE_SOA_COLUMN(PhiD, phiD, float); //! Azimuthal angle of the D meson
DECLARE_SOA_COLUMN(MD, mD, float); //! Invariant mass of the D meson
DECLARE_SOA_COLUMN(DType, dType, uint8_t); //! D meson type (D0 or D0bar)
DECLARE_SOA_COLUMN(PoolBinD, poolBinD, int); //! Pool bin of the D meson
DECLARE_SOA_COLUMN(GIndexColD, gIndexColD, int); //! G-index column of the D meson
DECLARE_SOA_COLUMN(TimestampD, timestampD, int64_t); //! Timestamp of the D meson
Expand All @@ -124,14 +125,19 @@ 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);
#define DECLARE_DMESON_ME_TABLE(_cand_number_, _marker_value_, _description_) \
DECLARE_SOA_TABLE(_cand_number_, "AOD", _description_, o2::soa::Marker<_marker_value_>, \
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::DType, \
hf_correlation_d_meson_had::PoolBinD, \
hf_correlation_d_meson_had::GIndexColD, \
hf_correlation_d_meson_had::TimestampD);

DECLARE_DMESON_ME_TABLE(DMesonInfoCand1, 1, "DMESCAND1"); //! D0 cand 1 info for event mixing
DECLARE_DMESON_ME_TABLE(DMesonInfoCand2, 2, "DMESCAND2"); //! D0 cand 2 info for event mixing

DECLARE_SOA_TABLE(AssocHadInfo, "AOD", "ASSOCHADINFO",
hf_correlation_d_meson_had::PtHad,
Expand Down
18 changes: 15 additions & 3 deletions PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ struct HfCorrelatorDMesonPairs {
Produces<aod::D0PairMcGenInfo> entryD0PairMcGenInfo;

// Tables for event mixing
Produces<aod::DMesonCandInfo> entryDMesonCand;
Produces<aod::DMesonInfoCand1> entryDMesonInfoCand1;
Produces<aod::DMesonInfoCand2> entryDMesonInfoCand2;
Produces<aod::AssocHadInfo> entryAssocHad;

Configurable<int> selectionFlagD0{"selectionFlagD0", 1, "Selection Flag for D0"};
Expand Down Expand Up @@ -422,6 +423,7 @@ struct HfCorrelatorDMesonPairs {
registry.add("hMultFT0M", "multiplicity;multiplicity;entries", {HistType::kTH1F, {{10000, 0., 10000.}}});
registry.add("hZvtx", "z vertex;z vertex;entries", {HistType::kTH1F, {{200, -20., 20.}}});
registry.add("hD0Bin", "D0 selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{axisPoolBin}}});
registry.add("hD0Cand2Bin", "D0 selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{axisPoolBin}}});
registry.add("hTracksBin", "Tracks selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{axisPoolBin}}});
registry.add("hDcaXYVsPt", "DCA xy vs pt", {HistType::kTH2F, {{axisDcaXY}, {axisPtHadron}}});
}
Expand Down Expand Up @@ -795,7 +797,7 @@ struct HfCorrelatorDMesonPairs {
}
// Fill D0 table for offline event mixing
if (applyMixedEvent) {
entryDMesonCand(candidate1.pt(), candidate1.eta(), candidate1.phi(), HfHelper::invMassD0ToPiK(candidate1), poolBin, gCollisionId, timeStamp);
entryDMesonInfoCand1(candidate1.pt(), candidate1.eta(), candidate1.phi(), HfHelper::invMassD0ToPiK(candidate1), candidateType1, poolBin, gCollisionId, timeStamp);
}
}
if (isDbarCand1) {
Expand All @@ -807,7 +809,7 @@ struct HfCorrelatorDMesonPairs {
}
// Fill D0 table for offline event mixing
if (applyMixedEvent) {
entryDMesonCand(candidate1.pt(), candidate1.eta(), candidate1.phi(), HfHelper::invMassD0barToKPi(candidate1), poolBin, gCollisionId, timeStamp);
entryDMesonInfoCand1(candidate1.pt(), candidate1.eta(), candidate1.phi(), HfHelper::invMassD0ToPiK(candidate1), candidateType1, poolBin, gCollisionId, timeStamp);
}
}

Expand Down Expand Up @@ -898,6 +900,16 @@ struct HfCorrelatorDMesonPairs {
continue;
}

if (applyMixedEvent) {
if (isDCand2) {
entryDMesonInfoCand2(candidate2.pt(), candidate2.eta(), candidate2.phi(), HfHelper::invMassD0barToKPi(candidate2), candidateType2, poolBin, gCollisionId, timeStamp);
}
if (isDbarCand2) {
entryDMesonInfoCand2(candidate2.pt(), candidate2.eta(), candidate2.phi(), HfHelper::invMassD0barToKPi(candidate2), candidateType2, poolBin, gCollisionId, timeStamp);
}
registry.fill(HIST("hD0Cand2Bin"), poolBin);
}

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),
Expand Down
Loading