Changeset 4189 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 05/26/04 11:18:32 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r4059 r4189 68 68 #include <TH1.h> 69 69 #include <TF1.h> 70 #include <TCanvas.h> 70 71 71 72 #include "MLog.h" … … 1850 1851 } 1851 1852 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 // 1870 void 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 -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r3957 r4189 16 16 #ifndef ROOT_TH1 17 17 #include <TH1.h> 18 #endif 19 #ifndef ROOT_TCanvas 20 #include <TCanvas.h> 18 21 #endif 19 22 … … 249 252 } 250 253 TProfile *RadialProfileS(const TArrayI §or, const TArrayI &aidx, const char *name="_rad", const Int_t nbins=25) const; 254 255 void CamDraw(TCanvas &c, const Int_t x, const Int_t y, 256 const Int_t fit, const Int_t rad=0, 257 TObject *notify=NULL); 251 258 252 259 const MGeomCam &GetGeomCam() const { return *fGeomCam; }
Note:
See TracChangeset
for help on using the changeset viewer.