# Maybe a bug for Electric field

**URL:** <https://fluka-forum.web.cern.ch/t/maybe-a-bug-for-electric-field/8278>\
**Category:** Physics, Transport and Magnetic Fields\
**Created:** [2 April 2026 06:31 UTC](https://fluka-forum.web.cern.ch/t/maybe-a-bug-for-electric-field/8278 "2026-04-02T06:31:42Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![dcalzola](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/d/b782af/32.png) [@dcalzola](https://fluka-forum.web.cern.ch/u/dcalzola)\
**Post date:** [2 April 2026 11:50 UTC](https://fluka-forum.web.cern.ch/t/maybe-a-bug-for-electric-field/8278/3 "2026-04-02T11:50:21Z")

</div>

Hello,

Thanks for this question, this is indeed a valid point. It is indeed a bug, which we have fixed and which will be solved in the upcoming release.

Without going into technicalities, the tracking algorithm was sometimes going into a different branch of the code that incorrectly calculated the particle energy while traveling in the electric field. As a result, only a fraction of the energy the particle was supposed to gain was actually accounted for.

Worry not, we will fix this issue in the upcoming release. I attach here the plot you would obtain after the next update:

 ![energy_spectrum](https://fluka-forum.web.cern.ch/uploads/default/original/2X/b/be6f9299d5c97e19269e6e44214dde6e3c0da20b.png)

Nice catch! Have a nice day.  
Cheers,  
Daniele

---

_[View the full topic](https://fluka-forum.web.cern.ch/t/maybe-a-bug-for-electric-field/8278)._
