Skip to content

Commit 2eeaaee

Browse files
[PWGLF] NucleiTask - Fix ITSHe applied to all tracks (#15594)
1 parent bc95809 commit 2eeaaee

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,7 +2392,7 @@ struct LFNucleiBATask {
23922392
return;
23932393
}
23942394

2395-
if (centFT0M <= cfgMultCutLow || centFT0M > cfgMultCutHigh) {
2395+
if (enableCentrality && (centFT0M <= cfgMultCutLow || centFT0M > cfgMultCutHigh)) {
23962396
return;
23972397
}
23982398
if (enableCentrality)
@@ -2699,8 +2699,10 @@ struct LFNucleiBATask {
26992699

27002700
isDeuteron = enableDe && deRapCut;
27012701
isHelium = enableHe && heRapCut;
2702-
isDe = isDeuteron && track.sign() > 0;
2703-
isAntiDe = isDeuteron && track.sign() < 0;
2702+
2703+
// ITS PID cut
2704+
bool passITSDeCut = !nsigmaITSvar.useITSDeCut || (nITSDe > nsigmaITSvar.nsigmaITSDe);
2705+
bool passITSHeCut = !nsigmaITSvar.useITSHeCut || (nITSHe > nsigmaITSvar.nsigmaITSHe);
27042706

27052707
if constexpr (IsMC && !IsFilteredData) {
27062708
int pdgCheck = track.mcParticle().pdgCode();
@@ -2710,25 +2712,19 @@ struct LFNucleiBATask {
27102712
histos.fill(HIST("tracks/hItsDeHeChecker"), 1);
27112713
}
27122714

2713-
// nSigmaITSHe cut
2714-
if (nsigmaITSvar.useITSDeCut && (nITSDe <= nsigmaITSvar.nsigmaITSDe)) {
2715-
continue;
2716-
}
2717-
2718-
if (nsigmaITSvar.useITSHeCut && (nITSHe <= nsigmaITSvar.nsigmaITSHe)) {
2719-
continue;
2720-
}
2721-
27222715
if constexpr (IsMC && !IsFilteredData) {
27232716
int pdgCheck = track.mcParticle().pdgCode();
2724-
if (std::abs(pdgCheck) == PDGDeuteron)
2717+
if ((std::abs(pdgCheck) == PDGDeuteron) && passITSDeCut)
27252718
histos.fill(HIST("tracks/hItsDeHeChecker"), 2);
2726-
if (std::abs(pdgCheck) == PDGHelium)
2719+
if ((std::abs(pdgCheck) == PDGHelium) && passITSHeCut)
27272720
histos.fill(HIST("tracks/hItsDeHeChecker"), 3);
27282721
}
27292722

2730-
isHe = isHelium && track.sign() > 0;
2731-
isAntiHe = isHelium && track.sign() < 0;
2723+
isDe = isDeuteron && passITSDeCut && track.sign() > 0;
2724+
isAntiDe = isDeuteron && passITSDeCut && track.sign() < 0;
2725+
2726+
isHe = isHelium && passITSHeCut && track.sign() > 0;
2727+
isAntiHe = isHelium && passITSHeCut && track.sign() < 0;
27322728

27332729
isDeWoDCAxy = isDe && passDCAzCutDe;
27342730
isAntiDeWoDCAxy = isAntiDe && passDCAzCutAntiDe;
@@ -4637,7 +4633,6 @@ struct LFNucleiBATask {
46374633

46384634
// TOF
46394635
if (outFlagOptions.doTOFplots) {
4640-
46414636
if (isDeWTPCpid) {
46424637
switch (useHasTRDConfig) {
46434638
case 0:
@@ -4913,7 +4908,8 @@ struct LFNucleiBATask {
49134908
}
49144909

49154910
if (isHeWTPCpid) {
4916-
histos.fill(HIST("tracks/helium/TOF/h2HeliumSpectraVsMult_Z2"), 2 * hePt, centFT0M);
4911+
if (enableCentrality)
4912+
histos.fill(HIST("tracks/helium/TOF/h2HeliumSpectraVsMult_Z2"), 2 * hePt, centFT0M);
49174913
histos.fill(HIST("tracks/helium/h2HeliumTOFbetaVsP"), heP, track.beta());
49184914
if (outFlagOptions.enableEffPlots) {
49194915
histos.fill(HIST("tracks/eff/helium/h2pVsTOFExpMomentumHe"), track.tofExpMom(), heP);
@@ -4922,7 +4918,8 @@ struct LFNucleiBATask {
49224918
}
49234919

49244920
if (isAntiHeWTPCpid) {
4925-
histos.fill(HIST("tracks/helium/TOF/h2antiHeliumSpectraVsMult_Z2"), 2 * antihePt, centFT0M);
4921+
if (enableCentrality)
4922+
histos.fill(HIST("tracks/helium/TOF/h2antiHeliumSpectraVsMult_Z2"), 2 * antihePt, centFT0M);
49264923
histos.fill(HIST("tracks/helium/h2antiHeliumTOFbetaVsP"), antiheP, track.beta());
49274924
if (outFlagOptions.enableEffPlots) {
49284925
histos.fill(HIST("tracks/eff/helium/h2pVsTOFExpMomentumantiHe"), track.tofExpMom(), antiheP);
@@ -6387,7 +6384,7 @@ struct LFNucleiBATask {
63876384
return;
63886385
}
63896386

6390-
if (mcCollision.centFT0M() < cfgMultCutLow || mcCollision.centFT0M() > cfgMultCutHigh)
6387+
if (enableCentrality && (mcCollision.centFT0M() < cfgMultCutLow || mcCollision.centFT0M() > cfgMultCutHigh))
63916388
return;
63926389

63936390
if (evselOptions.enableGenVzCut) {

0 commit comments

Comments
 (0)