source: trunk/Dwarf/Documents/macros/reflectivity.C@ 15015

Last change on this file since 15015 was 8749, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 1.7 KB
Line 
1void reflectivity()
2{
3 TGraph g2;
4 g2.SetName("10nm");
5 g2.SetTitle("Reflectivity for Al, d = 300nm");
6 g2.SetPoint(g2.GetN(), 290, 88.5);
7 g2.SetPoint(g2.GetN(), 350, 89.9);
8 g2.SetPoint(g2.GetN(), 400, 90.5);
9 g2.SetPoint(g2.GetN(), 500, 91.1);
10 g2.SetPoint(g2.GetN(), 600, 90.9);
11 g2.SetPoint(g2.GetN(), 700, 89.9);
12 g2.SetMarkerStyle(kFullDotMedium);
13 g2.SetLineWidth(2);
14 g2.SetLineStyle(7);
15 g2.SetMaximum(95);
16 g2.SetMinimum(79);
17 TGraph *g=(TGraph*)g2.DrawClone("AC");
18
19 TGraph g1;
20 g1.SetName("100nm");
21 g1.SetPoint(g1.GetN(), 290, 85.7);
22 g1.SetPoint(g1.GetN(), 310, 89.3);
23 g1.SetPoint(g1.GetN(), 330, 91.2);
24 g1.SetPoint(g1.GetN(), 360, 92.3);
25 g1.SetPoint(g1.GetN(), 390, 92.4);
26 g1.SetPoint(g1.GetN(), 430, 91.7);
27 g1.SetPoint(g1.GetN(), 475, 90.2);
28 g1.SetPoint(g1.GetN(), 530, 87.3);
29 g1.SetPoint(g1.GetN(), 620, 81.1);
30 g1.SetMarkerStyle(kFullDotMedium);
31 g1.SetLineWidth(2);
32 g1.SetLineColor(kBlue);
33 g1.DrawClone("C");
34
35 TH1 *h = g->GetHistogram();
36
37 TAxis *axex = h->GetXaxis();
38 TAxis *axey = h->GetYaxis();
39
40 axex->SetTitle("Wavelength \\nu / nm");
41 axey->SetTitle("Reflectivity / %");
42 axex->CenterTitle();
43 axey->CenterTitle();
44 axex->SetRangeUser(275, 725);
45 axex->SetTitleOffset(1.2);
46
47 gPad->SetGridx();
48 gPad->SetGridy();
49 gPad->SetBorderMode(0);
50 gPad->SetFrameBorderMode(0);
51 gPad->SetFillColor(kWhite);
52 gPad->SetRightMargin(0.01);
53 gPad->SetLeftMargin(0.08);
54
55 TLegend leg(0.55, 0.89, 0.99, 0.99);
56 leg.AddEntry("10nm", "Protection layer d = 10nm","l");
57 leg.AddEntry("100nm", "Protection layer d = 100nm","l");
58 leg.DrawClone();
59}
60
Note: See TracBrowser for help on using the repository browser.