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
6 changes: 3 additions & 3 deletions PWGLF/Tasks/Strangeness/lambdaspincorrderived.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <Math/GenVector/Boost.h>
#include <Math/Vector3D.h>
#include <Math/Vector4D.h>
#include <TLorentzVector.h>

Check failure on line 33 in PWGLF/Tasks/Strangeness/lambdaspincorrderived.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
#include <TMath.h>
#include <TRandom3.h>

Expand All @@ -40,7 +40,7 @@
#include <cmath> // for std::fabs
#include <cstdint>
#include <deque>
#include <iostream>

Check failure on line 43 in PWGLF/Tasks/Strangeness/lambdaspincorrderived.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <limits>
#include <random>
Expand Down Expand Up @@ -635,11 +635,11 @@
} else if (mixedLeg == 2) {
double w2 = 1.0;
if (tag1 == 0 && tag2 == 0) {
w2 = hweight12->GetBinContent(hweight12->FindBin(dphi2, deta1, pt2));
w2 = hweight12->GetBinContent(hweight12->FindBin(dphi2, deta2, pt2));
} else if (tag1 == 0 && tag2 == 1) {
w2 = hweight22->GetBinContent(hweight22->FindBin(dphi2, deta1, pt2));
w2 = hweight22->GetBinContent(hweight22->FindBin(dphi2, deta2, pt2));
} else if (tag1 == 1 && tag2 == 0) {
w2 = hweight32->GetBinContent(hweight32->FindBin(dphi2, deta1, pt2));
w2 = hweight32->GetBinContent(hweight32->FindBin(dphi2, deta2, pt2));
} else if (tag1 == 1 && tag2 == 1) {
w2 = hweight42->GetBinContent(hweight42->FindBin(dphi2, deta2, pt2));
}
Expand Down Expand Up @@ -818,7 +818,7 @@
{
auto collOldIndex = -999;
std::vector<bool> t1Used;
for (auto& [collision1, collision2] : selfCombinations(colBinning, nEvtMixing, -1, collisions, collisions)) {

Check failure on line 821 in PWGLF/Tasks/Strangeness/lambdaspincorrderived.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.
// LOGF(info, "Mixed event collisions: (%d, %d)", collision1.index(), collision2.index());
// auto centrality = collision1.cent();
auto groupV01 = V0s.sliceBy(tracksPerCollisionV0, collision1.index());
Expand All @@ -832,7 +832,7 @@
// std::vector<bool> t1Used(groupV01.size(), false); // <-- reset here
collOldIndex = collNewIndex;
}
for (auto& [t1, t3] : soa::combinations(o2::soa::CombinationsFullIndexPolicy(groupV01, groupV03))) {

Check failure on line 835 in PWGLF/Tasks/Strangeness/lambdaspincorrderived.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.
if (t1Used[t1.index()]) {
continue;
}
Expand Down Expand Up @@ -887,7 +887,7 @@
auto nBins = colBinning.getAllBinsCount();
std::vector<std::deque<std::pair<int, AllTrackCandidates>>> eventPools(nBins);

for (auto& collision1 : collisions) {

Check failure on line 890 in PWGLF/Tasks/Strangeness/lambdaspincorrderived.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.
int bin = colBinning.getBin(std::make_tuple(collision1.posz(), collision1.cent()));
auto poolA = V0s.sliceBy(tracksPerCollisionV0, collision1.index());
// float centrality = collision1.cent();
Expand All @@ -895,7 +895,7 @@
// <<< CHANGED: map old collision index → set of (t2.idx, t3.idx) we've already filled
std::unordered_map<int, std::set<std::pair<int, int>>> seenMap;

for (auto& [t1, t2] : soa::combinations(o2::soa::CombinationsFullIndexPolicy(poolA, poolA))) {

Check failure on line 898 in PWGLF/Tasks/Strangeness/lambdaspincorrderived.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.
if (!selectionV0(t1) || !selectionV0(t2))
continue;
if (t2.index() <= t1.index())
Expand All @@ -911,7 +911,7 @@
AllTrackCandidates& poolB = it->second;

int nRepl = 0;
for (auto& t3 : poolB) {

Check failure on line 914 in PWGLF/Tasks/Strangeness/lambdaspincorrderived.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.
if (selectionV0(t3) && checkKinematics(t1, t3)) {
++nRepl;
}
Expand All @@ -920,7 +920,7 @@
continue;
float invN = 1.0f / static_cast<float>(nRepl);

for (auto& t3 : poolB) {

Check failure on line 923 in PWGLF/Tasks/Strangeness/lambdaspincorrderived.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.
if (!(selectionV0(t3) && checkKinematics(t1, t3))) {
continue;
}
Expand Down Expand Up @@ -974,7 +974,7 @@
auto nBins = colBinning.getAllBinsCount();
std::vector<std::deque<std::pair<int, AllTrackCandidates>>> eventPools(nBins);

for (auto& collision1 : collisions) {

Check failure on line 977 in PWGLF/Tasks/Strangeness/lambdaspincorrderived.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.
const int bin = colBinning.getBin(std::make_tuple(collision1.posz(), collision1.cent()));

// if pool empty, push and continue
Expand All @@ -990,7 +990,7 @@
auto poolA = V0s.sliceBy(tracksPerCollisionV0, collision1.index());

// loop over SE unordered pairs (t1,t2)
for (auto& [t1, t2] : soa::combinations(o2::soa::CombinationsFullIndexPolicy(poolA, poolA))) {

Check failure on line 993 in PWGLF/Tasks/Strangeness/lambdaspincorrderived.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.
if (!selectionV0(t1) || !selectionV0(t2))
continue;
if (t2.index() <= t1.index())
Expand Down
Loading