Changeset 7672


Ignore:
Timestamp:
04/30/06 21:01:33 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7665 r7672  
    2525     - fixed the auto training (still far from working well)
    2626     - improved result plots
     27
     28   * mbase/MMath.cc:
     29     - fixed SignificanceLiMa such that it allows basically zero
     30       signal- and/or background events
    2731
    2832
  • 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);
  • trunk/MagicSoft/Mars/mjtrain/MJTrainSeparation.cc

    r7671 r7672  
    370370    // Target spectrum
    371371    TF1 flx("Flux", "[0]/1000*(x/1000)^(-2.6)", min, max);
    372     flx.SetParameter(0, 1e-6);
     372    flx.SetParameter(0, 2e-7);
    373373
    374374    // Number n0 of events this spectrum would produce per s and m^2
Note: See TracChangeset for help on using the changeset viewer.