Ignore:
Timestamp:
07/05/06 11:41:13 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r7741 r7777  
    330330    // Assuming that bg and fit2.GetEventsBackground() are rather identical:
    331331    const Double_t sc = er*er / fit.GetEventsBackground();
    332     /*
     332
    333333     cout << MMath::SignificanceLiMaSigned(hon.Integral(1, bin), fit.GetEventsBackground()/sc, sc) << " ";
    334334     cout << sc << " ";
    335335     cout << fit.fChiSqBg << endl;
    336      */
     336
    337337    return sc;
    338338}
     
    404404}
    405405
    406 void MAlphaFitter::PaintResult(Float_t x, Float_t y, Float_t size) const
     406void MAlphaFitter::PaintResult(Float_t x, Float_t y, Float_t size, Bool_t draw) const
    407407{
    408408    const Double_t w  = GetGausSigma();
     
    413413    const TString fmt = Form("\\sigma_{L/M}=%%.1f  \\omega=%%.%df\\circ  E=%%d B=%%d  x<%%.%df  \\tilde\\chi_{b}=%%.1f  \\tilde\\chi_{s}=%%.1f  c=%%.1f  f=%%.2f",
    414414                             l1<1?1:l1+1, l2<1?1:l2+1);
    415 
    416     TLatex text(x, y, Form(fmt.Data(), fSignificance, w, (int)fEventsExcess,
    417                            (int)fEventsBackground, m, fChiSqBg, fChiSqSignal,
    418                            fCoefficients[3], fScaleFactor));
    419 
     415    const TString txt = Form(fmt.Data(), fSignificance, w, (int)fEventsExcess,
     416                             (int)fEventsBackground, m, fChiSqBg, fChiSqSignal,
     417                             fCoefficients[3], fScaleFactor);
     418
     419    // This is totaly weired but the only way to get both options
     420    // working with this nonsense implementation of TLatex
     421    TLatex text(x, y, txt);
    420422    text.SetBit(TLatex::kTextNDC);
    421423    text.SetTextSize(size);
    422     text.Paint();
     424    if (draw)
     425        text.DrawLatex(x, y, txt);
     426    else
     427        text.Paint();
    423428
    424429    TLine line;
    425430    line.SetLineColor(14);
    426     line.PaintLine(m, gPad->GetUymin(), m, gPad->GetUymax());
     431    if (draw)
     432        line.DrawLine(m, gPad->GetUymin(), m, gPad->GetUymax());
     433    else
     434        line.PaintLine(m, gPad->GetUymin(), m, gPad->GetUymax());
    427435}
    428436
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h

    r7720 r7777  
    237237
    238238    // Interface to result
    239     void PaintResult(Float_t x=0.04, Float_t y=0.94, Float_t size=0.035) const;
     239    void PaintResult(Float_t x=0.04, Float_t y=0.94, Float_t size=0.035, Bool_t draw=kFALSE) const;
     240    void DrawResult(Float_t x=0.04, Float_t y=0.94, Float_t size=0.035) const { PaintResult(x, y, size, kTRUE); }
    240241
    241242    // MTask
Note: See TracChangeset for help on using the changeset viewer.