GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Fix in lhetrack
Fix in lhetrack [message #6339] Thu, 10 April 2008 10:57 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *physik.uni-giessen.de
Dear all,
I have found a problem in lhetrack code that gave me a crash while processing many events. In particular, the function PndTpcLheTrackCuts::Circle3pnts(...) which estimates from the first and the last point of the track candidate the centre and the radius of the circle crossing those two points and the origin (0,0).

You can see below the old version in PndTpcLheTrackCuts.cxx

Toggle Spoiler


As you can see, the function is not protected agains division by zero (so when x[1]-x[0]==0 or x[2]-x[1]==0). Moreover, the case m_a==m_b (the three points lay on a straight line) does not give results.

I have corrected it in the repository in the following way:

Toggle Spoiler


If the three points lay on a straight line, the circle centre is set at (10000,10000) just to put a high number, probably the code will kill those tracks or be able to recover them.
If there is the division by zero, I have simply exchanged x->y y->x (in this system there is no division by zero anymore), calculated the centre coordinates and re-transformated them into the original system.

I hope I have not messed up things, however now I do not have the crash anymore (or at least there).

Comments and checks are welcome.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EmcCluster: Map version 0 does not exist
Next Topic: Update in Dart.sh
Goto Forum:
  


Current Time: Fri Mar 29 06:31:58 CET 2024

Total time taken to generate the page: 0.01270 seconds