source: old/Dwarf/Documents/macros/sensitivity.C@ 15513

Last change on this file since 15513 was 8597, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 4.7 KB
Line 
1sensitivity(){
2TGraph dwarf;
3dwarf.SetName("DWARF");
4dwarf.SetTitle("Differential Flux Sensitivity");
5TLegend leg(0.75, 0.75, 0.95, 0.95); //x1, y1, x2, y2 in %
6//dwarf.SetPoint(dwarf.GetN()+1, x1, y1);
7//dwarf.SetPoint(dwarf.GetN()+1, x2, y2);
8dwarf.SetPoint(dwarf.GetN(), 0.001, 6E-12);
9dwarf.SetPoint(dwarf.GetN(), 0.25, 6E-12);
10dwarf.SetPoint(dwarf.GetN(), 0.31, 4.38E-12);
11dwarf.SetPoint(dwarf.GetN(), 0.39, 2.1E-12);
12dwarf.SetPoint(dwarf.GetN(), 0.45, 1.54E-12);
13dwarf.SetPoint(dwarf.GetN(), 0.5, 1.4E-12);
14dwarf.SetPoint(dwarf.GetN(), 1, 7.5E-13);
15dwarf.SetPoint(dwarf.GetN(), 10, 2.25E-13);
16dwarf.SetPoint(dwarf.GetN(), 50, 3.13E-13);
17dwarf.SetLineColor(kBlue);
18dwarf.SetLineWidth(5);
19
20TGraph *gclone = dwarf.DrawClone("AC");
21
22TH1 *h = gclone->GetHistogram();
23
24TAxis *axex = h->GetXaxis();
25TAxis *axey = h->GetYaxis();
26//axex->SetLabelOffset(x);
27//axey->SetLabelOffset(y);
28//axex->SetLabelSize(x);
29//axey->SetLabelSize(y);
30axex->SetTitleOffset(1.30);
31axey->SetTitleOffset(1.2);
32//axex->SetTitleSize(x);
33//axey->SetTitleSize(y);
34
35axex->SetMoreLogLabels();
36//axey->SetMoreLogLabels();
37
38axex->SetTitle("E_0 [TeV]");
39axey->SetTitle("F(E<E_0) [cm^{-2}s^{-1}]");
40
41axex->SetRangeUser(0.005, 100);
42axey->SetRangeUser(1E-13, 2E-10);
43gclone->RemovePoint(0);
44leg.AddEntry("DWARF", "DWARF", "l");
45
46
47TGraph hegras;
48hegras.SetName("HEGRAS");
49hegras.SetPoint(hegras.GetN(), 0.5, 1.7E-12);
50hegras.SetPoint(hegras.GetN(), 1, 1E-12);
51hegras.SetPoint(hegras.GetN(), 10, 2.5E-13);
52hegras.SetPoint(hegras.GetN(), 50, 2.5E-13);
53hegras.SetLineColor(kGreen);
54hegras.SetLineWidth(5);
55hegras.DrawClone("C");
56leg.AddEntry("HEGRAS", "HEGRA CT System", "l");
57
58//TGraph hegra2;
59//hegra.SetName("HEGRA2");
60//hegra2.SetPoint(hegra2.GetN(), 0.4, 1.7E-12); //1.2E-12
61//hegra2.SetLineColor(kBlue);
62//hegra2.SetMarkerStyle(kFullDotMedium);
63//hegra2.DrawClone("P");
64//leg.AddEntry("HEGRA2", "HEGRA CT System 2", "p");
65
66TF1* pow2=new TF1("pow2","1.7e-12/pow(0.4,-0.73)*pow(x,-0.73)",0.4,7);
67pow2->SetLineColor(kGreen);
68pow2->SetLineStyle(kDashed);
69pow2->Draw("same");
70leg.AddEntry("pow2", "HEGRA CT System 2", "l");
71
72//TGraph hegra;
73//hegra.SetName("HEGRA");
74//hegra.SetPoint(hegra.GetN(), 0.75, 7.1E-12); //1E-11
75//hegra.SetLineColor(kBlue);
76//hegra.SetMarkerStyle(kFullDotMedium);
77//hegra.SetMarkerSize(5);
78//hegra.DrawClone("P");
79//leg.AddEntry("HEGRA", "1 HEGRA CT", "p");
80
81TF1* pow3=new TF1("pow3","7.1e-12/pow(0.75,-0.73)*pow(x,-0.73)",0.75,7);
82pow3->SetLineColor(kBlue);
83pow3->SetLineStyle(kDashed);
84pow3->Draw("same");
85leg.AddEntry("pow3", "1 single HEGRA CT", "l");
86
87TGraph whipple;
88whipple.SetName("Whipple");
89whipple.SetPoint(whipple.GetN(), 0.25, 1E-11);
90whipple.SetPoint(whipple.GetN(), 1, 2.7E-12);
91whipple.SetPoint(whipple.GetN(), 3, 1E-12);
92whipple.SetPoint(whipple.GetN(), 10, 1E-12);
93whipple.SetLineColor(kRed);
94whipple.SetLineWidth(5);
95whipple.DrawClone("C");
96leg.AddEntry("Whipple", "Whipple", "l");
97
98//TGraph whipple2;
99//whipple2.SetName("Whipple2");
100//whipple2.SetPoint(whipple2.GetN(), 0.3, 9.2E-12); //1.3E-11
101//whipple2.SetLineColor(kBlue);
102//whipple2.SetMarkerStyle(kFullDotMedium);
103//whipple2.DrawClone("P");
104//leg.AddEntry("Whipple2", "Whipple2", "p");
105
106TF1* pow1=new TF1("pow1","1.3e-11/pow(0.3,-0.95)*pow(x,-0.95)",0.3,3.5);
107pow1->SetLineColor(kRed);
108pow1->SetLineStyle(kDashed);
109pow1->Draw("same");
110leg.AddEntry("pow1", "Whipple 2", "l");
111
112TGraph magic_loi;
113magic_loi.SetName("magic_loi");
114magic_loi.SetPoint(magic_loi.GetN(), 0.01, 1E-10);
115magic_loi.SetPoint(magic_loi.GetN(), 0.045, 1E-11);
116magic_loi.SetPoint(magic_loi.GetN(), 0.095, 4.5E-12);
117magic_loi.SetPoint(magic_loi.GetN(), 0.55, 1E-12);
118magic_loi.SetPoint(magic_loi.GetN(), 1, 6E-13);
119magic_loi.SetLineColor(kCyan);
120magic_loi.SetLineWidth(5);
121magic_loi.SetLineStyle(kDashed);
122magic_loi.DrawClone("C");
123leg.AddEntry("magic_loi", "MAGIC LoI", "l");
124
125TGraph magic;
126magic.SetName("magic");
127magic.SetPoint(magic.GetN(), 0.036, 1.2E-10);
128magic.SetPoint(magic.GetN(), 0.045, 8E-11);
129magic.SetPoint(magic.GetN(), 0.063, 5E-11);
130magic.SetPoint(magic.GetN(), 0.095, 2.3E-11);
131magic.SetPoint(magic.GetN(), 0.12, 1.3E-11);
132magic.SetPoint(magic.GetN(), 0.15, 7E-12);
133magic.SetPoint(magic.GetN(), 0.18, 5E-12);
134magic.SetPoint(magic.GetN(), 0.25, 3E-12);
135magic.SetPoint(magic.GetN(), 0.31, 2.5E-12);
136magic.SetPoint(magic.GetN(), 0.45, 1.1E-12);
137magic.SetPoint(magic.GetN(), 0.5, 1.05E-12);
138magic.SetPoint(magic.GetN(), 0.6, 9E-13);
139magic.SetPoint(magic.GetN(), 0.8, 6E-13);
140magic.SetPoint(magic.GetN(), 0.9, 6E-13);
141magic.SetPoint(magic.GetN(), 1, 4E-13);
142magic.SetLineColor(kCyan);
143magic.SetLineWidth(5);
144magic.DrawClone("C");
145leg.AddEntry("magic", "MAGIC", "l");
146
147leg.DrawClone();
148gPad->SetGridx();
149gPad->SetGridx();
150gPad->SetLogx();
151gPad->SetLogy();
152gPad->SetFillColor(kWhite);
153gPad->SetBottomMargin(0.13);
154gPad->SetLeftMargin(0.11);
155
156}
Note: See TracBrowser for help on using the repository browser.