Changeset 1567 for trunk/MagicSoft
- Timestamp:
- 10/30/02 16:52:01 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc
r1557 r1567 200 200 Double_t dh = fMHadrons->CalcDist(event, numh); 201 201 202 if (dg<0 || dh<0) 203 { 204 *fLog << err << "MHMatrix::CalcDist failed (dg=" << dg << ", dh=" << dh << ")... aborting" << endl; 205 return kFALSE; 206 } 207 202 208 //fHadronness->SetHadronness(dg/(dg+dh)); 203 209 fHadronness->SetHadronness(exp(-dh/dg)); -
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r1554 r1567 367 367 if (det==0) 368 368 { 369 *fLog << err << "ERROR - MHMatrix::InvertPosDef failed (Matrix is si gular)." << endl;369 *fLog << err << "ERROR - MHMatrix::InvertPosDef failed (Matrix is singular)." << endl; 370 370 delete m2; 371 371 return NULL; … … 441 441 res += exp(-dists[idx[i]]/h); 442 442 443 return log(res/n);443 return -log(res/n); 444 444 } 445 445 else … … 466 466 if (!fM2.IsValid()) 467 467 { 468 const TMatrix &m = *InvertPosDef(); 469 fM2.ResizeTo(m); 470 fM2 = m; 468 const TMatrix *m = InvertPosDef(); 469 if (!m) 470 return -1; 471 472 fM2.ResizeTo(*m); 473 fM2 = *m; 471 474 fM2 *= fM.GetNrows()-1; 472 delete &m;475 delete m; 473 476 } 474 477
Note:
See TracChangeset
for help on using the changeset viewer.