Hi Rooters, I use TMinuit in my code. Normally everething is OK, but sometimes I recieve Arithmetic exception: Program received signal SIGFPE, Arithmetic exception. 0x43d817c3 in TMinuit::mnline () from /usr/remote/prive/alice/root/root_v2.25-03.Linux.2.2.14.gcc2952/lib/libMinuit.so Current language: auto; currently c (gdb) bt #0 0x43d817c3 in TMinuit::mnline () from /usr/remote/prive/alice/root/root_v2.25-03.Linux.2.2.14.gcc2952/lib/libMinuit.so #1 0x43d83616 in TMinuit::mnmigr () from /usr/remote/prive/alice/root/root_v2.25-03.Linux.2.2.14.gcc2952/lib/libMinuit.so #2 0x43d7ad9c in TMinuit::mnexcm () from /usr/remote/prive/alice/root/root_v2.25-03.Linux.2.2.14.gcc2952/lib/libMinuit.so #3 0x41b8ea45 in AliPHOSTrackSegmentMakerv1::FindFit (this=0x97d8d70, emcRP=0xa210028, maxAt=0x9b38b50, maxAtEnergy=0x9b38b88, nPar=6, fitparameters=0xa2c43f0) at AliPHOSTrackSegmentMakerv1.cxx:132 Does someone knows, what is going wrong (or how to check this): TMinuit or my program? The data, which should be fitted, looks OK... Sincerely Dmitri. Below one can find my code: -------------------------------------------------------------------- AliPHOSTrackSegmentMakerv1::AliPHOSTrackSegmentMakerv1() : AliPHOSTrackSegmentMaker() { // ctor if(!gMinuit) gMinuit = new TMinuit(100) ; } //____________________________________________________________________________ AliPHOSTrackSegmentMakerv1::~AliPHOSTrackSegmentMakerv1() { // dtor delete gMinuit ; gMinuit = 0 ; } //____________________________________________________________________________ Bool_t AliPHOSTrackSegmentMakerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * maxAt, Float_t * maxAtEnergy, Int_t nPar, Float_t * fitparameters) { // Calls TMinuit to fit the energy distribution of a cluster with several maxima gMinuit->SetPrintLevel(-1) ; // No Printout gMinuit->SetFCN(UnfoldingChiSquare) ; // To set the address of the //minimization function gMinuit->SetObjectFit(emcRP) ; // To tranfer pointer to //UnfoldingChiSquare for(all parameters) gMinuit->mnparm(index, "x", x, 0.1, 0, 0, ierflg) ; gMinuit->mnexcm("SET STR", &p2, 0, ierflg) ; // force TMinuit to // reduce function calls gMinuit->mnexcm("SET GRA", &p1, 1, ierflg) ; // force TMinuit to use // my gradient gMinuit->SetMaxIterations(5); gMinuit->mnexcm("SET NOW", &p2 , 0, ierflg) ; // No Warnings gMinuit->mnexcm("MIGRAD", &p0, 0, ierflg) ; // minimize } //______________________________________________________________________________ void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) { // Calculates th Chi square for the cluster unfolding minimization // Number of parameters, Gradient, Chi squared, parameters, what to do AliPHOSEmcRecPoint * emcRP = (AliPHOSEmcRecPoint *)gMinuit->GetObjectFit() ; // EmcRecPoint to fit Grad = ... fret = ... }
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:33 MET