|
16 | 16 |
|
17 | 17 | /// \author Andrea Giovanni Riffero <andrea.giovanni.riffero@cern.ch> |
18 | 18 |
|
19 | | -#include <PWGUD/DataModel/UDTables.h> |
| 19 | +#include "PWGUD/DataModel/UDTables.h" |
20 | 20 |
|
21 | 21 | #include <CommonConstants/PhysicsConstants.h> |
| 22 | +#include <PWGUD/DataModel/UDTables.h> |
22 | 23 | #include <Framework/AnalysisDataModel.h> |
23 | 24 | #include <Framework/AnalysisTask.h> |
24 | 25 | #include <Framework/O2DatabasePDGPlugin.h> |
25 | 26 | #include <Framework/runDataProcessing.h> |
26 | 27 |
|
27 | 28 | #include <Math/Vector4D.h> |
28 | 29 | #include <Math/VectorUtil.h> |
29 | | -#include <TPDGCode.h> |
30 | 30 | #include <TRandom3.h> |
31 | 31 |
|
32 | 32 | #include <unordered_map> |
@@ -181,6 +181,9 @@ const int k4Tracks = 4; |
181 | 181 |
|
182 | 182 | struct fwdMuonsUPC { |
183 | 183 |
|
| 184 | + // a PDG object |
| 185 | + Service<o2::framework::O2DatabasePDG> pdg; |
| 186 | + |
184 | 187 | using CandidatesFwd = soa::Join<o2::aod::UDCollisions, o2::aod::UDCollisionsSelsFwd>; |
185 | 188 | using ForwardTracks = soa::Join<o2::aod::UDFwdTracks, o2::aod::UDFwdTracksExtra>; |
186 | 189 | using CompleteFwdTracks = soa::Join<ForwardTracks, o2::aod::UDMcFwdTrackLabels>; |
@@ -270,7 +273,7 @@ struct fwdMuonsUPC { |
270 | 273 | if (candId < 0) { |
271 | 274 | continue; |
272 | 275 | } |
273 | | - if (std::abs(tr.pdgCode()) != PDG_t::kMuonMinus) { |
| 276 | + if (std::abs(tr.pdgCode()) != pdg->GetParticle("mu-")->PdgCode()) { |
274 | 277 | continue; |
275 | 278 | } |
276 | 279 | tracksPerCand[candId].push_back(tr.globalIndex()); |
@@ -531,7 +534,7 @@ struct fwdMuonsUPC { |
531 | 534 | { |
532 | 535 |
|
533 | 536 | // check that all pairs are mu+mu- |
534 | | - if (std::abs(McPart1.pdgCode()) != PDG_t::kMuonMinus || std::abs(McPart2.pdgCode()) != PDG_t::kMuonMinus) { |
| 537 | + if (std::abs(McPart1.pdgCode()) != pdg->GetParticle("mu-")->PdgCode() || std::abs(McPart2.pdgCode()) != pdg->GetParticle("mu-")->PdgCode()) { |
535 | 538 | LOGF(debug, "PDG codes: %d | %d", McPart1.pdgCode(), McPart2.pdgCode()); |
536 | 539 | return; |
537 | 540 | } |
@@ -594,7 +597,7 @@ struct fwdMuonsUPC { |
594 | 597 | { |
595 | 598 |
|
596 | 599 | // check that all pairs are mu+mu- |
597 | | - if (std::abs(McPart1.pdgCode()) != PDG_t::kMuonMinus || std::abs(McPart2.pdgCode()) != PDG_t::kMuonMinus) |
| 600 | + if (std::abs(McPart1.pdgCode()) != pdg->GetParticle("mu-")->PdgCode() || std::abs(McPart2.pdgCode()) != pdg->GetParticle("mu-")->PdgCode()) |
598 | 601 | LOGF(debug, "PDG codes: %d | %d", McPart1.pdgCode(), McPart2.pdgCode()); |
599 | 602 |
|
600 | 603 | // V0 selection |
|
0 commit comments