void spr_test() { gROOT->SetStyle("Plain"); gStyle->SetPalette(1); gStyle->SetOptStat(1); gStyle->SetOptFit(1); gStyle->SetLineWidth(1); gStyle->SetTextFont(63); gStyle->SetTextSize(15); gStyle->SetLabelSize(20,"xy"); gStyle->SetLabelFont(63,"xy"); gStyle->SetOptTitle(0); // gStyle->SetTitleSize(5.0); // gStyle->SetLabelSize(5); gStyle->SetLineWidth(1); //---------------------------------------------------------------------------- // Total SPR in calorimeter parts //---------------------------------------------------------------------------- // gStyle->SetOptFit(1110); // gStyle->SetOptStat(0); int num = 0; int iiso = 2; char histname[1000]; char prjname[1000]; TCanvas *SPRTotC = new TCanvas("SPRTotC","SPR in em/fh/ch in CC/ICR/EC",900,600); SPRTotC->Divide(4,3,0,0); for (int ical = 0; ical < 3; ical++) { for (int idet = 0; idet < 4; idet++) { num++; SPRTotC->cd(num); gPad->SetTicks(1,1); sprintf(histname, "ha_spr_tot_pi_cal%d_det%d_iso%d", ical, idet, iiso); TH2F* hist = (TH2F*)gROOT->FindObject(histname); // if ((num-1)%4 ==0) gPad->SetLeftMargin(0.3); hist->GetXaxis()->SetRangeUser(0.0,50.0); hist->GetXaxis()->SetNdivisions(205,0); hist->GetXaxis()->SetLabelFont(63); hist->GetXaxis()->SetLabelSize(15); hist->GetXaxis()->SetTitleFont(63); hist->GetXaxis()->SetTitleSize(15); hist->GetXaxis()->SetTitleOffset(1.8); hist->GetYaxis()->SetRangeUser(0.0,5.0); hist->GetYaxis()->SetNdivisions(205,0); hist->GetYaxis()->SetLabelFont(63); hist->GetYaxis()->SetLabelSize(15); hist->GetYaxis()->SetTitleFont(63); hist->GetYaxis()->SetTitleSize(15); hist->GetYaxis()->SetTitleOffset(2.5); SPRTotC->Update(); hist->Draw("colz"); } } }