source: trunk/source/processes/electromagnetic/standard/test/eegg.C @ 1319

Last change on this file since 1319 was 1199, checked in by garnier, 15 years ago

nvx fichiers dans CVS

File size: 1.7 KB
Line 
1{
2gROOT->Reset();
3gStyle->SetOptStat(0);
4gStyle->SetNdivisions(210, "x");
5gStyle->SetNdivisions(210, "y");
6gStyle->SetLabelOffset(0.005, "x");
7gStyle->SetLabelOffset(0.005, "y");
8gStyle->SetLabelSize(0.07, "x");
9gStyle->SetLabelSize(0.07, "y");
10gStyle->SetTitleOffset(0.8, "x");
11gStyle->SetTitleOffset(0.8, "y");
12gStyle->SetTitleSize(0.08, "x");
13gStyle->SetTitleSize(0.08, "y");
14gStyle->SetPadBottomMargin(0.15);
15gStyle->SetPadTopMargin(0.1);
16gStyle->SetPadLeftMargin(0.15);
17gStyle->SetPadRightMargin(0.1);
18gStyle->SetTickLength(0.04, "x");
19gStyle->SetTickLength(0.02, "y");
20gStyle->SetPadBorderMode(0);
21
22TCanvas c1("c1","eegg ",0.5, 5, 600, 600);
23
24c1->Divide(1,2);
25
26TString ang[2] = {"",""};
27
28TLegend* leg[2];
29TH1F* hh[4];
30leg[0] = new TLegend(0.2, 0.5, 0.35, 0.8);
31leg[0]->SetTextSize(0.07);
32leg[1] = new TLegend(0.2, 0.5, 0.35, 0.8);
33leg[1]->SetTextSize(0.07);
34leg[0]->SetHeader("100 keV"); 
35leg[1]->SetHeader("100 keV"); 
36//  c1.cd(i+1);
37//  hh[i] = gPad->DrawFrame(0, 0, 6.5, 700, "");
38//  hh[i]->GetXaxis()->SetTitle("p (GeV)");
39//  hh[i]->GetYaxis()->SetTitle("#sigma (mb/GeV/srad)");
40//  hh[i]->Draw("AXIS");
41
42TString file1 = "eegg100kev.root";
43//TString file1 = "eegg10kev.root";
44//TString file1 = "eegg1mev.root";
45
46TFile ff(file1);
47c1.cd(1);
48h2->SetLineColor(4); 
49h2->Draw("HIST");
50leg[0]->AddEntry(h2, "G4 8.2", "l"); 
51
52h1->SetLineColor(2); 
53h1->Draw("HIST SAME");
54leg[0]->AddEntry(h1, "G4 8.1", "l"); 
55
56c1.cd(2);
57h4->SetLineColor(4); 
58h4->Draw("HIST");
59leg[1]->AddEntry(h4, "G4 8.2", "l"); 
60
61h3->SetLineColor(2); 
62h3->Draw("HIST SAME");
63leg[1]->AddEntry(h3, "G4 8.1", "l"); 
64
65for(i=0; i<2; i++) {
66  c1.cd(i+1);
67  leg[i]->Draw();
68}
69
70c1.Update();
71
72c1.Print("eegg100kev.eps");
73//c1.Print("eegg1mev.eps");
74
75}
Note: See TracBrowser for help on using the repository browser.