1414// / \author Andrea Tavira Garcia a.tavira@cern.ch
1515// / \author Andrea Giovanni Riffero andrea.giovanni.riffero@cern.ch
1616
17- #include " Common/CCDB/EventSelectionParams.h"
1817#include " Common/DataModel/PIDResponseTPC.h"
1918#include " Common/DataModel/TrackSelectionTables.h"
2019
2120#include < CCDB/BasicCCDBManager.h>
21+ #include < CommonConstants/LHCConstants.h>
2222#include < CommonConstants/PhysicsConstants.h>
2323#include < DataFormatsParameters/AggregatedRunInfo.h>
2424#include < Framework/AnalysisDataModel.h>
25+ #include < Framework/AnalysisHelpers.h>
2526#include < Framework/AnalysisTask.h>
2627#include < Framework/Configurable.h>
2728#include < Framework/HistogramRegistry.h>
3031#include < Framework/Logger.h>
3132#include < Framework/runDataProcessing.h>
3233
33- #include < Math/Vector4D.h>
34- #include < TH1.h>
35- #include < TH2.h>
36- #include < TPDGCode.h>
34+ #include < Math/GenVector/LorentzVector.h>
35+ #include < Math/Vector4D.h> // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h)
36+ #include < Math/Vector4Dfwd.h>
3737
3838#include < array>
3939#include < cmath>
@@ -72,7 +72,7 @@ struct UpcTrackVertexingQA {
7272 HistogramRegistry registry{" registry" };
7373
7474 // services
75- Service<o2::ccdb::BasicCCDBManager> ccdb; // access to database
75+ Service<o2::ccdb::BasicCCDBManager> ccdb{} ; // access to database
7676
7777 // variables to store run info
7878 int runNumberBc = 0 ; // run number used to process BCs
@@ -85,8 +85,8 @@ struct UpcTrackVertexingQA {
8585 int64_t nTF = 0 ; // number of time frames in run
8686
8787 // constants
88- const unsigned int twoTracks = 2 ;
89- const int unassignedDCA = 999 ;
88+ static constexpr unsigned int TwoTracks = 2 ;
89+ static constexpr int UnassignedDCA = 999 ;
9090
9191 static constexpr float MassPion = o2::constants::physics::MassPionCharged;
9292 static constexpr float MassMuon = o2::constants::physics::MassMuon;
@@ -221,7 +221,7 @@ struct UpcTrackVertexingQA {
221221 if (track.pt () < ptTrackMin || std::abs (track.eta ()) > etaTrackMax) {
222222 return false ;
223223 }
224- if (std::abs (track.dcaZ ()) >= unassignedDCA || std::abs (track.dcaXY ()) >= unassignedDCA ) {
224+ if (std::abs (track.dcaZ ()) >= UnassignedDCA || std::abs (track.dcaXY ()) >= UnassignedDCA ) {
225225 return false ;
226226 }
227227 return true ;
@@ -329,7 +329,7 @@ struct UpcTrackVertexingQA {
329329 registry.fill (HIST (" TrkColl/hTrackSizePerEvent" ), goodTracks.size ());
330330
331331 // build UPC candidates using events with exactly two opposite sign good tracks
332- if (goodTracks.size () != twoTracks ) {
332+ if (goodTracks.size () != TwoTracks ) {
333333 return ;
334334 }
335335 auto const & track0 = goodTracks[0 ];
@@ -386,10 +386,7 @@ struct UpcTrackVertexingQA {
386386 registry.fill (HIST (" McGen/Part/hTrackSizePerEvent" ), goodMcGenParticles.size ());
387387
388388 // consider only j/psi->mumu and rho->pipi events
389- auto genId = mcCollision.getGeneratorId ();
390- LOGF (info, " Gen Id: {%d}" , genId);
391389 auto sourceId = mcCollision.getSourceId ();
392- LOGF (info, " Source Id: {%d}" , sourceId);
393390
394391 if constexpr (isEmbedded) {
395392 if (!sourceId) {
@@ -402,7 +399,7 @@ struct UpcTrackVertexingQA {
402399 }
403400 }
404401
405- if (goodMcGenParticles.size () != twoTracks ) {
402+ if (goodMcGenParticles.size () != TwoTracks ) {
406403 return ;
407404 }
408405
@@ -413,7 +410,7 @@ struct UpcTrackVertexingQA {
413410 LOGF (fatal, " Selected particle has no mother: pdgCode=%d" , goodMcGenParticles[0 ].pdgCode ());
414411 return ;
415412 }
416- auto motherPart = mothers[0 ];
413+ auto const & motherPart = mothers[0 ];
417414
418415 registry.fill (HIST (" McGen/MotherPart/hMotherPdg" ), std::abs (motherPart.pdgCode ()));
419416 registry.fill (HIST (" McGen/MotherPart/hPt" ), motherPart.pt ());
0 commit comments