|
9 | 9 | // granted to it by virtue of its status as an Intergovernmental Organization |
10 | 10 | // or submit itself to any jurisdiction. |
11 | 11 |
|
| 12 | +/// \file drawTrackSmearer.C |
| 13 | +/// \brief Draw the ALICE3 track-smearing performance curves for key particle species. |
| 14 | + |
12 | 15 | #include "FlatTrackSmearer.h" |
13 | 16 | #include "TrackUtilities.h" |
14 | 17 |
|
|
17 | 20 | #include <TColor.h> |
18 | 21 | #include <TGraph.h> |
19 | 22 |
|
20 | | -void drawTrackSmearer(const std::vector<std::pair<int, std::string>>& filenames = {{11, "/tmp/lut/lutCov.acts.11.2T.dNdEta5.dat"}, |
21 | | - {13, "/tmp/lut/lutCov.acts.13.2T.dNdEta5.dat"}, |
22 | | - {211, "/tmp/lut/lutCov.acts.211.2T.dNdEta5.dat"}, |
23 | | - {2212, "/tmp/lut/lutCov.acts.2212.2T.dNdEta5.dat"}, |
24 | | - {321, "/tmp/lut/lutCov.acts.321.2T.dNdEta5.dat"}}) |
| 23 | +#include <TPDGCode.h> |
| 24 | + |
| 25 | +namespace |
| 26 | +{ |
| 27 | +constexpr int kElectronPdg = static_cast<int>(PDG_t::kElectron); |
| 28 | +constexpr int kMuonPdg = static_cast<int>(PDG_t::kMuonMinus); |
| 29 | +constexpr int kPionPdg = static_cast<int>(PDG_t::kPiPlus); |
| 30 | +constexpr int kProtonPdg = static_cast<int>(PDG_t::kProton); |
| 31 | +constexpr int kKaonPdg = static_cast<int>(PDG_t::kKPlus); |
| 32 | + |
| 33 | +const std::vector<std::pair<int, std::string>> kDefaultLutFiles = {{kElectronPdg, "/tmp/lut/lutCov.acts.11.2T.dNdEta5.dat"}, |
| 34 | + {kMuonPdg, "/tmp/lut/lutCov.acts.13.2T.dNdEta5.dat"}, |
| 35 | + {kPionPdg, "/tmp/lut/lutCov.acts.211.2T.dNdEta5.dat"}, |
| 36 | + {kProtonPdg, "/tmp/lut/lutCov.acts.2212.2T.dNdEta5.dat"}, |
| 37 | + {kKaonPdg, "/tmp/lut/lutCov.acts.321.2T.dNdEta5.dat"}}; |
| 38 | +} // namespace |
| 39 | + |
| 40 | +void drawTrackSmearer(const std::vector<std::pair<int, std::string>>& filenames = kDefaultLutFiles) |
25 | 41 | { |
26 | 42 |
|
27 | 43 | o2::delphes::TrackSmearer trackSmearer; |
@@ -50,15 +66,15 @@ void drawTrackSmearer(const std::vector<std::pair<int, std::string>>& filenames |
50 | 66 | } |
51 | 67 |
|
52 | 68 | int color = 0; |
53 | | - if (pdg == 11) { |
| 69 | + if (pdg == kElectronPdg) { |
54 | 70 | color = TColor::GetColor("#e41a1c"); |
55 | | - } else if (pdg == 13) { |
| 71 | + } else if (pdg == kMuonPdg) { |
56 | 72 | color = TColor::GetColor("#377eb8"); |
57 | | - } else if (pdg == 211) { |
| 73 | + } else if (pdg == kPionPdg) { |
58 | 74 | color = TColor::GetColor("#4daf4a"); |
59 | | - } else if (pdg == 2212) { |
| 75 | + } else if (pdg == kProtonPdg) { |
60 | 76 | color = TColor::GetColor("#984ea3"); |
61 | | - } else if (pdg == 321) { |
| 77 | + } else if (pdg == kKaonPdg) { |
62 | 78 | color = TColor::GetColor("#ff7f00"); |
63 | 79 | } |
64 | 80 | gPt->SetLineColor(color); |
|
0 commit comments