+
+ Int_t fixedparamat[6]={0,0,0,0,0,0};
+ const Int_t unfixedparam=GetNFreeParam();
+ Int_t position[6],last=0;//position is of size 6 but only unfiexedparam indeces will be used
+
+ if(fBFixed[0]==kTRUE){
+ fixedparamat[0]=1;
+ }
+ else {
+ position[0]=0;
+ last++;
+ }
+
+ for(Int_t j=1;j<6;j++){
+ if(fBFixed[j]==kTRUE){
+ fixedparamat[j]=fixedparamat[j-1]+1;
+ }
+ else {
+ fixedparamat[j]=fixedparamat[j-1];
+ position[last]=j;
+ last++;
+ }
+ }
+
+ TMatrixDSym smatrixRedu(unfixedparam);
+ for(Int_t i=0;i<unfixedparam;i++){
+ for(Int_t j=0;j<unfixedparam;j++){
+ smatrixRedu(i,j)=smatrix(position[i],position[j]);
+ }
+ }
+
+ // smatrixRedu.Print();
+ smatrixRedu.Invert();
+
+ if (!smatrixRedu.IsValid()) {
+ printf("Minimization Failed! \n");
+ return kFALSE;
+ }