Logo ROOT   6.10/09
Reference Guide
exclusiongraph2.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_graphs
3 /// \notebook
4 /// Draw several graphs with an exclusion zones.
5 ///
6 /// \macro_image
7 /// \macro_code
8 ///
9 /// \author Olivier Couet
10 
11 void exclusiongraph2()
12 {
13  TCanvas *c = new TCanvas("c",
14  "Charged Higgs L300 Contour",0,0,700,700);
15  c->SetTickx();
16  c->SetTicky();
17  c->SetGridx();
18  c->SetGridy();
19 
20  TH1 *frame = new TH1F("frame","",1000,50,500);
21  frame->SetMinimum(1);
22  frame->SetMaximum(50);
23  frame->SetDirectory(0);
24  frame->SetStats(0);
25  frame->GetXaxis()->SetTitle("m_{A} (GeV)");
26  frame->GetXaxis()->SetTickLength(0.02);
27  frame->GetXaxis()->SetLabelSize(0.03);
28  frame->GetYaxis()->SetTitle("tan#beta");
29  frame->GetYaxis()->SetMoreLogLabels();
30  frame->GetYaxis()->SetLabelSize(0.03);
31  frame->Draw(" ");
32  c->SetLogy();
33 
34  TGraph *gr1 = new TGraph(10);
35  gr1->SetFillColor(6);
36  gr1->SetFillStyle(3005);
37  gr1->SetLineColor(6);
38  gr1->SetLineWidth(603);
39  gr1->SetPoint(0,140,0.5);
40  gr1->SetPoint(1,130,2.9);
41  gr1->SetPoint(2,124.677,3.83726);
42  gr1->SetPoint(3,113.362,6.06903);
43  gr1->SetPoint(4,108.513,8.00221);
44  gr1->SetPoint(5,111.746,10.0272);
45  gr1->SetPoint(6,119.828,12.8419);
46  gr1->SetPoint(7,135.991,30.0872);
47  gr1->SetPoint(8,140,40);
48  gr1->SetPoint(9,135,60);
49  gr1->Draw("C");
50  TLatex *tex = new TLatex(140.841,37.9762,
51  "#leftarrow t #rightarrow bH^{+}, H^{+} #rightarrow #tau#nu");
52  tex->SetTextColor(6);
53  tex->Draw();
54 
55  TGraph *gr2 = new TGraph(15);
56  gr2->SetName("Graph");
57  gr2->SetTitle("Graph");
58  gr2->SetFillColor(1);
59  gr2->SetFillStyle(3005);
60  gr2->SetLineWidth(3);
61  gr2->SetPoint(0,499.192,3.02622);
62  gr2->SetPoint(1,427.748,3.06233);
63  gr2->SetPoint(2,358.244,3.10722);
64  gr2->SetPoint(3,305.711,3.24589);
65  gr2->SetPoint(4,244.289,3.36617);
66  gr2->SetPoint(5,206.304,3.7544);
67  gr2->SetPoint(6,178.017,4.50347);
68  gr2->SetPoint(7,148.114,6.20297);
69  gr2->SetPoint(8,131.142,8.00221);
70  gr2->SetPoint(9,111.746,8.48188);
71  gr2->SetPoint(10,102.047,9.52921);
72  gr2->SetPoint(11,96.3901,13.2212);
73  gr2->SetPoint(12,92.3491,19.0232);
74  gr2->SetPoint(13,90.7328,26.3935);
75  gr2->SetPoint(14,93.1573,50.4385);
76  gr2->Draw("L");
77  tex = new TLatex(346.929,6.62281,"ATLAS");
78  tex->SetLineWidth(2);
79  tex->Draw();
80  tex = new TLatex(328.341,5.24703,"#intLdt = 300 fb^{-1}");
81  tex->SetTextSize(0.0297619);
82  tex->SetLineWidth(2);
83  tex->Draw();
84  tex = new TLatex(340.463,4.1874,"Maximal mixing");
85  tex->SetTextSize(0.0297619);
86  tex->SetLineWidth(2);
87  tex->Draw();
88  tex = new TLatex(413.2,2.51608,"LEP 2000");
89  tex->SetTextSize(0.0297619);
90  tex->SetLineWidth(2);
91  tex->Draw();
92 
93  TGraph *gr3 = new TGraph(10);
94  gr3->SetName("Graph");
95  gr3->SetTitle("Graph");
96  gr3->SetFillColor(2);
97  gr3->SetFillStyle(3004);
98  gr3->SetLineColor(2);
99  gr3->SetLineWidth(603);
100  gr3->SetPoint(0,176.84,10.7499);
101  gr3->SetPoint(1,190.575,11.9912);
102  gr3->SetPoint(2,211.58,12.7108);
103  gr3->SetPoint(3,243.088,12.3457);
104  gr3->SetPoint(4,279.443,12.6185);
105  gr3->SetPoint(5,302.065,12.9916);
106  gr3->SetPoint(6,331.957,13.7713);
107  gr3->SetPoint(7,369.928,14.2821);
108  gr3->SetPoint(8,425.673,16.1651);
109  gr3->SetPoint(9,499.192,18.1635);
110  gr3->Draw("C");
111  tex = new TLatex(188.151,9.36035,
112  "gb #rightarrow tH^{+}, H^{+} #rightarrow #tau#nu");
113  tex->SetTextColor(2);
114  tex->Draw();
115 
116  TGraph *gr4 = new TGraph(10);
117  gr4->SetName("Graph");
118  gr4->SetTitle("Graph");
119  gr4->SetFillColor(4);
120  gr4->SetFillStyle(3004);
121  gr4->SetLineColor(4);
122  gr4->SetLineWidth(-603);
123  gr4->SetPoint(0,178.456,2.91797);
124  gr4->SetPoint(1,200.269,3.40033);
125  gr4->SetPoint(2,229.354,3.96243);
126  gr4->SetPoint(3,249.551,4.07959);
127  gr4->SetPoint(4,269.749,3.71097);
128  gr4->SetPoint(5,298.025,3.09308);
129  gr4->SetPoint(6,341.652,2.89679);
130  gr4->SetPoint(7,378.007,2.57808);
131  gr4->SetPoint(8,441.023,2.16454);
132  gr4->SetPoint(9,499.677,1.76145);
133  gr4->Draw("C");
134  tex = new TLatex(165.,1.15498,
135  "gb #rightarrow tH^{+}, H^{+} #rightarrow tb");
136  tex->SetTextColor(4);
137  tex->Draw();
138 
139  TGraph *gr5 = new TGraph(10);
140  gr5->SetName("Graph");
141  gr5->SetTitle("Graph");
142  gr5->SetFillColor(4);
143  gr5->SetFillStyle(3004);
144  gr5->SetLineColor(4);
145  gr5->SetLineWidth(603);
146  gr5->SetPoint(0,152.603,23.0996);
147  gr5->SetPoint(1,188.151,18.8373);
148  gr5->SetPoint(2,239.048,15.2499);
149  gr5->SetPoint(3,264.901,15.8156);
150  gr5->SetPoint(4,299.641,18.8373);
151  gr5->SetPoint(5,334.381,20.7085);
152  gr5->SetPoint(6,360.233,22.4362);
153  gr5->SetPoint(7,396.589,24.4859);
154  gr5->SetPoint(8,433.752,25.7669);
155  gr5->SetPoint(9,499.192,27.3132);
156  gr5->Draw("C");
157 }
virtual void SetGridx(Int_t value=1)
Definition: TPad.h:324
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:43
virtual void SetTickx(Int_t value=1)
Definition: TPad.h:344
virtual void SetMaximum(Double_t maximum=-1111)
Definition: TH1.h:375
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
Definition: TH1.cxx:8053
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:131
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
Definition: THist.hxx:311
virtual void SetMinimum(Double_t minimum=-1111)
Definition: TH1.h:376
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Definition: TObject.cxx:202
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition: TAttFill.h:39
virtual void SetTitle(const char *title="")
Set graph title.
Definition: TGraph.cxx:2180
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
Definition: TGraph.cxx:745
To draw Mathematical Formula.
Definition: TLatex.h:18
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition: TAttLine.h:40
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Definition: TH1.cxx:2851
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:37
virtual void SetTicky(Int_t value=1)
Definition: TPad.h:345
TAxis * GetYaxis()
Definition: TH1.h:301
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels The size is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:204
The Canvas class.
Definition: TCanvas.h:31
virtual void SetGridy(Int_t value=1)
Definition: TPad.h:325
The TH1 histogram class.
Definition: TH1.h:56
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
Definition: TGraph.cxx:2156
void SetMoreLogLabels(Bool_t more=kTRUE)
Set the kMoreLogLabels bit flag When this option is selected more labels are drawn when in log scale ...
Definition: TAxis.h:213
A Graph is a graphics object made of two arrays X and Y with npoints each.
Definition: TGraph.h:41
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length The length is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:249
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
Definition: TAttText.h:43
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Definition: TAttText.h:46
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:155
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
Definition: TH1.cxx:8103
TAxis * GetXaxis()
Definition: TH1.h:300
virtual void SetLogy(Int_t value=1)
Set Lin/Log scale for Y.
Definition: TPad.cxx:5780