Skip to content

Commit 7e2b060

Browse files
committed
Changes for Vit's comments
1 parent 34f76e8 commit 7e2b060

File tree

2 files changed

+29
-72
lines changed

2 files changed

+29
-72
lines changed

PWGHF/HFC/TableProducer/correlatorLcHadrons.cxx

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ struct HfCorrelatorLcHadronsSelection {
9090
Configurable<float> ptCandMin{"ptCandMin", 1., "min. cand. pT"};
9191
Configurable<float> centMin{"centMin", 0., "Minimum Centrality"};
9292
Configurable<float> centMax{"centMax", 100., "Maximum Centrality"};
93+
Configurable<bool> isMultiplicityDependent{"isMultiplicityDependent", false, "Flag for multiplicity dependent analyses"};
9394

9495
HfHelper hfHelper;
9596
SliceCache cache;
@@ -122,7 +123,10 @@ struct HfCorrelatorLcHadronsSelection {
122123
}
123124
}
124125

125-
float cent = collision.centFT0M();
126+
float cent = 0.;
127+
if (isMultiplicityDependent) {
128+
cent = collision.centFT0M();
129+
}
126130

127131
if (useSel8) {
128132
isSel8 = collision.sel8();
@@ -315,11 +319,7 @@ struct HfCorrelatorLcHadrons {
315319
registry.add("hCentFT0M", "Centrality FT0M; Centrality;entries", {HistType::kTH1D, {{100, 0., 100.}}});
316320
registry.add("hLcBin", "Lc selected in pool Bin;pool Bin;entries", {HistType::kTH1D, {{9, 0., 9.}}});
317321
registry.add("hTracksBin", "Tracks selected in pool Bin;pool Bin;entries", {HistType::kTH1D, {{9, 0., 9.}}});
318-
if (isMultiplicityDependent) {
319-
registry.add("hMassLcVsPtvsCent", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisCent}}});
320-
} else {
321-
registry.add("hMassLcVsPt", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH2F, {{axisMassLc}, {axisPtLc}}});
322-
}
322+
registry.add("hMassLcVsPtvsCent", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisCent}}});
323323
registry.add("hMassLcData", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{axisMassLc}}});
324324
registry.add("hLcPoolBin", "Lc candidates pool bin", {HistType::kTH1D, {axisPoolBin}});
325325
registry.add("hTracksPoolBin", "Particles associated pool bin", {HistType::kTH1D, {axisPoolBin}});
@@ -389,8 +389,10 @@ struct HfCorrelatorLcHadrons {
389389
int gCollisionId = collision.globalIndex();
390390
int64_t timeStamp = bc.timestamp();
391391

392-
float cent = collision.centFT0M();
393-
392+
float cent = 0.;
393+
if (isMultiplicityDependent) {
394+
cent = collision.centFT0M();
395+
}
394396
int poolBin = corrBinning.getBin(std::make_tuple(collision.posZ(), collision.multFT0M()));
395397
int nTracks = 0;
396398
if (collision.numContrib() > 1) {
@@ -431,11 +433,7 @@ struct HfCorrelatorLcHadrons {
431433
registry.fill(HIST("hLcBin"), poolBin);
432434

433435
if (candidate.isSelLcToPKPi() >= selectionFlagLc) {
434-
if (isMultiplicityDependent) {
435-
registry.fill(HIST("hMassLcVsPtvsCent"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
436-
} else {
437-
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), efficiencyWeightLc);
438-
}
436+
registry.fill(HIST("hMassLcVsPtvsCent"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
439437
registry.fill(HIST("hMassLcData"), hfHelper.invMassLcToPKPi(candidate), efficiencyWeightLc);
440438
registry.fill(HIST("hSelectionStatusLcToPKPi"), candidate.isSelLcToPKPi());
441439
for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) {
@@ -445,11 +443,7 @@ struct HfCorrelatorLcHadrons {
445443
entryLc(candidate.phi(), candidate.eta(), candidate.pt() * chargeLc, hfHelper.invMassLcToPKPi(candidate), poolBin, gCollisionId, timeStamp);
446444
}
447445
if (candidate.isSelLcToPiKP() >= selectionFlagLc) {
448-
if (isMultiplicityDependent) {
449-
registry.fill(HIST("hMassLcVsPtvsCent"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
450-
} else {
451-
registry.fill(HIST("hMassLcVsPt"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), efficiencyWeightLc);
452-
}
446+
registry.fill(HIST("hMassLcVsPtvsCent"), hfHelper.invMassLcToPKPi(candidate), candidate.pt(), cent, efficiencyWeightLc);
453447
registry.fill(HIST("hMassLcData"), hfHelper.invMassLcToPiKP(candidate), efficiencyWeightLc);
454448
registry.fill(HIST("hSelectionStatusLcToPiKP"), candidate.isSelLcToPiKP());
455449
for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) {

PWGHF/HFC/Tasks/taskCorrelationLcHadrons.cxx

Lines changed: 17 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -220,33 +220,19 @@ struct HfTaskCorrelationLcHadrons {
220220
registry.add("hDeltaEtaPtIntSidebands", stringLcHadron + stringSideband + stringDeltaEta + "entries", {HistType::kTH1D, {axisDeltaEta}});
221221
registry.add("hDeltaPhiPtIntSidebands", stringLcHadron + stringSideband + stringDeltaPhi + "entries", {HistType::kTH1D, {axisDeltaPhi}});
222222
registry.add("hCorrel2DPtIntSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + "entries", {HistType::kTH2F, {{axisDeltaPhi}, {axisDeltaEta}}});
223-
if (isMultiplicityDependent) {
224-
registry.add("hCorrel2DVsPtSidebandsWithCentrality", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
225-
} else {
226-
registry.add("hCorrel2DVsPtSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}}});
227-
}
223+
registry.add("hCorrel2DVsPtSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
228224
registry.add("hDeltaEtaPtIntSidebandLeft", stringLcHadron + "Left" + stringSideband + stringDeltaEta, {HistType::kTH1D, {axisDeltaEta}});
229225
registry.add("hDeltaPhiPtIntSidebandLeft", stringLcHadron + "Left" + stringSideband + stringDeltaPhi, {HistType::kTH1D, {axisDeltaPhi}});
230226
registry.add("hDeltaEtaPtIntSidebandRight", stringLcHadron + "Right" + stringSideband + stringDeltaEta, {HistType::kTH1D, {axisDeltaEta}});
231227
registry.add("hDeltaPhiPtIntSidebandRight", stringLcHadron + "Right" + stringSideband + stringDeltaPhi, {HistType::kTH1D, {axisDeltaPhi}});
232228

233229
if (!fillSign) {
234-
if (isMultiplicityDependent) {
235-
registry.add("hCorrel2DVsPtSidebandLeftWithCentrality", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
236-
registry.add("hCorrel2DVsPtSidebandRightWithCentrality", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
237-
registry.add("hCorrel2DVsPtSignalRegionWithCentrality", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
238-
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandLeftWithCentrality"))->Sumw2();
239-
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandRightWithCentrality"))->Sumw2();
240-
registry.get<THnSparse>(HIST("hCorrel2DVsPtSignalRegionWithCentrality"))->Sumw2();
241-
} else {
242-
registry.add("hCorrel2DVsPtSidebandLeft", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}}});
243-
registry.add("hCorrel2DVsPtSidebandRight", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}}});
244-
registry.add("hCorrel2DVsPtSignalRegion", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}}});
245-
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandLeft"))->Sumw2();
246-
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandRight"))->Sumw2();
247-
registry.get<THnSparse>(HIST("hCorrel2DVsPtSignalRegion"))->Sumw2();
248-
}
249-
230+
registry.add("hCorrel2DVsPtSidebandLeft", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
231+
registry.add("hCorrel2DVsPtSidebandRight", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
232+
registry.add("hCorrel2DVsPtSignalRegion", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
233+
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandLeft"))->Sumw2();
234+
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandRight"))->Sumw2();
235+
registry.get<THnSparse>(HIST("hCorrel2DVsPtSignalRegion"))->Sumw2();
250236
} else {
251237
registry.add("hCorrel2DVsPtSignSidebandLeft", stringLcHadron + "Left" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + stringSign + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisSignPair}, {axisPoolBin}}});
252238
registry.add("hCorrel2DVsPtSignSidebandRight", stringLcHadron + "Right" + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + stringSign + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtLc}, {axisPtHadron}, {axisSignPair}, {axisPoolBin}}});
@@ -260,11 +246,7 @@ struct HfTaskCorrelationLcHadrons {
260246
registry.add("hTransverse", "Transverse invmass; ptLc; correlationState;entries", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisCorrelationState}}});
261247
registry.add("hAway", "Away invmass; ptLc; correlationState;entries", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisCorrelationState}}});
262248

263-
if (isMultiplicityDependent) {
264-
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebandsWithCentrality"))->Sumw2();
265-
} else {
266-
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebands"))->Sumw2();
267-
}
249+
registry.get<THnSparse>(HIST("hCorrel2DVsPtSidebands"))->Sumw2();
268250

269251
if (fillSignAndMass) {
270252
registry.add("hCorrel2DVsPtSignMass", stringLcHadron + stringSignal + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + stringSignMass + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisMassLc}, {axisSignPair}, {axisPoolBin}}});
@@ -463,7 +445,10 @@ struct HfTaskCorrelationLcHadrons {
463445
for (const auto& pairEntry : pairEntries) {
464446
// define variables for widely used quantities
465447
float deltaPhi = pairEntry.deltaPhi();
466-
float centr = pairEntry.cent();
448+
float centr = 0.;
449+
if (isMultiplicityDependent) {
450+
centr = pairEntry.cent();
451+
}
467452
float deltaEta = pairEntry.deltaEta();
468453
double ptLc = std::abs(pairEntry.ptLc());
469454
double ptHadron = std::abs(pairEntry.ptHadron());
@@ -525,19 +510,13 @@ struct HfTaskCorrelationLcHadrons {
525510
if (fillSignAndMass) {
526511
registry.fill(HIST("hCorrel2DVsPtSignMass"), deltaPhi, deltaEta, ptLc, ptHadron, massLc, signPair, poolBin, efficiencyWeight);
527512
}
528-
529513
// check if correlation entry belongs to signal region, sidebands or is outside both, and fill correlation plots
530514
if (massLc > signalRegionInner->at(ptBinLc) && massLc < signalRegionOuter->at(ptBinLc)) {
531515
// in signal region
532516
if (fillSign) {
533517
registry.fill(HIST("hCorrel2DVsPtSignSignalRegion"), deltaPhi, deltaEta, ptLc, ptHadron, signPair, poolBin, efficiencyWeight);
534518
} else {
535-
536-
if (isMultiplicityDependent) {
537-
registry.fill(HIST("hCorrel2DVsPtSignalRegionWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
538-
} else {
539-
registry.fill(HIST("hCorrel2DVsPtSignalRegion"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
540-
}
519+
registry.fill(HIST("hCorrel2DVsPtSignalRegion"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
541520
}
542521
registry.fill(HIST("hCorrel2DPtIntSignalRegion"), deltaPhi, deltaEta, efficiencyWeight);
543522
registry.fill(HIST("hDeltaEtaPtIntSignalRegion"), deltaEta, efficiencyWeight);
@@ -548,19 +527,11 @@ struct HfTaskCorrelationLcHadrons {
548527
if (fillSign) {
549528
registry.fill(HIST("hCorrel2DVsPtSignSidebandLeft"), deltaPhi, deltaEta, ptLc, ptHadron, signPair, poolBin, efficiencyWeight);
550529
} else {
551-
if (isMultiplicityDependent) {
552-
registry.fill(HIST("hCorrel2DVsPtSidebandLeftWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
553-
} else {
554-
registry.fill(HIST("hCorrel2DVsPtSidebandLeft"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
555-
}
530+
registry.fill(HIST("hCorrel2DVsPtSidebandLeft"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
556531
}
557532
registry.fill(HIST("hDeltaEtaPtIntSidebandLeft"), deltaEta, efficiencyWeight);
558533
registry.fill(HIST("hDeltaPhiPtIntSidebandLeft"), deltaPhi, efficiencyWeight);
559-
if (isMultiplicityDependent) {
560-
registry.fill(HIST("hCorrel2DVsPtSidebandsWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
561-
} else {
562-
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
563-
}
534+
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
564535
registry.fill(HIST("hCorrel2DPtIntSidebands"), deltaPhi, deltaEta, efficiencyWeight);
565536
registry.fill(HIST("hDeltaEtaPtIntSidebands"), deltaEta, efficiencyWeight);
566537
registry.fill(HIST("hDeltaPhiPtIntSidebands"), deltaPhi, efficiencyWeight);
@@ -570,19 +541,11 @@ struct HfTaskCorrelationLcHadrons {
570541
if (fillSign) {
571542
registry.fill(HIST("hCorrel2DVsPtSignSidebandRight"), deltaPhi, deltaEta, ptLc, ptHadron, signPair, poolBin, efficiencyWeight);
572543
} else {
573-
if (isMultiplicityDependent) {
574-
registry.fill(HIST("hCorrel2DVsPtSidebandRightWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
575-
} else {
576-
registry.fill(HIST("hCorrel2DVsPtSidebandRight"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
577-
}
544+
registry.fill(HIST("hCorrel2DVsPtSidebandRight"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
578545
}
579546
registry.fill(HIST("hDeltaEtaPtIntSidebandRight"), deltaEta, efficiencyWeight);
580547
registry.fill(HIST("hDeltaPhiPtIntSidebandRight"), deltaPhi, efficiencyWeight);
581-
if (isMultiplicityDependent) {
582-
registry.fill(HIST("hCorrel2DVsPtSidebandsWithCentrality"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
583-
} else {
584-
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, efficiencyWeight);
585-
}
548+
registry.fill(HIST("hCorrel2DVsPtSidebands"), deltaPhi, deltaEta, ptLc, ptHadron, poolBin, centr, efficiencyWeight);
586549
registry.fill(HIST("hCorrel2DPtIntSidebands"), deltaPhi, deltaEta, efficiencyWeight);
587550
registry.fill(HIST("hDeltaEtaPtIntSidebands"), deltaEta, efficiencyWeight);
588551
registry.fill(HIST("hDeltaPhiPtIntSidebands"), deltaPhi, efficiencyWeight);

0 commit comments

Comments
 (0)