Skip to content

Commit 5eb3835

Browse files
committed
add a mass axis to final Thnsparse Correlation Data
1 parent c2aed8a commit 5eb3835

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ struct HfCorrelatorLcHadrons {
209209

210210
Configurable<int> selectionFlagLc{"selectionFlagLc", 1, "Selection Flag for Lc"};
211211
Configurable<int> numberEventsMixed{"numberEventsMixed", 5, "number of events mixed in ME process"};
212+
Configurable<int> numberOfDeltaPhiBins{"numberOfDeltaPhiBins", 32, "number of Delta Phi bins"};
212213
Configurable<int> applyEfficiency{"applyEfficiency", 1, "Flag for applying Lc efficiency weights"};
213214
Configurable<float> yCandMax{"yCandMax", 0.8, "max. cand. rapidity"};
214215
Configurable<float> yCandGenMax{"yCandGenMax", 0.5, "max. gen. cand. rapidity"};
@@ -277,6 +278,7 @@ struct HfCorrelatorLcHadrons {
277278
ConfigurableAxis binsBdtScore{"binsBdtScore", {100, 0., 1.}, "Bdt output scores"};
278279
ConfigurableAxis binsEta{"binsEta", {50, -2., 2.}, "#it{#eta}"};
279280
ConfigurableAxis binsPhi{"binsPhi", {64, -PIHalf, 3. * PIHalf}, "#it{#varphi}"};
281+
ConfigurableAxis binsDeltaPhi{"binsDeltaPhi", {32, -PIHalf, 3. * PIHalf}, "#it{#varphi}^{Hadron}-#it{#varphi}^{#Lambda_c} (rad)"};
280282
ConfigurableAxis binsPoolBin{"binsPoolBin", {9, 0., 9.}, "PoolBin"};
281283
ConfigurableAxis binsMultFT0M{"binsMultFT0M", {600, 0., 6000.}, "Multiplicity as FT0M signal amplitude"};
282284
ConfigurableAxis binsMassLc{"binsMassLc", {200, 1.98, 2.58}, "inv. mass (p K #pi) (GeV/#it{c}^{2})"};
@@ -290,6 +292,7 @@ struct HfCorrelatorLcHadrons {
290292
AxisSpec axisMassLc = {binsMassLc, "inv. mass (p K #pi) (GeV/#it{c}^{2})"};
291293
AxisSpec const axisEta = {binsEta, "#it{eta}"};
292294
AxisSpec const axisPhi = {binsPhi, "#it{#varphi}"};
295+
AxisSpec const axisDeltaPhi = {binsDeltaPhi, "#it{#varphi}^{Hadron}-#it{#varphi}^{#Lambda_c} (rad)"};
293296
AxisSpec axisPtLc = {(std::vector<double>)binsPtLc, "#it{p}_{T} (GeV/#it{c})"};
294297
AxisSpec axisPtHadron = {(std::vector<double>)binsPtHadron, "#it{p}_{T} Hadron (GeV/#it{c})"};
295298
AxisSpec axisPtTrack = {500, 0, 50, "#it{p}_{T} Hadron (GeV/#it{c})"};
@@ -320,6 +323,7 @@ struct HfCorrelatorLcHadrons {
320323
registry.add("hLcBin", "Lc selected in pool Bin;pool Bin;entries", {HistType::kTH1D, {{9, 0., 9.}}});
321324
registry.add("hTracksBin", "Tracks selected in pool Bin;pool Bin;entries", {HistType::kTH1D, {{9, 0., 9.}}});
322325
registry.add("hMassLcVsPtVsCent", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisCent}}});
326+
registry.add("hMassLcVsPtVsDeltaPhi", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisDeltaPhi}}});
323327
registry.add("hMassLcData", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{axisMassLc}}});
324328
registry.add("hLcPoolBin", "Lc candidates pool bin", {HistType::kTH1D, {axisPoolBin}});
325329
registry.add("hTracksPoolBin", "Particles associated pool bin", {HistType::kTH1D, {axisPoolBin}});
@@ -413,6 +417,7 @@ struct HfCorrelatorLcHadrons {
413417
std::vector<float> outputMl = {-1., -1., -1.};
414418

415419
for (const auto& candidate : candidates) {
420+
std::vector<float> binNumOfDeltaPhi(numberOfDeltaPhiBins, 0.0f);
416421
if (std::abs(HfHelper::yLc(candidate)) > yCandMax || candidate.pt() < ptCandMin || candidate.pt() > ptCandMax) {
417422
continue;
418423
}
@@ -481,6 +486,12 @@ struct HfCorrelatorLcHadrons {
481486
continue;
482487
}
483488
}
489+
int index = static_cast<int>((getDeltaPhi(track.phi(), candidate.phi()) + PIHalf) / (PIHalf / (numberOfDeltaPhiBins / 4)));
490+
if (index < 0)
491+
index = 0;
492+
if (index >= numberOfDeltaPhiBins)
493+
index = numberOfDeltaPhiBins - 1;
494+
binNumOfDeltaPhi[index]++;
484495
if (candidate.isSelLcToPKPi() >= selectionFlagLc) {
485496
entryLcHadronPair(getDeltaPhi(track.phi(), candidate.phi()),
486497
track.eta() - candidate.eta(),
@@ -494,6 +505,9 @@ struct HfCorrelatorLcHadrons {
494505
entryLcHadronGenInfo(false, false, 0);
495506
entryLcHadronMlInfo(outputMl[0], outputMl[1]);
496507
entryTrackRecoInfo(track.dcaXY(), track.dcaZ(), track.tpcNClsCrossedRows());
508+
if (binNumOfDeltaPhi[index] == 1) {
509+
registry.fill(HIST("hMassLcVsPtVsDeltaPhi"), hfHelper::invMassLcToPKPi(candidate), candidate.pt(), getDeltaPhi(track.phi(), candidate.phi()), efficiencyWeightLc);
510+
}
497511
if (fillTrkPID) {
498512
entryLcHadronPairTrkPID(track.tpcNSigmaPr(), track.tpcNSigmaKa(), track.tpcNSigmaPi(), track.tofNSigmaPr(), track.tofNSigmaKa(), track.tofNSigmaPi());
499513
}
@@ -511,6 +525,9 @@ struct HfCorrelatorLcHadrons {
511525
entryLcHadronGenInfo(false, false, 0);
512526
entryLcHadronMlInfo(outputMl[0], outputMl[1]);
513527
entryTrackRecoInfo(track.dcaXY(), track.dcaZ(), track.tpcNClsCrossedRows());
528+
if (binNumOfDeltaPhi[index] == 1) {
529+
registry.fill(HIST("hMassLcVsPtVsDeltaPhi"), hfHelper::invMassLcToPiKP(candidate), candidate.pt(), getDeltaPhi(track.phi(), candidate.phi()), efficiencyWeightLc);
530+
}
514531
if (fillTrkPID) {
515532
entryLcHadronPairTrkPID(track.tpcNSigmaPr(), track.tpcNSigmaKa(), track.tpcNSigmaPi(), track.tofNSigmaPr(), track.tofNSigmaKa(), track.tofNSigmaPi());
516533
}

PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -221,19 +221,21 @@ struct HfTaskCorrelationLcHadrons {
221221
registry.add("hDeltaEtaPtIntSidebands", stringLcHadron + stringSideband + stringDeltaEta + "entries", {HistType::kTH1D, {axisDeltaEta}});
222222
registry.add("hDeltaPhiPtIntSidebands", stringLcHadron + stringSideband + stringDeltaPhi + "entries", {HistType::kTH1D, {axisDeltaPhi}});
223223
registry.add("hCorrel2DPtIntSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + "entries", {HistType::kTH2F, {{axisDeltaPhi}, {axisDeltaEta}}});
224-
registry.add("hCorrel2DVsPtSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
224+
registry.add("hCorrel2DVsPtSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}, {axisMassLc}}});
225225
registry.add("hDeltaEtaPtIntSidebandLeft", stringLcHadron + "Left" + stringSideband + stringDeltaEta, {HistType::kTH1D, {axisDeltaEta}});
226226
registry.add("hDeltaPhiPtIntSidebandLeft", stringLcHadron + "Left" + stringSideband + stringDeltaPhi, {HistType::kTH1D, {axisDeltaPhi}});
227227
registry.add("hDeltaEtaPtIntSidebandRight", stringLcHadron + "Right" + stringSideband + stringDeltaEta, {HistType::kTH1D, {axisDeltaEta}});
228228
registry.add("hDeltaPhiPtIntSidebandRight", stringLcHadron + "Right" + stringSideband + stringDeltaPhi, {HistType::kTH1D, {axisDeltaPhi}});
229229

230230
if (!fillSign) {
231-
registry.add("hCorrel2DVsPtSidebandLeft", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
232-
registry.add("hCorrel2DVsPtSidebandRight", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
233-
registry.add("hCorrel2DVsPtSignalRegion", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
231+
registry.add("hCorrel2DVsPtSidebandLeft", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}, {axisMassLc}}});
232+
registry.add("hCorrel2DVsPtSidebandRight", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}, {axisMassLc}}});
233+
registry.add("hCorrel2DVsPtSignalRegion", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}, {axisMassLc}}});
234+
registry.add("hCorrel2DVsPtGlobalRegion", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}, {axisMassLc}}});
234235
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandLeft"))->Sumw2();
235236
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandRight"))->Sumw2();
236237
registry.get<THnSparse>(HIST("hCorrel2DVsPtSignalRegion"))->Sumw2();
238+
registry.get<THnSparse>(HIST("hCorrel2DVsPtGlobalRegion"))->Sumw2();
237239
} else {
238240
registry.add("hCorrel2DVsPtSignSidebandLeft", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + stringSign + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisSignPair}, {axisPoolBin}}});
239241
registry.add("hCorrel2DVsPtSignSidebandRight", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + stringSign + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisSignPair}, {axisPoolBin}}});
@@ -512,12 +514,13 @@ struct HfTaskCorrelationLcHadrons {
512514
registry.fill(HIST("hCorrel2DVsPtSignMass"), deltaPhi, deltaEta, ptLc, ptHadron, massLc, signPair, poolBin, efficiencyWeight);
513515
}
514516
// check if correlation entry belongs to signal region, sidebands or is outside both, and fill correlation plots
517+
registry.fill(HIST("hCorrel2DVsPtGlobalRegion"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, massLc, efficiencyWeight);
515518
if (massLc > signalRegionInner->at(ptBinLc) && massLc < signalRegionOuter->at(ptBinLc)) {
516519
// in signal region
517520
if (fillSign) {
518521
registry.fill(HIST("hCorrel2DVsPtSignSignalRegion"), deltaPhi, deltaEta, ptLc, ptHadron, signPair, poolBin, efficiencyWeight);
519522
} else {
520-
registry.fill(HIST("hCorrel2DVsPtSignalRegion"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, efficiencyWeight);
523+
registry.fill(HIST("hCorrel2DVsPtSignalRegion"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, massLc, efficiencyWeight);
521524
}
522525
registry.fill(HIST("hCorrel2DPtIntSignalRegion"), deltaPhi, deltaEta, efficiencyWeight);
523526
registry.fill(HIST("hDeltaEtaPtIntSignalRegion"), deltaEta, efficiencyWeight);
@@ -528,11 +531,11 @@ struct HfTaskCorrelationLcHadrons {
528531
if (fillSign) {
529532
registry.fill(HIST("hCorrel2DVsPtSignSidebandLeft"), deltaPhi, deltaEta, ptLc, ptHadron, signPair, poolBin, efficiencyWeight);
530533
} else {
531-
registry.fill(HIST("hCorrel2DVsPtSidebandLeft"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, efficiencyWeight);
534+
registry.fill(HIST("hCorrel2DVsPtSidebandLeft"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, massLc, efficiencyWeight);
532535
}
533536
registry.fill(HIST("hDeltaEtaPtIntSidebandLeft"), deltaEta, efficiencyWeight);
534537
registry.fill(HIST("hDeltaPhiPtIntSidebandLeft"), deltaPhi, efficiencyWeight);
535-
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, efficiencyWeight);
538+
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, massLc, efficiencyWeight);
536539
registry.fill(HIST("hCorrel2DPtIntSidebands"), deltaPhi, deltaEta, efficiencyWeight);
537540
registry.fill(HIST("hDeltaEtaPtIntSidebands"), deltaEta, efficiencyWeight);
538541
registry.fill(HIST("hDeltaPhiPtIntSidebands"), deltaPhi, efficiencyWeight);
@@ -542,11 +545,11 @@ struct HfTaskCorrelationLcHadrons {
542545
if (fillSign) {
543546
registry.fill(HIST("hCorrel2DVsPtSignSidebandRight"), deltaPhi, deltaEta, ptLc, ptHadron, signPair, poolBin, efficiencyWeight);
544547
} else {
545-
registry.fill(HIST("hCorrel2DVsPtSidebandRight"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, efficiencyWeight);
548+
registry.fill(HIST("hCorrel2DVsPtSidebandRight"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, massLc, efficiencyWeight);
546549
}
547550
registry.fill(HIST("hDeltaEtaPtIntSidebandRight"), deltaEta, efficiencyWeight);
548551
registry.fill(HIST("hDeltaPhiPtIntSidebandRight"), deltaPhi, efficiencyWeight);
549-
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, efficiencyWeight);
552+
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, cent, massLc, efficiencyWeight);
550553
registry.fill(HIST("hCorrel2DPtIntSidebands"), deltaPhi, deltaEta, efficiencyWeight);
551554
registry.fill(HIST("hDeltaEtaPtIntSidebands"), deltaEta, efficiencyWeight);
552555
registry.fill(HIST("hDeltaPhiPtIntSidebands"), deltaPhi, efficiencyWeight);

0 commit comments

Comments
 (0)