Skip to content
Open
Show file tree
Hide file tree
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: 5 additions & 7 deletions PWGDQ/Core/AnalysisCompositeCut.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@

#include <vector>

ClassImp(AnalysisCompositeCut)

//____________________________________________________________________________
AnalysisCompositeCut::AnalysisCompositeCut(bool useAND) : AnalysisCut(),
fOptionUseAND(useAND),
fCutList(),
fCompositeCutList()
//____________________________________________________________________________
AnalysisCompositeCut::AnalysisCompositeCut(bool useAND) : AnalysisCut(),
fOptionUseAND(useAND),
fCutList(),
fCompositeCutList()
{
//
// default constructor
Expand Down
6 changes: 2 additions & 4 deletions PWGDQ/Core/AnalysisCompositeCut.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class AnalysisCompositeCut : public AnalysisCut

void AddCut(AnalysisCut* cut)
{
if (cut->IsA() == AnalysisCompositeCut::Class()) {
fCompositeCutList.push_back(*(AnalysisCompositeCut*)cut);
if (auto* composite = dynamic_cast<AnalysisCompositeCut*>(cut)) {
fCompositeCutList.push_back(*composite);
} else {
fCutList.push_back(*cut);
}
Expand All @@ -52,8 +52,6 @@ class AnalysisCompositeCut : public AnalysisCut
bool fOptionUseAND; // true (default): apply AND on all cuts; false: use OR
std::vector<AnalysisCut> fCutList; // list of cuts
std::vector<AnalysisCompositeCut> fCompositeCutList; // list of composite cuts

ClassDef(AnalysisCompositeCut, 2);
};

#endif // PWGDQ_CORE_ANALYSISCOMPOSITECUT_H_
2 changes: 0 additions & 2 deletions PWGDQ/Core/AnalysisCut.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@

#include <Rtypes.h>

#include <iostream>

Check failure on line 18 in PWGDQ/Core/AnalysisCut.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <vector>

using std::cout;
using std::endl;

ClassImp(AnalysisCut);

std::vector<int> AnalysisCut::fgUsedVars = {};

//____________________________________________________________________________
Expand Down Expand Up @@ -64,5 +62,5 @@
//____________________________________________________________________________
void AnalysisCut::PrintCuts()
{
cout << "**************** AnalysisCut::PrintCuts" << endl;

Check failure on line 65 in PWGDQ/Core/AnalysisCut.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}
2 changes: 0 additions & 2 deletions PWGDQ/Core/AnalysisCut.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ class AnalysisCut : public TNamed

protected:
std::vector<CutContainer> fCuts;

ClassDef(AnalysisCut, 2);
};

//____________________________________________________________________________
Expand Down
14 changes: 0 additions & 14 deletions PWGDQ/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,3 @@ o2physics_add_library(PWGDQCore
MCProng.cxx
MCSignal.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2::DCAFitter O2::GlobalTracking O2Physics::AnalysisCore KFParticle::KFParticle O2Physics::MLCore)

o2physics_target_root_dictionary(PWGDQCore
HEADERS AnalysisCut.h
AnalysisCompositeCut.h
VarManager.h
HistogramManager.h
CutsLibrary.h
MixingHandler.h
MixingLibrary.h
HistogramsLibrary.h
MCProng.h
MCSignal.h
MCSignalLibrary.h
LINKDEF PWGDQCoreLinkDef.h)
2 changes: 0 additions & 2 deletions PWGDQ/Core/HistogramManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <RtypesCore.h>

#include <cstdint>
#include <iostream>

Check failure on line 29 in PWGDQ/Core/HistogramManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <list>
#include <memory>
#include <vector>
Expand All @@ -43,8 +43,6 @@
#include <TProfile2D.h>
#include <TProfile3D.h>

ClassImp(HistogramManager);

//_______________________________________________________________________________
HistogramManager::HistogramManager() : TNamed("", ""),
fMainList(nullptr),
Expand Down Expand Up @@ -924,14 +922,14 @@
//
// Print the defined histograms
//
cout << "###################################################################" << endl;

Check failure on line 925 in PWGDQ/Core/HistogramManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
cout << "HistogramManager:: " << fMainList->GetName() << endl;

Check failure on line 926 in PWGDQ/Core/HistogramManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
for (int i = 0; i < fMainList->GetEntries(); ++i) {
auto* list = reinterpret_cast<TList*>(fMainList->At(i));
cout << "************** List " << list->GetName() << endl;

Check failure on line 929 in PWGDQ/Core/HistogramManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
for (int j = 0; j < list->GetEntries(); ++j) {
TObject* obj = list->At(j);
cout << obj->GetName() << ": " << obj->IsA()->GetName() << endl;

Check failure on line 932 in PWGDQ/Core/HistogramManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}
}
}
2 changes: 0 additions & 2 deletions PWGDQ/Core/HistogramManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ class HistogramManager : public TNamed

HistogramManager& operator=(const HistogramManager& c);
HistogramManager(const HistogramManager& c);

ClassDef(HistogramManager, 2)
};

#endif // PWGDQ_CORE_HISTOGRAMMANAGER_H_
2 changes: 0 additions & 2 deletions PWGDQ/Core/MCProng.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <iostream>

Check failure on line 21 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <map>
#include <vector>

ClassImp(MCProng);

std::map<TString, int> MCProng::fgSourceNames = {
{"kNothing", MCProng::kNothing},
{"kPhysicalPrimary", MCProng::kPhysicalPrimary},
Expand Down Expand Up @@ -422,8 +420,8 @@
}
break;
case 900: // electron from LF mesons + Quarkonias for LMEE
decision = absPDG == 111 || // pion

Check failure on line 423 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
absPDG == 221 || // eta

Check failure on line 424 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
absPDG == 331 || // eta'
absPDG == 113 || // rho
absPDG == 223 || // omega
Expand Down
2 changes: 0 additions & 2 deletions PWGDQ/Core/MCProng.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,5 @@ class MCProng
bool fCheckGenerationsInTime;
std::vector<int> fPDGInHistory;
std::vector<bool> fExcludePDGInHistory;

ClassDef(MCProng, 2);
};
#endif // PWGDQ_CORE_MCPRONG_H_
2 changes: 0 additions & 2 deletions PWGDQ/Core/MCSignal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
using std::cout;
using std::endl;

ClassImp(MCSignal);

//________________________________________________________________________________________________
MCSignal::MCSignal() : TNamed("", ""),
fProngs({}),
Expand Down
2 changes: 0 additions & 2 deletions PWGDQ/Core/MixingHandler.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <vector>
using namespace std;

ClassImp(MixingHandler);

//_________________________________________________________________________
MixingHandler::MixingHandler() : TNamed(),
fIsInitialized(false),
Expand Down
15 changes: 7 additions & 8 deletions PWGDQ/Core/MixingHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <algorithm>
#include <array>
#include <cstdint>
#include <iostream>
#include <map>
#include <vector>
Expand Down Expand Up @@ -57,7 +58,7 @@ class MixingHandler : public TNamed
// bit map for active filtering bits of all the tracks
uint32_t filteringMask = 0;
// counters to keep track of how many times the event was used for mixing (for each track cut separately)
std::array<short, 64> counters = {0};
std::array<int16_t, 64> counters = {0};
// add a track to the event and update the filtering mask accordingly
void AddTrack1(const MixingTrack& track)
{
Expand All @@ -74,7 +75,7 @@ class MixingHandler : public TNamed
// 1) increment the counters for a given track cut bit mask and if the counters reached the pool depth,
// 2) clear the corresponding bit in the tracks filtering flags to exclude them from further mixing
// 3) for each track, if there are no more active bits in the filtering mask, then remove the track from the event
void IncrementCounters(uint32_t mask, short poolDepth)
void IncrementCounters(uint32_t mask, int16_t poolDepth)
{
for (int i = 0; i < 32; i++) {
uint32_t bitMask = (static_cast<uint32_t>(1) << i);
Expand Down Expand Up @@ -150,7 +151,7 @@ class MixingHandler : public TNamed
}
// The function that performs the mixing is called outside this class, but the pool provides the events and tracks to be mixed and takes care of updating the events after mixing
// (e.g. incrementing the counters and removing the tracks that reached the pool depth for a given cut)
void UpdatePool(const MixingEvent& event, short poolDepth)
void UpdatePool(const MixingEvent& event, int16_t poolDepth)
{
for (auto& event : events) {
event.IncrementCounters(event.filteringMask, poolDepth);
Expand All @@ -176,14 +177,14 @@ class MixingHandler : public TNamed

// setters
void AddMixingVariable(int var, std::vector<float> binLims);
void SetPoolDepth(short depth) { fPoolDepth = depth; }
void SetPoolDepth(int16_t depth) { fPoolDepth = depth; }

// getters
// int GetNMixingVariables() const { return fVariables.size(); }
// int GetMixingVariable(VarManager::Variables var); // returns the position in the internal varible list of the handler. Useful for checks, mostly
// std::vector<float> GetMixingVariableLimits(VarManager::Variables var);
MixingPool& GetPool(int category) { return fPools[category]; }
short GetPoolDepth() const { return fPoolDepth; }
int16_t GetPoolDepth() const { return fPoolDepth; }

void Init();
int FindEventCategory(float* values);
Expand All @@ -200,10 +201,8 @@ class MixingHandler : public TNamed
std::vector<std::vector<float>> fVariableLimits;
std::map<int, int> fVariables; // key: variable, value: position in the internal variable list of the handler (used to map the variables to the values passed to FindEventCategory)

short fPoolDepth; // number of events to be kept in each pool
int16_t fPoolDepth; // number of events to be kept in each pool
std::map<int, MixingPool> fPools; // key: category, value: pool of events corresponding to that category

ClassDef(MixingHandler, 2);
};

#endif // PWGDQ_CORE_MIXINGHANDLER_H_
22 changes: 0 additions & 22 deletions PWGDQ/Core/PWGDQCoreLinkDef.h

This file was deleted.

2 changes: 0 additions & 2 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@

using namespace o2::constants::physics;

ClassImp(VarManager);

TString VarManager::fgVariableNames[VarManager::kNVars] = {""};
TString VarManager::fgVariableUnits[VarManager::kNVars] = {""};
std::map<TString, int> VarManager::fgVarNamesMap;
Expand Down
2 changes: 0 additions & 2 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -1585,8 +1585,6 @@ class VarManager : public TObject

VarManager& operator=(const VarManager& c);
VarManager(const VarManager& c);

ClassDef(VarManager, 6);
};

template <typename T, typename C>
Expand Down
Loading