]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITStrackerV2.cxx
Add fEnergy to AliPHOSDigit and operate with EMC amplitude in energy units (Yu.Kharlov)
[u/mrichter/AliRoot.git] / ITS / AliITStrackerV2.cxx
index b0f285c2b13d3587e7db0a3b064bb97b64d2ce51..9f40d657d23b0cc996b33039bd0ef5cdc0e6019d 100644 (file)
@@ -1053,9 +1053,17 @@ void AliITStrackerV2::UseClusters(const AliKalmanTrack *t, Int_t from) const {
   //--------------------------------------------------------------------
   AliTracker::UseClusters(t,from);
 
-  AliITSRecPoint *c=(AliITSRecPoint *)GetCluster(t->GetClusterIndex(0));
+  Int_t clusterIndex = t->GetClusterIndex(0);
+  AliITSRecPoint *c= 0x0;
+
+  if (clusterIndex>-1)
+    c = (AliITSRecPoint *)GetCluster(clusterIndex);
   if (c && c->GetSigmaZ2()>0.1) c->UnUse();
-  c=(AliITSRecPoint *)GetCluster(t->GetClusterIndex(1));
+
+  c = 0x0;
+  clusterIndex = t->GetClusterIndex(1);
+  if (clusterIndex>-1)
+    c=(AliITSRecPoint *)GetCluster(clusterIndex);
   if (c && c->GetSigmaZ2()>0.1) c->UnUse();
 
 }