GSI Forum - RDF feed
type: channel
description: GSI Helmholtzzentrum für Schwerionenforschung
items: Problems with integer FairTrackPar charge
items: Re: Problems with integer FairTrackPar charge

Problems with integer FairTrackPar charge
type: item
description: Hello, after moving the charge in FairTrackPar from float to integer the genfit/geane code crashes in the following way: Toggle Spoiler *** Break *** floating point exception (no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". Attaching to program: /proc/15127/exe, process 15127 (no debugging symbols found)...done. [Thread debugging using libthread_db enabled] [New Thread -1208826176 (LWP 15127)] (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. 0x0075f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x00529f13 in __waitpid_nocancel () from /lib/tls/libc.so.6 #2 0x004d37b9 in do_system () from /lib/tls/libc.so.6 #3 0x0024198d in system () from /lib/tls/libpthread.so.0 #4 0x0096d4b7 in TUnixSystem::Exec () from /home/spataro/july09/tools/root/lib/libCore.so.5.24 #5 0x0097314f in TUnixSystem::StackTrace () from /home/spataro/july09/tools/root/lib/libCore.so.5.24 #6 0x0096fb4a in TUnixSystem::DispatchSignals () from /home/spataro/july09/tools/root/lib/libCore.so.5.24 #7 0x0096fbd8 in SigHandler () from /home/spataro/july09/tools/root/lib/libCore.so.5.24 #8 0x0096ee55 in sighandler () from /home/spataro/july09/tools/root/lib/libCore.so.5.24 #9 <signal handler called> #10 0x0190ea69 in FairGeaneUtil::FromSDToMars (this=0xbfe44d10, PC=0xbfe44c40, RC=0xbfe44c60, H=0xbfe44d70, CH=0, SP1=1, DJ1=0xbfe452d8, DK1=0xbfe452f0, PD=0xbfe44d50, RD=@0xbfe44b20) at /home/spataro/july09/pandaroot/trackbase/FairGeaneUtil.cxx:1485 #11 0x018fc832 in FairTrackParP::FairTrackParP () at /home/spataro/july09/tools/root/include/TVector3.h:280 #12 0x0631147b in GeaneTrackRep::extrapolate (this=0xca446f0, pl=@0xbfe464c0, statePred=@0xbfe46640, covPred=@0xbfe46540) at /home/spataro/july09/pandaroot/trackrep/Gea…
creator: StefanoSpataro
date: 2009-09-16T14:58:56-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: I don't know how all these tracking classes work, but it looks like a division by zero, probably because of truncating a float that was almost but not exactly +/- 1.0 to zero, when converting it to an integer on the lines in FairTrackParX that give the warnings. Perhaps rounding the charges when they are calculated on those lines instead of implicitly truncating them to integers would help, just a guess though.
creator: Elwin Dijck
date: 2009-09-16T18:49:34-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Hi, I found few places where it has to be changed from Double_t to Int_t in geane and trackbase. it is now replaced in SVN r6547. can you please check if it is still crashing. for me it seems to work! regards Mohammad
creator: Mohammad Al-Turany
date: 2009-09-16T23:45:05-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Hi, thanks, but unfortunately the problem still persists: *** Event # 1 ===== PndLheHitsMaker ===== Total number of hits for tracking: 88 Total number of tracks in TPC: 1 Good tracks in TPC: 1 Working with 88 hits found 1 tracks finder : Real Time = 0.01 seconds Cpu Time = 0.00 seconds ===== PndLheTrackFitter ===== Number of tracks for fitting 1 *** Break *** floating point exception (no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". Attaching to program: /proc/9557/exe, process 9557 (no debugging symbols found)...done. [Thread debugging using libthread_db enabled] [New Thread -1208490304 (LWP 9557)] (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. 0x0075f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x00475f13 in __waitpid_nocancel () from /lib/tls/libc.so.6 #2 0x0041f7b9 in do_system () from /lib/tls/libc.so.6 #3 0x003e498d in system () from /lib/tls/libpthread.so.0 #4 0x0096d4b7 in TUnixSystem::Exec () from /home/spataro/july09/tools/root/lib/libCore.so.5.24 #5 0x0097314f in TUnixSystem::StackTrace () from /home/spataro/july09/tools/root/lib/libCore.so.5.24 #6 0x0096fb4a in TUnixSystem::DispatchSignals () from /home/spataro/july09/tools/root/lib/libCore.so.5.24 #7 0x0096fbd8 in SigHandler () from /home/spataro/july09/tools/root/lib/libCore.so.5.24 #8 0x0096ee55 in sighandler () from /home/spataro/july09/tools/root/lib/libCore.so.5.24 #9 <signal handler called> #10 0x052499fb in FairGeaneUtil::FromSDToMars (this=0xbfe972e0, PC=0xbfe97210, RC=0xbfe97230, H=0xbfe97340, CH=@0xbfe972d4, SP1=1, DJ1=0xbfe97898, DK1=0xbfe978b0, PD=0xbfe97320, RD=@0xbfe970f0) at /home/spataro/july09/pandaroot/trackbase/FairGeaneUtil.cxx:1485 #11 0x05237836 in FairTrackParP::FairTrackParP () at /hom…
creator: StefanoSpataro
date: 2009-09-17T10:04:34-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: The rounding issue is not fixed. My guess is that the lines where the charge calculation is done in two steps give a zero charge sometimes (like FairTrackParH.cxx:43-44) due to rounding errors. Perhaps changing it to something like fq = (int)TMath::Sign(1.0, fQp) or doing it in one step would prevent the problem.
creator: Elwin Dijck
date: 2009-09-17T11:14:07-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Hi all, I found the TMath::Nint(Float_t) function which might be exactly what we look for. I wonder if it is default to track only charges of ±1. Is it really not possible to track e.g. alphas with Panda later from pbar->Nucleus? Kind regards, Ralf.
creator: Ralf Kliemt
date: 2009-09-17T16:32:34-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Hi i have been tracking particles ion-like, by obtaining the charge by using GetChargeIon(Int_t ion) in my class PndHypDPatternRecoTask. If the question concerns whether geane can track particles with charge magnitude bigger than 1 or not, that i don't know because i was using LSLTrackRep. But i think it must be any problem. Long time ago, i remmember there were some problems by trying get rid of pdgcode of ions, but maybe by giving the charge magnitude as I'm doing could solve the problem. best regards Alicia. Int_t PndHypDPatternRecoTask::GetChargeIon(Int_t ion) 261 { 262 Int_t A,Z,L; 263 264 if(ion>1000000000&&(ion<1010000000)) 265 { ion -= 1000000000; 266 Z = ion/10000; 267 ion -= 10000*Z; 268 A = ion/10; 269 cout<<" ion charge "<<Z<<endl; 270 271 return Z; 272 273 } 287 }
creator: asanchez
date: 2009-09-18T07:33:11-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Excuse me, the problem here is not how much the charge of a track is; the tracking code does no differences between charge 1 and 2 (apart if one refits a track with another particle hypothesis, not done presently in the code). Setting the value of the charge to the correct place is pid job, tracking should only set the sign. In propagation the parameter which is used is q/p, then geane should be able to propagate particles with higher charge. Here the problem is that I have asked some time ago to set the charge as integer instead of float. This was done by Mohammad, but somewhere in the code there is some part of the code that is doing bad things... while before the "change" everything was running fine. At least this is my feeling.
creator: StefanoSpataro
date: 2009-09-18T08:20:54-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Hi all, to answer your questions about GEANE: geane is able to track any particle (so also particle with charge different from +1 and -1 and neutral particles). I will check with prof. Rotondi the interface to be sure that everything works fine: it surely works for charge +1 or -1, it should be working also for other charged tracks (I made a quick test and it seems right) and it surely does not work for neutral particles (since we store as first track parameter q/p and in that case q = 0). By the side of geane it should be enough to use, as Ralf said, the TMath::Nint(Float_t) function if we want to have an integer charge (or to go back to double if we decide to). Best regards, Lia.
creator: Lia Lavezzi
date: 2009-09-18T11:20:43-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Hi, just to get back to the original problem, namely the crash seen by Stefano after the change from Double_t to Int_t. I am not able to reproduce this on any of the following systems: Mac Os X 10.5.8 Suse Enterprise 10.3 Ubuntu 9.04 all 64 bit systems, Stefano already told me privately that it crashes on the GSI cluster, but unfortunately today it was impossible to run on the GSI cluster! any way I will test this further and try to find out what is going on. regards Mohammad
creator: Mohammad Al-Turany
date: 2009-09-18T21:47:45-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Following the previous suggestions I have substituted, in FairTrackParP.cxx, all the: fq = int(P * fQp) with: fq = (int)TMath::Sign(1.0, fQp) Now the code does not crash anymore (with 200 events), then maybe the problem is solved. Maybe this fix should be done even on the helix parameters... I do not have the rights to write inside trackbase, therefore somebody else should do these changes and commit the code...
creator: StefanoSpataro
date: 2009-09-21T09:43:34-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Hi, I manage to repruduce the crash on Debian Etch 32, and it is in the FairGeaneUtil: Quote: Program received signal SIGFPE, Arithmetic exception. [Switching to Thread -1229228352 (LWP 18037)] 0xb3fe5bc1 in FairGeaneUtil::FromSDToMars (this=0xbfc1e124, PC=0xbfc1e0d8, RC=0xbfc1dfd0, H=0xbfc1e0f0, CH=0, SP1=1, DJ1=0xbfc1e6a0, DK1=0xbfc1e6b8, PD=0xbfc1e108, RD=@0xbfc1deb0) at /misc/turany/svn/pandaroot/trackbase/FairGeaneUtil.cxx:1485 1485 M65[0][0] = - SPU*PM2*PC[1]/(CH*PVW); So as you can see it is a division by zero! and this comes from the CH = 0 which comes in this case from FairTrackParP: fq= int (P * fQp); As Stefano suggested replacing this with fq = (int)TMath::Sign(1.0, fQp) Solves the problem. I tried to print out the values for these two functions using 32 and 64 bit mashines: on 32-bit: Quote: FairTrackParP::FairTrackParP fq = (int)TMath::Sign(1.0, fQp); P =2.046 fQp = -0.4887 fq = -1 FairTrackParP::FairTrackParP fq= int (P * fQp); P =2.046 fQp = -0.4887 fq = 0 and the same code on 64 bit: Quote: FairTrackParP::FairTrackParP fq = (int)TMath::Sign(1.0, fQp); P =1.957 fQp = -0.5109 fq = -1 FairTrackParP::FairTrackParP fq= int (P * fQp); P =1.957 fQp = -0.5109 fq = -1 which explain why I could not reproduce this problem before! Anyway, the change suggested by Stefano is now in SVN (-r 6568) regards Mohammad
creator: Mohammad Al-Turany
date: 2009-09-21T12:46:11-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: It seems not it works. I think that also the ticket can be closed. Thanks
creator: StefanoSpataro
date: 2009-09-21T13:19:45-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Hi, to me it looks like the int cast goes wrong. This would somehow explain why this is platform-dependant. I replaced the corresponding fq assignments in FairTrackParP with statements like if(fQp<0) fq = -1; else fq = 1; and it works now.
creator: Felix Boehmer
date: 2009-09-21T14:08:50-00:00

Re: Problems with integer FairTrackPar charge
type: item
description: Coming back to this topic, I have seen that in GeaneTrackRep the charge is still defined as double, and then given to FairTrackParP where it is integer. This produces the following warning: /home/spataro/july09/pandaroot/GenfitTools/trackrep/GeaneTrackRep/GeaneTrackRep.cxx: In constructor `GeaneTrackRep::GeaneTrackRep(FairGeanePro*, const GFDetPlane&, const TVector3&, const TVector3&, const TVector3&, double, int)': /home/spataro/july09/pandaroot/GenfitTools/trackrep/GeaneTrackRep/GeaneTrackRep.cxx:53: warning: passing `double' for converting 5 of `FairTrackParP::FairTrackParP(TVector3, TVector3, TVector3, TVector3, Int_t, TVector3, TVector3, TVector3)' Maybe also GeaneTrackRep should be fixed, in order to not produce problems. In this case it seems this change should affect all the kalman tasks and also PndSttPatternRecoTask/2. Comments are welcome
creator: StefanoSpataro
date: 2009-10-27T09:30:47-00:00