Skip to content

Commit 0d4f3e1

Browse files
author
fcolamar
committed
ALICE 3: updates to decay finder for integration with DDbar correlations
1 parent f6732b5 commit 0d4f3e1

File tree

1 file changed

+70
-25
lines changed

1 file changed

+70
-25
lines changed

ALICE3/TableProducer/alice3-decayfinder.cxx

Lines changed: 70 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ struct alice3decayFinder {
8585
Configurable<float> kaFromD_dcaXYconstant{"kaFromD_dcaXYconstant", -1.0f, "[0] in |DCAxy| > [0]+[1]/pT"};
8686
Configurable<float> kaFromD_dcaXYpTdep{"kaFromD_dcaXYpTdep", 0.0, "[1] in |DCAxy| > [0]+[1]/pT"};
8787

88-
Configurable<float> DCosPA{"DCosPA", 0.99, " Cos of pointing angle: pt < 3 GeV"};
89-
Configurable<float> DCosPAHighPt{"DCosPAHighPt", 0.995, " Cos of pointing angle: 3 GeV < pt"};
90-
Configurable<float> DCosPAxy{"DCosPAxy", 0.99, " Cos of pointing angle xy: pt < 3 GeV"};
91-
Configurable<float> DCosPAxyHighPt{"DCosPAxyHighPt", 0.995, " Cos of pointing angle xy: 3 GeV < pt"};
92-
Configurable<float> DCosThetaStarLowPt{"DCosThetaStarLowPt", 0.8, "Cos theta; pt < 9"};
93-
Configurable<float> DCosThetaStarHighPt{"DCosThetaStarHighPt", 0.9, "Cos theta; 9 < pt < 16"};
94-
Configurable<float> DCosThetaStarVHighPt{"DCosThetaStarVHighPt", 1.0, "Cos theta; 16 < pt"};
88+
Configurable<float> DCosPA{"DCosPA", 0.99, " Cos of pointing angle: low pt"};
89+
Configurable<float> DCosPAHighPt{"DCosPAHighPt", 0.995, " Cos of pointing angle: high pt"};
90+
Configurable<float> DCosPAxy{"DCosPAxy", 0.99, " Cos of pointing angle xy: low pt"};
91+
Configurable<float> DCosPAxyHighPt{"DCosPAxyHighPt", 0.995, " Cos of pointing angle xy: DCosPAxyHighPt pt"};
92+
Configurable<float> DCosThetaStarLowPt{"DCosThetaStarLowPt", 0.8, "Cos theta; low pt"};
93+
Configurable<float> DCosThetaStarHighPt{"DCosThetaStarHighPt", 0.9, "Cos theta; high pt"};
94+
Configurable<float> DCosThetaStarVHighPt{"DCosThetaStarVHighPt", 1.0, "Cos theta; very high pt"};
9595
Configurable<float> DDauDecayLength{"DDauDecayLength", 3, "|Normalized dau decay length| > [0]"};
9696

9797
Configurable<float> piFromLc_dcaXYconstant{"piFromLc_dcaXYconstant", -1.0f, "[0] in |DCAxy| > [0]+[1]/pT"};
@@ -101,7 +101,11 @@ struct alice3decayFinder {
101101
Configurable<float> prFromLc_dcaXYconstant{"prFromLc_dcaXYconstant", -1.0f, "[0] in |DCAxy| > [0]+[1]/pT"};
102102
Configurable<float> prFromLc_dcaXYpTdep{"prFromLc_dcaXYpTdep", 0.0, "[1] in |DCAxy| > [0]+[1]/pT"};
103103

104+
Configurable<float> lowPtDLimit{"lowPtDLimit", 3.5, "Upper boundary of low pT D range, for topological selection (GeV/c)"};
105+
Configurable<float> highPtDLimit{"highPtDLimit", 16, "Upper boundary of high pT D range, for topological selection (GeV/c)"};
106+
104107
ConfigurableAxis axisEta{"axisEta", {8, -4.0f, +4.0f}, "#eta"};
108+
ConfigurableAxis axisY{"axisY", {12, -6.0f, +6.0f}, "y"};
105109
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "pt axis for QA histograms"};
106110
ConfigurableAxis axisDCA{"axisDCA", {200, -100, 100}, "DCA (#mum)"};
107111
ConfigurableAxis axisDCADaughters{"axisDCADaughters", {200, 0, 100}, "DCA (#mum)"};
@@ -343,11 +347,26 @@ struct alice3decayFinder {
343347
if (doprocessFindDmesons) {
344348
histos.add("h2dGenD", "h2dGenD", kTH2F, {axisPt, axisEta});
345349
histos.add("h2dGenDbar", "h2dGenDbar", kTH2F, {axisPt, axisEta});
346-
histos.add("h3dRecD", "h2dRecD", kTH3F, {axisPt, axisEta, axisDMass});
347-
histos.add("h3dRecDbar", "h2dRecDbar", kTH3F, {axisPt, axisEta, axisDMass});
350+
histos.add("h3dRecD", "h3dRecD", kTH3F, {axisPt, axisEta, axisDMass});
351+
histos.add("h3dRecDSig", "h3dRecDSig", kTH3F, {axisPt, axisEta, axisDMass});
352+
histos.add("h3dRecDRefl", "h3dRecDRefl", kTH3F, {axisPt, axisEta, axisDMass});
353+
histos.add("h3dRecDBkg", "h3dRecDBkg", kTH3F, {axisPt, axisEta, axisDMass});
354+
histos.add("h3dRecDbar", "h3dRecDbar", kTH3F, {axisPt, axisEta, axisDMass});
355+
histos.add("h3dRecDbarSig", "h3dRecDbarSig", kTH3F, {axisPt, axisEta, axisDMass});
356+
histos.add("h3dRecDbarRefl", "h3dRecDbarRefl", kTH3F, {axisPt, axisEta, axisDMass});
357+
histos.add("h3dRecDbarBkg", "h3dRecDbarBkg", kTH3F, {axisPt, axisEta, axisDMass});
358+
359+
histos.add("hDGenForEfficiency", "hDGenForEfficiency", kTH2F, {axisPt, axisY}); //2D vs pT, Y, filling generated D0 and D0bar
360+
histos.add("hDRecForEfficiency", "hDRecForEfficiency", kTH2F, {axisPt, axisY}); //2D vs pT, Y, filling reconstructed D0 and D0bar with correct MC matching
348361

349362
histos.add("hMassD", "hMassD", kTH1F, {axisDMass});
363+
histos.add("hMassDSig", "hMassDSig", kTH1F, {axisDMass});
364+
histos.add("hMassDRefl", "hMassDRefl", kTH1F, {axisDMass});
365+
histos.add("hMassDBkg", "hMassDBkg", kTH1F, {axisDMass});
350366
histos.add("hMassDbar", "hMassDbar", kTH1F, {axisDMass});
367+
histos.add("hMassDbarSig", "hMassDbarSig", kTH1F, {axisDMass});
368+
histos.add("hMassDbarRefl", "hMassDbarRefl", kTH1F, {axisDMass});
369+
histos.add("hMassDbarBkg", "hMassDbarBkg", kTH1F, {axisDMass});
351370

352371
histos.add("hDCosPA", "hDCosPA", kTH1F, {{200, 0, 1}});
353372
histos.add("hDCosPAxy", "hDCosPAxy", kTH1F, {{200, 0, 1}});
@@ -390,10 +409,14 @@ struct alice3decayFinder {
390409
{
391410
// no grouping for MC particles -> as intended
392411
if (doprocessFindDmesons) {
393-
for (auto const& mcParticle : trueD)
412+
for (auto const& mcParticle : trueD) {
394413
histos.fill(HIST("h2dGenD"), mcParticle.pt(), mcParticle.eta());
395-
for (auto const& mcParticle : trueDbar)
414+
histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); //in common for D and Dbar
415+
}
416+
for (auto const& mcParticle : trueDbar) {
396417
histos.fill(HIST("h2dGenDbar"), mcParticle.pt(), mcParticle.eta());
418+
histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); //in common for D and Dbar
419+
}
397420
}
398421
if (doprocessFindLcBaryons) {
399422
for (auto const& mcParticle : trueLc)
@@ -445,21 +468,21 @@ struct alice3decayFinder {
445468
if (dmeson.dcaDau > dcaDaughtersSelection)
446469
continue;
447470

448-
if (dmeson.pt <= 3 && dmeson.cosPA < DCosPA)
471+
if (dmeson.pt <= lowPtDLimit && dmeson.cosPA < DCosPA)
449472
continue;
450-
else if (dmeson.pt > 3 && dmeson.cosPA < DCosPAHighPt)
473+
else if (dmeson.pt > lowPtDLimit && dmeson.cosPA < DCosPAHighPt)
451474
continue;
452475

453-
if (dmeson.pt <= 3 && dmeson.cosPAxy < DCosPAxy)
476+
if (dmeson.pt <= lowPtDLimit && dmeson.cosPAxy < DCosPAxy)
454477
continue;
455-
else if (dmeson.pt > 3 && dmeson.cosPAxy < DCosPAxyHighPt)
478+
else if (dmeson.pt > lowPtDLimit && dmeson.cosPAxy < DCosPAxyHighPt)
456479
continue;
457480

458-
if (dmeson.pt <= 9 && std::fabs(dmeson.cosThetaStar) > DCosThetaStarLowPt)
481+
if (dmeson.pt <= lowPtDLimit && std::fabs(dmeson.cosThetaStar) > DCosThetaStarLowPt)
459482
continue;
460-
else if (dmeson.pt <= 16 && std::fabs(dmeson.cosThetaStar) > DCosThetaStarHighPt)
483+
else if (dmeson.pt <= highPtDLimit && std::fabs(dmeson.cosThetaStar) > DCosThetaStarHighPt)
461484
continue;
462-
else if (dmeson.pt > 16 && std::fabs(dmeson.cosThetaStar) > DCosThetaStarVHighPt)
485+
else if (dmeson.pt > highPtDLimit && std::fabs(dmeson.cosThetaStar) > DCosThetaStarVHighPt)
463486
continue;
464487

465488
if (dmeson.normalizedDecayLength > DDauDecayLength)
@@ -468,6 +491,17 @@ struct alice3decayFinder {
468491
histos.fill(HIST("hDCADDaughters"), dmeson.dcaDau * 1e+4);
469492
histos.fill(HIST("hMassD"), dmeson.mass);
470493
histos.fill(HIST("h3dRecD"), dmeson.pt, dmeson.eta, dmeson.mass);
494+
if (dmeson.mcTruth == 1) { //true D0 meson, reco as D0 (= correct matching)
495+
histos.fill(HIST("h3dRecDSig"), dmeson.pt, dmeson.eta, dmeson.mass);
496+
histos.fill(HIST("hMassDSig"), dmeson.mass);
497+
histos.fill(HIST("hDRecForEfficiency"), dmeson.pt, dmeson.y); //for efficiency
498+
} else if (dmeson.mcTruth == 2) { //true D0bar meson, reco as D0 (= reflection)
499+
histos.fill(HIST("hMassDRefl"), dmeson.mass);
500+
histos.fill(HIST("h3dRecDRefl"), dmeson.pt, dmeson.eta, dmeson.mass);
501+
} else { //background, reco as D0
502+
histos.fill(HIST("hMassDBkg"), dmeson.mass);
503+
histos.fill(HIST("h3dRecDBkg"), dmeson.pt, dmeson.eta, dmeson.mass);
504+
}
471505

472506
// store D0 in output table
473507
candidateD0meson(collision.globalIndex(),
@@ -505,21 +539,21 @@ struct alice3decayFinder {
505539
if (dmeson.dcaDau > dcaDaughtersSelection)
506540
continue;
507541

508-
if (dmeson.pt <= 3 && dmeson.cosPA < DCosPA)
542+
if (dmeson.pt <= lowPtDLimit && dmeson.cosPA < DCosPA)
509543
continue;
510-
else if (dmeson.pt > 3 && dmeson.cosPA < DCosPAHighPt)
544+
else if (dmeson.pt > lowPtDLimit && dmeson.cosPA < DCosPAHighPt)
511545
continue;
512546

513-
if (dmeson.pt <= 3 && dmeson.cosPAxy < DCosPAxy)
547+
if (dmeson.pt <= lowPtDLimit && dmeson.cosPAxy < DCosPAxy)
514548
continue;
515-
else if (dmeson.pt > 3 && dmeson.cosPAxy < DCosPAxyHighPt)
549+
else if (dmeson.pt > lowPtDLimit && dmeson.cosPAxy < DCosPAxyHighPt)
516550
continue;
517551

518-
if (dmeson.pt <= 9 && std::fabs(dmeson.cosThetaStar) > DCosThetaStarLowPt)
552+
if (dmeson.pt <= highPtDLimit && std::fabs(dmeson.cosThetaStar) > DCosThetaStarLowPt)
519553
continue;
520-
else if (dmeson.pt <= 16 && std::fabs(dmeson.cosThetaStar) > DCosThetaStarHighPt)
554+
else if (dmeson.pt <= highPtDLimit && std::fabs(dmeson.cosThetaStar) > DCosThetaStarHighPt)
521555
continue;
522-
else if (dmeson.pt > 16 && std::fabs(dmeson.cosThetaStar) > DCosThetaStarVHighPt)
556+
else if (dmeson.pt > highPtDLimit && std::fabs(dmeson.cosThetaStar) > DCosThetaStarVHighPt)
523557
continue;
524558

525559
if (dmeson.normalizedDecayLength > DDauDecayLength)
@@ -528,6 +562,17 @@ struct alice3decayFinder {
528562
histos.fill(HIST("hDCADbarDaughters"), dmeson.dcaDau * 1e+4);
529563
histos.fill(HIST("hMassDbar"), dmeson.mass);
530564
histos.fill(HIST("h3dRecDbar"), dmeson.pt, dmeson.eta, dmeson.mass);
565+
if (dmeson.mcTruth == 2) { //true D0bar meson, reco as D0bar (= correct matching)
566+
histos.fill(HIST("h3dRecDbarSig"), dmeson.pt, dmeson.eta, dmeson.mass);
567+
histos.fill(HIST("hMassDbarSig"), dmeson.mass);
568+
histos.fill(HIST("hDRecForEfficiency"), dmeson.pt, dmeson.y); //for efficiency
569+
} else if (dmeson.mcTruth == 1) { //true D0 meson, reco as D0bar (= reflection)
570+
histos.fill(HIST("hMassDbarRefl"), dmeson.mass);
571+
histos.fill(HIST("h3dRecDbarRefl"), dmeson.pt, dmeson.eta, dmeson.mass);
572+
} else { //background, reco as D0
573+
histos.fill(HIST("hMassDbarBkg"), dmeson.mass);
574+
histos.fill(HIST("h3dRecDbarBkg"), dmeson.pt, dmeson.eta, dmeson.mass);
575+
}
531576

532577
// store D0bar in output table
533578
candidateD0meson(collision.globalIndex(),

0 commit comments

Comments
 (0)