Changeset 1966 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 04/20/03 12:51:47 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/macros
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/plot.C
r1543 r1966 23 23 ! 24 24 \* ======================================================================== */ 25 25 #include <MH.h> 26 26 // ------------------------------------------------------------------------- 27 27 // … … 32 32 void plot() 33 33 { 34 MStatusDisplay *d = new MStatusDisplay; 35 d->SetLogStream(&gLog); 36 34 37 // 35 38 // Create a empty Parameter List and an empty Task List … … 48 51 // First Task: Read file with image parameters 49 52 // (created with the star.C macro) 50 MReadMarsFile read("Events", "star.root"); 53 MReadMarsFile read("Events", "MC_OFF1.root"); 54 read.AddFile("MC_ON1.root"); 51 55 read.DisableAutoScheme(); 52 56 tlist.AddToList(&read); … … 64 68 // set the name of the variable to plot and the binning 65 69 // 66 TString var(" MHillas.fSize");70 TString var("Hillas.fSize"); 67 71 68 72 MBinning bins("BinningMH3X"); … … 99 103 // Execute your analysis 100 104 // 101 MProgressBar bar; 102 evtloop.SetProgressBar(&bar); 105 evtloop.SetDisplay(d); 103 106 if (!evtloop.Eventloop()) 104 107 return; … … 106 109 tlist.PrintStatistics(); 107 110 108 // Create a default canvas called Plot and set the 111 // Create a pad, check if MStatusDisplay was not closed meanwhile 112 if (evtloop.GetDisplay()) 113 d->AddTab("Size"); 114 else 115 MH::MakeDefCanvas("Plot"); 116 109 117 // x-axis to logarithmic scale 110 MH::MakeDefCanvas("Plot");111 118 gPad->SetLogx(); 112 119 … … 114 121 // and draw a copy of both 115 122 h3h.GetHist().SetLineColor(kRed); 116 h3h.GetHist().SetFillStyle(4000); 117 h3g.GetHist().DrawCopy(); 118 h3h.GetHist().DrawCopy("same"); 123 MH::DrawCopy(h3h.GetHist(), h3g.GetHist(), "Size"); 119 124 120 125 // Now create a new histogram, fill it with the division of the … … 124 129 h.Divide(&h3g.GetHist(), &h3h.GetHist()); 125 130 h.SetLineColor(kGreen); 126 h.SetFillStyle(4000);127 131 h.DrawCopy("same"); 128 132 } -
trunk/MagicSoft/Mars/macros/status.C
r1965 r1966 80 80 81 81 // ------------- user change ----------------- 82 //read.AddFile("data/Pro*.root");83 82 read.AddFile("data/Gam*.root"); 83 //read.AddFile("200*.root"); 84 84 85 85 MMcPedestalCopy pcopy; … … 93 93 MHillasCalc hcalc; 94 94 MHillasSrcCalc scalc; // !!Preliminary!! Will be removed later! 95 MNewImageParCalc icalc; 95 96 96 97 // ------------------------------------------- … … 99 100 MFillH hfill3("MHHillasExtSrc [MHHillasExt]"); 100 101 MFillH hfill4("MHHillasSrc","MHillasSrc"); 102 MFillH hfill4("MHNewImagePar","MNewImagePar"); 101 103 MFillH hfill5("MHStarMap", "MHillas"); 102 104 MFillH hfill6("MHCerPhotEvt", "MCerPhotEvt"); … … 107 109 108 110 tlist.AddToList(&ncalc); 109 110 111 tlist.AddToList(&blind); 111 112 tlist.AddToList(&clean); 112 113 tlist.AddToList(&hcalc); 113 114 tlist.AddToList(&scalc); 115 tlist.AddToList(&icalc); 114 116 tlist.AddToList(&hfill1); 115 117 tlist.AddToList(&hfill2);
Note:
See TracChangeset
for help on using the changeset viewer.