const int belle2_font = 133; const double belle2_tsize = 26; // void set_style() // { // gROOT->SetStyle("Modern"); // TStyle *belle2Style = new TStyle("BelleII","Belle II style"); // // set the paper & margin sizes // belle2Style->SetPaperSize(20,26); // // set canvas, pads, etc. // belle2Style->SetCanvasDefW(600); // belle2Style->SetCanvasDefH(600); // belle2Style->SetFillColor(1); // belle2Style->SetFillStyle(1001); // belle2Style->SetFrameFillColor(0); // belle2Style->SetFrameBorderMode(0); // belle2Style->SetPadBorderMode(0); // belle2Style->SetPadColor(0); // belle2Style->SetCanvasBorderMode(0); // belle2Style->SetCanvasColor(0); // belle2Style->SetStatColor(0); // belle2Style->SetLegendBorderSize(0); // // set margin sizes // belle2Style->SetPadTopMargin(0.05); // belle2Style->SetPadRightMargin(0.05); // belle2Style->SetPadBottomMargin(0.16); // belle2Style->SetPadLeftMargin(0.16); // // use large fonts // belle2Style->SetTextFont(belle2_font); // belle2Style->SetTextSize(belle2_tsize); // belle2Style->SetLabelFont(belle2_font,"x"); // belle2Style->SetTitleFont(belle2_font,"x"); // belle2Style->SetLabelFont(belle2_font,"y"); // belle2Style->SetTitleFont(belle2_font,"y"); // belle2Style->SetLabelFont(belle2_font,"z"); // belle2Style->SetTitleFont(belle2_font,"z"); // belle2Style->SetLabelSize(belle2_tsize,"x"); // belle2Style->SetLabelSize(belle2_tsize,"y"); // belle2Style->SetLabelSize(belle2_tsize,"z"); // belle2Style->SetTitleSize(belle2_tsize,"x"); // belle2Style->SetTitleSize(belle2_tsize,"y"); // belle2Style->SetTitleSize(belle2_tsize,"z"); // belle2Style->SetTitleOffset(1.5,"x"); // belle2Style->SetTitleOffset(1.5,"y"); // belle2Style->SetTitleOffset(1.5,"z"); // belle2Style->SetLabelOffset(0.01,"x"); // belle2Style->SetLabelOffset(0.01,"y"); // belle2Style->SetLabelOffset(0.01,"z"); // belle2Style->SetLegendFont(belle2_font); // // use bold lines and markers // belle2Style->SetMarkerStyle(20); // belle2Style->SetMarkerSize(1.0); // belle2Style->SetHistLineWidth(2); // belle2Style->SetFrameLineWidth(2); // belle2Style->SetLineWidth(2); // belle2Style->SetFuncWidth(2); // belle2Style->SetLineStyleString(2,"[12 12]");// postscript dashes // // get rid of X error bars // //belle2Style->SetErrorX(0.001); // // get rid of error bar caps // belle2Style->SetEndErrorSize(0.); // // do not display any of the standard histogram decorations // belle2Style->SetOptTitle(0); // belle2Style->SetOptStat(0); // belle2Style->SetOptFit(0); // // put tick marks on top and RHS of plots // belle2Style->SetPadTickX(1); // belle2Style->SetPadTickY(1); // // histogram divisions: only 5 in x to avoid label overlaps // belle2Style->SetNdivisions(505,"x"); // belle2Style->SetNdivisions(510,"y"); // // function // belle2Style->SetFuncColor(kBlue); // belle2Style->SetFuncStyle(0); // // legend // belle2Style->SetLegendBorderSize(0); // belle2Style->SetLegendFillColor(0); // belle2Style->SetHistMinimumZero(); // std::cout << "-------------------------" << std::endl; // std::cout << "Set Belle II Style" << std::endl; // std::cout << "-------------------------" << std::endl; // gROOT->SetStyle("BelleII"); // gROOT->ForceStyle(); // TGaxis::SetMaxDigits(4); // } void sames_tratio_wt() { gStyle->SetHistMinimumZero(); //////////////////////////////////////////////// // TFile *f1=new TFile("sPlot_ksks_belle_data.root"); // TFile *f2=new TFile("sPlot_kk_belle_data.root"); TFile *f3=new TFile("sPlot_ksks_data.root"); TFile *f4=new TFile("sPlot_kk_data.root"); TH1F *h1; TH1F *h2; TH1F *h3; TH1F *h4; TH1F *h5; TH1F *h6; TH1F *h7; TH1F *h8; TH1F *h9; TH1F *h10; TH1F *h11; TH1F *h12; TH1F *h13; TH1F *h14; TH1F *h15; TH1F *h16; /////////////////////////////////// (Unweighted_data) ///////////////////////////// // h1 = (TH1F*)f1->Get("hsig_dst_cos"); // h2 = (TH1F*)f2->Get("hsig_dst_cos"); // h3 = (TH1F*)f1->Get("hsig_pisoft_cos"); // h4 = (TH1F*)f2->Get("hsig_pisoft_cos"); // h5 = (TH1F*)f1->Get("hsig_dst_p"); // h6 = (TH1F*)f2->Get("hsig_dst_p"); // h7 = (TH1F*)f1->Get("hsig_pisoft_p"); // h8 = (TH1F*)f2->Get("hsig_pisoft_p"); h9 = (TH1F*)f3->Get("hsig_dst_cos"); h10 = (TH1F*)f4->Get("hsig_dst_cos"); h11 = (TH1F*)f3->Get("hsig_pisoft_cos"); h12 = (TH1F*)f4->Get("hsig_pisoft_cos"); h13 = (TH1F*)f3->Get("hsig_dst_p"); h14 = (TH1F*)f4->Get("hsig_dst_p"); h15 = (TH1F*)f3->Get("hsig_pisoft_p"); h16 = (TH1F*)f4->Get("hsig_pisoft_p"); ////////////////////////////////////////////////////////////////////////////////// // cout << "h1->Integral:" << h1->Integral() << endl; // cout << "h2->Integral:" << h2->Integral() << endl; // cout << "h3->Integral:" << h3->Integral() << endl; // cout << "h4->Integral:" << h4->Integral() << endl; // cout << "h5->Integral:" << h5->Integral() << endl; // cout << "h6->Integral:" << h6->Integral() << endl; // cout << "h7->Integral:" << h7->Integral() << endl; // cout << "h8->Integral:" << h8->Integral() << endl; cout << "h9->Integral:" << h9->Integral() << endl; cout << "h10->Integral:" << h10->Integral() << endl; cout << "h11->Integral:" << h11->Integral() << endl; cout << "h12->Integral:" << h12->Integral() << endl; cout << "h13->Integral:" << h13->Integral() << endl; cout << "h14->Integral:" << h14->Integral() << endl; cout << "h15->Integral:" << h15->Integral() << endl; cout << "h16->Integral:" << h16->Integral() << endl; ////////////////////////////////////////////////////////////////////////////////// // Double_t scale_h1 = (h2->Integral())/(h1->Integral()); // h1-> Scale(scale_h1); // Double_t scale_h3 = (h4->Integral())/(h3->Integral()); // h3-> Scale(scale_h3); // Double_t scale_h5 = (h6->Integral())/(h5->Integral()); // h5-> Scale(scale_h5); // Double_t scale_h7 = (h8->Integral())/(h7->Integral()); // h7-> Scale(scale_h7); Double_t scale_h9 = (h10->Integral())/(h9->Integral()); h9-> Scale(scale_h9); Double_t scale_h11 = (h12->Integral())/(h11->Integral()); h11-> Scale(scale_h11); Double_t scale_h13 = (h14->Integral())/(h13->Integral()); h13-> Scale(scale_h13); Double_t scale_h15 = (h16->Integral())/(h15->Integral()); h15-> Scale(scale_h15); ////////////////////////////////////////////////////////////////////////////////// // Define the Canvas TCanvas *c = new TCanvas("c", "canvas", 1500, 800); c->Divide(4,2); c->cd(1); // // h1 attributes // h1->SetMinimum(1.); // h1->SetStats(0); // No statistics on upper plot // // h1->Draw(); // h1->Draw("HIST"); // h1->SetLineColor(kBlue); // h1->SetLineWidth(2); // // h1->SetFillStyle(3004); // // h1->SetFillColor(kBlue); // // h1->GetYaxis()->SetTitle("Candidates per 0.55 GeV/c");//pis(p) // // h1->GetYaxis()->SetTitle("Candidates per 50 MeV/c");//Dst(p) // // h1->GetYaxis()->SetTitle("Candidates per 0.02");//cos // // h1->GetYaxis()->SetTitleFont(43); // // h1->GetYaxis()->SetTitleOffset(1.55); // // h1->GetXaxis()->SetTitleOffset(99);//cos // // h1->GetXaxis()->SetLabelOffset(99);//cos // // h2 attributes // h2->SetMinimum(1.); // h2->Draw("sames"); // h2->SetStats(0); // No statistics on upper plot // h2->SetLineColor(kRed); // h2->SetLineWidth(2); // // h2->GetXaxis()->SetTitle("Candidates per 0.02");//cos // // h2->SetFillStyle(3005); // // h2->SetFillColor(kRed); // c->Update(); // auto logo1 = new TLatex(); // //TLatex *logo = new TLatex(); // logo1->SetNDC(); // //logo->SetTextSize(belle2_tsize); // logo1->DrawLatex(0.1561605,0.8083067,"#bf{Belle}"); // // logo->DrawLatex(0.12,0.72, " #it{#scale[0.6]{#int} L dt} = 711 fb^{#minus1}"); // logo1->SetTextSize(0.06389777); // logo1->SetTextFont(42); // logo1->SetTextSize(0.05705158); // TLegend *legend1 = new TLegend(0.1518625,0.6074852,0.3452722,0.7581013); // legend1->SetTextSize(0.03879507); // legend1->AddEntry(h1,"D^{0}#rightarrow K^{0}_{s}K^{0}_{s}"); // legend1->AddEntry(h2,"D^{0}#rightarrow K^{+}K^{-}"); // legend1->SetTextSize(0.05020538); // legend1->SetLineColor(0); // legend1->Draw(); // ////////////////////////////////////////////////////////////////////////////////// // c->cd(2); // // gPad->SetBottomMargin(0); // Adjust bottom margin for the first pad // // gPad->SetTopMargin(0); // h3->SetMinimum(1.); // h3->SetStats(0); // No statistics on upper plot // // h1->Draw(); // h3->Draw("HIST"); // h3->SetLineColor(kBlue); // h3->SetLineWidth(2); // // h3->SetFillStyle(3004); // // h3->SetFillColor(kBlue); // // h3->GetYaxis()->SetTitle("Candidates per 0.55 GeV/c");//pis(p) // // h1->GetYaxis()->SetTitle("Candidates per 50 MeV/c");//Dst(p) // // h3->GetYaxis()->SetTitle("Candidates per 0.02");//cos // h3->GetYaxis()->SetTitleFont(43); // // h1->GetYaxis()->SetTitleOffset(1.55); // // h3->GetXaxis()->SetTitleOffset(99);//cos // // h1->GetXaxis()->SetLabelOffset(99);//cos // // h2 attributes // h4->SetMinimum(1.); // h4->Draw("sames"); // h4->SetStats(0); // No statistics on upper plot // h4->SetLineColor(kRed); // h4->SetLineWidth(2); // auto logo2 = new TLatex(); // //TLatex *logo = new TLatex(); // logo2->SetNDC(); // //logo->SetTextSize(belle2_tsize); // logo2->DrawLatex(0.1561605,0.8083067,"#bf{Belle}"); // // logo->DrawLatex(0.12,0.72, " #it{#scale[0.6]{#int} L dt} = 711 fb^{#minus1}"); // logo2->SetTextSize(0.06389777); // logo2->SetTextFont(42); // logo2->SetTextSize(0.05705158); // // TLegend *legend2 = new TLegend(0.1518625,0.6074852,0.3452722,0.7581013); // // legend2->SetTextSize(0.03879507); // // legend2->AddEntry(h3,"D^{0}#rightarrow K^{0}_{s}K^{0}_{s}"); // // legend2->AddEntry(h4,"D^{0}#rightarrow K^{+}K^{-}"); // // legend2->SetTextSize(0.05020538); // // legend2->SetLineColor(0); // // legend2->Draw(); // ////////////////////////////////////////////////////////////////////////////////// // c->cd(3); // // gPad->SetBottomMargin(0); // Adjust bottom margin for the first pad // // gPad->SetTopMargin(0); // h5->SetMinimum(1.); // h5->SetStats(0); // No statistics on upper plot // h5->Draw("HIST"); // h5->SetLineColor(kBlue); // h5->SetLineWidth(2); // // h5->SetFillStyle(3004); // // h5->SetFillColor(kBlue); // // h3->GetYaxis()->SetTitle("Candidates per 0.55 GeV/c");//pis(p) // // h1->GetYaxis()->SetTitle("Candidates per 50 MeV/c");//Dst(p) // // h5->GetYaxis()->SetTitle("Candidates per 0.02");//cos // h5->GetYaxis()->SetTitleFont(43); // // h1->GetYaxis()->SetTitleOffset(1.55); // // h3->GetXaxis()->SetTitleOffset(99);//cos // // h1->GetXaxis()->SetLabelOffset(99);//cos // // h2 attributes // h6->SetMinimum(1.); // h6->Draw("sames"); // h6->SetStats(0); // No statistics on upper plot // h6->SetLineColor(kRed); // h6->SetLineWidth(2); // // h6->SetFillStyle(3005); // // h6->SetFillColor(kRed); // auto logo3 = new TLatex(); // //TLatex *logo = new TLatex(); // logo3->SetNDC(); // //logo->SetTextSize(belle2_tsize); // logo3->DrawLatex(0.1561605,0.8083067,"#bf{Belle}"); // // logo->DrawLatex(0.12,0.72, " #it{#scale[0.6]{#int} L dt} = 711 fb^{#minus1}"); // logo3->SetTextSize(0.06389777); // logo3->SetTextFont(42); // logo3->SetTextSize(0.05705158); // // TLegend *legend3 = new TLegend(0.1518625,0.6074852,0.3452722,0.7581013); // // legend3->SetTextSize(0.03879507); // // legend3->AddEntry(h3,"D^{0}#rightarrow K^{0}_{s}K^{0}_{s}"); // // legend3->AddEntry(h4,"D^{0}#rightarrow K^{+}K^{-}"); // // legend3->SetTextSize(0.05020538); // // legend3->SetLineColor(0); // // legend3->Draw(); // ///////////////////////////////////////////////////////////// // c->cd(4); // // gPad->SetBottomMargin(0); // Adjust bottom margin for the first pad // // gPad->SetTopMargin(0); // h7->SetMinimum(1.); // h7->SetStats(0); // No statistics on upper plot // h7->Draw("HIST"); // h7->SetLineColor(kBlue); // h7->SetLineWidth(2); // // h7->SetFillStyle(3004); // // h7->SetFillColor(kBlue); // // h3->GetYaxis()->SetTitle("Candidates per 0.55 GeV/c");//pis(p) // // h1->GetYaxis()->SetTitle("Candidates per 50 MeV/c");//Dst(p) // // h7->GetYaxis()->SetTitle("Candidates per 0.02");//cos // h7->GetYaxis()->SetTitleFont(43); // // h1->GetYaxis()->SetTitleOffset(1.55); // // h3->GetXaxis()->SetTitleOffset(99);//cos // // h1->GetXaxis()->SetLabelOffset(99);//cos // // h2 attributes // h8->SetMinimum(1.); // h8->Draw("sames"); // h8->SetStats(0); // No statistics on upper plot // h8->SetLineColor(kRed); // h8->SetLineWidth(2); // // h8->SetFillStyle(3005); // // h8->SetFillColor(kRed); // auto logo4 = new TLatex(); // //TLatex *logo = new TLatex(); // logo4->SetNDC(); // //logo->SetTextSize(belle2_tsize); // logo4->DrawLatex(0.1561605,0.8083067,"#bf{Belle}"); // // logo->DrawLatex(0.12,0.72, " #it{#scale[0.6]{#int} L dt} = 711 fb^{#minus1}"); // logo4->SetTextSize(0.06389777); // logo4->SetTextFont(42); // logo4->SetTextSize(0.05705158); // // TLegend *legend4 = new TLegend(0.1518625,0.6074852,0.3452722,0.7581013); // // legend4->SetTextSize(0.03879507); // // legend4->AddEntry(h3,"D^{0}#rightarrow K^{0}_{s}K^{0}_{s}"); // // legend4->AddEntry(h4,"D^{0}#rightarrow K^{+}K^{-}"); // // legend4->SetTextSize(0.05020538); // // legend4->SetLineColor(0); // // legend4->Draw(); ///////////////////////////////////////////////////////////// c->cd(5); // gPad->SetBottomMargin(0); // Adjust bottom margin for the first pad // gPad->SetTopMargin(0); h9->SetMinimum(1.); h9->SetStats(0); // No statistics on upper plot h9->Draw("HIST"); h9->SetLineColor(kBlue); h9->SetLineWidth(2); // h9->SetFillStyle(3004); // h9->SetFillColor(kBlue); // h3->GetYaxis()->SetTitle("Candidates per 0.55 GeV/c");//pis(p) // h1->GetYaxis()->SetTitle("Candidates per 50 MeV/c");//Dst(p) // h9->GetYaxis()->SetTitle("Candidates per 0.02");//cos h9->GetYaxis()->SetTitleFont(43); // h1->GetYaxis()->SetTitleOffset(1.55); // h3->GetXaxis()->SetTitleOffset(99);//cos // h1->GetXaxis()->SetLabelOffset(99);//cos // h2 attributes h10->SetMinimum(1.); h10->Draw("sames"); h10->SetStats(0); // No statistics on upper plot h10->SetLineColor(kRed); h10->SetLineWidth(2); // h10->SetFillStyle(3005); // h10->SetFillColor(kRed); auto logo5 = new TLatex(); //TLatex *logo = new TLatex(); logo5->SetNDC(); //logo->SetTextSize(belle2_tsize); logo5->DrawLatex(0.1561605,0.8083067,"#bf{#it{Belle II}}"); // logo->DrawLatex(0.12,0.72, " #it{#scale[0.6]{#int} L dt} = 711 fb^{#minus1}"); logo5->SetTextSize(0.06389777); logo5->SetTextFont(42); logo5->SetTextSize(0.05705158); TLegend *legend5 = new TLegend(0.1518625,0.6074852,0.3452722,0.7581013); legend5->SetTextSize(0.03879507); legend5->AddEntry(h9,"D^{0}#rightarrow K^{0}_{s}K^{0}_{s}"); legend5->AddEntry(h10,"D^{0}#rightarrow K^{+}K^{-}"); legend5->SetTextSize(0.05020538); legend5->SetLineColor(0); legend5->Draw(); ///////////////////////////////////////////////////////////// c->cd(6); // gPad->SetBottomMargin(0); // Adjust bottom margin for the first pad // gPad->SetTopMargin(0); h11->SetMinimum(1.); h11->SetStats(0); // No statistics on upper plot h11->Draw("HIST"); h11->SetLineColor(kBlue); h11->SetLineWidth(2); // h11->SetFillStyle(3004); // h11->SetFillColor(kBlue); // h11->GetYaxis()->SetTitle("Candidates per 0.02");//cos h11->GetYaxis()->SetTitleFont(43); // h2 attributes h12->SetMinimum(1.); h12->Draw("sames"); h12->SetStats(0); // No statistics on upper plot h12->SetLineColor(kRed); h12->SetLineWidth(2); // h12->SetFillStyle(3005); // h12->SetFillColor(kRed); auto logo6 = new TLatex(); //TLatex *logo = new TLatex(); logo6->SetNDC(); //logo->SetTextSize(belle2_tsize); logo6->DrawLatex(0.1561605,0.8083067,"#bf{#it{Belle II}}"); // logo->DrawLatex(0.12,0.72, " #it{#scale[0.6]{#int} L dt} = 711 fb^{#minus1}"); logo6->SetTextSize(0.06389777); logo6->SetTextFont(42); logo6->SetTextSize(0.05705158); // TLegend *legend6 = new TLegend(0.1518625,0.6074852,0.3452722,0.7581013); // legend6->SetTextSize(0.03879507); // legend6->AddEntry(h3,"D^{0}#rightarrow K^{0}_{s}K^{0}_{s}"); // legend6->AddEntry(h4,"D^{0}#rightarrow K^{+}K^{-}"); // legend6->SetTextSize(0.05020538); // legend6->SetLineColor(0); // legend6->Draw(); //////////////////////////////////////////////////////////// c->cd(7); // gPad->SetBottomMargin(0); // Adjust bottom margin for the first pad // gPad->SetTopMargin(0); h13->SetMinimum(1.); h13->SetStats(0); // No statistics on upper plot h13->Draw("HIST"); h13->SetLineColor(kBlue); h13->SetLineWidth(2); // h13->SetFillStyle(3004); // h13->SetFillColor(kBlue); // h13->GetYaxis()->SetTitle("Candidates per 0.02");//cos h13->GetYaxis()->SetTitleFont(43); // h2 attributes h14->SetMinimum(1.); h14->Draw("sames"); h14->SetStats(0); // No statistics on upper plot h14->SetLineColor(kRed); h14->SetLineWidth(2); // h14->SetFillStyle(3005); // h14->SetFillColor(kRed); auto logo7 = new TLatex(); //TLatex *logo = new TLatex(); logo7->SetNDC(); //logo->SetTextSize(belle2_tsize); logo7->DrawLatex(0.1561605,0.8083067,"#bf{#it{Belle II}}"); // logo->DrawLatex(0.12,0.72, " #it{#scale[0.6]{#int} L dt} = 711 fb^{#minus1}"); logo7->SetTextSize(0.06389777); logo7->SetTextFont(42); logo7->SetTextSize(0.05705158); // TLegend *legend7 = new TLegend(0.1518625,0.6074852,0.3452722,0.7581013); // legend7->SetTextSize(0.03879507); // legend7->AddEntry(h3,"D^{0}#rightarrow K^{0}_{s}K^{0}_{s}"); // legend7->AddEntry(h4,"D^{0}#rightarrow K^{+}K^{-}"); // legend7->SetTextSize(0.05020538); // legend7->SetLineColor(0); // legend7->Draw(); //////////////////////////////////////////////////////////// c->cd(8); // gPad->SetBottomMargin(0); // Adjust bottom margin for the first pad // gPad->SetTopMargin(0); h15->SetMinimum(1.); h15->SetStats(0); // No statistics on upper plot h15->Draw("HIST"); h15->SetLineColor(kBlue); h15->SetLineWidth(2); // h15->SetFillStyle(3004); // h15->SetFillColor(kBlue); // h15->GetYaxis()->SetTitle("Candidates per 0.02");//cos h15->GetYaxis()->SetTitleFont(43); // h2 attributes h16->SetMinimum(1.); h16->Draw("sames"); h16->SetStats(0); // No statistics on upper plot h16->SetLineColor(kRed); h16->SetLineWidth(2); h16->GetXaxis()->SetTitle("Candidates per 0.02");//cos // h16->SetFillStyle(3005); // h16->SetFillColor(kRed); auto logo8 = new TLatex(); //TLatex *logo = new TLatex(); logo8->SetNDC(); //logo->SetTextSize(belle2_tsize); logo8->DrawLatex(0.1561605,0.8083067,"#bf{#it{Belle II}}"); // logo->DrawLatex(0.12,0.72, " #it{#scale[0.6]{#int} L dt} = 711 fb^{#minus1}"); logo8->SetTextSize(0.06389777); logo8->SetTextFont(42); logo8->SetTextSize(0.05705158); // TLegend *legend8 = new TLegend(0.1518625,0.6074852,0.3452722,0.7581013); // legend8->SetTextSize(0.03879507); // legend8->AddEntry(h3,"D^{0}#rightarrow K^{0}_{s}K^{0}_{s}"); // legend8->AddEntry(h4,"D^{0}#rightarrow K^{+}K^{-}"); // legend8->SetTextSize(0.05020538); // legend8->SetLineColor(0); // legend8->Draw(); }