void test() { //=========Macro generated from canvas: c/PORTHOS / DoubleFace //========= (Tue May 24 17:51:19 2016) by ROOT version6.06/04 TCanvas *c = new TCanvas("c", "PORTHOS / DoubleFace",12,33,700,520); c->ToggleEventStatus(); c->Range(0,0,1,1); c->SetFillColor(0); c->SetBorderMode(0); c->SetBorderSize(2); c->SetFrameBorderMode(0); // ------------>Primitives in pad: c_1 TPad *c_1 = new TPad("c_1", "c_1",0.01,0.51,0.99,0.99); c_1->Draw(); c_1->cd(); c_1->Range(0.306969,-4.205341,3.32254,-0.07905365); c_1->SetFillColor(0); c_1->SetBorderMode(0); c_1->SetBorderSize(2); c_1->SetLogx(); c_1->SetLogy(); c_1->SetGridy(); c_1->SetFrameBorderMode(0); c_1->SetFrameBorderMode(0); TMultiGraph *multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle(""); Double_t Graph_fx1[17] = { 10, 14, 17.6, 22.1, 25.1, 32.1, 36.4, 37.3, 59.5, 88, 122.1, 136.5, 255.1, 391.7, 661.7, 834.8, 1000}; Double_t Graph_fy1[17] = { 0.07479, 0.14311, 0.19733, 0.23476, 0.2507, 0.2721, 0.2794, 0.2806, 0.2924, 0.2876, 0.2692, 0.2588, 0.1647, 0.1089, 0.0672, 0.0551, 0.0471}; TGraph *graph = new TGraph(17,Graph_fx1,Graph_fy1); graph->SetName("Graph"); graph->SetTitle("GSPECOR"); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#00ff00"); graph->SetLineColor(ci); ci = TColor::GetColor("#00ff00"); graph->SetMarkerColor(ci); graph->SetMarkerStyle(20); TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","GSPECOR",100,9,1099); Graph_Graph1->SetMinimum(0.02257); Graph_Graph1->SetMaximum(0.31693); Graph_Graph1->SetDirectory(0); Graph_Graph1->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1->SetLineColor(ci); Graph_Graph1->GetXaxis()->SetLabelFont(42); Graph_Graph1->GetXaxis()->SetLabelSize(0.035); Graph_Graph1->GetXaxis()->SetTitleSize(0.035); Graph_Graph1->GetXaxis()->SetTitleFont(42); Graph_Graph1->GetYaxis()->SetLabelFont(42); Graph_Graph1->GetYaxis()->SetLabelSize(0.035); Graph_Graph1->GetYaxis()->SetTitleSize(0.035); Graph_Graph1->GetYaxis()->SetTitleFont(42); Graph_Graph1->GetZaxis()->SetLabelFont(42); Graph_Graph1->GetZaxis()->SetLabelSize(0.035); Graph_Graph1->GetZaxis()->SetTitleSize(0.035); Graph_Graph1->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph1); multigraph->Add(graph,""); Double_t Graph_fx2[12] = { 17.55, 22.103, 25.072, 32.061, 59.541, 88.034, 122.061, 136.474, 255.134, 391.698, 661.657, 834.838}; Double_t Graph_fy2[12] = { 0.185913, 0.241484, 0.243785, 0.263375, 0.290647, 0.290691, 0.27801, 0.258643, 0.170904, 0.106527, 0.064552, 0.052317}; graph = new TGraph(12,Graph_fx2,Graph_fy2); graph->SetName("Graph"); graph->SetTitle("Donnees"); ci = TColor::GetColor("#0000ff"); graph->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); graph->SetMarkerColor(ci); graph->SetMarkerStyle(20); TH1F *Graph_Graph2 = new TH1F("Graph_Graph2","Donnees",100,15.795,916.5668); Graph_Graph2->SetMinimum(0.0284796); Graph_Graph2->SetMaximum(0.3145284); Graph_Graph2->SetDirectory(0); Graph_Graph2->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph2->SetLineColor(ci); Graph_Graph2->GetXaxis()->SetLabelFont(42); Graph_Graph2->GetXaxis()->SetLabelSize(0.035); Graph_Graph2->GetXaxis()->SetTitleSize(0.035); Graph_Graph2->GetXaxis()->SetTitleFont(42); Graph_Graph2->GetYaxis()->SetLabelFont(42); Graph_Graph2->GetYaxis()->SetLabelSize(0.035); Graph_Graph2->GetYaxis()->SetTitleSize(0.035); Graph_Graph2->GetYaxis()->SetTitleFont(42); Graph_Graph2->GetZaxis()->SetLabelFont(42); Graph_Graph2->GetZaxis()->SetLabelSize(0.035); Graph_Graph2->GetZaxis()->SetTitleSize(0.035); Graph_Graph2->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph2); multigraph->Add(graph,""); Double_t Graph_fx3[17] = { 10.001, 14.001, 17.55, 22.1, 25.07, 32.06, 36.45, 37.3, 59.541, 88.034, 122.061, 136.474, 255.134, 391.698, 661.657, 834.838, 1000}; Double_t Graph_fy3[17] = { 0.13047, 0.13004, 0.19532, 0.24455, 0.264, 0.28765, 0.29533, 0.29399, 0.30873, 0.30205, 0.28366, 0.27078, 0.16943, 0.1117, 0.06616, 0.05464, 0.03648}; graph = new TGraph(17,Graph_fx3,Graph_fy3); graph->SetName("Graph"); graph->SetTitle("GEANT4"); ci = TColor::GetColor("#ff0000"); graph->SetLineColor(ci); ci = TColor::GetColor("#ff0000"); graph->SetMarkerColor(ci); graph->SetMarkerStyle(20); TH1F *Graph_Graph3 = new TH1F("Graph_Graph3","GEANT4",100,9.0009,1099); Graph_Graph3->SetMinimum(0.009255); Graph_Graph3->SetMaximum(0.335955); Graph_Graph3->SetDirectory(0); Graph_Graph3->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph3->SetLineColor(ci); Graph_Graph3->GetXaxis()->SetLabelFont(42); Graph_Graph3->GetXaxis()->SetLabelSize(0.035); Graph_Graph3->GetXaxis()->SetTitleSize(0.035); Graph_Graph3->GetXaxis()->SetTitleFont(42); Graph_Graph3->GetYaxis()->SetLabelFont(42); Graph_Graph3->GetYaxis()->SetLabelSize(0.035); Graph_Graph3->GetYaxis()->SetTitleSize(0.035); Graph_Graph3->GetYaxis()->SetTitleFont(42); Graph_Graph3->GetZaxis()->SetLabelFont(42); Graph_Graph3->GetZaxis()->SetLabelSize(0.035); Graph_Graph3->GetZaxis()->SetTitleSize(0.035); Graph_Graph3->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph3); multigraph->Add(graph,""); Double_t Graph_fx4[18] = { 10.001, 14.001, 17.55, 22.1, 25.001, 26.001, 27.001, 28.001, 29.001, 30.001, 31.001, 32.001, 33.001, 34.001, 35.001, 36.45, 37.3, 59.541}; Double_t Graph_fy4[18] = { 0.09456, 0.09497, 0.15971, 0.21821, 0.23884, 0.24716, 0.25605, 0.25959, 0.26647, 0.2698, 0.273, 0.27847, 0.27929, 0.28605, 0.26679, 0.27358, 0.27556, 0.30683}; graph = new TGraph(18,Graph_fx4,Graph_fy4); graph->SetName("Graph"); graph->SetTitle("GEANT4 (Xenon)"); graph->SetMarkerStyle(20); TH1F *Graph_Graph4 = new TH1F("Graph_Graph4","GEANT4 (Xenon)",100,5.047,64.495); Graph_Graph4->SetMinimum(0.073333); Graph_Graph4->SetMaximum(0.328057); Graph_Graph4->SetDirectory(0); Graph_Graph4->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph4->SetLineColor(ci); Graph_Graph4->GetXaxis()->SetLabelFont(42); Graph_Graph4->GetXaxis()->SetLabelSize(0.035); Graph_Graph4->GetXaxis()->SetTitleSize(0.035); Graph_Graph4->GetXaxis()->SetTitleFont(42); Graph_Graph4->GetYaxis()->SetLabelFont(42); Graph_Graph4->GetYaxis()->SetLabelSize(0.035); Graph_Graph4->GetYaxis()->SetTitleSize(0.035); Graph_Graph4->GetYaxis()->SetTitleFont(42); Graph_Graph4->GetZaxis()->SetLabelFont(42); Graph_Graph4->GetZaxis()->SetLabelSize(0.035); Graph_Graph4->GetZaxis()->SetTitleSize(0.035); Graph_Graph4->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph4); multigraph->Add(graph,""); multigraph->Draw("ALP"); multigraph->GetXaxis()->SetTitle("Energy (keV)"); multigraph->GetXaxis()->CenterTitle(true); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetLabelSize(0.035); multigraph->GetXaxis()->SetTitleSize(0.035); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetTitle("Efficiency"); multigraph->GetYaxis()->CenterTitle(true); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetLabelSize(0.035); multigraph->GetYaxis()->SetTitleSize(0.035); multigraph->GetYaxis()->SetTitleFont(42); TLegend *leg = new TLegend(0.33,0.15,0.88,0.5,NULL,"brNDC"); leg->SetBorderSize(1); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("Graph","GSPECOR","lpf"); entry->SetFillStyle(1001); ci = TColor::GetColor("#00ff00"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#00ff00"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(20); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","Donnees","lpf"); entry->SetFillStyle(1001); ci = TColor::GetColor("#0000ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#0000ff"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(20); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","GEANT4","lpf"); entry->SetFillStyle(1001); ci = TColor::GetColor("#ff0000"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#ff0000"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(20); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","GEANT4 (Xenon)","lpf"); entry->SetFillStyle(1001); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(20); entry->SetMarkerSize(1); entry->SetTextFont(42); leg->Draw(); c_1->Modified(); c->cd(); // ------------>Primitives in pad: c_2 TPad *c_2 = new TPad("c_2", "c_2",0.01,0.01,0.99,0.49); c_2->Draw(); c_2->cd(); c_2->Range(0.5647217,0.9128007,1.947838,1.473151); c_2->SetFillColor(0); c_2->SetBorderMode(0); c_2->SetBorderSize(2); c_2->SetLogx(); c_2->SetFrameBorderMode(0); c_2->SetFrameBorderMode(0); Double_t Graph0_fx5[18] = { 10.001, 14.001, 17.55, 22.1, 25.001, 26.001, 27.001, 28.001, 29.001, 30.001, 31.001, 32.001, 33.001, 34.001, 35.001, 36.45, 37.3, 59.541}; Double_t Graph0_fy5[18] = { 1.379759, 1.369275, 1.222967, 1.120709, 1.103451, 1.080879, 1.056565, 1.05519, 1.040643, 1.040339, 1.040538, 1.032249, 1.035827, 1.017464, 1.097474, 1.079501, 1.066882, 1.006192}; graph = new TGraph(18,Graph0_fx5,Graph0_fy5); graph->SetName("Graph0"); graph->SetTitle(""); graph->SetFillColor(1); graph->SetMarkerStyle(20); TH1F *Graph_Graph5 = new TH1F("Graph_Graph5","",100,5.047,64.495); Graph_Graph5->SetMinimum(0.9688357); Graph_Graph5->SetMaximum(1.417116); Graph_Graph5->SetDirectory(0); Graph_Graph5->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph5->SetLineColor(ci); Graph_Graph5->GetXaxis()->SetTitle("Energy (keV)"); Graph_Graph5->GetXaxis()->CenterTitle(true); Graph_Graph5->GetXaxis()->SetLabelFont(42); Graph_Graph5->GetXaxis()->SetLabelSize(0.035); Graph_Graph5->GetXaxis()->SetTitleSize(0.035); Graph_Graph5->GetXaxis()->SetTitleFont(42); Graph_Graph5->GetYaxis()->SetTitle("GEANT4 MOUSSE / GEANT4 XE"); Graph_Graph5->GetYaxis()->CenterTitle(true); Graph_Graph5->GetYaxis()->SetLabelFont(42); Graph_Graph5->GetYaxis()->SetLabelSize(0.035); Graph_Graph5->GetYaxis()->SetTitleSize(0.035); Graph_Graph5->GetYaxis()->SetTitleFont(42); Graph_Graph5->GetZaxis()->SetLabelFont(42); Graph_Graph5->GetZaxis()->SetLabelSize(0.035); Graph_Graph5->GetZaxis()->SetTitleSize(0.035); Graph_Graph5->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph5); graph->Draw("alp"); TLine *line = new TLine(5.047,1.05,64.495,1.05); ci = TColor::GetColor("#ff0000"); line->SetLineColor(ci); line->Draw(); line = new TLine(5.047,0.95,64.495,0.95); ci = TColor::GetColor("#ff0000"); line->SetLineColor(ci); line->Draw(); c_2->Modified(); c->cd(); c->Modified(); c->cd(); c->SetSelected(c); }