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
12 changes: 8 additions & 4 deletions PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <iostream>

Check failure on line 67 in PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <map>
#include <memory>
Expand Down Expand Up @@ -294,7 +294,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 297 in PWGDQ/Tasks/dqEfficiency_withAssoc_direct.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 @@

void init(o2::framework::InitContext& context)
{
cout << "AnalysisEventSelection::init() called" << endl;

Check failure on line 332 in PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
if (context.mOptions.get<bool>("processDummy")) {
return;
}
Expand Down Expand Up @@ -374,13 +374,13 @@
fCCDB->setLocalObjectValidityChecking();
fCCDB->setCreatedNotAfter(fConfigNoLaterThan.value);
fCCDBApi.init(fConfigCcdbUrl.value);
cout << "AnalysisEventSelection::init() completed" << endl;

Check failure on line 377 in PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

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

template <uint32_t TEventFillMap, typename TEvents, typename TEventsMC>
void runEventSelection(TEvents const& events, BCsWithTimestamps const& bcs, TEventsMC const& mcEvents)
{
cout << "AnalysisEventSelection::runEventSelection() called with " << events.size() << " events and " << bcs.size() << " BCs" << endl;

Check failure on line 383 in PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
if (bcs.size() > 0 && bcs.begin().runNumber() != fCurrentRun) {
std::map<std::string, std::string> metadataRCT, header;
header = fCCDBApi.retrieveHeaders(Form("RCT/Info/RunInformation/%i", bcs.begin().runNumber()), metadataRCT, -1);
Expand All @@ -389,7 +389,7 @@
VarManager::SetSORandEOR(sor, eor);
}

cout << "Filling TimeFrame statistics histograms" << endl;

Check failure on line 392 in PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
VarManager::ResetValues(0, VarManager::kNEventWiseVariables);
VarManager::FillTimeFrame(bcs);
VarManager::FillTimeFrame(events);
Expand All @@ -402,7 +402,7 @@
fBCCollMap.clear();
// int iEvent = 0;

cout << "Starting event loop for event selection" << endl;

Check failure on line 405 in PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
for (auto& event : events) {

auto bc = event.template bc_as<BCsWithTimestamps>();
Expand Down Expand Up @@ -450,13 +450,13 @@
}
}

cout << "AnalysisEventSelection::runEventSelection() completed" << endl;

Check failure on line 453 in PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

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

template <uint32_t TEventFillMap, typename TEvents>
void publishSelections(TEvents const& events)
{
cout << "AnalysisEventSelection::publishSelections() called" << endl;

Check failure on line 459 in PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
std::map<int64_t, bool> collisionSplittingMap; // key: event global index, value: whether pileup event is a possible splitting

// Reset the fValues array and fill event observables
Expand Down Expand Up @@ -530,7 +530,7 @@
}
eventSel(evSel);
}
cout << "AnalysisEventSelection::publishSelections() completed" << endl;

Check failure on line 533 in PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

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

void processDirect(MyEvents const& events, BCsWithTimestamps const& bcs, soa::Join<aod::McCollisions, aod::McCollsExtra, aod::MultMCExtras> const& mcEvents)
Expand Down Expand Up @@ -2017,7 +2017,7 @@
PresliceUnsorted<aod::McParticles> perReducedMcEvent = aod::mcparticle::mcCollisionId;

// template <int TPairType, typename TEventsMC>
template <int TPairType, typename TEvents, typename TEventsMC>
template <int TPairType, uint32_t TEventFillMap, typename TEvents, typename TEventsMC>
void runMCGen(TEvents const& events, TEventsMC const& mcEvents, McParticles const& mcTracks)
{
cout << "AnalysisSameEventPairing::runMCGen() called" << endl;
Expand Down Expand Up @@ -2053,7 +2053,11 @@
eFromJpsiMcParticleIndices.clear();

auto mcCollisionGlobalIndex = event.mcCollisionId();
// auto mcEvent = mcEvents.rawIteratorAt(mcCollisionGlobalIndex);
auto mcEvent = mcEvents.rawIteratorAt(mcCollisionGlobalIndex);

// fill event information
VarManager::FillEvent<TEventFillMap>(event);
VarManager::FillEvent<VarManager::ObjTypes::CollisionMC>(mcEvent);

auto groupedMCTracks = mcTracks.sliceBy(perReducedMcEvent, mcCollisionGlobalIndex);
groupedMCTracks.bindInternalIndicesTo(&mcTracks);
Expand Down Expand Up @@ -2161,7 +2165,7 @@
{
cout << "AnalysisSameEventPairing::processBarrelOnly() called" << endl;
runSameEventPairing<true, VarManager::kDecayToEE, gkEventFillMapWithMults, gkTrackFillMapWithCov>(events, bcs, trackAssocsPerCollision, barrelAssocs, barrelTracks, mcEvents, mcTracks);
runMCGen<VarManager::kDecayToEE>(events, mcEvents, mcTracks);
runMCGen<VarManager::kDecayToEE, gkEventFillMapWithMults>(events, mcEvents, mcTracks);
cout << "AnalysisSameEventPairing::processBarrelOnly() completed" << endl;
}

Expand All @@ -2171,7 +2175,7 @@
{
cout << "AnalysisSameEventPairing::processBarrelPbPbOnly() called" << endl;
runSameEventPairing<true, VarManager::kDecayToEE, gkEventFillMapWithCentAndMults, gkTrackFillMapWithCov>(events, bcs, trackAssocsPerCollision, barrelAssocs, barrelTracks, mcEvents, mcTracks);
runMCGen<VarManager::kDecayToEE>(events, mcEvents, mcTracks);
runMCGen<VarManager::kDecayToEE, gkEventFillMapWithCentAndMults>(events, mcEvents, mcTracks);
cout << "AnalysisSameEventPairing::processBarrelPbPbOnly() completed" << endl;
}

Expand Down
Loading