#include "functions.h" void Print_Theta ( string path, TH1F h1, TH1F h2, string name ) { TCanvas cnv ("", "", 0, 0, 1920, 1080); gStyle->SetPalette(87); // 55, 56, 87 is good gStyle->SetOptStat(""); gPad->SetLogx(1); gPad->SetLogy(1); h1.GetXaxis()->SetTitle("#Delta#theta"); h1.GetXaxis()->CenterTitle(); h1.SetLineColor(kRed); h1.Draw(""); h2.GetXaxis()->SetTitle("#Delta#theta"); h2.GetXaxis()->CenterTitle(); h2.SetLineColor(kBlue); h2.Draw("same"); stringstream ss; ss << path << name; name = ss.str(); cnv.Print(name.c_str(), "png"); } void Print_ScatterPlot ( string path, TH2F h, string name ) { TCanvas cnv ("", "", 0, 0, 1920, 1080); gStyle->SetPalette(87); // 55, 56, 87 is good gStyle->SetOptStat(""); gPad->SetLogx(0); gPad->SetLogy(0); gPad->SetLogz(1); h.GetXaxis()->SetTitle("#Delta#theta"); h.GetYaxis()->SetTitle("#Deltae"); h.GetXaxis()->CenterTitle(); h.GetYaxis()->CenterTitle(); h.Draw("colz"); stringstream ss; ss << path << name; name = ss.str(); cnv.Print(name.c_str(), "png"); }