coverity 15108 fixed
authorsgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Mar 2011 12:06:57 +0000 (12:06 +0000)
committersgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Mar 2011 12:06:57 +0000 (12:06 +0000)
HLT/EVE/AliHLTEveHLT.cxx

index 72dd416..a7a5511 100644 (file)
@@ -545,23 +545,24 @@ AliEveTrack* AliHLTEveHLT::MakeEsdTrack (AliESDtrack *at, TEveTrackList* cont) {
     // set a reference at the half of trajectory for better drawing
     //
     
-    for( double dxx=dx/2; ok && TMath::Abs(dxx)>=1.; dxx*=.9 ){
-
-      if( !t.TransportToX(x0+dxx, bz, .999 ) ){
-       ok = 0;
-       break;
+    if( ok ){ 
+      double dxx=dx/2; 
+      if( TMath::Abs(dxx)>=1. ){
+
+       if( !t.TransportToX(x0+dxx, bz, .999 ) ){
+         ok = 0;
+       } else {
+         AliExternalTrackParam tt;
+         AliHLTTPCCATrackConvertor::GetExtParam( t, tt, trackParam.GetAlpha() ); 
+         tt.GetXYZ(vbuf);
+         tt.GetPxPyPz(pbuf);
+         TEvePathMark midPoint(TEvePathMark::kReference);
+         midPoint.fV.Set(vbuf);
+         midPoint.fP.Set(pbuf);    
+         track->AddPathMark( midPoint );     
+       }
       }
-      AliExternalTrackParam tt;
-      AliHLTTPCCATrackConvertor::GetExtParam( t, tt, trackParam.GetAlpha() ); 
-      tt.GetXYZ(vbuf);
-      tt.GetPxPyPz(pbuf);
-      TEvePathMark midPoint(TEvePathMark::kReference);
-      midPoint.fV.Set(vbuf);
-      midPoint.fP.Set(pbuf);    
-      track->AddPathMark( midPoint );
-      break;
     }
    
     //
     // Set a reference at the end of the trajectory