1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //-----------------------------------------------------------------
17 // Implementation of the base class for fast track fitters
20 //-----------------------------------------------------------------
22 #include <TMatrixDSym.h>
24 #include "AliTrackFitter.h"
25 #include "AliTrackPointArray.h"
27 ClassImp(AliTrackFitter)
29 //_____________________________________________________________________________
30 AliTrackFitter::AliTrackFitter()
32 // default constructor
34 for (Int_t i=0;i<6;i++) fParams[i] = 0;
40 //_____________________________________________________________________________
41 AliTrackFitter::AliTrackFitter(AliTrackPointArray *array, Bool_t owner)
43 // constructor from space points array
45 for (Int_t i=0;i<6;i++) fParams[i] = 0;
46 fCov = new TMatrixDSym(6);
48 SetTrackPointArray(array,owner);
51 //_____________________________________________________________________________
52 AliTrackFitter::AliTrackFitter(const AliTrackFitter &fitter):
57 for (Int_t i=0;i<6;i++) fParams[i] = fitter.fParams[i];
58 fCov = new TMatrixDSym(*fitter.fCov);
60 SetTrackPointArray(fitter.fPoints,fitter.fIsOwner);
63 //_____________________________________________________________________________
64 AliTrackFitter &AliTrackFitter::operator =(const AliTrackFitter& fitter)
66 // assignment operator
68 if(this==&fitter) return *this;
70 for (Int_t i=0;i<6;i++) fParams[i] = fitter.fParams[i];
71 fCov = new TMatrixDSym(*fitter.fCov);
73 SetTrackPointArray(fitter.fPoints);
78 //_____________________________________________________________________________
79 AliTrackFitter::~AliTrackFitter()
86 //_____________________________________________________________________________
87 void AliTrackFitter::Reset()
89 for (Int_t i=0;i<6;i++) fParams[i] = 0;
91 fCov = new TMatrixDSym(6);
94 void AliTrackFitter::SetTrackPointArray(AliTrackPointArray *array, Bool_t owner)
96 // Load space points from array
97 // By default we don't copy them but
98 // just put the pointers to them
101 if (fIsOwner) delete fPoints;
104 fPoints = new AliTrackPointArray(*array);