Skip to content

Commit

Permalink
PWGLF: add secondary correction (AliceO2Group#7495)
Browse files Browse the repository at this point in the history
* add secondary correction

* Please consider the following formatting changes

---------

Co-authored-by: ALICE Action Bot <[email protected]>
  • Loading branch information
ercolessi and alibuild authored Aug 29, 2024
1 parent 8595385 commit 0586d59
Showing 1 changed file with 36 additions and 7 deletions.
43 changes: 36 additions & 7 deletions PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ struct hadronnucleicorrelation {
registry.add("hReco_EtaPhiPtMC_Proton", "Gen (anti)protons in reco collisions (MC info used)", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., 2 * TMath::Pi(), "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hReco_EtaPhiPtMC_Deuteron", "Gen (anti)deuteron in reco collisions (MC info used)", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., 2 * TMath::Pi(), "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});

registry.add("hSec_EtaPhiPt_Proton", "Secondary (anti)protons", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., 2 * TMath::Pi(), "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});
registry.add("hPrimSec_EtaPhiPt_Proton", "Primary + Secondary (anti)protons", {HistType::kTH3F, {{100, -1., 1., "#eta"}, {157, 0., 2 * TMath::Pi(), "#phi"}, {100, -5.f, 5.f, "p_{T} GeV/c"}}});

registry.add("hnSigmaTPCVsPt_Pr_MC", "n#sigma TPC vs p_{T} for p hypothesis true MC; p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2F, {pTAxis, AxisNSigma}});
registry.add("hnSigmaTPCVsPt_De_MC", "n#sigma TPC vs p_{T} for d hypothesis true MC; p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2F, {pTAxis, AxisNSigma}});
registry.add("hnSigmaTOFVsPt_Pr_MC", "n#sigma TOF vs p_{T} for p hypothesis true MC; p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2F, {pTAxis, AxisNSigma}});
Expand Down Expand Up @@ -568,6 +571,9 @@ struct hadronnucleicorrelation {
if (abs(track.dcaXY()) > max_dcaxy || abs(track.dcaZ()) > max_dcaz) { // For now no filtering on the DCAxy or DCAz (casting not supported)
continue;
}
if (track.tpcFractionSharedCls() > max_tpcSharedCls || track.itsNCls() < min_itsNCls)
continue;

if (doQA) {
QA.fill(HIST("QA/hTPCnClusters"), track.tpcNClsFound());
QA.fill(HIST("QA/hTPCchi2"), track.tpcChi2NCl());
Expand All @@ -585,10 +591,6 @@ struct hadronnucleicorrelation {
if (track.pt() > pTBins.value.at(nBinspT) || track.pt() < pTBins.value.at(0))
continue;

// Additional track cuts
if (track.tpcFractionSharedCls() > max_tpcSharedCls || track.itsNCls() < min_itsNCls)
continue;

bool isPr = false;
bool isAntiPr = false;
bool isDeTPCTOF = false;
Expand Down Expand Up @@ -837,6 +839,8 @@ struct hadronnucleicorrelation {
if (abs(track.dcaXY()) > max_dcaxy || abs(track.dcaZ()) > max_dcaz) { // For now no filtering on the DCAxy or DCAz (casting not supported)
continue;
}
if (abs(track.pdgCode()) != pdgProton && abs(track.pdgCode()) != pdgDeuteron)
continue;

if (doQA) {
QA.fill(HIST("QA/hTPCnClusters"), track.tpcNClsFound());
Expand All @@ -852,10 +856,35 @@ struct hadronnucleicorrelation {
QA.fill(HIST("QA/hnSigmaTOFVsPt_De"), track.pt() * track.sign(), track.tofNSigmaDe());
}

if (track.origin() != 0)
continue;
int s = +1;
if (track.pdgCode() == -pdgProton) {
s = -1;
}

if (abs(track.pdgCode()) != pdgProton && abs(track.pdgCode()) != pdgDeuteron)
if (track.origin() == 1) { // secondaries
if (TMath::Abs(track.pdgCode()) == pdgProton) {
if (TMath::Abs(track.tpcNSigmaPr()) < nsigmaTPC) {
if (track.pt() < pTthrpr_TOF) {
registry.fill(HIST("hSec_EtaPhiPt_Proton"), track.eta(), track.phi(), track.pt() * s);
} else if (TMath::Abs(track.tofNSigmaPr()) < nsigmaTOF) {
registry.fill(HIST("hSec_EtaPhiPt_Proton"), track.eta(), track.phi(), track.pt() * s);
}
}
}
}
if (track.origin() == 1 || track.origin() == 0) { // primaries and secondaries
if (TMath::Abs(track.pdgCode()) == pdgProton) {
if (TMath::Abs(track.tpcNSigmaPr()) < nsigmaTPC) {
if (track.pt() < pTthrpr_TOF) {
registry.fill(HIST("hPrimSec_EtaPhiPt_Proton"), track.eta(), track.phi(), track.pt() * s);
} else if (TMath::Abs(track.tofNSigmaPr()) < nsigmaTOF) {
registry.fill(HIST("hPrimSec_EtaPhiPt_Proton"), track.eta(), track.phi(), track.pt() * s);
}
}
}
}

if (track.origin() != 0)
continue;

bool isPr = false;
Expand Down

0 comments on commit 0586d59

Please sign in to comment.