Skip to content

Commit fbf53ed

Browse files
authored
[PWGLF] nuclei-proton correlation, add de spectrum (#10613)
1 parent cd67cfa commit fbf53ed

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,12 @@ struct hadronnucleicorrelation {
193193

194194
AxisSpec ptBinnedAxis = {pTBins, "#it{p}_{T} of #bar{p} (GeV/c)"};
195195
AxisSpec etaAxis = {100, -1., 1., "#eta"};
196-
AxisSpec phiAxis = {157, 0., 2 * TMath::Pi(), "#phi (rad)"};
196+
AxisSpec phiAxis = {157, 0., 2 * o2::constants::math::PI, "#phi (rad)"};
197197
AxisSpec pTAxis = {200, -10.f, 10.f, "p_{T} GeV/c"};
198198
AxisSpec pTAxis_small = {100, -5.f, 5.f, "p_{T} GeV/c"};
199199

200200
AxisSpec DeltaEtaAxis = {100, -1.5, 1.5, "#Delta#eta"};
201-
AxisSpec DeltaPhiAxis = {60, -TMath::Pi() / 2, 1.5 * TMath::Pi(), "#Delta#phi (rad)"};
201+
AxisSpec DeltaPhiAxis = {60, -o2::constants::math::PI / 2, 1.5 * o2::constants::math::PI, "#Delta#phi (rad)"};
202202

203203
registry.add("hNEvents", "hNEvents", {HistType::kTH1D, {{5, 0.f, 5.f}}});
204204
registry.get<TH1>(HIST("hNEvents"))->GetXaxis()->SetBinLabel(1, "Selected");
@@ -329,12 +329,12 @@ struct hadronnucleicorrelation {
329329
if (doMCQA) {
330330
registry.add("hResEta_Proton", "; #eta(gen); #eta(reco) - #eta(gen) ", {HistType::kTH2F, {{100, -1.f, 1.f, "#eta(gen)"}, {200, -0.5f, 0.5f, "#eta(reco) - #eta(gen) "}}});
331331
registry.add("hResEta_Deuteron", "; #eta(gen); #eta(reco) - #eta(gen) ", {HistType::kTH2F, {{100, -1.f, 1.f, "#eta(gen)"}, {200, -0.5f, 0.5f, "#eta(reco) - #eta(gen) "}}});
332-
registry.add("hResPhi_Proton", "; #phi(gen); #phi(reco) - #phi(gen)", {HistType::kTH2F, {{100, 0.f, 2 * TMath::Pi(), "#phi(gen)"}, {200, -0.5f, 0.5f, "#phi(reco) - #phi(gen)"}}});
333-
registry.add("hResPhi_Deuteron", "; #phi(gen); #phi(reco) - #phi(gen)", {HistType::kTH2F, {{100, 0.f, 2 * TMath::Pi(), "#phi(gen)"}, {200, -0.5f, 0.5f, "#phi(reco) - #phi(gen)"}}});
332+
registry.add("hResPhi_Proton", "; #phi(gen); #phi(reco) - #phi(gen)", {HistType::kTH2F, {{100, 0.f, 2 * o2::constants::math::PI, "#phi(gen)"}, {200, -0.5f, 0.5f, "#phi(reco) - #phi(gen)"}}});
333+
registry.add("hResPhi_Deuteron", "; #phi(gen); #phi(reco) - #phi(gen)", {HistType::kTH2F, {{100, 0.f, 2 * o2::constants::math::PI, "#phi(gen)"}, {200, -0.5f, 0.5f, "#phi(reco) - #phi(gen)"}}});
334334
registry.add("hResEta_AntiProton", "; #eta(gen); #eta(reco) - #eta(gen) ", {HistType::kTH2F, {{100, -1.f, 1.f, "#eta(gen)"}, {200, -0.5f, 0.5f, "#eta(reco) - #eta(gen) "}}});
335335
registry.add("hResEta_AntiDeuteron", "; #eta(gen); #eta(reco) - #eta(gen) ", {HistType::kTH2F, {{100, -1.f, 1.f, "#eta(gen)"}, {200, -0.5f, 0.5f, "#eta(reco) - #eta(gen) "}}});
336-
registry.add("hResPhi_AntiProton", "; #phi(gen); #phi(reco) - #phi(gen)", {HistType::kTH2F, {{100, 0.f, 2 * TMath::Pi(), "#phi(gen)"}, {200, -0.5f, 0.5f, "#phi(reco) - #phi(gen)"}}});
337-
registry.add("hResPhi_AntiDeuteron", "; #phi(gen); #phi(reco) - #phi(gen)", {HistType::kTH2F, {{100, 0.f, 2 * TMath::Pi(), "#phi(gen)"}, {200, -0.5f, 0.5f, "#phi(reco) - #phi(gen)"}}});
336+
registry.add("hResPhi_AntiProton", "; #phi(gen); #phi(reco) - #phi(gen)", {HistType::kTH2F, {{100, 0.f, 2 * o2::constants::math::PI, "#phi(gen)"}, {200, -0.5f, 0.5f, "#phi(reco) - #phi(gen)"}}});
337+
registry.add("hResPhi_AntiDeuteron", "; #phi(gen); #phi(reco) - #phi(gen)", {HistType::kTH2F, {{100, 0.f, 2 * o2::constants::math::PI, "#phi(gen)"}, {200, -0.5f, 0.5f, "#phi(reco) - #phi(gen)"}}});
338338

339339
registry.add("hNumeratorPurity_Proton_TPC", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}});
340340
registry.add("hNumeratorPurity_Deuteron_TPC", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}});
@@ -385,6 +385,9 @@ struct hadronnucleicorrelation {
385385
registry.get<TH1>(HIST("Generated/hQADeuterons"))->GetXaxis()->SetBinLabel(1, "All");
386386
registry.get<TH1>(HIST("Generated/hQADeuterons"))->GetXaxis()->SetBinLabel(2, "PhysicalPrimary");
387387
registry.get<TH1>(HIST("Generated/hQADeuterons"))->GetXaxis()->SetBinLabel(3, "|#eta|<0.8");
388+
389+
registry.add("Generated/hDeuteronsVsPt", "hDeuteronsVsPt; p_{T} (GeV/c);", {HistType::kTH1D, {{100, 0.f, 10.f}}});
390+
registry.add("Generated/hAntiDeuteronsVsPt", "hAntiDeuteronsVsPt; p_{T} (GeV/c);", {HistType::kTH1D, {{100, 0.f, 10.f}}});
388391
}
389392
}
390393

@@ -509,9 +512,9 @@ struct hadronnucleicorrelation {
509512
{
510513
bool passcut = true;
511514
// pt-dependent selection
512-
if (TMath::Abs(track.dcaXY()) > (par0 + par1 / track.pt()))
515+
if (std::abs(track.dcaXY()) > (par0 + par1 / track.pt()))
513516
passcut = false;
514-
if (TMath::Abs(track.dcaZ()) > (par0 + par1 / track.pt()))
517+
if (std::abs(track.dcaZ()) > (par0 + par1 / track.pt()))
515518
passcut = false;
516519

517520
return passcut;
@@ -635,10 +638,10 @@ struct hadronnucleicorrelation {
635638

636639
float getDeltaPhi(float deltaPhi)
637640
{
638-
if (deltaPhi < -TMath::Pi() / 2) {
639-
return deltaPhi += 2 * TMath::Pi();
640-
} else if (deltaPhi >= 3 * TMath::Pi() / 2) {
641-
return deltaPhi -= 2 * TMath::Pi();
641+
if (deltaPhi < -o2::constants::math::PI / 2) {
642+
return deltaPhi += 2 * o2::constants::math::PI;
643+
} else if (deltaPhi >= 3 * o2::constants::math::PI / 2) {
644+
return deltaPhi -= 2 * o2::constants::math::PI;
642645
}
643646
return deltaPhi;
644647
}
@@ -1356,6 +1359,13 @@ struct hadronnucleicorrelation {
13561359
registry.fill(HIST("Generated/hQADeuterons"), 1.5);
13571360
}
13581361

1362+
if (particle.pdgCode() == pdgDeuteron && std::abs(particle.y()) < 0.5) {
1363+
registry.fill(HIST("Generated/hDeuteronsVsPt"), particle.pt());
1364+
}
1365+
if (particle.pdgCode() == -pdgDeuteron && std::abs(particle.y()) < 0.5) {
1366+
registry.fill(HIST("Generated/hAntiDeuteronsVsPt"), particle.pt());
1367+
}
1368+
13591369
if (std::abs(particle.eta()) > etacut) {
13601370
continue;
13611371
}

0 commit comments

Comments
 (0)