Skip to content

Commit 47af723

Browse files
authored
[PWGLF] Add delta phi info and improved mixed event weight (#13378)
1 parent 08b26f1 commit 47af723

File tree

1 file changed

+51
-29
lines changed

1 file changed

+51
-29
lines changed

PWGLF/Tasks/Strangeness/lambdaspincorrderived.cxx

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ struct lambdaspincorrderived {
108108
Configurable<float> massMix{"massMix", 0.0028, "Masscut on event mixing"};
109109

110110
ConfigurableAxis ax_dphi_h{"ax_dphi_h", {72, 0.0, 2.0 * TMath::Pi()}, "Δφ_h"};
111-
ConfigurableAxis ax_deta{"ax_deta", {32, -1.6, 1.6}, "Δη"};
111+
ConfigurableAxis ax_deta{"ax_deta", {40, -1.0, 1.0}, "Δη"};
112112
ConfigurableAxis ax_ptpair{"ax_ptpair", {100, 0.0, 10.0}, "p_{T,pair} (GeV/c)"};
113113

114114
// THnsparse bining
@@ -132,15 +132,15 @@ struct lambdaspincorrderived {
132132
histos.add("etaCent", "etaCent", HistType::kTH2D, {{32, -0.8, 0.8}, {8, 0.0, 80.0}}, true);
133133

134134
// --- 3D SE/ME pair-space maps per category (LL, LAL, ALL, ALAL)
135-
histos.add("SE_LL", "SE pairs LL;Δφ_h;Δη;p_{T,pair}", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
136-
histos.add("SE_LAL", "SE pairs LAL;Δφ_h;Δη;p_{T,pair}", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
137-
histos.add("SE_ALL", "SE pairs ALL;Δφ_h;Δη;p_{T,pair}", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
138-
histos.add("SE_ALAL", "SE pairs ALAL;Δφ_h;Δη;p_{T,pair}", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
135+
histos.add("SE_LL", "SE pairs", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
136+
histos.add("SE_LAL", "SE pairs", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
137+
histos.add("SE_ALL", "SE pairs", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
138+
histos.add("SE_ALAL", "SE pairs", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
139139

140-
histos.add("ME_LL", "ME pairs LL;Δφ_h;Δη;p_{T,pair}", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
141-
histos.add("ME_LAL", "ME pairs LAL;Δφ_h;Δη;p_{T,pair}", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
142-
histos.add("ME_ALL", "ME pairs ALL;Δφ_h;Δη;p_{T,pair}", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
143-
histos.add("ME_ALAL", "ME pairs ALAL;Δφ_h;Δη;p_{T,pair}", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
140+
histos.add("ME_LL", "ME pairs", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
141+
histos.add("ME_LAL", "ME pairs", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
142+
histos.add("ME_ALL", "ME pairs", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
143+
histos.add("ME_ALAL", "ME pairs", HistType::kTH3D, {ax_dphi_h, ax_deta, ax_ptpair}, true);
144144

145145
histos.add("hSparseLambdaLambda", "hSparseLambdaLambda", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, configThnAxisR}, true);
146146
histos.add("hSparseLambdaAntiLambda", "hSparseLambdaAntiLambda", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, configThnAxisR}, true);
@@ -162,6 +162,16 @@ struct lambdaspincorrderived {
162162
histos.add("hSparseRapAntiLambdaLambdaMixed", "hSparseRapAntiLambdaLambdaMixed", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, configThnAxisRapidity}, true);
163163
histos.add("hSparseRapAntiLambdaAntiLambdaMixed", "hSparseRapAntiLambdaAntiLambdaMixed", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, configThnAxisRapidity}, true);
164164

165+
histos.add("hSparsePhiLambdaLambda", "hSparsePhiLambdaLambda", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, ax_dphi_h}, true);
166+
histos.add("hSparsePhiLambdaAntiLambda", "hSparsePhiLambdaAntiLambda", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, ax_dphi_h}, true);
167+
histos.add("hSparsePhiAntiLambdaLambda", "hSparsePhiAntiLambdLambda", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, ax_dphi_h}, true);
168+
histos.add("hSparsePhiAntiLambdaAntiLambda", "hSparsePhiAntiLambdaAntiLambda", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, ax_dphi_h}, true);
169+
170+
histos.add("hSparsePhiLambdaLambdaMixed", "hSparsePhiLambdaLambdaMixed", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, ax_dphi_h}, true);
171+
histos.add("hSparsePhiLambdaAntiLambdaMixed", "hSparsePhiLambdaAntiLambdaMixed", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, ax_dphi_h}, true);
172+
histos.add("hSparsePhiAntiLambdaLambdaMixed", "hSparsePhiAntiLambdaLambdaMixed", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, ax_dphi_h}, true);
173+
histos.add("hSparsePhiAntiLambdaAntiLambdaMixed", "hSparsePhiAntiLambdaAntiLambdaMixed", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, ax_dphi_h}, true);
174+
165175
histos.add("hSparsePairMassLambdaLambda", "hSparsePairMassLambdaLambda", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, configThnAxisPairMass}, true);
166176
histos.add("hSparsePairMassLambdaAntiLambda", "hSparsePairMassLambdaAntiLambda", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, configThnAxisPairMass}, true);
167177
histos.add("hSparsePairMassAntiLambdaLambda", "hSparsePairMassAntiLambdLambda", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisInvMass, configThnAxisPol, configThnAxisPairMass}, true);
@@ -319,26 +329,30 @@ struct lambdaspincorrderived {
319329
cosThetaDiff = cosDeltaTheta_hel;
320330
}
321331

322-
// --- helper to compute pair-space variables
323-
auto phi1h = RecoDecay::constrainAngle(particle1Dummy.Phi(), 0.0F, harmonic);
324-
auto phi2h = RecoDecay::constrainAngle(particle2Dummy.Phi(), 0.0F, harmonic);
325-
double dphi_h = std::abs(phi1h - phi2h);
326-
double deta_pair = particle1Dummy.Eta() - particle2Dummy.Eta();
327-
double pt_pair = (particle1Dummy + particle2Dummy).Pt();
328-
double deltaRap = std::abs(particle1Dummy.Rapidity() - particle2Dummy.Rapidity());
329-
double deltaR = TMath::Sqrt(deta_pair * deta_pair + dphi_h * dphi_h);
332+
double pt1 = particle1.Pt();
333+
double dphi1 = RecoDecay::constrainAngle(particle1.Phi(), 0.0F, harmonic);
334+
double deta1 = particle1.Eta();
335+
336+
double dphi2 = RecoDecay::constrainAngle(particle2.Phi(), 0.0F, harmonic);
337+
double deta2 = particle2.Eta();
338+
339+
double deta_pair = std::abs(deta1 - deta2);
340+
double dphi_pair = std::abs(dphi1 - dphi2);
341+
342+
double deltaR = TMath::Sqrt(deta_pair * deta_pair + dphi_pair * dphi_pair);
343+
double deltaRap = std::abs(particle1.Rapidity() - particle2.Rapidity());
330344

331345
double epsWeight = 1.0;
332346

333347
if (useweight && datatype == 1) {
334348
if (tag1 == 0 && tag2 == 0) {
335-
epsWeight = hweight1->GetBinContent(hweight1->FindBin(dphi_h, deta_pair, pt_pair));
349+
epsWeight = hweight1->GetBinContent(hweight1->FindBin(dphi1, deta1, pt1));
336350
} else if (tag1 == 0 && tag2 == 1) {
337-
epsWeight = hweight2->GetBinContent(hweight2->FindBin(dphi_h, deta_pair, pt_pair));
351+
epsWeight = hweight2->GetBinContent(hweight2->FindBin(dphi1, deta1, pt1));
338352
} else if (tag1 == 1 && tag2 == 0) {
339-
epsWeight = hweight3->GetBinContent(hweight3->FindBin(dphi_h, deta_pair, pt_pair));
353+
epsWeight = hweight3->GetBinContent(hweight3->FindBin(dphi1, deta1, pt1));
340354
} else if (tag1 == 1 && tag2 == 1) {
341-
epsWeight = hweight4->GetBinContent(hweight4->FindBin(dphi_h, deta_pair, pt_pair));
355+
epsWeight = hweight4->GetBinContent(hweight4->FindBin(dphi1, deta1, pt1));
342356
}
343357
}
344358

@@ -348,23 +362,27 @@ struct lambdaspincorrderived {
348362
if (tag1 == 0 && tag2 == 0) {
349363
histos.fill(HIST("hSparseLambdaLambda"), particle1.M(), particle2.M(), cosThetaDiff, deltaR, mixpairweight);
350364
histos.fill(HIST("hSparseRapLambdaLambda"), particle1.M(), particle2.M(), cosThetaDiff, deltaRap, mixpairweight);
365+
histos.fill(HIST("hSparsePhiLambdaLambda"), particle1.M(), particle2.M(), cosThetaDiff, dphi_pair, mixpairweight);
351366
histos.fill(HIST("hSparsePairMassLambdaLambda"), particle1.M(), particle2.M(), cosThetaDiff, pairDummy.M(), mixpairweight);
352-
histos.fill(HIST("SE_LL"), dphi_h, deta_pair, pt_pair);
367+
histos.fill(HIST("SE_LL"), dphi1, deta1, pt1, mixpairweight);
353368
} else if (tag1 == 0 && tag2 == 1) {
354369
histos.fill(HIST("hSparseLambdaAntiLambda"), particle1.M(), particle2.M(), cosThetaDiff, deltaR, mixpairweight);
355370
histos.fill(HIST("hSparseRapLambdaAntiLambda"), particle1.M(), particle2.M(), cosThetaDiff, deltaRap, mixpairweight);
371+
histos.fill(HIST("hSparsePhiLambdaAntiLambda"), particle1.M(), particle2.M(), cosThetaDiff, dphi_pair, mixpairweight);
356372
histos.fill(HIST("hSparsePairMassLambdaAntiLambda"), particle1.M(), particle2.M(), cosThetaDiff, pairDummy.M(), mixpairweight);
357-
histos.fill(HIST("SE_LAL"), dphi_h, deta_pair, pt_pair);
373+
histos.fill(HIST("SE_LAL"), dphi1, deta1, pt1, mixpairweight);
358374
} else if (tag1 == 1 && tag2 == 0) {
359375
histos.fill(HIST("hSparseAntiLambdaLambda"), particle1.M(), particle2.M(), cosThetaDiff, deltaR, mixpairweight);
360376
histos.fill(HIST("hSparseRapAntiLambdaLambda"), particle1.M(), particle2.M(), cosThetaDiff, deltaRap, mixpairweight);
377+
histos.fill(HIST("hSparsePhiAntiLambdaLambda"), particle1.M(), particle2.M(), cosThetaDiff, dphi_pair, mixpairweight);
361378
histos.fill(HIST("hSparsePairMassAntiLambdaLambda"), particle1.M(), particle2.M(), cosThetaDiff, pairDummy.M(), mixpairweight);
362-
histos.fill(HIST("SE_ALL"), dphi_h, deta_pair, pt_pair);
379+
histos.fill(HIST("SE_ALL"), dphi1, deta1, pt1, mixpairweight);
363380
} else if (tag1 == 1 && tag2 == 1) {
364381
histos.fill(HIST("hSparseAntiLambdaAntiLambda"), particle1.M(), particle2.M(), cosThetaDiff, deltaR, mixpairweight);
365382
histos.fill(HIST("hSparseRapAntiLambdaAntiLambda"), particle1.M(), particle2.M(), cosThetaDiff, deltaRap, mixpairweight);
383+
histos.fill(HIST("hSparsePhiAntiLambdaAntiLambda"), particle1.M(), particle2.M(), cosThetaDiff, dphi_pair, mixpairweight);
366384
histos.fill(HIST("hSparsePairMassAntiLambdaAntiLambda"), particle1.M(), particle2.M(), cosThetaDiff, pairDummy.M(), mixpairweight);
367-
histos.fill(HIST("SE_ALAL"), dphi_h, deta_pair, pt_pair);
385+
histos.fill(HIST("SE_ALAL"), dphi1, deta1, pt1, mixpairweight);
368386
}
369387
} else if (datatype == 1) {
370388
double weight = mixpairweight;
@@ -376,26 +394,30 @@ struct lambdaspincorrderived {
376394
histos.fill(HIST("hPtYMix"), particle1.Pt(), particle1.Rapidity(), weight);
377395
histos.fill(HIST("hSparseLambdaLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, deltaR, weight);
378396
histos.fill(HIST("hSparseRapLambdaLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, deltaRap, weight);
397+
histos.fill(HIST("hSparsePhiLambdaLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, dphi_pair, weight);
379398
histos.fill(HIST("hSparsePairMassLambdaLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, pairDummy.M(), weight);
380-
histos.fill(HIST("ME_LL"), dphi_h, deta_pair, pt_pair);
399+
histos.fill(HIST("ME_LL"), dphi1, deta1, pt1, mixpairweight);
381400
} else if (tag1 == 0 && tag2 == 1) {
382401
histos.fill(HIST("hPtYMix"), particle1.Pt(), particle1.Rapidity(), weight);
383402
histos.fill(HIST("hSparseLambdaAntiLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, deltaR, weight);
384403
histos.fill(HIST("hSparseRapLambdaAntiLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, deltaRap, weight);
404+
histos.fill(HIST("hSparsePhiLambdaAntiLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, dphi_pair, weight);
385405
histos.fill(HIST("hSparsePairMassLambdaAntiLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, pairDummy.M(), weight);
386-
histos.fill(HIST("ME_LAL"), dphi_h, deta_pair, pt_pair);
406+
histos.fill(HIST("ME_LAL"), dphi1, deta1, pt1, mixpairweight);
387407
} else if (tag1 == 1 && tag2 == 0) {
388408
histos.fill(HIST("hPtYMix"), particle1.Pt(), particle1.Rapidity(), weight);
389409
histos.fill(HIST("hSparseAntiLambdaLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, deltaR, weight);
390410
histos.fill(HIST("hSparseRapAntiLambdaLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, deltaRap, weight);
411+
histos.fill(HIST("hSparsePhiAntiLambdaLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, dphi_pair, weight);
391412
histos.fill(HIST("hSparsePairMassAntiLambdaLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, pairDummy.M(), weight);
392-
histos.fill(HIST("ME_ALL"), dphi_h, deta_pair, pt_pair);
413+
histos.fill(HIST("ME_ALL"), dphi1, deta1, pt1, mixpairweight);
393414
} else if (tag1 == 1 && tag2 == 1) {
394415
histos.fill(HIST("hPtYMix"), particle1.Pt(), particle1.Rapidity(), weight);
395416
histos.fill(HIST("hSparseAntiLambdaAntiLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, deltaR, weight);
396417
histos.fill(HIST("hSparseRapAntiLambdaAntiLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, deltaRap, weight);
418+
histos.fill(HIST("hSparsePhiAntiLambdaAntiLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, dphi_pair, weight);
397419
histos.fill(HIST("hSparsePairMassAntiLambdaAntiLambdaMixed"), particle1.M(), particle2.M(), cosThetaDiff, pairDummy.M(), weight);
398-
histos.fill(HIST("ME_ALAL"), dphi_h, deta_pair, pt_pair);
420+
histos.fill(HIST("ME_ALAL"), dphi1, deta1, pt1, mixpairweight);
399421
}
400422
}
401423
}

0 commit comments

Comments
 (0)