void mean_mip_histogram () { /* Files used for histogram: mipfile0.gains = Run12_200mip mipfile1.gains = Run12_500mip mipfile2.gains = Run13P1mip mipfile3.gains = Run13P2mip mipfile4.gains = Run15mip mipfile5.gains = Run17mip */ TTree t0; t0.ReadFile("mip_w_RMS.gains","cell:a:x:y"); t0.Draw("y:a>>h0"); TH2F *h0 = (TH2F*) gROOT->FindObject("h0"); h0->GetXaxis()->SetRangeUser(0,30); h0->GetYaxis()->SetRangeUser(0,2); //h0->GetXaxis()->SetTitle("Mean Values"); //h0->SetTitle("MIP Mean Values"); /*TTree t1; t1.ReadFile("mipfile1.gains","cell:mean:x:y"); t1.Draw("y<1:mean>>h1"); TH2F *h1 = (TH2F*) gROOT->FindObject("h1"); h1->GetXaxis()->SetRangeUser(10,30); h1->GetYaxis()->SetRangeUser(0,6); h1->SetFillColor(2); TTree t2; t2.ReadFile("mipfile2.gains","cell:mean:x:y"); t2.Draw("(y*2):mean>>h2"); TH2F *h2 = (TH2F*) gROOT->FindObject("h2"); h2->GetXaxis()->SetRangeUser(10,30); h2->GetYaxis()->SetRangeUser(0,6); h2->SetFillColor(3); TTree t3; t3.ReadFile("mipfile3.gains","cell:mean:x:y"); t3.Draw("(y*2):mean>>h3"); TH2F *h3 = (TH2F*) gROOT->FindObject("h3"); h3->GetXaxis()->SetRangeUser(10,30); h3->GetYaxis()->SetRangeUser(0,6); h3->SetFillColor(4); TTree t4; t4.ReadFile("mipfile4.gains","cell:mean:x:y"); t4.Draw("(y*3):mean>>h4"); TH2F *h4 = (TH2F*) gROOT->FindObject("h4"); h4->GetXaxis()->SetRangeUser(10,30); h4->GetYaxis()->SetRangeUser(0,6); h4->SetFillColor(5); TTree t5; t5.ReadFile("mipfile5.gains","cell:mean:x:y"); t5.Draw("(y*5):mean>>h5"); TH2F *h5 = (TH2F*) gROOT->FindObject("h5"); h5->GetXaxis()->SetRangeUser(10,30); h5->GetYaxis()->SetRangeUser(0,6); h5->SetFillColor(6);*/ TCanvas * c1 = new TCanvas("c1","c1",800,800); //gPad->SetLogy(); h0->Draw("CANDLEY6"); /*h1->Draw("CANDLEY6 SAME"); h2->Draw("CANDLEY6 SAME"); h3->Draw("CANDLEY6 SAME"); h4->Draw("CANDLEY6 SAME"); h5->Draw("CANDLEY6 SAME"); TLegend * l = new TLegend(0.78,0.695,0.980,0.935); l->AddEntry(h0,"Run12_200mip","f"); l->AddEntry(h1,"Run12_500mip","f"); l->AddEntry(h2,"Run13P1mip","f"); l->AddEntry(h3,"Run13P2mip","f"); l->AddEntry(h4,"Run15mip","f"); l->AddEntry(h5,"Run17mip","f"); l->Draw();*/ }