Skip to content

Commit 24a4fb7

Browse files
committed
add PID with quadratic cut
1 parent ca6308b commit 24a4fb7

1 file changed

Lines changed: 78 additions & 28 deletions

File tree

PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx

Lines changed: 78 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,15 @@ struct HadronNucleiCorrelation {
9090
Configurable<bool> isMCGen{"isMCGen", false, "is isMCGen"};
9191
Configurable<bool> isPrim{"isPrim", true, "is isPrim"};
9292
Configurable<bool> doCorrection{"doCorrection", false, "do efficiency correction"};
93-
Configurable<bool> removeSameBunchPileup{"removeSameBunchPileup", false, "remove Same Bunch Pileup"};
93+
Configurable<bool> doQuadraticPID{"doQuadraticPID", false, "do PID with sum in quadrature of TOF and TPC"};
9494

9595
Configurable<std::string> fCorrectionPath{"fCorrectionPath", "", "Correction path to file"};
9696
Configurable<std::string> fCorrectionHisto{"fCorrectionHisto", "", "Correction histogram"};
9797
Configurable<std::string> cfgUrl{"cfgUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
9898

9999
// Event selection
100100
Configurable<float> cutzVertex{"cutzVertex", 10.0, "|vertexZ| value limit"};
101+
Configurable<bool> removeSameBunchPileup{"removeSameBunchPileup", false, "remove Same Bunch Pileup"};
101102

102103
// Track selection
103104
Configurable<bool> doClosePairRejection{"doClosePairRejection", false, "doClosePairRejection"};
@@ -281,6 +282,8 @@ struct HadronNucleiCorrelation {
281282
QA.add("QA/hDCAxy", "DCAxy", {HistType::kTH2D, {{200, -0.2f, 0.2f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}});
282283
QA.add("QA/hDCAz", "DCAz", {HistType::kTH2D, {{200, -0.2f, 0.2f, "DCA z (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}});
283284
QA.add("QA/TPCChi2VsPZ", "TPCChi2VsPZ", {HistType::kTH2D, {{100, 0.f, 10.f, "p_{TPC}/Z (GeV/c)"}, {120, 0.f, 6.f, "TPC Chi2"}}});
285+
QA.add("QA/h2dTPCTOF_Pr", "n#sigma TPC vs n#sigma TOF; n#sigma TPC; n#sigma TOF", {HistType::kTH2D, {axisNSigma, axisNSigma}});
286+
QA.add("QA/h2dTPCTOF_AntiPr", "n#sigma TPC vs n#sigma TOF; n#sigma TPC; n#sigma TOF", {HistType::kTH2D, {axisNSigma, axisNSigma}});
284287
QA.add("QA/hnSigmaTPCVsPt_El", "n#sigma TPC vs p_{T} for e hypothesis (all tracks); p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2D, {pTAxis, axisNSigma}});
285288
QA.add("QA/hnSigmaTPCVsPt_Pr", "n#sigma TPC vs p_{T} for p hypothesis (all tracks); p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2D, {pTAxis, axisNSigma}});
286289
QA.add("QA/hnSigmaTPCVsPt_De", "n#sigma TPC vs p_{T} for d hypothesis (all tracks); p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2D, {pTAxis, axisNSigma}});
@@ -306,6 +309,8 @@ struct HadronNucleiCorrelation {
306309
QA.add("QA/hnSigmaTOFVsPt_De_AfterSel", "n#sigma TOF vs p_{T} for d hypothesis (all tracks); p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2D, {pTAxis, axisNSigma}});
307310
QA.add("QA/hnSigmaITSVsPt_Pr_AfterSel", "n#sigma ITS vs p_{T} for p hypothesis (all tracks); p_{T} (GeV/c); n#sigma ITS", {HistType::kTH2D, {pTAxis, axisNSigma}});
308311
QA.add("QA/hnSigmaITSVsPt_De_AfterSel", "n#sigma ITS vs p_{T} for d hypothesis (all tracks); p_{T} (GeV/c); n#sigma ITS", {HistType::kTH2D, {pTAxis, axisNSigma}});
312+
QA.add("QA/h2dTPCTOF_Pr_AfterSel", "n#sigma TPC vs n#sigma TOF; n#sigma TPC; n#sigma TOF", {HistType::kTH2D, {axisNSigma, axisNSigma}});
313+
QA.add("QA/h2dTPCTOF_AntiPr_AfterSel", "n#sigma TPC vs n#sigma TOF; n#sigma TPC; n#sigma TOF", {HistType::kTH2D, {axisNSigma, axisNSigma}});
309314
}
310315
}
311316

@@ -435,14 +440,33 @@ struct HadronNucleiCorrelation {
435440
bool IsProton(Type const& track, int sign)
436441
{
437442
bool isProton = false;
443+
438444
bool isTPCPID = std::abs(track.tpcNSigmaPr()) < nsigmaTPC;
439445
bool isTOFPID = std::abs(track.tofNSigmaPr()) < nsigmaTOF;
440446
bool isTPCElRejection = rejectionEl && track.beta() < betahasTOFthr && track.pt() < pTthrprTPCEl && track.tpcNSigmaEl() >= nsigmaElPr;
441447
bool isITSPID = track.itsNSigmaPr() > nsigmaITSPr;
442448

443-
if (isTPCPID) {
444-
if (track.pt() < pTthrprTOF) {
445-
if (!doITSPID || isITSPID) {
449+
bool isQuadraticPID = TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + track.tofNSigmaPr() * track.tofNSigmaPr()) < nsigmaTPC;
450+
451+
if (!doQuadraticPID) {
452+
if (isTPCPID) {
453+
if (track.pt() < pTthrprTOF) {
454+
if (!doITSPID || isITSPID) {
455+
if (sign > 0) {
456+
if (track.sign() > 0) {
457+
isProton = true;
458+
} else if (track.sign() < 0) {
459+
isProton = false;
460+
}
461+
} else if (sign < 0) {
462+
if (track.sign() > 0) {
463+
isProton = false;
464+
} else if (track.sign() < 0) {
465+
isProton = true;
466+
}
467+
}
468+
}
469+
} else if (isTPCElRejection) {
446470
if (sign > 0) {
447471
if (track.sign() > 0) {
448472
isProton = true;
@@ -456,33 +480,55 @@ struct HadronNucleiCorrelation {
456480
isProton = true;
457481
}
458482
}
459-
}
460-
} else if (isTPCElRejection) {
461-
if (sign > 0) {
462-
if (track.sign() > 0) {
463-
isProton = true;
464-
} else if (track.sign() < 0) {
465-
isProton = false;
466-
}
467-
} else if (sign < 0) {
468-
if (track.sign() > 0) {
469-
isProton = false;
470-
} else if (track.sign() < 0) {
471-
isProton = true;
483+
} else if (isTOFPID) {
484+
if (sign > 0) {
485+
if (track.sign() > 0) {
486+
isProton = true;
487+
} else if (track.sign() < 0) {
488+
isProton = false;
489+
}
490+
} else if (sign < 0) {
491+
if (track.sign() > 0) {
492+
isProton = false;
493+
} else if (track.sign() < 0) {
494+
isProton = true;
495+
}
472496
}
473497
}
474-
} else if (isTOFPID) {
475-
if (sign > 0) {
476-
if (track.sign() > 0) {
477-
isProton = true;
478-
} else if (track.sign() < 0) {
479-
isProton = false;
498+
}
499+
} else {
500+
if (track.pt() < pTthrprTOF) {
501+
if (isTPCPID) {
502+
if (!doITSPID || isITSPID) {
503+
if (sign > 0) {
504+
if (track.sign() > 0) {
505+
isProton = true;
506+
} else if (track.sign() < 0) {
507+
isProton = false;
508+
}
509+
} else if (sign < 0) {
510+
if (track.sign() > 0) {
511+
isProton = false;
512+
} else if (track.sign() < 0) {
513+
isProton = true;
514+
}
515+
}
480516
}
481-
} else if (sign < 0) {
482-
if (track.sign() > 0) {
483-
isProton = false;
484-
} else if (track.sign() < 0) {
485-
isProton = true;
517+
}
518+
} else if (isQuadraticPID) {
519+
if (!doITSPID || isITSPID) {
520+
if (sign > 0) {
521+
if (track.sign() > 0) {
522+
isProton = true;
523+
} else if (track.sign() < 0) {
524+
isProton = false;
525+
}
526+
} else if (sign < 0) {
527+
if (track.sign() > 0) {
528+
isProton = false;
529+
} else if (track.sign() < 0) {
530+
isProton = true;
531+
}
486532
}
487533
}
488534
}
@@ -767,20 +813,24 @@ struct HadronNucleiCorrelation {
767813
QA.fill(HIST("QA/hnSigmaTOFVsPt_De"), track.pt() * track.sign(), track.tofNSigmaDe());
768814
QA.fill(HIST("QA/hnSigmaITSVsPt_Pr"), track.pt() * track.sign(), track.itsNSigmaPr());
769815
QA.fill(HIST("QA/hnSigmaITSVsPt_De"), track.pt() * track.sign(), track.itsNSigmaDe());
816+
QA.fill(HIST("QA/h2dTPCTOF_AntiPr"), track.tpcNSigmaPr(), track.tofNSigmaPr());
817+
QA.fill(HIST("QA/h2dTPCTOF_Pr"), track.tpcNSigmaPr(), track.tofNSigmaPr());
770818

771819
if (IsProton(track, -1)) {
772820
QA.fill(HIST("QA/hEtaAntiPr"), track.eta());
773821
QA.fill(HIST("QA/hPhiAntiPr"), track.phi());
774822
QA.fill(HIST("QA/hnSigmaTOFVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tofNSigmaPr());
775823
QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaPr());
776824
QA.fill(HIST("QA/hnSigmaITSVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.itsNSigmaPr());
825+
QA.fill(HIST("QA/h2dTPCTOF_AntiPr_AfterSel"), track.tpcNSigmaPr(), track.tofNSigmaPr());
777826
}
778827
if (IsProton(track, +1)) {
779828
QA.fill(HIST("QA/hEtaPr"), track.eta());
780829
QA.fill(HIST("QA/hPhiPr"), track.phi());
781830
QA.fill(HIST("QA/hnSigmaTOFVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tofNSigmaPr());
782831
QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaPr());
783832
QA.fill(HIST("QA/hnSigmaITSVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.itsNSigmaPr());
833+
QA.fill(HIST("QA/h2dTPCTOF_Pr_AfterSel"), track.tpcNSigmaPr(), track.tofNSigmaPr());
784834
}
785835
if (IsDeuteron(track, -1)) {
786836
QA.fill(HIST("QA/hEtaAntiDe"), track.eta());

0 commit comments

Comments
 (0)