Changeset 7672 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 04/30/06 21:01:33 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MMath.cc
r7410 r7672 78 78 // The significance has the same (positive!) value for s>b and b>s. 79 79 // 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 82 81 // 83 82 // Here is some eMail written by Daniel Mazin about the meaning of the arguments: … … 107 106 const Double_t sum = s+b; 108 107 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) 113 109 return -1; 114 110 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) ); 117 113 118 114 return l+m<0 ? -1 : TMath::Sqrt((l+m)*2);
Note:
See TracChangeset
for help on using the changeset viewer.