diff --git a/PWGHF/HFC/DataModel/DMesonPairsTables.h b/PWGHF/HFC/DataModel/DMesonPairsTables.h index 67a352a46ae..65f76dc586e 100644 --- a/PWGHF/HFC/DataModel/DMesonPairsTables.h +++ b/PWGHF/HFC/DataModel/DMesonPairsTables.h @@ -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 @@ -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, diff --git a/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx b/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx index 5df55b79b8d..19130525213 100644 --- a/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx @@ -143,7 +143,8 @@ struct HfCorrelatorDMesonPairs { Produces entryD0PairMcGenInfo; // Tables for event mixing - Produces entryDMesonCand; + Produces entryDMesonInfoCand1; + Produces entryDMesonInfoCand2; Produces entryAssocHad; Configurable selectionFlagD0{"selectionFlagD0", 1, "Selection Flag for D0"}; @@ -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}}}); } @@ -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) { @@ -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); } } @@ -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),