5 import matplotlib.pyplot
as plt
7 plt.style.use(
"tableau-colorblind10")
14 ROOT.gInterpreter.ProcessLine(
'#include "TrkExUtils/MaterialInteraction.h"')
15 ROOT.gSystem.Load(
"libTrkExUtils.so")
321 conv = (centimeter / millimeter) / rho
322 mat = ROOT.Trk.Material(X0 * conv, L0 * conv, A, Z, rho / centimeter**3)
323 particle = ROOT.Trk.muon
324 sigma = ctypes.c_double()
325 kazL = ctypes.c_double()
332 "|{0:<17}|{1:<17}|{2:<17}|{3:<17}|{4:<17}|{5:<17}|".
format(
341 for i
in range(len(p)):
342 atlas_mean_ion.append(
343 -ROOT.Trk.MaterialInteraction.dEdl_ionization(p[i], mat, particle, sigma, kazL)
346 atlas_mop_ion.append(
347 -ROOT.Trk.MaterialInteraction.dE_MPV_ionization(
348 p[i], mat, particle, sigma, kazL, centimeter
353 -ROOT.Trk.MaterialInteraction.dEdl_radiation(p[i], mat, particle, sigma) * conv
357 "|{0:17.5}|{1:17.6}|{2:17.6}|{3:17.6}|{4:17.6}|{5:17.6}|".
format(
367 plt.plot(p, pdg_rad, label=
"PDG rad", marker=
".")
368 plt.plot(p, atlas_rad, label=
"ATLAS rad", marker=
"x")
369 plt.xlabel(
"p [MeV]")
370 plt.ylabel(
"-<dE/dx> [MeV cm^2/g]")
372 plt.savefig(
"dEdx_rad_vs_p.png", dpi=300)
375 plt.plot(p, pdg_mean_ion, label=
"PDG mean ion", marker=
".", markersize=4)
376 plt.plot(p, atlas_mean_ion, label=
"ATLAS mean ion", marker=
"x", markersize=4)
377 plt.plot(p, atlas_mop_ion, label=
"ATLAS mpv ion", marker=
"+", markersize=4)
378 plt.ylabel(
"-<dE/dx> [MeV cm^2/g]")
379 plt.xlabel(
"p [MeV]")
383 plt.savefig(
"dEdx_ion_vs_p_all.png", dpi=300)