diff --git a/PWGUD/Core/DGCutparHolder.cxx b/PWGUD/Core/DGCutparHolder.cxx index cfe813d4ad3..5775a7dd47e 100644 --- a/PWGUD/Core/DGCutparHolder.cxx +++ b/PWGUD/Core/DGCutparHolder.cxx @@ -11,6 +11,8 @@ #include "DGCutparHolder.h" +#include + // setter void DGCutparHolder::SetNDtcoll(int ndtcoll) { diff --git a/PWGUD/Core/DGPIDSelector.h b/PWGUD/Core/DGPIDSelector.h index c130c2094ce..74ad6b54a58 100644 --- a/PWGUD/Core/DGPIDSelector.h +++ b/PWGUD/Core/DGPIDSelector.h @@ -342,10 +342,10 @@ struct DGPIDSelector { // cut on dcaXY and dcaZ LOGF(debug, "mAnaPars.maxDCAxyz %f %f", mAnaPars.maxDCAxy(), mAnaPars.maxDCAz()); - if (track.dcaXY() < -abs(mAnaPars.maxDCAxy()) || track.dcaXY() > abs(mAnaPars.maxDCAxy())) { + if (track.dcaXY() < -std::abs(mAnaPars.maxDCAxy()) || track.dcaXY() > std::abs(mAnaPars.maxDCAxy())) { return false; } - if (track.dcaZ() < -abs(mAnaPars.maxDCAz()) || track.dcaZ() > abs(mAnaPars.maxDCAz())) { + if (track.dcaZ() < -std::abs(mAnaPars.maxDCAz()) || track.dcaZ() > std::abs(mAnaPars.maxDCAz())) { return false; } @@ -379,7 +379,7 @@ struct DGPIDSelector { if (!track.hasTPC()) { continue; } - switch (abs(pidcut.cutType())) { + switch (std::abs(pidcut.cutType())) { case 1: detValue = getTPCnSigma(track, pidcut.cutPID()); break; @@ -387,11 +387,11 @@ struct DGPIDSelector { detValue = track.tpcSignal(); } LOGF(debug, "detValue TPC %f", detValue); - } else if (abs(pidcut.cutDetector()) == 2) { + } else if (std::abs(pidcut.cutDetector()) == 2) { if (!track.hasTOF()) { continue; } - switch (abs(pidcut.cutType())) { + switch (std::abs(pidcut.cutType())) { case 1: detValue = getTOFnSigma(track, pidcut.cutPID()); break; diff --git a/PWGUD/Core/SGCutParHolder.cxx b/PWGUD/Core/SGCutParHolder.cxx index fc7977fec08..d171bd45a61 100644 --- a/PWGUD/Core/SGCutParHolder.cxx +++ b/PWGUD/Core/SGCutParHolder.cxx @@ -11,6 +11,8 @@ #include "SGCutParHolder.h" +#include + // setter void SGCutParHolder::SetNDtcoll(int ndtcoll) { diff --git a/PWGUD/Core/SGSelector.h b/PWGUD/Core/SGSelector.h index 2c5868df303..cddfa730fba 100644 --- a/PWGUD/Core/SGSelector.h +++ b/PWGUD/Core/SGSelector.h @@ -28,11 +28,12 @@ #include "Framework/Logger.h" #include +#include template struct SelectionResult { int value; // The original integer return value - const BC* bc; // Pointer to the BC object + std::shared_ptr bc; // Pointer to the BC object }; namespace o2::aod::sgselector @@ -66,9 +67,9 @@ class SGSelector // LOGF(info, "Collision %f", collision.collisionTime()); // LOGF(info, "Number of close BCs: %i", bcRange.size()); SelectionResult result; - result.bc = &oldbc; if (collision.numContrib() < diffCuts.minNTracks() || collision.numContrib() > diffCuts.maxNTracks()) { result.value = o2::aod::sgselector::TrkOutOfRange; // 4 + result.bc = std::make_shared(oldbc); return result; } auto newbc = oldbc; @@ -97,6 +98,7 @@ class SGSelector } // end of loop over bc range if (!gA && !gC) { result.value = o2::aod::sgselector::NoUpc; // gap = 3 + result.bc = std::make_shared(oldbc); return result; } if (gA && gC) { // loop once again for so-called DG events to get the most active FT0 BC @@ -120,9 +122,8 @@ class SGSelector } newbc = newdgabc; } - result.bc = &newbc; // LOGF(info, "Old BC: %i, New BC: %i",oldbc.globalBC(), newbc.globalBC()); - result.bc = &newbc; + result.bc = std::make_shared(newbc); // result.value = gA && gC ? 2 : (gA ? 0 : 1); result.value = gA && gC ? o2::aod::sgselector::DoubleGap : (gA ? o2::aod::sgselector::SingleGapA : o2::aod::sgselector::SingleGapC); return result; diff --git a/PWGUD/Core/UDFSParser.cxx b/PWGUD/Core/UDFSParser.cxx index 8759e404f69..08c6b947ab2 100644 --- a/PWGUD/Core/UDFSParser.cxx +++ b/PWGUD/Core/UDFSParser.cxx @@ -9,10 +9,14 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#include "Framework/Logger.h" +#include "UDFSParser.h" + #include "CommonConstants/LHCConstants.h" #include "CommonDataFormat/BunchFilling.h" -#include "UDFSParser.h" +#include "Framework/Logger.h" + +#include +#include // ----------------------------------------------------------------------------- UDFSParser::UDFSParser(const char* filename) diff --git a/PWGUD/Core/UDGoodRunSelector.cxx b/PWGUD/Core/UDGoodRunSelector.cxx index ec51580cccf..c9c7d317ec7 100644 --- a/PWGUD/Core/UDGoodRunSelector.cxx +++ b/PWGUD/Core/UDGoodRunSelector.cxx @@ -9,11 +9,17 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#include +#include "PWGUD/Core/UDGoodRunSelector.h" + #include "Framework/Logger.h" + #include "rapidjson/document.h" #include "rapidjson/filereadstream.h" -#include "PWGUD/Core/UDGoodRunSelector.h" + +#include +#include +#include +#include class TFile; diff --git a/PWGUD/DataModel/UDIndex.h b/PWGUD/DataModel/UDIndex.h index 5fdfb0596e6..8a4a236c5af 100644 --- a/PWGUD/DataModel/UDIndex.h +++ b/PWGUD/DataModel/UDIndex.h @@ -19,6 +19,8 @@ #ifndef PWGUD_DATAMODEL_UDINDEX_H_ #define PWGUD_DATAMODEL_UDINDEX_H_ +#include "UDTables.h" + #include "Framework/AnalysisDataModel.h" namespace o2::aod {