diff --git a/PWGUD/Tasks/upcTrackVertexingQA.cxx b/PWGUD/Tasks/upcTrackVertexingQA.cxx index 7dc4be7bbc6..70900886cee 100644 --- a/PWGUD/Tasks/upcTrackVertexingQA.cxx +++ b/PWGUD/Tasks/upcTrackVertexingQA.cxx @@ -14,14 +14,15 @@ /// \author Andrea Tavira Garcia a.tavira@cern.ch /// \author Andrea Giovanni Riffero andrea.giovanni.riffero@cern.ch -#include "Common/CCDB/EventSelectionParams.h" #include "Common/DataModel/PIDResponseTPC.h" #include "Common/DataModel/TrackSelectionTables.h" #include +#include #include #include #include +#include #include #include #include @@ -30,10 +31,9 @@ #include #include -#include -#include -#include -#include +#include +#include // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h) +#include #include #include @@ -72,7 +72,7 @@ struct UpcTrackVertexingQA { HistogramRegistry registry{"registry"}; // services - Service ccdb; // access to database + Service ccdb{}; // access to database // variables to store run info int runNumberBc = 0; // run number used to process BCs @@ -85,8 +85,8 @@ struct UpcTrackVertexingQA { int64_t nTF = 0; // number of time frames in run // constants - const unsigned int twoTracks = 2; - const int unassignedDCA = 999; + static constexpr unsigned int TwoTracks = 2; + static constexpr int UnassignedDCA = 999; static constexpr float MassPion = o2::constants::physics::MassPionCharged; static constexpr float MassMuon = o2::constants::physics::MassMuon; @@ -221,7 +221,7 @@ struct UpcTrackVertexingQA { if (track.pt() < ptTrackMin || std::abs(track.eta()) > etaTrackMax) { return false; } - if (std::abs(track.dcaZ()) >= unassignedDCA || std::abs(track.dcaXY()) >= unassignedDCA) { + if (std::abs(track.dcaZ()) >= UnassignedDCA || std::abs(track.dcaXY()) >= UnassignedDCA) { return false; } return true; @@ -329,7 +329,7 @@ struct UpcTrackVertexingQA { registry.fill(HIST("TrkColl/hTrackSizePerEvent"), goodTracks.size()); // build UPC candidates using events with exactly two opposite sign good tracks - if (goodTracks.size() != twoTracks) { + if (goodTracks.size() != TwoTracks) { return; } auto const& track0 = goodTracks[0]; @@ -386,10 +386,7 @@ struct UpcTrackVertexingQA { registry.fill(HIST("McGen/Part/hTrackSizePerEvent"), goodMcGenParticles.size()); // consider only j/psi->mumu and rho->pipi events - auto genId = mcCollision.getGeneratorId(); - LOGF(info, "Gen Id: {%d}", genId); auto sourceId = mcCollision.getSourceId(); - LOGF(info, "Source Id: {%d}", sourceId); if constexpr (isEmbedded) { if (!sourceId) { @@ -402,7 +399,7 @@ struct UpcTrackVertexingQA { } } - if (goodMcGenParticles.size() != twoTracks) { + if (goodMcGenParticles.size() != TwoTracks) { return; } @@ -413,7 +410,7 @@ struct UpcTrackVertexingQA { LOGF(fatal, "Selected particle has no mother: pdgCode=%d", goodMcGenParticles[0].pdgCode()); return; } - auto motherPart = mothers[0]; + auto const& motherPart = mothers[0]; registry.fill(HIST("McGen/MotherPart/hMotherPdg"), std::abs(motherPart.pdgCode())); registry.fill(HIST("McGen/MotherPart/hPt"), motherPart.pt());