Ignore:
Timestamp:
06/17/04 10:49:08 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r4282 r4301  
    6969#include <TF1.h>
    7070#include <TCanvas.h>
     71#include <TLegend.h>
    7172
    7273#include "MLog.h"
     
    16641665// 6: Fit Inner and Outer pixels separately by a single Gaussian and display
    16651666//                 additionally the two camera halfs separately (for MAGIC camera)
     1667// 7: Single Gauss with TLegend to show the meaning of the colours
    16661668//
    16671669//
     
    17081710          inout[0]->SetDirectory(NULL);
    17091711          inout[1]->SetDirectory(NULL);
    1710          
     1712
    17111713          for (int i=0; i<2; i++)
    17121714            {
     
    17161718              inout[i]->Draw();
    17171719              inout[i]->Fit("gaus","Q");
    1718               /*
    1719               gPad->Modified();
    1720               gPad->Update();
    1721               gPad->SaveAs(Form("%s%s%i%s",GetName(),"AreaIdx",i,".eps"));
    1722               */
     1720             
     1721             
    17231722              if (fit == 6)
    17241723                {
     
    17781777      halfInOut[2] = ProjectionS(s0, outer, "Sector 6-1-2 Outer");
    17791778      halfInOut[3] = ProjectionS(s1, outer, "Sector 3-4-5 Outer");
     1779
     1780      TLegend *leg = new TLegend(0.05,0.65,0.35,0.9);
    17801781     
    17811782      for (int i=0; i<4; i++)
     
    17851786          halfInOut[i]->SetBit(kCanDelete);
    17861787          halfInOut[i]->Draw("same");
     1788          leg->AddEntry(halfInOut[i],halfInOut[i]->GetTitle(),"l");
    17871789        }
     1790
     1791      if (fit==7)
     1792        leg->Draw();
     1793     
     1794      gPad->Modified();
     1795      gPad->Update();
    17881796    }
    17891797 
Note: See TracChangeset for help on using the changeset viewer.