{ gROOT->Reset(); gStyle->SetOptTitle(0); gStyle->SetOptStat(0); TCanvas *c1 = new TCanvas("c1", "c1",46,39,200,230); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetLeftMargin(0.15); c1->SetBottomMargin(0.15); c1->SetTopMargin(0.05); c1->SetRightMargin(0.05); c1->SetFrameBorderMode(0); c1->SetFrameLineWidth(2); c1->SetFrameFillColor(0); //float nch_x[8] ={48.7993 ,345.645 ,1439.62 ,3217.51 ,5051.86 ,7623.24 ,10526.2 ,13449.1}; float nch_x[8]={ 9.02817, 66.0042, 272.815, 615.624, 963.854, 1455.15, 2005.98, 2566.05 }; float Pixel_occup_b_0[8] ={0.00344425 ,0.0184009 ,0.0731671 ,0.163026 ,0.254749 ,0.384437 ,0.530369 ,0.67577 }; float Pixel_occup_b_1[8] ={0.00213922 ,0.00923742 ,0.0354765 ,0.078137 ,0.121859 ,0.183363 ,0.252246 ,0.32186 }; float Pixel_occup_b_2[8] ={0.00174109 ,0.00632073 ,0.0231192 ,0.0504953 ,0.0786906 ,0.118238 ,0.162824 ,0.20754 }; float Pixel_occup_e[8] ={0.00196606 ,0.00795298 ,0.0299914 ,0.0656417 ,0.102738 ,0.154727 ,0.214116 ,0.272206}; float SCT_occup_b_0[8] ={0.0541424 ,0.362503 ,1.48365 ,3.29639 ,5.10347 ,7.62277 ,10.3853 ,13.0723 }; float SCT_occup_b_1[8] ={0.0407218 ,0.271668 ,1.11701 ,2.48619 ,3.86555 ,5.78863 ,7.90365 ,9.96824 }; float SCT_occup_b_2[8] ={0.0309893 ,0.206514 ,0.844257 ,1.88448 ,2.93093 ,4.4055 ,6.03799 ,7.66142 }; float SCT_occup_b_3[8] ={0.0255915 ,0.16102 ,0.66118 ,1.46857 ,2.29731 ,3.45282 ,4.73516 ,6.02416 }; float SCT_occup_e[8] ={0.028371 ,0.183673 ,0.754556 ,1.6758 ,2.6192 ,3.93093 ,5.41805 ,6.87506 }; float TRT_occup_b[8] ={2.92407 ,9.1144 ,28.0124 ,50.6957 ,65.7582 ,78.8624 ,87.3136 ,91.9362 }; float TRT_occup_e[8] ={2.78535 ,8.18482 ,25.3305 ,47.0111 ,62.4329 ,76.5485 ,86.3064 ,91.6155 }; TGraph *gTRT_occup_b = new TGraph(8,nch_x, TRT_occup_b); TGraph *gTRT_occup_e = new TGraph(8,nch_x, TRT_occup_e); TGraph *gPixel_occup_b_0 = new TGraph(8,nch_x,Pixel_occup_b_0); TGraph *gPixel_occup_b_1 = new TGraph(8,nch_x,Pixel_occup_b_1); TGraph *gPixel_occup_b_2 = new TGraph(8,nch_x,Pixel_occup_b_2); TGraph *gPixel_occup_e = new TGraph(8,nch_x,Pixel_occup_e); TGraph *gSCT_occup_b_0 = new TGraph(8,nch_x, SCT_occup_b_0); TGraph *gSCT_occup_b_1 = new TGraph(8,nch_x, SCT_occup_b_1); TGraph *gSCT_occup_b_2 = new TGraph(8,nch_x, SCT_occup_b_2); TGraph *gSCT_occup_b_3 = new TGraph(8,nch_x, SCT_occup_b_3); TGraph *gSCT_occup_e = new TGraph(8,nch_x, SCT_occup_e); TGraph *gTRT_occup_b = new TGraph(8,nch_x,TRT_occup_b); TGraph *gTRT_occup_e = new TGraph(8,nch_x,TRT_occup_e); TGraph *gPixel_occup_b_0 = new TGraph(8,nch_x,Pixel_occup_b_0); TGraph *gPixel_occup_b_1 = new TGraph(8,nch_x,Pixel_occup_b_1); TGraph *gPixel_occup_b_2 = new TGraph(8,nch_x,Pixel_occup_b_2); TGraph *gPixel_occup_e = new TGraph(8,nch_x,Pixel_occup_e); TGraph *gSCT_occup_b_0 = new TGraph(8,nch_x,SCT_occup_b_0); TGraph *gSCT_occup_b_1 = new TGraph(8,nch_x,SCT_occup_b_1); TGraph *gSCT_occup_b_2 = new TGraph(8,nch_x,SCT_occup_b_2); TGraph *gSCT_occup_b_3 = new TGraph(8,nch_x,SCT_occup_b_3); TGraph *gSCT_occup_e = new TGraph(8,nch_x,SCT_occup_e); gTRT_occup_b ->SetTitle("TRT barrel"); gTRT_occup_e ->SetTitle("TRT EndCap"); gPixel_occup_b_0->SetTitle("Pixel barrel layer 0"); gPixel_occup_b_1->SetTitle("Pixel barrel layer 1"); gPixel_occup_b_2->SetTitle("Pixel barrel layer 2"); gPixel_occup_e ->SetTitle("Pixel EndCap"); gSCT_occup_b_0 ->SetTitle("SCT barrel layer 0" ); gSCT_occup_b_1 ->SetTitle("SCT barrel layer 1" ); gSCT_occup_b_2 ->SetTitle("SCT barrel layer 2" ); gSCT_occup_b_3 ->SetTitle("SCT barrel layer 3" ); gSCT_occup_e ->SetTitle("SCT EndCap" ); gTRT_occup_b->SetMarkerStyle(25); gTRT_occup_e->SetMarkerStyle(26); gPixel_occup_b_0->SetMarkerStyle(23); gPixel_occup_b_1->SetMarkerStyle(22); gPixel_occup_b_2->SetMarkerStyle(21); gPixel_occup_e ->SetMarkerStyle(26); Int_t ci; // for color index setting ci = TColor::GetColor("#cc00cc"); gPixel_occup_b_0->SetMarkerColor(1); gPixel_occup_b_1->SetMarkerColor(1); gPixel_occup_b_2->SetMarkerColor(1); gPixel_occup_e ->SetMarkerColor(1); gPixel_occup_b_0->SetMarkerSize(4); gPixel_occup_b_1->SetMarkerSize(4); gPixel_occup_b_2->SetMarkerSize(4); gPixel_occup_e ->SetMarkerSize(4); gPixel_occup_b_0->SetMaximum(.80); gPixel_occup_b_0->SetMinimum(0.0005); gPixel_occup_b_0->GetYaxis()->SetTitle("occupancy [%]"); gPixel_occup_b_0->GetXaxis()->SetTitle("dN_{ch}/d#eta (|#eta|<1)"); gPixel_occup_b_0->GetXaxis()->SetTitleOffset(1.); TH1F *h=new TH1F("h","h",10000,-10,2800); h->Draw(); h->SetMaximum(1); h->SetMinimum(0.0); h->GetYaxis()->SetTitle("occupancy [%]"); h->GetYaxis()->SetTitleOffset(1.2); h->GetYaxis()->SetTitleSize(0.06); h->GetYaxis()->SetLabelSize(0.06); h->GetYaxis()->SetNdivisions(505); h->GetXaxis()->SetTitle("dN_{ch}/d#eta (|#eta|<1)"); h->GetXaxis()->SetTitleSize(0.06); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetNdivisions(505); h->GetXaxis()->SetTitleOffset(1.2); gPixel_occup_b_0->Draw("CPsame"); gPixel_occup_b_1->Draw("CPsame"); gPixel_occup_b_2->Draw("CPsame"); gPixel_occup_e->Draw("CPsame"); leg = new TLegend(0.2,0.65,0.75,0.93); leg->AddEntry(gPixel_occup_b_0,"Pixel barrel B-layer","p"); leg->AddEntry(gPixel_occup_b_1,"Pixel barrel layer 1","p"); leg->AddEntry(gPixel_occup_b_2,"Pixel barrel layer 2","p"); leg->AddEntry(gPixel_occup_e ,"Pixel EndCap","p"); leg->SetFillColor(0); leg->Draw(); TLatex * tex = new TLatex(224.6135,0.517562,"ATLAS Preliminary"); tex->SetLineWidth(2); tex->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); c1->ToggleToolBar(); }