Skip to content

Commit

Permalink
ALIROOT-6702 Protection againt negative cov. matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 authored and dberzano committed Jul 25, 2016
1 parent bb86442 commit 3fcf9c6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion TPC/TPCrec/AliTPCtracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9872,7 +9872,14 @@ void AliTPCtracker::AddSystCovariance(AliTPCseed* t)
a42 = C20*cg40 + C21*cg41 + C22*cg42 + C32*cg43 + C42*cg44,
a43 = C30*cg40 + C31*cg41 + C32*cg42 + C33*cg43 + C43*cg44,
a44 = C40*cg40 + C41*cg41 + C42*cg42 + C43*cg43 + C44*cg44;

//
// make sure diagonal elements are positive
if (a00<0) a00 = 0;
if (a11<0) a11 = 0;
if (a22<0) a22 = 0;
if (a33<0) a33 = 0;
if (a44<0) a44 = 0;
//
C00 += a00;
C10 += a10; C11 += a11;
C20 += a20; C21 += a21; C22 += a22;
Expand Down

0 comments on commit 3fcf9c6

Please sign in to comment.