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
9 changes: 8 additions & 1 deletion PWGDQ/Tasks/tableReader_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <iostream>

Check failure on line 56 in PWGDQ/Tasks/tableReader_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <map>
#include <memory>
#include <numeric>
Expand Down Expand Up @@ -258,7 +258,7 @@
void PrintBitMap(TMap map, int nbits)
{
for (int i = 0; i < nbits; i++) {
cout << ((map & (TMap(1) << i)) > 0 ? "1" : "0");

Check failure on line 261 in PWGDQ/Tasks/tableReader_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

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

Expand Down Expand Up @@ -329,7 +329,7 @@
TString eventCutJSONStr = fConfigEventCutsJSON.value;
if (eventCutJSONStr != "") {
std::vector<AnalysisCut*> jsonCuts = dqcuts::GetCutsFromJSON(eventCutJSONStr.Data());
for (auto& cutIt : jsonCuts) {

Check failure on line 332 in PWGDQ/Tasks/tableReader_withAssoc.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.
fEventCut->AddCut(cutIt);
}
}
Expand Down Expand Up @@ -389,7 +389,7 @@
fSelMap.clear();
fBCCollMap.clear();

for (auto& event : events) {

Check failure on line 392 in PWGDQ/Tasks/tableReader_withAssoc.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.
// Reset the fValues array and fill event observables
VarManager::ResetValues(0, VarManager::kNEventWiseVariables);
VarManager::FillEvent<TEventFillMap>(event);
Expand Down Expand Up @@ -480,10 +480,10 @@
auto& bc2Events = bc2It->second;

// loop over events in the first BC
for (auto ev1It : bc1Events) {

Check failure on line 483 in PWGDQ/Tasks/tableReader_withAssoc.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 ev1 = events.rawIteratorAt(ev1It);
// loop over events in the second BC
for (auto ev2It : bc2Events) {

Check failure on line 486 in PWGDQ/Tasks/tableReader_withAssoc.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 ev2 = events.rawIteratorAt(ev2It);
// compute 2-event quantities and mark the candidate split collisions
VarManager::FillTwoEvents(ev1, ev2);
Expand All @@ -502,7 +502,7 @@

// publish the table
uint8_t evSel = static_cast<uint8_t>(0);
for (auto& event : events) {

Check failure on line 505 in PWGDQ/Tasks/tableReader_withAssoc.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.
evSel = 0;
if (fSelMap[event.globalIndex()]) { // event passed the user cuts
evSel |= (static_cast<uint8_t>(1) << 0);
Expand Down Expand Up @@ -611,7 +611,7 @@
TString addTrackCutsStr = fConfigCutsJSON.value;
if (addTrackCutsStr != "") {
std::vector<AnalysisCut*> addTrackCuts = dqcuts::GetCutsFromJSON(addTrackCutsStr.Data());
for (auto& t : addTrackCuts) {

Check failure on line 614 in PWGDQ/Tasks/tableReader_withAssoc.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.
fTrackCuts.push_back(reinterpret_cast<AnalysisCompositeCut*>(t));
}
}
Expand All @@ -625,7 +625,7 @@

// set one histogram directory for each defined track cut
TString histDirNames = "TrackBarrel_BeforeCuts;";
for (auto& cut : fTrackCuts) {

Check failure on line 628 in PWGDQ/Tasks/tableReader_withAssoc.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.
histDirNames += Form("TrackBarrel_%s;", cut->GetName());
}
if (fConfigPublishAmbiguity) {
Expand Down Expand Up @@ -689,7 +689,7 @@
uint32_t filterMap = static_cast<uint32_t>(0);
int iCut = 0;

for (auto& assoc : assocs) {

Check failure on line 692 in PWGDQ/Tasks/tableReader_withAssoc.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 the event from this association is not selected, reject also the association
auto event = assoc.template reducedevent_as<TEvents>();
Expand Down Expand Up @@ -1313,7 +1313,7 @@
{
fEnableBarrelHistos = context.mOptions.get<bool>("processAllSkimmed") || context.mOptions.get<bool>("processBarrelOnlySkimmed") || context.mOptions.get<bool>("processBarrelOnlyWithCollSkimmed") || context.mOptions.get<bool>("processBarrelOnlySkimmedNoCov") || context.mOptions.get<bool>("processBarrelOnlySkimmedNoCovWithMultExtra") || context.mOptions.get<bool>("processBarrelOnlyWithQvectorCentrSkimmedNoCov");
fEnableBarrelMixingHistos = context.mOptions.get<bool>("processMixingAllSkimmed") || context.mOptions.get<bool>("processMixingBarrelSkimmed") || context.mOptions.get<bool>("processMixingBarrelSkimmedFlow") || context.mOptions.get<bool>("processMixingBarrelWithQvectorCentrSkimmedNoCov");
fEnableMuonHistos = context.mOptions.get<bool>("processAllSkimmed") || context.mOptions.get<bool>("processMuonOnlySkimmed") || context.mOptions.get<bool>("processMuonOnlySkimmedMultExtra") || context.mOptions.get<bool>("processMixingMuonSkimmed");
fEnableMuonHistos = context.mOptions.get<bool>("processAllSkimmed") || context.mOptions.get<bool>("processMuonOnlySkimmed") || context.mOptions.get<bool>("processMuonOnlySkimmedMultExtra") || context.mOptions.get<bool>("processMuonOnlySkimmedFlow") || context.mOptions.get<bool>("processMixingMuonSkimmed");
fEnableMuonMixingHistos = context.mOptions.get<bool>("processMixingAllSkimmed") || context.mOptions.get<bool>("processMixingMuonSkimmed");

if (context.mOptions.get<bool>("processDummy")) {
Expand Down Expand Up @@ -2291,6 +2291,12 @@
runSameEventPairing<true, VarManager::kDecayToMuMu, gkEventFillMapWithMultExtra, gkMuonFillMapWithCov>(events, muonAssocsPerCollision, muonAssocs, muons);
}

void processMuonOnlySkimmedFlow(MyEventsQvectorCentrSelected const& events,
soa::Join<aod::ReducedMuonsAssoc, aod::MuonTrackCuts> const& muonAssocs, MyMuonTracksWithCovWithAmbiguities const& muons)
{
runSameEventPairing<true, VarManager::kDecayToMuMu, gkEventFillMapWithMultExtraWithQVector, gkMuonFillMapWithCov>(events, muonAssocsPerCollision, muonAssocs, muons);
}

void processMixingAllSkimmed(soa::Filtered<MyEventsHashSelected>& events,
soa::Join<aod::ReducedTracksAssoc, aod::BarrelTrackCuts, aod::Prefilter> const& trackAssocs, MyBarrelTracksWithCov const& tracks,
soa::Join<aod::ReducedMuonsAssoc, aod::MuonTrackCuts> const& muonAssocs, MyMuonTracksWithCovWithAmbiguities const& muons)
Expand Down Expand Up @@ -2337,6 +2343,7 @@
PROCESS_SWITCH(AnalysisSameEventPairing, processBarrelOnlySkimmedFlow, "Run barrel only pairing, with skimmed tracks and with flow", false);
PROCESS_SWITCH(AnalysisSameEventPairing, processMuonOnlySkimmed, "Run muon only pairing, with skimmed tracks", false);
PROCESS_SWITCH(AnalysisSameEventPairing, processMuonOnlySkimmedMultExtra, "Run muon only pairing, with skimmed tracks", false);
PROCESS_SWITCH(AnalysisSameEventPairing, processMuonOnlySkimmedFlow, "Run muon only pairing, with skimmed tracks and flow", false);
PROCESS_SWITCH(AnalysisSameEventPairing, processMixingAllSkimmed, "Run all types of mixed pairing, with skimmed tracks/muons", false);
PROCESS_SWITCH(AnalysisSameEventPairing, processMixingBarrelSkimmed, "Run barrel type mixing pairing, with skimmed tracks", false);
PROCESS_SWITCH(AnalysisSameEventPairing, processMixingBarrelSkimmedFlow, "Run barrel type mixing pairing, with flow, with skimmed tracks", false);
Expand Down
Loading