Changeset 2190
- Timestamp:
- 06/18/03 09:29:45 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2188 r2190 1 1 -*-*- END OF LINE -*-*- 2 3 2003/06/18: Thomas Bretz 4 5 * macros/sumcurrents.C: 6 - added MDirIter support 7 - fixed the rel. error calculation 8 - some small corrections to the layout 9 10 * mhist/MHCurrents.cc: 11 - changed histogram name 12 - added axis titles 13 14 2 15 3 16 2003/06/17: Oscar Blanch … … 7 20 8 21 * mgeom/MGeomCamMagicHG.[h,cc] 9 - New geom atry for a high granularity hipothetic Magic camera22 - New geometry for a high granularity hipothetic Magic camera 10 23 11 24 * mgeom/Makefile and mgeom/GeomLinkDef.h 12 25 - Introduction of MGeomMagicHG class. 13 26 27 28 14 29 2003/06/17: Thomas Bretz 15 30 … … 22 37 * manalysis/MCurrents.h: 23 38 - fixed a bug in the const operator[] 39 40 * mgui/MCamDisplay.[h,cc]: 41 - set ClassDef to 1 so that the camera display can be written into 42 a root file 43 - fixed destructor (didn't fit default constructor) 44 - implemented FillRandom for test cases 45 46 * mgui/MHexagon.h 47 - set ClassDef to 1 so that the camera display can be written into 48 a root file 24 49 25 50 -
trunk/MagicSoft/Mars/macros/sumcurrents.C
r2178 r2190 23 23 \* ======================================================================== */ 24 24 25 // ------------------------------------------------------------------------- 26 // 27 // plot.C 28 // 29 // This macro shows how to fill and display a histogram using Mars 30 // 31 void sumcurrents(const char *fname="../currents/spica_center.txt") 25 void ProcessFile(TString fname) 32 26 { 33 27 // … … 51 45 // (created with the star.C macro) 52 46 MReadCurrents read(fname); 53 /*54 read.AddFile("../currents/dcs_arcturus2.dat");55 read.AddFile("../currents/dcs_arcturus3.dat");56 read.AddFile("../currents/dcs_arcturus4.dat");57 read.AddFile("../currents/dcs_arcturus5.dat");58 read.AddFile("../currents/dcs_arcturus6.dat");59 read.AddFile("../currents/dcs_arcturus7.dat");60 read.AddFile("../currents/dcs_arcturus8.dat");61 read.AddFile("../currents/dcs_arcturus9.dat");62 read.AddFile("../currents/dcs_arcturus10.dat");63 */64 47 tlist.AddToList(&read); 65 48 … … 97 80 TArrayF &r = h.GetRms(); 98 81 TArrayF &v = h.GetSum(); 99 arr[i] = (r[i]==0 ? 0 : v[i]/r[i]);82 arr[i] = (r[i]==0 ? 0 : r[i]/v[i]); 100 83 } 101 84 disp3->Fill(arr); … … 124 107 c->cd(4); 125 108 gPad->SetBorderMode(0); 126 h.GetHist().DrawClone(); 109 h.GetHist().SetStats(kFALSE); 110 h.GetHist().DrawCopy(); 127 111 c->cd(5); 128 112 gPad->SetBorderMode(0); 113 gPad->SetLogy(); 129 114 TH1F h1("currents;rms", "Currents Rms", 577, -0.5, 576.5); 115 h1.SetXTitle("Pixel Index"); 116 h1.SetStats(kFALSE); 130 117 for (int i=1;i<=577; i++) 131 118 h1.SetBinContent(i, h.GetHist().GetBinError(i)); … … 133 120 c->cd(6); 134 121 gPad->SetBorderMode(0); 122 gPad->SetLogy(); 135 123 TH1F h2("currents;relerr", "Currents rel. Error [%]", 577, -0.5, 576.5); 124 h2.SetXTitle("Pixel Index"); 125 h2.SetStats(kFALSE); 136 126 for (int i=1;i<=577; i++) 137 { 138 Float_t val = h.GetHist().GetBinContent(i); 139 Float_t rms = h.GetHist().GetBinError(i); 140 h2.SetBinContent(i, rms==0?0:val/rms); 141 } 127 h2.SetBinContent(i, arr[i]*100); 142 128 h2.DrawCopy(); 143 129 144 c->SaveAs("spica_center-avg.ps"); 130 c->SaveAs(fname(0, fname.Last('.')+1) + "ps"); 131 c->SaveAs(fname(0, fname.Last('.')+1) + "root"); 145 132 } 133 134 // ------------------------------------------------------------------------- 135 // 136 // plot.C 137 // 138 // This macro shows how to fill and display a histogram using Mars 139 // 140 void sumcurrents(const char *dirname="/home/MAGIC/online_data/ccdata/") 141 { 142 MDirIter Next; 143 Next.AddDirectory(dirname, "dc_*.txt", -1); 144 145 TString fname; 146 while (1) 147 { 148 fname = Next(); 149 if (fname.IsNull()) 150 break; 151 152 ProcessFile(fname); 153 } 154 } -
trunk/MagicSoft/Mars/mhist/MHCurrents.cc
r2186 r2190 79 79 Clear(); 80 80 81 fHist.SetName("currents ");81 fHist.SetName("currents;avg"); 82 82 fHist.SetTitle("Avg.Currents [nA]"); 83 fHist.SetXTitle("Pixel Index"); 84 fHist.SetYTitle("A [nA]"); 83 85 fHist.SetDirectory(NULL); 84 fHist.Sumw2();85 86 fHist.SetLineColor(kGreen); 86 87 fHist.SetMarkerStyle(kFullDotMedium);
Note:
See TracChangeset
for help on using the changeset viewer.