]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added optional scaling coeff. for cov.matrix (to effectively exclude the point from...
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Aug 2010 00:09:00 +0000 (00:09 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Aug 2010 00:09:00 +0000 (00:09 +0000)
STEER/AliParamSolver.cxx
STEER/AliParamSolver.h

index 1340a83a4868e771320771eed6e02b3aea538cfa..5e5383815f1c1f1e1f478aaa55f66ae4ff57bd20 100644 (file)
@@ -142,7 +142,7 @@ Bool_t AliParamSolver::Solve(Bool_t obtainCov)
 }
 
 //______________________________________________________________________________________
-void AliParamSolver::AddEquation(const Double_t* dGl,const Double_t *dLc,const Double_t *res, const Double_t *covI)
+void AliParamSolver::AddEquation(const Double_t* dGl,const Double_t *dLc,const Double_t *res, const Double_t *covI,Double_t sclErrI)
 {
   // add the measured point to chi2 normal equations
   // Input: 
@@ -150,7 +150,7 @@ void AliParamSolver::AddEquation(const Double_t* dGl,const Double_t *dLc,const D
   // dLc : 3-vector of derivative for each coordinate vs local param
   // res : residual of the point (extrapolated - measured)
   // covI: 3 x (3+1)/2 matrix of the (inverted) errors (symmetric)
-  //
+  // sclErrI: scaling coefficient to apply to inverted errors (used if >0)
   // The contribution of the point to chi2 is  V * covI * V 
   // with component of the vector V(i) = dGl[i]*glob + dLc[i]*loc - res[i] 
   //
@@ -175,6 +175,7 @@ void AliParamSolver::AddEquation(const Double_t* dGl,const Double_t *dLc,const D
   cDl[kX] = covI[kXX]*dLc[kX] + covI[kXY]*dLc[kY] + covI[kXZ]*dLc[kZ];
   cDl[kY] = covI[kXY]*dLc[kX] + covI[kYY]*dLc[kY] + covI[kYZ]*dLc[kZ];
   cDl[kZ] = covI[kXZ]*dLc[kX] + covI[kYZ]*dLc[kY] + covI[kZZ]*dLc[kZ];
+  if (sclErrI>0) { cDl[kX] *= sclErrI; cDl[kY] *= sclErrI; cDl[kZ] *= sclErrI;}
   //
   for (int i=fNGlobal;i--;) {
     const double *dGli = dGl+i*3;  // derivatives of XYZ vs i-th global param
@@ -182,6 +183,7 @@ void AliParamSolver::AddEquation(const Double_t* dGl,const Double_t *dLc,const D
     cDgi[kX] = covI[kXX]*dGli[kX] + covI[kXY]*dGli[kY] + covI[kXZ]*dGli[kZ];
     cDgi[kY] = covI[kXY]*dGli[kX] + covI[kYY]*dGli[kY] + covI[kYZ]*dGli[kZ];
     cDgi[kZ] = covI[kXZ]*dGli[kX] + covI[kYZ]*dGli[kY] + covI[kZZ]*dGli[kZ];
+    if (sclErrI>0) { cDgi[kX] *= sclErrI; cDgi[kY] *= sclErrI; cDgi[kZ] *= sclErrI;}
     //
     mtG[i]   = cDl[kX]*dGli[kX] + cDl[kY]*dGli[kY] + cDl[kZ]*dGli[kZ];  // dR/dGl_i * cov * dR/dLoc
   }
index 9c082efa1a33167a29e850276063e307f4e9ef4e..6462e5fe68dc10638b95b894a1e8d324d3f81174 100644 (file)
@@ -30,7 +30,7 @@ class AliParamSolver: public TObject
   AliParamSolver& operator=(const AliParamSolver& src);
   ~AliParamSolver();
   //
-  void    AddEquation(const Double_t* dGl,const Double_t *dLc,const Double_t *res,const Double_t *covI);
+  void    AddEquation(const Double_t* dGl,const Double_t *dLc,const Double_t *res,const Double_t *covI,Double_t sclErrI=-1.);
   void    AddConstraint(Int_t parID, Double_t val, Double_t err2inv);
   Bool_t  Solve(Bool_t obtainCov=kFALSE);
   Bool_t  SolveGlobals(Bool_t obtainCov=kFALSE);