]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSNeuralTrack.cxx
Geometry builder classes moved from base to sim.
[u/mrichter/AliRoot.git] / ITS / AliITSNeuralTrack.cxx
index f19f4bed2fe068ec2ec834501427a0e871765ad5..3b2a0e7873878130c789d3c0a031a101cbc5e21b 100644 (file)
@@ -1,3 +1,20 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
 // AliITSNeuralTrack
 //
 // The format of output data from Neural Tracker
@@ -17,6 +34,9 @@
 //#include <TObjArray.h>
 //#include <TH1.h>
 #include <TMatrixD.h>
+#if ROOT_VERSION_CODE >= 262146
+#include <TMatrixDEigen.h>
+#endif
 
 //#include "AliITSVertex.h"
 #include "AliITSIOTrack.h"
@@ -347,7 +367,7 @@ Int_t AliITSNeuralTrack::PropagateTo(Double_t rk)
        // and the multiple scattering effects, which respectively have the effect
        // of changing the curvature and widening the covariance matrix.
 
-       if (rk < fabs(fDt)) {
+       if (rk < TMath::Abs(fDt)) {
                Error("PropagateTo", Form("Impossible propagation to r (=%17.15g) < Dt (=%17.15g)", rk, fDt));
                return 0;
        }
@@ -506,7 +526,7 @@ Bool_t AliITSNeuralTrack::SeedCovariance()
        }
        Double_t n = 0.;
        for (l = 0; l < 6; l++) if (fPoint[l]) n++;
-       fMatrix *= 1./(n++ * n);
+       fMatrix *= 1./(n * (n+1));
        return kTRUE;
 }
 //
@@ -790,7 +810,15 @@ Bool_t AliITSNeuralTrack::RiemannFit()
        // Eigenvalue problem solving for V matrix
        Int_t ileast = 0;
        TVectorD eval(3), n(3);
+       //      TMatrixD evec = mV.EigenVectors(eval);
+#if ROOT_VERSION_CODE >= 262146
+       TMatrixDEigen ei(mV);
+       TMatrixD evec = ei.GetEigenVectors();
+       eval = ei.GetEigenValues();
+#else
        TMatrixD evec = mV.EigenVectors(eval);
+#endif
+
        if (eval(1) < eval(ileast)) ileast = 1;
        if (eval(2) < eval(ileast)) ileast = 2;
        n(0) = evec(0, ileast);
@@ -1101,7 +1129,7 @@ Double_t AliITSNeuralTrack::ArgZ(Double_t r) const
        Double_t arg;
        arg = (r * r - fDt * fDt) / (1. + fC * fDt);
        if (arg < 0.) {
-               if (fabs(arg) < 1.E-6) arg = 0.;
+               if (TMath::Abs(arg) < 1.E-6) arg = 0.;
                else {
                        Error("ArgZ", "Square root argument error: %17.15g < 0", arg);
                        return 10.;