{ gROOT->Reset(); #include "Riostream.h" // Graphics options... gStyle->SetOptStat(000000000); gStyle->SetOptFit(000000000); gStyle->SetOptFit(); gStyle->SetStatColor(10); gStyle->SetTextFont(42); gStyle->SetTitleOffset(1.15,"xyz"); gStyle->SetLabelFont(42,"xyz"); gStyle->SetLabelSize(0.030,"xyz"); gStyle->SetTitleFont(42,"xyz"); gStyle->SetTitleFillColor(10); gStyle->SetPalette(1,0); TGaxis::SetMaxDigits(4); // Useful variables for the diagrams Float_t X1Min = 0.00; Float_t X1Max = 6.28; Float_t Y1Min = -0.03; Float_t Y1Max = 0.03; // Open the file TFile *hfile1 = new TFile("CE_1.root"); // Load the histogram TH2F *histo = (TH2F*)hfile1->Get("Align"); // Create the canvas TCanvas *c01 = new TCanvas("c01","Alignment",0,0,600,600); c01->SetFillColor(10); c01->Modified(); // Create the frame for the Clarity Factor vs Elapsed Time TH2F *frame1 = new TH2F("frame1","",10,X1Min,X1Max,10,Y1Min,Y1Max); frame1->Draw(); frame1->GetXaxis()->SetNdivisions(30510); frame1->GetYaxis()->SetNdivisions(30510); frame1->SetTitle(""); frame1->SetXTitle("#phi (rad)"); frame1->SetYTitle("#Delta #theta (rad)"); frame1->GetYaxis()->CenterTitle(); frame1->GetXaxis()->CenterTitle(); /* histo->SetTitle(""); histo->SetXTitle("#phi (rad)"); histo->SetYTitle("#Delta #theta (rad)"); histo->SetZTitle(""); histo->GetXaxis()->SetTitleFont(42); histo->GetYaxis()->SetTitleFont(42); histo->GetZaxis()->SetTitleFont(42); histo->GetXaxis()->CenterTitle(); histo->GetYaxis()->CenterTitle(); histo->GetZaxis()->CenterTitle(); histo->GetXaxis()->SetLabelFont(42); histo->GetYaxis()->SetLabelFont(42); histo->GetZaxis()->SetLabelFont(42); histo->GetXaxis()->SetLabelOffset(0.015); histo->GetYaxis()->SetLabelOffset(0.015); histo->GetZaxis()->SetLabelOffset(0.015); histo->GetXaxis()->SetTitleOffset(1.18); histo->GetYaxis()->SetTitleOffset(1.18); histo->GetZaxis()->SetTitleOffset(1.18); histo->SetMaximum(1000.0); histo->Draw("colz"); gPad->Update(); TPaletteAxis *palette=(TPaletteAxis*)myHPDPanel->FindObject("palette"); palette->SetLabelFont(42); palette->SetLabelSize(0.035); palette->SetX1NDC(0.905); palette->SetX2NDC(0.918); palette->GetAxis()->SetDecimals(kTRUE); palette->GetAxis()->SetMaxDigits(3); palette->GetAxis()->SetNoExponent(kFALSE); histo->Draw("colz"); */ histo->Draw("same"); // Save the plot c01->Update(); // c01->Print("Alignment_1.eps"); }