void Pixels(int ip=10) { gROOT->SetStyle("Plain"); TCanvas *c1=new TCanvas("c1","Canvas",600,600); //c1->SetLogy(); gStyle->SetOptStat(0); if(ip==10) { TFile::Open("SimAnalysisLayerTracks900071.root"); SLayer3All->SetTitle("Photon 10GeV;Number of particles;Number of hit pixels"); } if(ip==100) { TFile::Open("SimAnalysisLayerTracks900045.root"); SLayer3All->SetTitle("Photon 100GeV;Number of particles;Number of hit pixels"); } if(ip==1000) { TFile::Open("SimAnalysisLayerTracks900058.root"); SLayer3All->SetTitle("Photon 1TeV;Number of particles;Number of hit pixels"); } TLatex t; t.SetTextAlign(31); t.SetTextSize(0.04); SLayer0All->SetMarkerStyle(20); SLayer0All->SetMarkerSize(0.1); SLayer0All->SetMarkerColor(5); SLayer1All->SetMarkerStyle(20); SLayer1All->SetMarkerSize(0.1); SLayer1All->SetMarkerColor(4); SLayer2All->SetMarkerStyle(20); SLayer2All->SetMarkerSize(0.1); SLayer2All->SetMarkerColor(2); SLayer3All->SetMarkerStyle(20); SLayer3All->SetMarkerSize(0.1); SLayer3All->SetMarkerColor(3); if(ip==10) { SLayer3All->GetXaxis()->SetRangeUser(0,160); SLayer3All->GetYaxis()->SetRangeUser(0,160); } if(ip==100) { SLayer3All->GetXaxis()->SetRangeUser(0,800); SLayer3All->GetYaxis()->SetRangeUser(0,800); } if(ip==1000) { SLayer3All->GetXaxis()->SetRangeUser(0,6000); SLayer3All->GetYaxis()->SetRangeUser(0,6000); } SLayer3All->GetYaxis()->SetTitleOffset(1.3); SLayer3All->Draw(); SLayer2All->Draw("same"); SLayer1All->Draw("same"); SLayer0All->Draw("same"); if(ip==10) { t.DrawLatex( 45,140,"Pixel size:"); t.SetTextColor(5); t.DrawLatex( 70,140," 25mu"); t.SetTextColor(4); t.DrawLatex( 70,130," 50mu"); t.SetTextColor(2); t.DrawLatex( 70,120,"100mu"); t.SetTextColor(3); t.DrawLatex( 70,110,"200mu"); } if(ip==100) { t.DrawLatex(225,700,"Pixel size:"); t.SetTextColor(5); t.DrawLatex(350,700," 25mu"); t.SetTextColor(4); t.DrawLatex(350,650," 50mu"); t.SetTextColor(2); t.DrawLatex(350,600,"100mu"); t.SetTextColor(3); t.DrawLatex(350,550,"200mu"); } if(ip==1000) { t.DrawLatex(1600,5000,"Pixel size:"); t.SetTextColor(5); t.DrawLatex(2600,5000," 25mu"); t.SetTextColor(4); t.DrawLatex(2600,4700," 50mu"); t.SetTextColor(2); t.DrawLatex(2600,4400,"100mu"); t.SetTextColor(3); t.DrawLatex(2600,4100,"200mu"); } c1->Update(); if(ip== 10) c1->Print("Pixels10.png"); if(ip== 100) c1->Print("Pixels100.png"); if(ip==1000) c1->Print("Pixels1000.png"); }