Ignore:
Timestamp:
05/26/04 11:18:32 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r4059 r4189  
    6868#include <TH1.h>
    6969#include <TF1.h>
     70#include <TCanvas.h>
    7071
    7172#include "MLog.h"
     
    18501851}
    18511852
     1853// --------------------------------------------------------------------------
     1854//
     1855// Draw the MHCamera into the MStatusDisplay:
     1856//
     1857// 1) Draw it as histogram (MHCamera::DrawCopy("hist")
     1858// 2) Draw it as a camera, with MHCamera::SetPrettyPalette() set.
     1859// 3) If "rad" is not zero, draw its values vs. the radius from the camera center.
     1860//    (DrawRadialProfile())
     1861// 4) Depending on the variable "fit", draw the values projection on the y-axis
     1862//    (DrawProjection()):
     1863//    0: don't draw
     1864//    1: Draw fit to Single Gauss (for distributions flat-fielded over the whole camera)
     1865//    2: Draw and fit to Double Gauss (for distributions different for inner and outer pixels)
     1866//    3: Draw and fit to Triple Gauss (for distributions with inner, outer pixels and outliers)
     1867//    4: Draw and fit to Polynomial grade 0: (for the probability distributions)
     1868//    >4: Draw and don;t fit.
     1869//
     1870void MHCamera::CamDraw(TCanvas &c, const Int_t x, const Int_t y,
     1871                       const Int_t fit, const Int_t rad, TObject *notify)
     1872{
     1873
     1874  c.cd(x);
     1875  gPad->SetBorderMode(0);
     1876  gPad->SetTicks();
     1877  MHCamera *obj1=(MHCamera*)DrawCopy("hist");
     1878  obj1->SetDirectory(NULL);
     1879 
     1880  if (notify)
     1881    obj1->AddNotify(notify);
     1882
     1883  c.cd(x+y);
     1884  gPad->SetBorderMode(0);
     1885  obj1->SetPrettyPalette();
     1886  obj1->Draw();
     1887
     1888  if (rad)
     1889    {
     1890      c.cd(x+2*y);
     1891      gPad->SetBorderMode(0);
     1892      gPad->SetTicks();
     1893      DrawRadialProfile();
     1894    }
     1895 
     1896  if (!fit)
     1897    return;
     1898 
     1899  c.cd(rad ? x+3*y : x+2*y);
     1900  gPad->SetBorderMode(0);
     1901  gPad->SetTicks();
     1902  DrawProjection(fit);
     1903}
     1904
     1905
Note: See TracChangeset for help on using the changeset viewer.