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
8 changes: 4 additions & 4 deletions PWGDQ/Tasks/filterPPwithAssociation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//
// Contact: iarsene@cern.ch, i.c.arsene@fys.uio.no
//
#include <iostream>

Check warning on line 14 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <vector>
#include <map>
#include <string>
Expand Down Expand Up @@ -250,7 +250,7 @@
fHistMan->SetDefaultVarNames(VarManager::fgVariableNames, VarManager::fgVariableUnits);

TString cutNames = "TrackBarrel_BeforeCuts;";
for (auto& cut : fTrackCuts) {

Check warning on line 253 in PWGDQ/Tasks/filterPPwithAssociation.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.
cutNames += Form("TrackBarrel_%s;", cut.GetName());
fCutHistNames.push_back(Form("TrackBarrel_%s", cut.GetName()));
}
Expand Down Expand Up @@ -300,7 +300,7 @@
emuSel.reserve(tracksBarrel.size());

VarManager::ResetValues(0, VarManager::kNBarrelTrackVariables);
for (auto& trackAssoc : trackAssocs) {

Check warning on line 303 in PWGDQ/Tasks/filterPPwithAssociation.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.
filterMap = static_cast<uint32_t>(0);
filterMapEMu = static_cast<uint32_t>(0);

Expand Down Expand Up @@ -336,7 +336,7 @@

void processSelection(Collisions const& collisions, aod::BCsWithTimestamps const& bcs, MyBarrelTracks const& tracks, aod::TrackAssoc const& trackAssocs)
{
for (auto& collision : collisions) {

Check warning on line 339 in PWGDQ/Tasks/filterPPwithAssociation.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.
auto trackIdsThisCollision = trackAssocs.sliceBy(barrelTrackIndicesPerCollision, collision.globalIndex());
runTrackSelection<gkTrackFillMap>(collision, bcs, tracks, trackIdsThisCollision);
}
Expand Down Expand Up @@ -445,7 +445,7 @@

VarManager::ResetValues(0, VarManager::kNMuonTrackVariables);

for (auto& muonAssoc : muonAssocs) {

Check warning on line 448 in PWGDQ/Tasks/filterPPwithAssociation.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.
filterMap = static_cast<uint32_t>(0);
filterMapEMu = static_cast<uint32_t>(0);
auto muon = muonAssoc.template fwdtrack_as<TMuons>();
Expand Down Expand Up @@ -535,9 +535,9 @@
std::map<uint64_t, uint64_t> fFiltersMap; // map of filters for events that passed at least one filter
std::map<uint64_t, std::vector<bool>> fCEFPfilters; // map of CEFP filters for events that passed at least one filter

uint32_t fPairingLSBarrel; // used to set in which cut setting LS pairs will be analysed
uint32_t fPairingLSMuon; // used to set in which cut setting LS pairs will be analysed
uint32_t fPairingLSBarrelMuon; // used to set in which cut setting LS pairs will be analysed
uint32_t fPairingLSBarrel; // used to set in which cut setting LS pairs will be analysed
uint32_t fPairingLSMuon; // used to set in which cut setting LS pairs will be analysed
uint32_t fPairingLSBarrelMuon; // used to set in which cut setting LS pairs will be analysed

void DefineCuts()
{
Expand Down Expand Up @@ -862,7 +862,7 @@
}
}
}

// run pairing if there is at least one selection that requires it
pairFilter = 0;
if (pairingMask > 0) {
Expand Down Expand Up @@ -937,7 +937,7 @@
fFiltersMap.clear();
fCEFPfilters.clear();

cout << "------------------- filterPP, n assocs barrel/muon :: " << trackAssocs.size() << " / " << muonAssocs.size() << endl;

Check warning on line 940 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).

uint64_t barrelMask = 0;
for (int i = 0; i < fNBarrelCuts; i++) {
Expand Down Expand Up @@ -1093,7 +1093,7 @@
}
}

cout << "-------------------- In this TF, eventsFired / totalTriggered :: " << eventsFired << "/" << totalEventsTriggered << endl;

Check warning on line 1096 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}

void processFilterMuonPP(MyEventsSelected const& collisions,
Expand All @@ -1104,7 +1104,7 @@
fFiltersMap.clear();
fCEFPfilters.clear();

cout << "------------------- filterPP, n assocs muon :: " << muonAssocs.size() << endl;

Check warning on line 1107 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).

uint64_t muonMask = 0;
for (int i = 0; i < fNMuonCuts; i++) {
Expand Down Expand Up @@ -1214,7 +1214,7 @@
}
}

cout << "-------------------- In this TF, eventsFired / totalTriggered :: " << eventsFired << "/" << totalEventsTriggered << endl;

Check warning on line 1217 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}

// TODO: dummy function for the case when no process function is enabled
Expand Down Expand Up @@ -1244,7 +1244,7 @@
// Define here the histograms for all the classes required in analysis.
//
std::unique_ptr<TObjArray> objArray(histClasses.Tokenize(";"));
for (Int_t iclass = 0; iclass < objArray->GetEntries(); ++iclass) {

Check warning on line 1247 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
TString classStr = objArray->At(iclass)->GetName();
histMan->AddHistClass(classStr.Data());

Expand Down
Loading