Skip to content

Commit e641793

Browse files
authored
[PWGLF] Nuspex: proton nuclei correlation: add merging rejection (#16391)
1 parent d60f1b2 commit e641793

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ struct HadronNucleiCorrelation {
9393
Configurable<float> cutzVertex{"cutzVertex", 10.0, "|vertexZ| value limit"};
9494

9595
// Track selection
96+
Configurable<bool> doClosePairRejection{"doClosePairRejection", false, "doClosePairRejection"};
9697
Configurable<double> par0{"par0", 0.004, "par 0"};
9798
Configurable<double> par1{"par1", 0.013, "par 1"};
99+
Configurable<bool> doDCAZ{"doDCAZ", true, "do DCA z cut"};
98100
Configurable<int16_t> min_TPC_nClusters{"min_TPC_nClusters", 80, "minimum number of found TPC clusters"};
99101
Configurable<float> min_TPC_nCrossedRowsOverFindableCls{"min_TPC_nCrossedRowsOverFindableCls", 0.8, "n TPC Crossed Rows Over Findable Cls"};
100102
Configurable<float> max_chi2_TPC{"max_chi2_TPC", 4.0f, "maximum TPC chi^2/Ncls"};
@@ -546,7 +548,8 @@ struct HadronNucleiCorrelation {
546548
// pt-dependent selection
547549
if (std::abs(track.dcaXY()) > (par0 + par1 / track.pt()))
548550
passcut = false;
549-
if (std::abs(track.dcaZ()) > (par0 + par1 / track.pt()))
551+
552+
if (doDCAZ && std::abs(track.dcaZ()) > (par0 + par1 / track.pt()))
550553
passcut = false;
551554

552555
return passcut;
@@ -562,6 +565,11 @@ struct HadronNucleiCorrelation {
562565
return;
563566
}
564567

568+
if (doClosePairRejection && Pair->IsClosePair(dEta, dPhi, radiusTPC)) {
569+
QA.fill(HIST("QA/hdEtadPhistar"), Pair->GetPhiStarDiff(radiusTPC), Pair->GetEtaDiff());
570+
return;
571+
}
572+
565573
float deltaEta = part0.eta() - part1.eta();
566574
float deltaPhi = part0.phi() - part1.phi();
567575
deltaPhi = RecoDecay::constrainAngle(deltaPhi, -1 * o2::constants::math::PIHalf);
@@ -611,10 +619,14 @@ struct HadronNucleiCorrelation {
611619

612620
if (ME) {
613621
hEtaPhi_ME[k]->Fill(deltaEta, deltaPhi, part1.pt());
614-
hCorrEtaPhi_ME[k]->Fill(deltaEta, deltaPhi, part1.pt(), 1. / (corr0 * corr1));
622+
if (corr0 != 0 && corr1 != 0) {
623+
hCorrEtaPhi_ME[k]->Fill(deltaEta, deltaPhi, part1.pt(), 1. / (corr0 * corr1));
624+
}
615625
} else {
616626
hEtaPhi_SE[k]->Fill(deltaEta, deltaPhi, part1.pt());
617-
hCorrEtaPhi_SE[k]->Fill(deltaEta, deltaPhi, part1.pt(), 1. / (corr0 * corr1));
627+
if (corr0 != 0 && corr1 != 0) {
628+
hCorrEtaPhi_SE[k]->Fill(deltaEta, deltaPhi, part1.pt(), 1. / (corr0 * corr1));
629+
}
618630
} // SE
619631
} // pT condition
620632
} // nBinspT loop
@@ -682,7 +694,7 @@ struct HadronNucleiCorrelation {
682694
float getMCMultiplicity(TParticles const& particles)
683695
{
684696
float Ncharged = 0.;
685-
for (auto& mcParticle : particles) {
697+
for (const auto& mcParticle : particles) {
686698

687699
if (!mcParticle.isPhysicalPrimary()) {
688700
continue;

0 commit comments

Comments
 (0)