]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coverity
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Feb 2011 10:37:40 +0000 (10:37 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Feb 2011 10:37:40 +0000 (10:37 +0000)
ITS/AliITStrackerV2.cxx

index e8fffb5cc07c11412911856e63e4a4522516f4a2..758c7641c155ba2733a867ff64d1e29b789d0777 100644 (file)
@@ -648,7 +648,10 @@ AliITStrackerV2::AliITSlayer::AliITSlayer():
   //--------------------------------------------------------------------
   
   for (Int_t i=0; i<kNsector; i++) fN[i]=0;
-  for (Int_t i=0; i<AliITSRecoParam::fgkMaxClusterPerLayer; i++)fIndex[i]=0;
+  for (Int_t i=0; i<AliITSRecoParam::fgkMaxClusterPerLayer; i++){
+    fClusters[i]=0;
+    fIndex[i]=0;
+  }
 }
 
 AliITStrackerV2::AliITSlayer::
@@ -668,8 +671,10 @@ AliITSlayer(Double_t r,Double_t p,Double_t z,Int_t nl,Int_t nd):
 
   for (Int_t i=0; i<kNsector; i++) fN[i]=0;
 
-  for (Int_t i=0; i<AliITSRecoParam::fgkMaxClusterPerLayer; i++) fClusters[i]=0;
-  for (Int_t i=0; i<AliITSRecoParam::fgkMaxClusterPerLayer; i++)fIndex[i]=0;
+  for (Int_t i=0; i<AliITSRecoParam::fgkMaxClusterPerLayer; i++){
+    fClusters[i]=0;
+    fIndex[i]=0;
+  }
 }
 
 AliITStrackerV2::AliITSlayer::~AliITSlayer() {
@@ -1009,12 +1014,12 @@ Bool_t AliITStrackerV2::RefitAt(Double_t xx,AliITStrackV2 *t,
        Int_t iLay = i-step;
        Double_t rs = 0.;
        if(iLay<0 || iLay>= AliITSgeomTGeo::kNLayers){
-        rs=0.5*(fgLayers[i-step].GetR() + r);
-       }
-       else{
         AliError(Form("Invalid layer %d ",iLay));
         return kFALSE;
        }
+       else{
+        rs=0.5*(fgLayers[i-step].GetR() + r);
+       }
        Double_t d=0.0034, x0=38.6; 
        if (TMath::Abs(hI-1.5)<0.01) {rs=9.; d=0.0097; x0=42;}
        if (!t->PropagateTo(rs,-step*d,x0)) {