Changeset 11426 for trunk/Mars
- Timestamp:
- 07/15/11 15:46:14 (13 years ago)
- Location:
- trunk/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mbase/MMath.cc
r10166 r11426 223 223 } 224 224 225 // -------------------------------------------------------------------------- 226 // 227 // Returns: 1 - exp((x/sigma)^2 / 2) 228 // 229 Double_t MMath::GaussProb2D(Double_t x, Double_t sigma) 230 { 231 const Double_t xs = x/sigma; 232 return 1 - TMath::Exp(-xs*xs/2); 233 } 234 225 235 // ------------------------------------------------------------------------ 226 236 // … … 720 730 // Q := (3*b - a^2)/9 721 731 // R := (9*b*a - 27*c - 2*a^3)/54 722 // D := Q^3 + R^2% polynomial discriminant732 // D := R^2 -Q^3 % polynomial discriminant 723 733 // 724 734 // if (D >= 0) then % complex or duplicate roots -
trunk/Mars/mbase/MMath.h
r9226 r11426 17 17 { 18 18 Double_t GaussProb(Double_t x, Double_t sigma=1, Double_t mean=0); 19 Double_t GaussProb2D(Double_t x, Double_t sigma=1); 19 20 20 21 template <class Size, class Element> void ReSortImp(Size n, Element *a, Bool_t down=kFALSE);
Note:
See TracChangeset
for help on using the changeset viewer.