]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSNeuralTrack.cxx
An additional protenction on the strip number has been implemented (E. Fragiacomo)
[u/mrichter/AliRoot.git] / ITS / AliITSNeuralTrack.cxx
index 233d4540f996c1143e9f1b735701ca37a8ce8214..348dc0947680e5913d8cd01b499909d6eb552832 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"
@@ -30,21 +50,31 @@ ClassImp(AliITSNeuralTrack)
 //
 //
 //
-AliITSNeuralTrack::AliITSNeuralTrack() : fMatrix(5,5), fVertex()
-{
+AliITSNeuralTrack::AliITSNeuralTrack() :  
+fXC(0.0),
+fYC(0.0),
+fR(0.0),
+fC(0.0),
+fTanL(0.0),
+fG0(0.0),
+fDt(0.0),
+fDz(0.0),
+fStateR(0.0),
+fStatePhi(0.0),
+fStateZ(0.0),
+fMatrix(5,5),
+fChi2(0.0),
+fNSteps(0.0),
+fMass(0.1396),// default assumption: pion
+fField(2.0),// default assumption: B = 0.4 Tesla
+fPDG(0),
+fLabel(0),
+fCount(0),
+fVertex(){
        // Default constructor
        
        Int_t i;
 
-       fMass  = 0.1396;   // default assumption: pion
-       fField = 2.0;      // default assumption: B = 0.4 Tesla
-
-       fXC = fYC = fR = fC = 0.0;
-       fTanL = fG0 = fDt = fDz = 0.0;
-       fStateR = fStatePhi = fStateZ = fChi2 = fNSteps = 0.0;
-
-       fLabel = 0;
-       fCount = 0;
        for (i = 0; i < 6; i++) fPoint[i] = 0;
 
        fVertex.X() = 0.0;
@@ -57,9 +87,28 @@ AliITSNeuralTrack::AliITSNeuralTrack() : fMatrix(5,5), fVertex()
 //
 //
 //
-AliITSNeuralTrack::AliITSNeuralTrack(AliITSNeuralTrack &track) 
-: TObject((TObject&)track), fMatrix(5,5), fVertex()
-{
+AliITSNeuralTrack::AliITSNeuralTrack(const AliITSNeuralTrack &track) 
+: TObject((TObject&)track), 
+fXC(0.0),
+fYC(0.0),
+fR(0.0),
+fC(0.0),
+fTanL(0.0),
+fG0(0.0),
+fDt(0.0),
+fDz(0.0),
+fStateR(0.0),
+fStatePhi(0.0),
+fStateZ(0.0),
+fMatrix(5,5),
+fChi2(0.0),
+fNSteps(0.0),
+fMass(0.1396),// default assumption: pion
+fField(2.0),// default assumption: B = 0.4 Tesla
+fPDG(0),
+fLabel(0),
+fCount(0),
+fVertex(){
 // copy constructor
 
        Int_t i;
@@ -85,6 +134,13 @@ AliITSNeuralTrack::AliITSNeuralTrack(AliITSNeuralTrack &track)
 //
 //
 //
+
+AliITSNeuralTrack& AliITSNeuralTrack::operator=(const AliITSNeuralTrack& track){
+  //assignment operator
+  this->~AliITSNeuralTrack();
+  new(this) AliITSNeuralTrack(track);
+  return *this;
+}
 AliITSNeuralTrack::~AliITSNeuralTrack()
 {
        Int_t l;
@@ -198,7 +254,7 @@ void AliITSNeuralTrack::Insert(AliITSNeuralPoint *point)
 //
 //
 //
-Int_t AliITSNeuralTrack::OccupationMask()
+Int_t AliITSNeuralTrack::OccupationMask() const
 {
 // Returns a byte which maps the occupied slots. 
 // Each bit represents a layer going from the less significant on.
@@ -506,7 +562,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 +846,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);