Fixed bug with GetCovMatrix returning a pointer to a deleted local array.
authornilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Feb 2001 20:20:05 +0000 (20:20 +0000)
committernilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Feb 2001 20:20:05 +0000 (20:20 +0000)
ITS/AliITSiotrack.cxx
ITS/AliITSiotrack.h

index 1b7a799133321c56b73867e8b8220daabe2969d0..57fa9f6a1719dad368bc9364cc94a2cff9c0ac66 100644 (file)
@@ -44,36 +44,35 @@ void AliITSiotrack::SetCovMatrix(TMatrix *cov) {
 
 
 Double_t * AliITSiotrack::GetCovMatrix() {
+// Return Covariance Matrix in array format.
 
-  Double_t covar[25];
+  fcovar[0]=fC00;
+  fcovar[1]=fC10;
+  fcovar[2]=fC20;
+  fcovar[3]=fC30;
+  fcovar[4]=fC40;
+  fcovar[5]=fC10;
+  fcovar[6]=fC11;
+  fcovar[7]=fC21;
+  fcovar[8]=fC31;
+  fcovar[9]=fC41;
+  fcovar[10]=fC20;
+  fcovar[11]=fC21;
+  fcovar[12]=fC22;
+  fcovar[13]=fC32;
+  fcovar[14]=fC42;
+  fcovar[15]=fC30;
+  fcovar[16]=fC31;
+  fcovar[17]=fC32;
+  fcovar[18]=fC33;
+  fcovar[19]=fC43;
+  fcovar[20]=fC40;
+  fcovar[21]=fC41;
+  fcovar[22]=fC42;
+  fcovar[23]=fC43;
+  fcovar[24]=fC44;
 
-  covar[0]=fC00;
-  covar[1]=fC10;
-  covar[2]=fC20;
-  covar[3]=fC30;
-  covar[4]=fC40;
-  covar[5]=fC10;
-  covar[6]=fC11;
-  covar[7]=fC21;
-  covar[8]=fC31;
-  covar[9]=fC41;
-  covar[10]=fC20;
-  covar[11]=fC21;
-  covar[12]=fC22;
-  covar[13]=fC32;
-  covar[14]=fC42;
-  covar[15]=fC30;
-  covar[16]=fC31;
-  covar[17]=fC32;
-  covar[18]=fC33;
-  covar[19]=fC43;
-  covar[20]=fC40;
-  covar[21]=fC41;
-  covar[22]=fC42;
-  covar[23]=fC43;
-  covar[24]=fC44;
-  
-  return covar;
+  return fcovar;
   
 }
 /*
index d868a31989506b7af3a35b1b311f871d8277bc30..3974c1b3ea04f909a69313c3da5f351f3dbe3ec4 100644 (file)
@@ -76,7 +76,8 @@ class AliITSiotrack : public TObject {
   Double_t  fRadius;             //  distance of the point from the origin
   Int_t     fCharge;             //  particle charge  
 
-//  Covariance matrix   
+//  Covariance matrix
+  Double_t  fcovar[25];              //! Elements of Covariance matrix below
   Double_t  fC00;
   Double_t  fC10, fC11;
   Double_t  fC20, fC21, fC22;
@@ -87,6 +88,3 @@ class AliITSiotrack : public TObject {
 };
 
 #endif
-
-
-