Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions PWGJE/Tasks/fullJetSpectra.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -759,24 +759,24 @@
}
filteredTrackPt += pt; // Accumulate valid track pT
hasValidTrack = true; // At least one track exists (if needed)
}
// Reject jets without valid tracks (edge case)
if (!hasValidTrack) {
return false;
}
// }
}
// Reject jets without valid tracks (edge case)
if (!hasValidTrack) {
return false;
}
// }

// --- Cluster cuts: ALL clusters must satisfy min <= pT <= max == 0.3 <= pT <= 250
// if (leadingClusterPtMin > kLeadingClusterPtMinThreshold || leadingClusterPtMax < kLeadingClusterPtMaxThreshold) {
bool hasValidCluster = false;
for (const auto& cluster : jet.template clusters_as<S>()) {
const double pt = cluster.energy() / std::cosh(cluster.eta());
if ((minClusterPt > kLeadingClusterPtMinThreshold && pt < minClusterPt) ||
(maxClusterPt < kLeadingClusterPtMaxThreshold && pt > maxClusterPt)) {
continue; // SKIP this invalid cluster
}
filteredClusterPt += pt;
hasValidCluster = true; // At least one cluster exists
// --- Cluster cuts: ALL clusters must satisfy min <= pT <= max == 0.3 <= pT <= 250
// if (leadingClusterPtMin > kLeadingClusterPtMinThreshold || leadingClusterPtMax < kLeadingClusterPtMaxThreshold) {
bool hasValidCluster = false;
for (const auto& cluster : jet.template clusters_as<S>()) {
const double pt = cluster.energy() / std::cosh(cluster.eta());
if ((minClusterPt > kLeadingClusterPtMinThreshold && pt < minClusterPt) ||
(maxClusterPt < kLeadingClusterPtMaxThreshold && pt > maxClusterPt)) {
continue; // SKIP this invalid cluster
}
filteredClusterPt += pt;
hasValidCluster = true; // At least one cluster exists
}
// Reject jets without valid clusters (edge case)
if (!hasValidCluster) {
Expand Down Expand Up @@ -1146,7 +1146,7 @@
if (bcs.size() == 0) {
return;
}
for (auto bc : bcs) {

Check failure on line 1149 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
registry.fill(HIST("hBCCounter"), 0.5); // All BC
if (bc.selection_bit(aod::evsel::EventSelectionFlags::kIsTriggerTVX)) {
registry.fill(HIST("hBCCounter"), 1.5); // BC+TVX
Expand All @@ -1158,7 +1158,7 @@
}
}
auto collisionsInBC = collisions.sliceBy(perFoundBC, bc.globalIndex());
for (auto collision : collisionsInBC) {

Check failure on line 1161 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
registry.fill(HIST("hBCCounter"), 4.5); // CollinBC
if (collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) {
registry.fill(HIST("hBCCounter"), 5.5); // CollinBC+TVX
Expand Down Expand Up @@ -2082,7 +2082,7 @@
callCount++;

// Clean up cache every 50000 calls to prevent memory issues
if (doMcClosure && callCount % 50000 == 0 && mcCollisionRandomValues.size() > 20000) {

Check failure on line 2085 in PWGJE/Tasks/fullJetSpectra.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOGF(info, "Cleaning up MC collision random values cache (size: %zu)", mcCollisionRandomValues.size());
mcCollisionRandomValues.clear();

Expand Down
Loading