Ignore:
Timestamp:
04/30/06 21:01:33 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r7410 r7672  
    7878//  The significance has the same (positive!) value for s>b and b>s.
    7979//
    80 //  Returns -1 if sum<0 or alpha<0 or the argument of sqrt<0
    81 //  Returns  0 if s+b==0, s==0 or b==0
     80//  Returns -1 if s<0 or b<0 or alpha<0 or the argument of sqrt<0
    8281//
    8382// Here is some eMail written by Daniel Mazin about the meaning of the arguments:
     
    107106    const Double_t sum = s+b;
    108107
    109     if (s==0 || b==0 || sum==0)
    110         return 0;
    111 
    112     if (sum<0 || alpha<=0)
     108    if (s<0 || b<0 || alpha<=0)
    113109        return -1;
    114110
    115     const Double_t l = s*TMath::Log(s/sum*(alpha+1)/alpha);
    116     const Double_t m = b*TMath::Log(b/sum*(alpha+1)      );
     111    const Double_t l = s==0 ? 0 : s*TMath::Log(s/sum*(alpha+1)/alpha);
     112    const Double_t m = b==0 ? 0 : b*TMath::Log(b/sum*(alpha+1)      );
    117113
    118114    return l+m<0 ? -1 : TMath::Sqrt((l+m)*2);
Note: See TracChangeset for help on using the changeset viewer.