Energy deposition isn't correct with plastic scintillators, steel absorber and b field

Geant4 Version: 11.2.0
Operating System: MacOS Sonoma 14.2.1
Compiler/Version:
CMake Version: CMake 3.22.0

I am dealing with a simulation of 40 plastic scintillation bars covered with mylar. These bars are divided in two layers (A and B), each layer has 20 bars. Both layers forms a kind of grid with 1m^2 of area. Between the scintillators and the particle gun is a steel absorber. with a thicks of 70 cm. Between the particle gun and the absorber is a uniform magnetic field B with a magnitude of 0.5 T.

I did four simulations. A simulation consists of 25,000 events where each event consists of shooting a single particle (muons and pions; mu+ & pi+). The first was shooting mu+ with the absorber. The second was shooting the mu+ without the absorber. The third was shooting the pi+ with the absorber. The fourth was shooting the pi+ without the absorber.

I retrieved the data of the particle momentum (a random value in (0,10) GeV/c) and the total energy deposition in all the 40 scintillation bars. When I compare them in a 2D histogram (p vs Edep) I expected to get curves like the bethe-bloch. Instead of that, I got something that didn’t make sense. Please help me, i don’t know what I am doing wrong.

Here is my simulation in my github repository.