Ignore:
Timestamp:
10/10/05 12:26:49 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
4 edited

Legend:

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

    r7181 r7384  
    133133// --------------------------------------------------------------------------
    134134//
     135// Return Li/Ma (5) for the error of the excess, under the assumption that
     136// the existance of a signal is already known.
     137//
     138Double_t MMath::SignificanceLiMaExc(Double_t s, Double_t b, Double_t alpha)
     139{
     140    Double_t Ns = s - alpha*b;
     141    Double_t sN = s - alpha*alpha*b;
     142
     143    return Ns<0 || sN<0 ? 0 : Ns/TMath::Sqrt(sN);
     144}
     145
     146// --------------------------------------------------------------------------
     147//
    135148// Returns: 2/(sigma*sqrt(2))*integral[0,x](exp(-(x-mu)^2/(2*sigma^2)))
    136149//
  • trunk/MagicSoft/Mars/mbase/MMath.h

    r7251 r7384  
    2222    Double_t SignificanceLiMa(Double_t s, Double_t b, Double_t alpha=1);
    2323    Double_t SignificanceLiMaSigned(Double_t s, Double_t b, Double_t alpha=1);
     24    Double_t SignificanceLiMaExc(Double_t s, Double_t b, Double_t alpha=1);
    2425
    2526    void ReducePrecision(Float_t &val);
  • trunk/MagicSoft/Mars/mbase/MTime.cc

    r7366 r7384  
    230230{
    231231    return (GetMjd()-49718)*kDay/1000;
     232}
     233
     234// --------------------------------------------------------------------------
     235//
     236// Counterpart of GetAxisTime
     237//
     238void MTime::SetAxisTime(Double_t time)
     239{
     240    SetMjd(time*1000/kDay+49718);
    232241}
    233242
  • trunk/MagicSoft/Mars/mbase/MTime.h

    r7366 r7384  
    8787    Bool_t   SetMjd(UInt_t mjd, ULong_t ms, UInt_t ns=0);
    8888    void     SetMjd(Double_t m);
     89    void     SetAxisTime(Double_t time);
    8990
    9091    // Getter functions
Note: See TracChangeset for help on using the changeset viewer.