Skip to content

Commit b56646a

Browse files
authored
[PWGLF] Correction for pT extrapolation (#16376)
1 parent e641793 commit b56646a

1 file changed

Lines changed: 22 additions & 3 deletions

File tree

PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ struct StudyPnch {
113113
Configurable<float> maxPhi{"maxPhi", 6.283185f, "Maximum phi value for track selection"};
114114
Configurable<bool> isPtincrease{"isPtincrease", false, "Varies low pT particles by a conservative amount of +100%"};
115115
Configurable<bool> isPtdecrease{"isPtdecrease", false, "Varies low pT particles by a conservative amount of -50%"};
116+
Configurable<bool> cPrint{"cPrint", false, "Enable printing information for debugging"};
116117
Configurable<bool> isApplyStrangenessSysUncert{"isApplyStrangenessSysUncert", false, "Enable the evaluation of systematics due to strange particle contribution"};
117118

118119
void init(InitContext const&)
@@ -359,21 +360,32 @@ struct StudyPnch {
359360
float countTracksPtCut(countTrk const& tracks, McColType const& McCol)
360361
{
361362
float nTrk = 0.0;
363+
auto count = 0;
362364
for (const auto& track : tracks) {
363365
if (!isGenTrackSelected(track)) {
364366
continue;
365367
}
366368
if (track.mcCollisionId() != McCol.mcCollisionId()) {
367369
continue;
368370
}
369-
if (track.pt() > pTminCut)
371+
if (track.pt() > pTminCut) {
372+
count++;
370373
continue;
374+
}
371375
if (isPtincrease) {
372-
nTrk += 2 - 10 * track.pt();
376+
nTrk += 2 - 10 * track.pt() - 1;
373377
} else {
374-
nTrk += 0.5 + 5 * track.pt();
378+
nTrk += 0.5 + 5 * track.pt() - 1;
379+
}
380+
if (cPrint) {
381+
LOG(info) << "nTrk: " << nTrk;
382+
LOG(info) << "low pT = " << track.pt();
375383
}
376384
}
385+
if (nTrk != 0 && cPrint) {
386+
LOG(info) << "counts standard pT: " << count;
387+
LOG(info) << "Result of the function: " << nTrk;
388+
}
377389
return nTrk;
378390
}
379391

@@ -429,10 +441,17 @@ struct StudyPnch {
429441
auto multrec = countNTracksMcCol(recTracksPart, RecCol);
430442
histos.fill(HIST("hMultiplicityMCrec"), multrec);
431443
float multgen = countGenTracks(GenParticles, RecCol);
444+
if (cPrint) {
445+
LOG(info) << "Generated Particles with standard pT:" << multgen;
446+
}
432447
histos.fill(HIST("hMultiplicityMCgen"), multgen);
433448
histos.fill(HIST("hResponseMatrix"), multrec, multgen);
434449
float nTrkPtCut = countTracksPtCut(GenParticles, RecCol);
435450
nTrkPtCut = multgen + nTrkPtCut;
451+
if (cPrint) {
452+
LOG(info) << "After Counting low pT: " << nTrkPtCut;
453+
LOG(info) << "########################";
454+
}
436455
histos.fill(HIST("hMultiplicityMCgenPtCut"), nTrkPtCut);
437456
histos.fill(HIST("hResponseMatrixPtCut"), multrec, nTrkPtCut);
438457
if (isApplyStrangenessSysUncert) {

0 commit comments

Comments
 (0)