Commit 5096557e authored by Leszek Kosarzewski's avatar Leszek Kosarzewski
Browse files

Make sure e.z() is treated as negative

parent 7cf1aca4
......@@ -91,11 +91,11 @@ public:
ei.x = 0.;
ei.y = 0.;
if( fabs(ei.z - 5.0) < 1.0 )
if( fabs(ei.z + 5.0) < 1.0 )
ei.z = -5.0;
else if( fabs(ei.z - 10.0) < 1.0 )
else if( fabs(ei.z + 10.0) < 1.0 )
ei.z = -10.0;
else if( fabs(ei.z - 18.0) < 1.0 )
else if( fabs(ei.z + 18.0) < 1.0 )
ei.z = -18.0;
ei.t = sqrt( ei.z*ei.z + m_electron*m_electron );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment