Skip to content

Commit 2a75245

Browse files
authored
We use the mass column correctly by separating it into LSmass and ULmass.
We use the mass column correctly by separating it into LSmass and ULmass.
1 parent 250f093 commit 2a75245

File tree

1 file changed

+18
-34
lines changed

1 file changed

+18
-34
lines changed

PWGHF/HFC/TableProducer/correlatorHfeHadrons.cxx

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ struct HfCorrelatorHfeHadrons {
133133
registry.add("hInclusiveEHCorrel", "Sparse for Delta phi and Delta eta Inclusive Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}});
134134
registry.add("hLSEHCorrel", "Sparse for Delta phi and Delta eta Like sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}});
135135
registry.add("hULSEHCorrel", "Sparse for Delta phi and Delta eta UnLike sign Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}});
136-
registry.add("hTpcTofNSigmaVsPt", " TPC and TOF nSigma vs pt; n#sigma; n#sigma;#it{pt} (GeV/#it{c});", {HistType::kTH3F, {{axisNSigma}, {axisNSigma}, {axisPt}}});
137-
138-
// After electron selection Information
139-
registry.add("hTofNSigmaVsPt", " TOF nSigma vs pt; n#sigma;#it{pt} (GeV/#it{c});", {HistType::kTH2F, {{axisNSigma}, {axisPt}}});
140-
registry.add("hTpcNSigmaVsPt", " TPC nSigma vs pt; n#sigma;#it{pt} (GeV/#it{c});", {HistType::kTH2F, {{axisNSigma}, {axisPt}}});
141136

142137
registry.add("hMCgenNonHfEHCorrel", "Sparse for Delta phi and Delta eta for McGen Non Hf Electron with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}});
143138
registry.add("hMCgenInclusiveEHCorrl", "Sparse for Delta phi and Delta eta for McGen Electron pair with Hadron;p_{T}^{e} (GeV#it{/c});p_{T}^{h} (GeV#it{/c});#Delta#varphi;#Delta#eta;", {HistType::kTHnSparseF, {{axisPt}, {axisPt}, {axisDeltaPhi}, {axisDeltaEta}}});
@@ -231,17 +226,7 @@ struct HfCorrelatorHfeHadrons {
231226
if (eTrack.isEmcal() && requireEmcal) {
232227
acceptElectron = true;
233228
} else if (!eTrack.isEmcal() && !requireEmcal) {
234-
235-
registry.fill(HIST("hTpcTofNSigmaVsPt"), eTrack.tofNSigmaElTrack(), eTrack.tpcNSigmaElTrack(), eTrack.ptTrack());
236-
237-
// After electron selection Information
238-
if (std::abs(eTrack.tofNSigmaElTrack()) < tofNSigmaEl && eTrack.tpcNSigmaElTrack() > tpcNsigmaElectronMin &&
239-
eTrack.tpcNSigmaElTrack() < tpcNsigmaElectronMax) {
240-
241-
registry.fill(HIST("hTofNSigmaVsPt"), eTrack.tofNSigmaElTrack(), eTrack.ptTrack());
242-
registry.fill(HIST("hTpcNSigmaVsPt"), eTrack.tpcNSigmaElTrack(), eTrack.ptTrack());
243-
acceptElectron = true;
244-
}
229+
acceptElectron = true;
245230
}
246231

247232
if (!acceptElectron) {
@@ -251,31 +236,33 @@ struct HfCorrelatorHfeHadrons {
251236
registry.fill(HIST("hptElectron"), ptElectron);
252237
int nElectronLS = 0;
253238
int nElectronUS = 0;
254-
float massLike = 0;
255-
float massUnLike = 0;
256-
if (eTrack.nElPairLS() > 0) {
257-
for (int i = 0; i < eTrack.nElPairLS(); ++i) {
258-
massLike = eTrack.invariantMassEE();
239+
240+
auto spanLS = eTrack.lSMassEE();
241+
auto spanUS = eTrack.uLSMassEE();
242+
243+
if (!spanLS.empty()) {
244+
for (size_t i = 0; i < spanLS.size(); ++i) {
245+
float massLike = spanLS[i]; // <-- access i-th element
259246

260247
registry.fill(HIST("hLSElectronBin"), poolBin);
261248
registry.fill(HIST("hLikeMass"), massLike);
249+
registry.fill(HIST("hLikeSignPt"), eTrack.ptTrack());
262250

263251
if (massLike <= invMassEEMax) {
264252
++nElectronLS;
265-
registry.fill(HIST("hLikeSignPt"), eTrack.ptTrack());
266253
}
267254
}
268255
}
269-
if (eTrack.nElPairUS() > 0) {
270-
for (int i = 0; i < eTrack.nElPairUS(); ++i) {
271-
massUnLike = eTrack.invariantMassEE();
256+
if (!spanUS.empty()) {
257+
for (size_t i = 0; i < spanUS.size(); ++i) {
258+
float massUnLike = spanUS[i]; // <-- access i-th element
272259

273260
registry.fill(HIST("hULSElectronBin"), poolBin);
274261
registry.fill(HIST("hUnLikeMass"), massUnLike);
262+
registry.fill(HIST("hUnLikeSignPt"), eTrack.ptTrack());
275263

276264
if (massUnLike <= invMassEEMax) {
277265
++nElectronUS;
278-
registry.fill(HIST("hLikeSignPt"), eTrack.ptTrack());
279266
}
280267
}
281268
}
@@ -309,18 +296,15 @@ struct HfCorrelatorHfeHadrons {
309296
int nElHadUSCorr = 0;
310297
if (eTrack.nElPairLS() > 0) {
311298
for (int i = 0; i < eTrack.nElPairLS(); ++i) {
312-
if (eTrack.invariantMassEE() <= invMassEEMax) {
313-
++nElHadLSCorr;
314-
registry.fill(HIST("hLSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
315-
}
299+
++nElHadLSCorr;
300+
registry.fill(HIST("hLSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
316301
}
317302
}
318303
if (eTrack.nElPairUS() > 0) {
319304
for (int i = 0; i < eTrack.nElPairUS(); ++i) {
320-
if (eTrack.invariantMassEE() <= invMassEEMax) {
321-
registry.fill(HIST("hULSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
322-
++nElHadUSCorr;
323-
}
305+
306+
registry.fill(HIST("hULSEHCorrel"), ptElectron, ptHadron, deltaPhi, deltaEta);
307+
++nElHadUSCorr;
324308
}
325309
}
326310
entryElectronHadronPair(deltaPhi, deltaEta, ptElectron, ptHadron, poolBin, nElHadLSCorr, nElHadUSCorr);

0 commit comments

Comments
 (0)