Changeset 7618


Ignore:
Timestamp:
03/20/06 18:05:27 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7617 r7618  
    3434   * ganymed.rc, ganymed_onoff.rc, ganymed_wobble.rc:
    3535     - added example how to change the new scale parameters in MHDisp
     36
     37   * mhflux/MAlphaFitter.[h,cc]:
     38     - implemented the strategy for optimization which is suggested
     39       by the Berlin people for weak sources "weaksource"
     40
     41   * mhflux/MHPhi.[h,cc]:
     42     - moved the AppendPad for the text-paint into all sub-pads which
     43       need it. Otherwise they are not always properly updated.
    3644
    3745
  • trunk/MagicSoft/Mars/NEWS

    r7616 r7618  
    2323     remove events triggered by car-light (rate changing on a short
    2424     time-scale) are missing.
     25
     26   - macros: optimonoff.C, optimwobble.C: implemented a new strategy
     27     for optimization (kWeakSource) which is suggested by the Berlin
     28     people for weak sources.
    2529
    2630   - ganymed: In the second loop the MHNewImagePar histograms disapeared.
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r7442 r7618  
    3636// Version 2:
    3737// ----------
    38 //  +Double_t fSignificanceExc;  // significance of excess
     38//  + Double_t fSignificanceExc;  // significance of a known excess
    3939//
    4040//
     
    276276    f.SetMuStep(0.05);
    277277    f.SetMuMax(100);
     278    f.SetMuMin(0);
     279    f.SetCL(90);
     280
    278281    return f.CalculateUpperLimit(fEventsSignal, fEventsBackground);
    279282}
     
    587590    case kGaussSigma:
    588591        return GetGausSigma();
     592    case kWeakSource:
     593        return GetEventsBackground()<1 ? -GetEventsExcess() : -GetEventsExcess()/TMath::Sqrt(GetEventsBackground());
    589594    }
    590595    return 0;
     
    649654        if (txt==(TString)"gausssigma" || txt==(TString)"gaussigma")
    650655            fStrategy = kGaussSigma;
     656        if (txt==(TString)"weaksource")
     657            fStrategy = kWeakSource;
    651658        rc = kTRUE;
    652659    }
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h

    r7442 r7618  
    3535        kSignificanceExcess,
    3636        kExcess,
    37         kGaussSigma
     37        kGaussSigma,
     38        kWeakSource
    3839    };
    3940    enum SignalFunc_t {
  • trunk/MagicSoft/Mars/mhflux/MHPhi.cc

    r7594 r7618  
    297297    h1->Draw("same");
    298298
     299    AppendPad("result1");
     300
    299301    // --------------------------
    300302
     
    341343    h1->Draw("same");
    342344
     345    AppendPad("result4");
     346
    343347    // --------------------------
    344 
    345     pad->cd();
    346     AppendPad("result");
    347348}
    348349
     
    454455}
    455456
    456 void MHPhi::PaintResult() const
    457 {
    458     TVirtualPad *pad = gPad;
    459 
    460     pad->cd(1);
    461     PaintText(fHPhi);
    462 
    463     pad->cd(4);
    464     TH1D *res = gPad ? dynamic_cast<TH1D*>(gPad->FindObject("Result")) : NULL;
    465     if (res)
    466         PaintText(*res);
    467 }
    468 
    469457void MHPhi::Paint(Option_t *o)
    470458{
     
    472460    if (opt=="update")
    473461        PaintUpdate();
    474     if (opt=="result")
    475         PaintResult();
     462    if (opt=="result1")
     463        PaintText(fHPhi);
     464    if (opt=="result4")
     465    {
     466        TH1D *res = gPad ? dynamic_cast<TH1D*>(gPad->FindObject("Result")) : NULL;
     467        if (res)
     468            PaintText(*res);
     469    }
    476470}
    477471
  • trunk/MagicSoft/Mars/mhflux/MHPhi.h

    r7594 r7618  
    3737    // Paint
    3838    void PaintUpdate() const;
    39     void PaintResult() const;
    4039    void PaintText(const TH1D &res) const;
    4140
Note: See TracChangeset for help on using the changeset viewer.