#include "ROOT_FUNCTIONS.C" void comparison () { cout.precision(10); SetAliceStyle(); // myOptions(); gROOT->ForceStyle(); TH1::SetDefaultSumw2(kTRUE); TH2::SetDefaultSumw2(kTRUE); TFile* f = new TFile("results.root"); TString dir_int7 ("lhc18m_kINT7"); TString dir_hmult ("lhc18m_kHighMultV0"); TH1D* h8all_pt_02_chg_20_30_int7 = getH1dir(*f, dir_int7, "h8all_pt_02_chg_20_30"); TH1D* h8all_pt_02_chg_20_30_hmult = getH1dir(*f, dir_hmult, "h8all_pt_02_chg_20_30"); TH1D* h8all_pt_02_chg_30_40_int7 = getH1dir(*f, dir_int7, "h8all_pt_02_chg_30_40"); TH1D* h8all_pt_02_chg_30_40_hmult = getH1dir(*f, dir_hmult, "h8all_pt_02_chg_30_40"); TH1D* h8all_pt_02_chg_40_60_int7 = getH1dir(*f, dir_int7, "h8all_pt_02_chg_40_60"); TH1D* h8all_pt_02_chg_40_60_hmult = getH1dir(*f, dir_hmult, "h8all_pt_02_chg_40_60"); TH1D* h8all_pt_02_chg_60_80_int7 = getH1dir(*f, dir_int7, "h8all_pt_02_chg_60_80"); TH1D* h8all_pt_02_chg_60_80_hmult = getH1dir(*f, dir_hmult, "h8all_pt_02_chg_60_80"); TH1D* h8all_pt_02_chg_80_100_int7 = getH1dir(*f, dir_int7, "h8all_pt_02_chg_80_100"); TH1D* h8all_pt_02_chg_80_100_hmult = getH1dir(*f, dir_hmult, "h8all_pt_02_chg_80_100"); const char* texX="#it{z}"; const char* texY="1/#it{N}_{jets} d#it{N}/d#it{z}"; TPad* upper_pad = nullptr; //__________________________________________________________________________________________ TCanvas* c8all = new TCanvas("c8all", "dN/dz CHG jets", 1900, 1150); /// c8all->cd(0); /// c8all->SetFillStyle(4000); // Number of PADS const Int_t Nx = 5; const Int_t Ny = 1; // Margins //Float_t lMargin = 0.12; //Float_t rMargin = 0.05; //Float_t bMargin = 0.15; //Float_t tMargin = 0.05; // Canvas setup ///CanvasPartition(c8all,Nx,Ny,lMargin,rMargin,bMargin,tMargin); c8all->Divide(Nx,Ny,0.); //####################################################################### TPad* pad1 = (TPad*) c8all->cd(1); pad1->SetFillStyle(4000); pad1->SetFrameFillStyle(4000); pad1->cd(); h8all_pt_02_chg_20_30_int7->GetYaxis()->SetTitle(texY); h8all_pt_02_chg_20_30_int7->GetXaxis()->SetTitle(texX); StyleColor(h8all_pt_02_chg_20_30_int7, markers[0], colors[1], 1.0); StyleColor(h8all_pt_02_chg_20_30_hmult, markers[0], colors[2], 1.0); auto ratio_20_30 = new TRatioPlot(h8all_pt_02_chg_20_30_int7, h8all_pt_02_chg_20_30_hmult); ratio_20_30->SetH1DrawOpt("PE"); ratio_20_30->SetH2DrawOpt("PE"); ratio_20_30->SetSeparationMargin(0.0); // upper_pad = ratio_20_30->GetUpperPad(); // upper_pad->SetTicks(0, 0); // PadToLogScale(upper_pad); // PadSetXaxis(upper_pad, 0., 1.); // PadSetYaxis(upper_pad, 0.0,60.); ratio_20_30->Draw("PE"); ratio_20_30->GetUpperRefYaxis()->SetRangeUser(0., 60.); ratio_20_30->GetLowerRefGraph()->SetMinimum(0.4); ratio_20_30->GetLowerRefGraph()->SetMaximum(1.8); ratio_20_30->GetLowerRefGraph()->GetXaxis()->SetRangeUser(0,1); ratio_20_30->GetUpperPad()->SetRightMargin(0.); // c8all->Update(); //####################################################################### TPad* pad2 = (TPad*) (TPad*) c8all->cd(2); pad2->SetFillStyle(4000); pad2->SetFrameFillStyle(4000); pad2->cd(); h8all_pt_02_chg_30_40_int7->GetYaxis()->SetTitle(texY); h8all_pt_02_chg_30_40_int7->GetXaxis()->SetTitle(texX); // SetXYRange(h8all_pt_02_chg_30_40_int7, 0., 1., 0., 60.); StyleColor(h8all_pt_02_chg_30_40_int7, markers[0], colors[1], 1.5); StyleColor(h8all_pt_02_chg_30_40_hmult, markers[0], colors[2], 1.5); auto ratio_30_40 = new TRatioPlot(h8all_pt_02_chg_30_40_int7, h8all_pt_02_chg_30_40_hmult); ratio_30_40->SetH1DrawOpt("PE"); ratio_30_40->SetH2DrawOpt("PE"); ratio_30_40->SetSeparationMargin(0.0); upper_pad = ratio_30_40->GetUpperPad(); // upper_pad->SetTicks(0, 0); // PadToLogScale(upper_pad); // PadSetXaxis(upper_pad, 0., 1.); // PadSetYaxis(upper_pad, 0.0,60.); ratio_30_40->Draw(); ratio_30_40->GetUpperRefYaxis()->SetTickLength(0); ratio_30_40->GetUpperRefYaxis()->SetLabelOffset(999); ratio_30_40->GetUpperRefYaxis()->SetRangeUser(0., 60.); ratio_30_40->GetLowerRefGraph()->SetMinimum(0.4); ratio_30_40->GetLowerRefGraph()->SetMaximum(1.8); ratio_30_40->GetLowerRefGraph()->GetXaxis()->SetRangeUser(0,1); ratio_30_40->GetUpperPad()->SetLeftMargin(0.); ratio_30_40->GetUpperPad()->SetRightMargin(0.); //####################################################################### TPad* pad3 = (TPad*)(TPad*) c8all->cd(3); pad3->SetFillStyle(4000); pad3->SetFrameFillStyle(4000); pad3->cd(); h8all_pt_02_chg_40_60_int7->GetYaxis()->SetTitle(texY); h8all_pt_02_chg_40_60_int7->GetXaxis()->SetTitle(texX); StyleColor(h8all_pt_02_chg_40_60_int7, markers[0], colors[1], 1.5); StyleColor(h8all_pt_02_chg_40_60_hmult, markers[0], colors[2], 1.5); auto ratio_40_60 = new TRatioPlot(h8all_pt_02_chg_40_60_int7, h8all_pt_02_chg_40_60_hmult); ratio_40_60->SetH1DrawOpt("PE"); ratio_40_60->SetH2DrawOpt("PE"); ratio_40_60->SetSeparationMargin(0.0); upper_pad = ratio_40_60->GetUpperPad(); // upper_pad->SetTicks(0, 0); // PadToLogScale(upper_pad); // PadSetXaxis(upper_pad, 0., 1.); // PadSetYaxis(upper_pad, 0.0,60.); ratio_40_60->Draw(); ratio_40_60->GetUpperRefYaxis()->SetRangeUser(0., 60.); ratio_40_60->GetLowerRefGraph()->SetMinimum(0.4); ratio_40_60->GetLowerRefGraph()->SetMaximum(1.8); ratio_40_60->GetLowerRefGraph()->GetXaxis()->SetRangeUser(0,1); ratio_40_60->GetUpperPad()->SetLeftMargin(-0.); ratio_40_60->GetUpperPad()->SetRightMargin(0.); //####################################################################### TPad* pad4 = (TPad*) (TPad*) c8all->cd(4); pad4->SetFillStyle(4000); pad4->SetFrameFillStyle(4000); pad4->cd(); h8all_pt_02_chg_60_80_int7->GetYaxis()->SetTitle(texY); h8all_pt_02_chg_60_80_int7->GetXaxis()->SetTitle(texX); StyleColor(h8all_pt_02_chg_60_80_int7, markers[0], colors[1], 1.5); StyleColor(h8all_pt_02_chg_60_80_hmult, markers[0], colors[2], 1.5); auto ratio_60_80 = new TRatioPlot(h8all_pt_02_chg_60_80_int7, h8all_pt_02_chg_60_80_hmult); ratio_60_80->SetH1DrawOpt("PE"); ratio_60_80->SetH2DrawOpt("PE"); ratio_60_80->SetSeparationMargin(0.0); upper_pad = ratio_60_80->GetUpperPad(); // upper_pad->SetTicks(0, 0); // PadToLogScale(upper_pad); // PadSetXaxis(upper_pad, 0., 1.); // PadSetYaxis(upper_pad, 0.0,60.); ratio_60_80->Draw(); ratio_60_80->GetUpperRefYaxis()->SetRangeUser(0., 60.); ratio_60_80->GetLowerRefGraph()->SetMinimum(0.4); ratio_60_80->GetLowerRefGraph()->SetMaximum(1.8); ratio_60_80->GetLowerRefGraph()->GetXaxis()->SetRangeUser(0,1); ratio_60_80->GetUpperPad()->SetLeftMargin(0.); ratio_60_80->GetUpperPad()->SetRightMargin(0.); //####################################################################### TPad* pad5 = (TPad*) (TPad*) c8all->cd(5); pad5->SetFillStyle(4000); pad5->SetFrameFillStyle(4000); pad5->cd(); h8all_pt_02_chg_80_100_int7->GetYaxis()->SetTitle(texY); h8all_pt_02_chg_80_100_int7->GetXaxis()->SetTitle(texX); StyleColor(h8all_pt_02_chg_80_100_int7, markers[0], colors[1], 1.5); StyleColor(h8all_pt_02_chg_80_100_hmult, markers[0], colors[2], 1.5); auto ratio_80_100 = new TRatioPlot(h8all_pt_02_chg_80_100_int7, h8all_pt_02_chg_80_100_hmult); ratio_80_100->SetH1DrawOpt("PE"); ratio_80_100->SetH2DrawOpt("PE"); ratio_80_100->SetSeparationMargin(0.0); upper_pad = ratio_80_100->GetUpperPad(); // upper_pad->SetTicks(0, 0); // PadToLogScale(upper_pad); // PadSetXaxis(upper_pad, 0., 1.); // PadSetYaxis(upper_pad, 0.0,60.); ratio_80_100->Draw(); ratio_80_100->GetUpperRefYaxis()->SetRangeUser(0., 60.); ratio_80_100->GetLowerRefGraph()->SetMinimum(0.4); ratio_80_100->GetLowerRefGraph()->SetMaximum(1.8); ratio_80_100->GetLowerRefGraph()->GetXaxis()->SetRangeUser(0,1); ratio_80_100->GetUpperPad()->SetLeftMargin(0.); }