protection for division by 0
authorsgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 May 2011 09:08:19 +0000 (09:08 +0000)
committersgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 May 2011 09:08:19 +0000 (09:08 +0000)
HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.h

index 921f573..b72328f 100644 (file)
@@ -109,7 +109,7 @@ class AliHLTTPCCAParam
     GPUd() void SetClusterError2CorrectionZ( float v ) { fClusterError2CorrectionZ = v; }
 
   GPUd() void SetMinNTrackClusters( int v ){ fMinNTrackClusters = v; }
-  GPUd() void SetMinTrackPt( float v ){ fMaxTrackQPt = 1./CAMath::Abs(v); }
+  GPUd() void SetMinTrackPt( float v ){ fMaxTrackQPt = CAMath::Abs(v)>0.02 ?1./CAMath::Abs(v) :1./0.02; }
 
     GPUd() float GetClusterError2( int yz, int type, float z, float angle ) const;
     GPUd() void GetClusterErrors2( int row, float z, float sinPhi, float cosPhi, float DzDs, float &Err2Y, float &Err2Z ) const;