Changeset 7384 for trunk


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7381 r7384  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2005/10/10 Thomas Bretz
     22
     23   * mbase/MMath.[h,cc]:
     24     - added new function SignificanceLiMaExc
     25
     26   * mbase/MTime.[h,cc]:
     27     - added new Setter SetAxisTime
     28
     29   * mcalib/MCalibCalcFromPast.cc:
     30     - fixed some format in output
     31
     32   * mhcalib/MHCalibrationCam.cc:
     33     - fixed a typo
     34
     35   * mhflux/MAlphaFitter.[h,cc]:
     36     - added new data member fSiginificanceExc
     37
     38
     39
    2140 2005/10/01 Thomas Bretz
    2241
     
    3049
    3150   * ganymed.cc:
    32      - implemented twonew options --ind and --ins
     51     - implemented two new options --ind and --ins
    3352
    3453   * datacenter/scripts/runganymed:
  • 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
  • trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc

    r7292 r7384  
    438438    *fLog << inf << endl;
    439439    *fLog << GetDescriptor() << " execution statistics:" << endl;
    440     *fLog << " " << setw(7) << fNumFails << " (" << Form("%5.1f", 100.*fNumFails/fNumCam) << "%) updates failed." << endl;
     440    *fLog << " " << setfill(' ') << setw(7) << fNumFails << " (" << Form("%5.1f", 100.*fNumFails/fNumCam) << "%) updates failed." << endl;
    441441    *fLog << endl;
    442442
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc

    r7288 r7384  
    967967    return kTRUE;
    968968
    969   *fLog << inf << GetDescriptor() << ": Number of event used to fill histograms == " << fCurrentNumEvts << endl;
     969  *fLog << inf << GetDescriptor() << ": Number of events used to fill histograms == " << fCurrentNumEvts << endl;
    970970
    971971  if (fHiGainArray->GetSize() == 0 && fLoGainArray->GetSize() == 0)
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r7224 r7384  
    6060{
    6161    fSignificance=0;
     62    fSignificanceExc=0;
    6263    fEventsExcess=0;
    6364    fEventsSignal=0;
     
    216217    fEventsExcess     = fEventsSignal-fEventsBackground;
    217218    fSignificance     = MMath::SignificanceLiMaSigned(fEventsSignal, fEventsBackground);
     219    fSignificanceExc  = MMath::SignificanceLiMaExc(fEventsSignal, fEventsBackground);
    218220
    219221    if (TMath::IsNaN(fSignificance))
     
    250252    fScaleFactor      = alpha;
    251253    fSignificance     = MMath::SignificanceLiMaSigned(fEventsSignal, fEventsBackground/alpha, alpha);
     254    fSignificanceExc  = MMath::SignificanceLiMaExc(fEventsSignal, fEventsBackground/alpha, alpha);
    252255
    253256    if (TMath::IsNaN(fSignificance))
     
    304307    // Result
    305308    f.fSignificance     = fSignificance;
     309    f.fSignificanceExc  = fSignificanceExc;
    306310    f.fEventsExcess     = fEventsExcess;
    307311    f.fEventsSignal     = fEventsSignal;
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h

    r7185 r7384  
    5454    // Result
    5555    Double_t fSignificance;     // significance of signal
     56    Double_t fSignificanceExc;  // significance of excess
    5657    Double_t fEventsExcess;     // calculated number of excess events (signal-bg)
    5758    Double_t fEventsSignal;     // calculated number of signal events
     
    154155
    155156    Double_t GetSignificance() const       { return fSignificance; }
     157    Double_t GetSignificanceExc() const    { return fSignificanceExc; }
    156158    Double_t GetChiSqSignal() const        { return fChiSqSignal; }
    157159    Double_t GetChiSqBg() const            { return fChiSqBg; }
Note: See TracChangeset for help on using the changeset viewer.