void CoreLayer2(int ip=0) { TCanvas *c1(new TCanvas()); //c1->SetLogy(); gStyle->SetOptStat(0); TFile::Open("SimAnalysisLayerTracks900071.root"); TH1F *temp1(new TH1F(*TLayerAll)); for(int i(0);i<100;i++) { temp1->SetBinContent(i+1,TLayerAll->GetBinContent(i+1)/100000.0); temp1->SetBinError(i+1,TLayerAll->GetBinError(i+1)/100000.0); } temp1->SetMarkerStyle(20); temp1->SetMarkerColor(4); temp1->SetLineColor(4); temp1->SetTitle("Photon 10GeV;Layer;Core density (particles/mm^{2})"); temp1->GetYaxis()->SetTitleOffset(1.3); temp1->Draw("hist"); c1->Update(); c1->Print("CoreLayer2.png"); }