Skip to content

Commit 2a689ff

Browse files
ataviragalibuild
andauthored
[PWGHF] Add possibility to do the event mixing with DDbar pairs in correlatorDMesonPairs (#17869)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent a95e57f commit 2a689ff

2 files changed

Lines changed: 29 additions & 11 deletions

File tree

PWGHF/HFC/DataModel/DMesonPairsTables.h

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ DECLARE_SOA_COLUMN(YD, yD, float); //! Rapidity of the D meson
108108
DECLARE_SOA_COLUMN(EtaD, etaD, float); //! Pseudorapidity of the D meson
109109
DECLARE_SOA_COLUMN(PhiD, phiD, float); //! Azimuthal angle of the D meson
110110
DECLARE_SOA_COLUMN(MD, mD, float); //! Invariant mass of the D meson
111+
DECLARE_SOA_COLUMN(DType, dType, uint8_t); //! D meson type (D0 or D0bar)
111112
DECLARE_SOA_COLUMN(PoolBinD, poolBinD, int); //! Pool bin of the D meson
112113
DECLARE_SOA_COLUMN(GIndexColD, gIndexColD, int); //! G-index column of the D meson
113114
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
124125
} // namespace hf_correlation_d_meson_had
125126

126127
// Definition of the D meson table for D-had correlations. Contains the info needed at Data level.
127-
DECLARE_SOA_TABLE(DMesonCandInfo, "AOD", "DMESONCANDINFO",
128-
hf_correlation_d_meson_had::PtD,
129-
hf_correlation_d_meson_had::EtaD,
130-
hf_correlation_d_meson_had::PhiD,
131-
hf_correlation_d_meson_had::MD,
132-
hf_correlation_d_meson_had::PoolBinD,
133-
hf_correlation_d_meson_had::GIndexColD,
134-
hf_correlation_d_meson_had::TimestampD);
128+
#define DECLARE_DMESON_ME_TABLE(_cand_number_, _marker_value_, _description_) \
129+
DECLARE_SOA_TABLE(_cand_number_, "AOD", _description_, o2::soa::Marker<_marker_value_>, \
130+
hf_correlation_d_meson_had::PtD, \
131+
hf_correlation_d_meson_had::EtaD, \
132+
hf_correlation_d_meson_had::PhiD, \
133+
hf_correlation_d_meson_had::MD, \
134+
hf_correlation_d_meson_had::DType, \
135+
hf_correlation_d_meson_had::PoolBinD, \
136+
hf_correlation_d_meson_had::GIndexColD, \
137+
hf_correlation_d_meson_had::TimestampD);
138+
139+
DECLARE_DMESON_ME_TABLE(DMesonInfoCand1, 1, "DMESCAND1"); //! D0 cand 1 info for event mixing
140+
DECLARE_DMESON_ME_TABLE(DMesonInfoCand2, 2, "DMESCAND2"); //! D0 cand 2 info for event mixing
135141

136142
DECLARE_SOA_TABLE(AssocHadInfo, "AOD", "ASSOCHADINFO",
137143
hf_correlation_d_meson_had::PtHad,

PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ struct HfCorrelatorDMesonPairs {
143143
Produces<aod::D0PairMcGenInfo> entryD0PairMcGenInfo;
144144

145145
// Tables for event mixing
146-
Produces<aod::DMesonCandInfo> entryDMesonCand;
146+
Produces<aod::DMesonInfoCand1> entryDMesonInfoCand1;
147+
Produces<aod::DMesonInfoCand2> entryDMesonInfoCand2;
147148
Produces<aod::AssocHadInfo> entryAssocHad;
148149

149150
Configurable<int> selectionFlagD0{"selectionFlagD0", 1, "Selection Flag for D0"};
@@ -422,6 +423,7 @@ struct HfCorrelatorDMesonPairs {
422423
registry.add("hMultFT0M", "multiplicity;multiplicity;entries", {HistType::kTH1F, {{10000, 0., 10000.}}});
423424
registry.add("hZvtx", "z vertex;z vertex;entries", {HistType::kTH1F, {{200, -20., 20.}}});
424425
registry.add("hD0Bin", "D0 selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{axisPoolBin}}});
426+
registry.add("hD0Cand2Bin", "D0 selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{axisPoolBin}}});
425427
registry.add("hTracksBin", "Tracks selected in pool Bin;pool Bin;entries", {HistType::kTH1F, {{axisPoolBin}}});
426428
registry.add("hDcaXYVsPt", "DCA xy vs pt", {HistType::kTH2F, {{axisDcaXY}, {axisPtHadron}}});
427429
}
@@ -795,7 +797,7 @@ struct HfCorrelatorDMesonPairs {
795797
}
796798
// Fill D0 table for offline event mixing
797799
if (applyMixedEvent) {
798-
entryDMesonCand(candidate1.pt(), candidate1.eta(), candidate1.phi(), HfHelper::invMassD0ToPiK(candidate1), poolBin, gCollisionId, timeStamp);
800+
entryDMesonInfoCand1(candidate1.pt(), candidate1.eta(), candidate1.phi(), HfHelper::invMassD0ToPiK(candidate1), candidateType1, poolBin, gCollisionId, timeStamp);
799801
}
800802
}
801803
if (isDbarCand1) {
@@ -807,7 +809,7 @@ struct HfCorrelatorDMesonPairs {
807809
}
808810
// Fill D0 table for offline event mixing
809811
if (applyMixedEvent) {
810-
entryDMesonCand(candidate1.pt(), candidate1.eta(), candidate1.phi(), HfHelper::invMassD0barToKPi(candidate1), poolBin, gCollisionId, timeStamp);
812+
entryDMesonInfoCand1(candidate1.pt(), candidate1.eta(), candidate1.phi(), HfHelper::invMassD0ToPiK(candidate1), candidateType1, poolBin, gCollisionId, timeStamp);
811813
}
812814
}
813815

@@ -898,6 +900,16 @@ struct HfCorrelatorDMesonPairs {
898900
continue;
899901
}
900902

903+
if (applyMixedEvent) {
904+
if (isDCand2) {
905+
entryDMesonInfoCand2(candidate2.pt(), candidate2.eta(), candidate2.phi(), HfHelper::invMassD0barToKPi(candidate2), candidateType2, poolBin, gCollisionId, timeStamp);
906+
}
907+
if (isDbarCand2) {
908+
entryDMesonInfoCand2(candidate2.pt(), candidate2.eta(), candidate2.phi(), HfHelper::invMassD0barToKPi(candidate2), candidateType2, poolBin, gCollisionId, timeStamp);
909+
}
910+
registry.fill(HIST("hD0Cand2Bin"), poolBin);
911+
}
912+
901913
fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, HfHelper::yD0(candidate1), HfHelper::yD0(candidate2),
902914
candidate1.eta(), candidate2.eta(), candidate1.phi(), candidate2.phi(),
903915
candidate1.pt(), candidate2.pt(), HfHelper::invMassD0ToPiK(candidate1), HfHelper::invMassD0barToKPi(candidate1),

0 commit comments

Comments
 (0)