diff --git a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx index 43e1d5dcce9..8bf72d54a5a 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -113,6 +113,7 @@ struct StudyPnch { Configurable maxPhi{"maxPhi", 6.283185f, "Maximum phi value for track selection"}; Configurable isPtincrease{"isPtincrease", false, "Varies low pT particles by a conservative amount of +100%"}; Configurable isPtdecrease{"isPtdecrease", false, "Varies low pT particles by a conservative amount of -50%"}; + Configurable cPrint{"cPrint", false, "Enable printing information for debugging"}; Configurable isApplyStrangenessSysUncert{"isApplyStrangenessSysUncert", false, "Enable the evaluation of systematics due to strange particle contribution"}; void init(InitContext const&) @@ -359,6 +360,7 @@ struct StudyPnch { float countTracksPtCut(countTrk const& tracks, McColType const& McCol) { float nTrk = 0.0; + auto count = 0; for (const auto& track : tracks) { if (!isGenTrackSelected(track)) { continue; @@ -366,14 +368,24 @@ struct StudyPnch { if (track.mcCollisionId() != McCol.mcCollisionId()) { continue; } - if (track.pt() > pTminCut) + if (track.pt() > pTminCut) { + count++; continue; + } if (isPtincrease) { - nTrk += 2 - 10 * track.pt(); + nTrk += 2 - 10 * track.pt() - 1; } else { - nTrk += 0.5 + 5 * track.pt(); + nTrk += 0.5 + 5 * track.pt() - 1; + } + if (cPrint) { + LOG(info) << "nTrk: " << nTrk; + LOG(info) << "low pT = " << track.pt(); } } + if (nTrk != 0 && cPrint) { + LOG(info) << "counts standard pT: " << count; + LOG(info) << "Result of the function: " << nTrk; + } return nTrk; } @@ -429,10 +441,17 @@ struct StudyPnch { auto multrec = countNTracksMcCol(recTracksPart, RecCol); histos.fill(HIST("hMultiplicityMCrec"), multrec); float multgen = countGenTracks(GenParticles, RecCol); + if (cPrint) { + LOG(info) << "Generated Particles with standard pT:" << multgen; + } histos.fill(HIST("hMultiplicityMCgen"), multgen); histos.fill(HIST("hResponseMatrix"), multrec, multgen); float nTrkPtCut = countTracksPtCut(GenParticles, RecCol); nTrkPtCut = multgen + nTrkPtCut; + if (cPrint) { + LOG(info) << "After Counting low pT: " << nTrkPtCut; + LOG(info) << "########################"; + } histos.fill(HIST("hMultiplicityMCgenPtCut"), nTrkPtCut); histos.fill(HIST("hResponseMatrixPtCut"), multrec, nTrkPtCut); if (isApplyStrangenessSysUncert) {