]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix in GetTPCClusterInfo(...) (M.Ivanov)
authorbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Dec 2010 15:53:07 +0000 (15:53 +0000)
committerbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Dec 2010 15:53:07 +0000 (15:53 +0000)
STEER/AliESDtrack.cxx

index 787801ec153a0166dcfd026c909237b249a0f2b8..eaa619b47831c03b012015ca87e7b0b083805aa6 100644 (file)
@@ -1735,14 +1735,17 @@ Float_t AliESDtrack::GetTPCClusterInfo(Int_t nNeighbours/*=3*/, Int_t type/*=0*/
       }
     }
   }
-
-  Float_t fraction=0;
+  if (type==1) return findable;
+  
   if (type==0){
-    if (findable>0) fraction=(Float_t)found/(Float_t)findable;
-  } else {
-    fraction=findable;
-  }
-  return findable;
+    Float_t fraction=0;
+    if (findable>0) 
+      fraction=(Float_t)found/(Float_t)findable;
+    else 
+      fraction=0;
+    return fraction;
+  }  
+  return 0;  // undefined type - default value
 }
 
 //_______________________________________________________________________