void makeNice(TString fileName, TString nice = "nicePlot"){ TFile *f = TFile::Open(fileName); // TFile *f = TFile::Open("out_Parameters_bkg1_3vtx.root"); TGraphErrors * gRgre = (TGraphErrors*)f->Get("gR"); TGraphErrors * gXgre = (TGraphErrors*)f->Get("gX"); TGraphErrors * gYgre = (TGraphErrors*)f->Get("gY"); TGraphErrors * rRgre = (TGraphErrors*)f->Get("rR"); TGraphErrors * rXgre = (TGraphErrors*)f->Get("rX"); TGraphErrors * rYgre = (TGraphErrors*)f->Get("rY"); //=========Macro generated from canvas: c1_n2/c1_n2 //========= (Fri May 27 11:43:08 2011) by ROOT version5.27/06b TCanvas *c1_n2 = new TCanvas("c1_n2","c1_n2",700,1500); gStyle->SetOptFit(0); gStyle->SetOptStat(0); c1_n2->Range(0,0,1,1); c1_n2->SetFillColor(0); c1_n2->SetBorderMode(0); c1_n2->SetBorderSize(2); c1_n2->SetTickx(1); c1_n2->SetTicky(1); c1_n2->SetLeftMargin(0.13); c1_n2->SetRightMargin(0.05); c1_n2->SetTopMargin(0.05); c1_n2->SetBottomMargin(0.13); c1_n2->SetFrameFillStyle(0); c1_n2->SetFrameBorderMode(0); // ------------>Primitives in pad: c1_n2_1 TPad *c1_n2_1 = new TPad("c1_n2_1", "c1_n2_1",0.01,0.67,0.99,0.99); c1_n2_1->Draw(); c1_n2_1->cd(); c1_n2_1->Range(-52.68293,-0.03170732,44.87805,0.2121951); c1_n2_1->SetFillColor(0); c1_n2_1->SetBorderMode(0); c1_n2_1->SetBorderSize(2); c1_n2_1->SetTickx(1); c1_n2_1->SetTicky(1); c1_n2_1->SetLeftMargin(0.12); c1_n2_1->SetRightMargin(0.02); c1_n2_1->SetTopMargin(0.05); c1_n2_1->SetBottomMargin(0.2); c1_n2_1->SetFrameFillStyle(0); c1_n2_1->SetFrameBorderMode(0); c1_n2_1->SetFrameFillStyle(0); c1_n2_1->SetFrameBorderMode(0); TH1D *PLOTTERX = new TH1D("PLOTTERX","",1,-40,40); PLOTTERX->SetMinimum(-0.19); PLOTTERX->SetMaximum(+0.19); PLOTTERX->SetFillColor(63); PLOTTERX->SetLineStyle(0); PLOTTERX->SetMarkerStyle(20); PLOTTERX->GetXaxis()->SetLabelFont(42); PLOTTERX->GetXaxis()->SetLabelOffset(0.007); PLOTTERX->GetXaxis()->SetLabelSize(0.09); PLOTTERX->GetXaxis()->SetTitleSize(0.1); PLOTTERX->GetXaxis()->SetTitleOffset(0.9); PLOTTERX->GetXaxis()->SetTitleFont(42); PLOTTERX->GetXaxis()->SetTitle("z [cm]"); PLOTTERX->GetYaxis()->SetNdivisions(505); PLOTTERX->GetYaxis()->SetTitle("x_{0} [cm] "); PLOTTERX->GetYaxis()->SetLabelFont(42); PLOTTERX->GetYaxis()->SetLabelOffset(0.007); PLOTTERX->GetYaxis()->SetLabelSize(0.09); PLOTTERX->GetYaxis()->SetTitleSize(0.1); PLOTTERX->GetYaxis()->SetTitleOffset(0.5); PLOTTERX->GetYaxis()->SetTitleFont(42); PLOTTERX->GetZaxis()->SetLabelFont(42); PLOTTERX->GetZaxis()->SetLabelOffset(0.007); PLOTTERX->GetZaxis()->SetLabelSize(0.05); PLOTTERX->GetZaxis()->SetTitleSize(0.06); PLOTTERX->GetZaxis()->SetTitleFont(42); PLOTTERX->Draw(""); gXgre->SetFillColor(kBlack); gXgre->SetMarkerStyle(20); gXgre->SetMarkerColor(kBlack); gXgre->SetLineColor(kBlack); gXgre->GetListOfFunctions()->RemoveLast(); //to remove parameters panel... gXgre->GetListOfFunctions()->RemoveLast(); //...and old fit gXgre->SetLineWidth(2); gXgre->Draw("P"); rXgre->SetFillColor(kBlue); rXgre->SetMarkerStyle(20); rXgre->SetMarkerColor(kBlue); rXgre->SetLineColor(kBlue); rXgre->GetListOfFunctions()->RemoveLast(); //to remove parameters panel... rXgre->GetListOfFunctions()->RemoveLast(); //...and old fit rXgre->SetLineWidth(2); rXgre->Draw("P"); TLatex *CMSPrel = new TLatex(-37.0,PLOTTERX->GetMaximum()-0.025,"CMS Preliminary 2011"); CMSPrel->SetTextSize(0.06); // CMSPrel->Draw(); c1_n2_1->Modified(); c1_n2->cd(); // ------------>Primitives in pad: c1_n2_2 TPad *c1_n2_2 = new TPad("c1_n2_1", "c1_n2_1",0.01,0.34,0.99,0.66); // TPad *c1_n2_1 = new TPad("c1_n2_1", "c1_n2_1",0.01,0.01,0.99,0.33); c1_n2_2->Draw(); c1_n2_2->cd(); c1_n2_2->Range(-52.68293,-0.3317073,44.87805,-0.08780488); c1_n2_2->SetFillColor(0); c1_n2_2->SetBorderMode(0); c1_n2_2->SetBorderSize(2); c1_n2_2->SetTickx(1); c1_n2_2->SetTicky(1); c1_n2_2->SetLeftMargin(0.12); c1_n2_2->SetRightMargin(0.02); c1_n2_2->SetTopMargin(0.05); c1_n2_2->SetBottomMargin(0.2); c1_n2_2->SetFrameFillStyle(0); c1_n2_2->SetFrameBorderMode(0); c1_n2_2->SetFrameFillStyle(0); c1_n2_2->SetFrameBorderMode(0); TH1D *PLOTTERY = new TH1D("PLOTTERY","",1,-40,40); PLOTTERY->SetMinimum(-0.29); PLOTTERY->SetMaximum(+0.09); PLOTTERY->SetFillColor(63); PLOTTERY->SetLineStyle(0); PLOTTERY->SetMarkerStyle(20); PLOTTERY->GetXaxis()->SetLabelFont(42); PLOTTERY->GetXaxis()->SetLabelOffset(0.007); PLOTTERY->GetXaxis()->SetLabelSize(0.09); PLOTTERY->GetXaxis()->SetTitleSize(0.1); PLOTTERY->GetXaxis()->SetTitleFont(42); PLOTTERY->GetXaxis()->SetTitleOffset(0.9); PLOTTERY->GetXaxis()->SetTitle("z [cm]"); PLOTTERY->GetYaxis()->SetNdivisions(505); PLOTTERY->GetYaxis()->SetTitle("y_{0} [cm] "); PLOTTERY->GetYaxis()->SetLabelFont(42); PLOTTERY->GetYaxis()->SetLabelOffset(0.007); PLOTTERY->GetYaxis()->SetLabelSize(0.09); PLOTTERY->GetYaxis()->SetTitleSize(0.1); PLOTTERY->GetYaxis()->SetTitleOffset(0.5); PLOTTERY->GetYaxis()->SetTitleFont(42); PLOTTERY->GetZaxis()->SetLabelFont(42); PLOTTERY->GetZaxis()->SetLabelOffset(0.007); PLOTTERY->GetZaxis()->SetLabelSize(0.05); PLOTTERY->GetZaxis()->SetTitleSize(0.06); PLOTTERY->GetZaxis()->SetTitleFont(42); PLOTTERY->Draw(""); gYgre->SetFillColor(kBlack); gYgre->SetMarkerStyle(20); gYgre->SetMarkerColor(kBlack); gYgre->SetLineColor(kBlack); gYgre->GetListOfFunctions()->RemoveLast(); //to remove parameters panel... gYgre->GetListOfFunctions()->RemoveLast(); //...and old fit gYgre->SetLineWidth(2); gYgre->Draw("P"); rYgre->SetFillColor(kBlue); rYgre->SetMarkerStyle(20); rYgre->SetMarkerColor(kBlue); rYgre->SetLineColor(kBlue); rYgre->GetListOfFunctions()->RemoveLast(); //to remove parameters panel... rYgre->GetListOfFunctions()->RemoveLast(); //...and old fit rYgre->SetLineWidth(2); rYgre->Draw("P"); TLatex *CMSPrel = new TLatex(-37.0,PLOTTERY->GetMaximum()-0.025,"CMS Preliminary 2011"); CMSPrel->SetTextSize(0.06); // CMSPrel->Draw(); c1_n2_2->Modified(); c1_n2->cd(); // ------------>Primitives in pad: c1_n2_2 TPad *c1_n2_3 = new TPad("c1_n2_1", "c1_n2_1",0.01,0.01,0.99,0.33); // TPad *c1_n2_1 = new TPad("c1_n2_1", "c1_n2_1",0.01,0.01,0.99,0.33); c1_n2_3->Draw(); c1_n2_3->cd(); c1_n2_3->Range(-52.68293,-0.3317073,44.87805,-0.08780488); c1_n2_3->SetFillColor(0); c1_n2_3->SetBorderMode(0); c1_n2_3->SetBorderSize(2); c1_n2_3->SetTickx(1); c1_n2_3->SetTicky(1); c1_n2_3->SetLeftMargin(0.12); c1_n2_3->SetRightMargin(0.02); c1_n2_3->SetTopMargin(0.05); c1_n2_3->SetBottomMargin(0.2); c1_n2_3->SetFrameFillStyle(0); c1_n2_3->SetFrameBorderMode(0); c1_n2_3->SetFrameFillStyle(0); c1_n2_3->SetFrameBorderMode(0); TH1D *PLOTTERR = new TH1D("PLOTTERR","",1,-40,40); PLOTTERR->SetMinimum(2.87); PLOTTERR->SetMaximum(2.97); PLOTTERR->SetFillColor(63); PLOTTERR->SetLineStyle(0); PLOTTERR->SetMarkerStyle(20); PLOTTERR->GetXaxis()->SetLabelFont(42); PLOTTERR->GetXaxis()->SetLabelOffset(0.007); PLOTTERR->GetXaxis()->SetLabelSize(0.09); PLOTTERR->GetXaxis()->SetTitleSize(0.1); PLOTTERR->GetXaxis()->SetTitleFont(42); PLOTTERR->GetXaxis()->SetTitleOffset(0.9); PLOTTERR->GetXaxis()->SetTitle("z [cm]"); PLOTTERR->GetYaxis()->SetNdivisions(505); PLOTTERR->GetYaxis()->SetTitle("R [cm] "); PLOTTERR->GetYaxis()->SetLabelFont(42); PLOTTERR->GetYaxis()->SetLabelOffset(0.007); PLOTTERR->GetYaxis()->SetLabelSize(0.09); PLOTTERR->GetYaxis()->SetTitleSize(0.1); PLOTTERR->GetYaxis()->SetTitleOffset(0.5); PLOTTERR->GetYaxis()->SetTitleFont(42); PLOTTERR->GetZaxis()->SetLabelFont(42); PLOTTERR->GetZaxis()->SetLabelOffset(0.007); PLOTTERR->GetZaxis()->SetLabelSize(0.05); PLOTTERR->GetZaxis()->SetTitleSize(0.06); PLOTTERR->GetZaxis()->SetTitleFont(42); PLOTTERR->Draw(""); gRgre->SetFillColor(kBlack); gRgre->SetMarkerStyle(20); gRgre->SetMarkerColor(kBlack); gRgre->SetLineColor(kBlack); gRgre->GetListOfFunctions()->RemoveLast(); //to remove parameters panel... gRgre->GetListOfFunctions()->RemoveLast(); //...and old fit gRgre->SetLineWidth(2); gRgre->Draw("P"); rRgre->SetFillColor(kBlue); rRgre->SetMarkerStyle(20); rRgre->SetMarkerColor(kBlue); rRgre->SetLineColor(kBlue); rRgre->GetListOfFunctions()->RemoveLast(); //to remove parameters panel... rRgre->GetListOfFunctions()->RemoveLast(); //...and old fit rRgre->SetLineWidth(2); rRgre->Draw("P"); TLatex *CMSPrel = new TLatex(-37.0,PLOTTERR->GetMaximum()-0.025,"CMS Preliminary 2011"); CMSPrel->SetTextSize(0.06); // CMSPrel->Draw(); c1_n2_3->Modified(); c1_n2->cd(); TF1* fX = new TF1("fX", "[0]+[1]*x", -35, 35); TF1* fY = new TF1("fY", "[0]+[1]*x", -35, 35); TF1* fR = new TF1("fR", "[0]+[1]*x", -35, 35); fX->SetParameter(0, 0.1); fX->SetParameter(1, -0.0007); fY->SetParameter(0, -0.2); fY->SetParameter(1, +0.0007); fR->SetParameter(0, 2.94); fR->SetParameter(1, 0.0); gXgre->Fit(fX); gYgre->Fit(fY); gRgre->Fit(fR); // c1_n2->cd(); c1_n2->Modified(); c1_n2->cd(); c1_n2->SetSelected(c1_n2); c1_n2->SaveAs(nice+".png"); //!Serve!!!! c1_n2->SaveAs(nice+".gif"); c1_n2->SaveAs(nice+".png"); }
void BSA_InCoherent_t() { //=========Macro generated from canvas: c17/Incoherent channe //========= (Tue Aug 21 12:00:26 2018) by ROOT version6.09/01 TCanvas *c17 = new TCanvas("c17", "Incoherent channe",0,0,1200,400); gStyle->SetOptFit(1); c17->Range(0,0,1,1); c17->SetFillColor(0); c17->SetBorderMode(0); c17->SetBorderSize(2); c17->SetLeftMargin(0.025); c17->SetRightMargin(0.02325581); c17->SetFrameBorderMode(0); // ------------>Primitives in pad: c17_1 TPad *c17_1 = new TPad("c17_1", "Incoherent channe_1",0,0,0.262936,0.9); c17_1->Draw(); c17_1->cd(); c17_1->Range(-32.86883,-0.4888889,353.6809,0.4); c17_1->SetFillColor(0); c17_1->SetBorderMode(0); c17_1->SetBorderSize(2); c17_1->SetGridx(); c17_1->SetGridy(); c17_1->SetRightMargin(0); c17_1->SetTopMargin(0); c17_1->SetFrameBorderMode(0); c17_1->SetFrameBorderMode(0); TMultiGraph *multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle("0.05<-t<0.21 [GeV^{2}/c^{2}]"); Double_t Graph_fx1154[9] = { 21.59954, 59.03178, 96.06391, 141.7703, 179.2242, 222.8541, 259.5793, 303.38, 337.8675}; Double_t Graph_fy1154[9] = { 0.1020231, 0.03114899, 0.2309077, 0.1341245, 0.01684177, -0.1267998, -0.2824572, -0.2260703, -0.0186068}; Double_t Graph_fex1154[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Graph_fey1154[9] = { 0.04242532, 0.05165487, 0.05483741, 0.07646672, 0.1006626, 0.09089962, 0.05905575, 0.04462244, 0.05521722}; TGraphErrors *gre = new TGraphErrors(9,Graph_fx1154,Graph_fy1154,Graph_fex1154,Graph_fey1154); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#00ff00"); gre->SetMarkerColor(ci); gre->SetMarkerStyle(21); TH1F *Graph_Graph1154 = new TH1F("Graph_Graph1154","Graph",100,0,369.4943); Graph_Graph1154->SetMinimum(-0.4042387); Graph_Graph1154->SetMaximum(0.3484709); Graph_Graph1154->SetDirectory(0); Graph_Graph1154->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1154->SetLineColor(ci); Graph_Graph1154->GetXaxis()->SetLabelFont(42); Graph_Graph1154->GetXaxis()->SetLabelSize(0.035); Graph_Graph1154->GetXaxis()->SetTitleSize(0.035); Graph_Graph1154->GetXaxis()->SetTitleFont(42); Graph_Graph1154->GetYaxis()->SetLabelFont(42); Graph_Graph1154->GetYaxis()->SetLabelSize(0.035); Graph_Graph1154->GetYaxis()->SetTitleSize(0.035); Graph_Graph1154->GetYaxis()->SetTitleFont(42); Graph_Graph1154->GetZaxis()->SetLabelFont(42); Graph_Graph1154->GetZaxis()->SetLabelSize(0.035); Graph_Graph1154->GetZaxis()->SetTitleSize(0.035); Graph_Graph1154->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1154); TF1 *myfit1155 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,369.4943); myfit1155->SetFillColor(19); myfit1155->SetFillStyle(0); myfit1155->SetLineColor(2); myfit1155->SetLineWidth(2); myfit1155->SetChisquare(12.03234); myfit1155->SetNDF(7); myfit1155->GetXaxis()->SetLabelFont(42); myfit1155->GetXaxis()->SetLabelSize(0.035); myfit1155->GetXaxis()->SetTitleSize(0.035); myfit1155->GetXaxis()->SetTitleFont(42); myfit1155->GetYaxis()->SetLabelFont(42); myfit1155->GetYaxis()->SetLabelSize(0.035); myfit1155->GetYaxis()->SetTitleSize(0.035); myfit1155->GetYaxis()->SetTitleFont(42); myfit1155->SetParameter(0,0.2160608); myfit1155->SetParError(0,0.02670852); myfit1155->SetParLimits(0,0,0); myfit1155->SetParameter(1,0.2378828); myfit1155->SetParError(1,0.2292802); myfit1155->SetParLimits(1,0,0); gre->GetListOfFunctions()->Add(myfit1155); TPaveStats *ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetTextAlign(12); ptstats->SetTextFont(42); TText *AText = ptstats->AddText("#chi^{2} / ndf = 12.03 / 7"); AText = ptstats->AddText("p0 = 0.2161 #pm 0.02671 "); AText = ptstats->AddText("p1 = 0.2379 #pm 0.2293 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); gre->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(gre->GetListOfFunctions()); multigraph->Add(gre,""); multigraph->Draw("AP"); multigraph->GetXaxis()->SetTitle("#phi [deg.]"); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetLabelSize(0.035); multigraph->GetXaxis()->SetTitleSize(0.035); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetTitle("A_{LU}"); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetLabelSize(0.035); multigraph->GetYaxis()->SetTitleSize(0.035); multigraph->GetYaxis()->SetTitleFont(42); gPad->Modified(); multigraph->GetYaxis()->SetRangeUser(-0.35, 0.35); TPaveText *pt = new TPaveText(0.2292451,0.9268996,0.7707549,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); AText = pt->AddText("0.05<-t<0.21 [GeV^{2}/c^{2}]"); pt->Draw(); c17_1->Modified(); c17->cd(); // ------------>Primitives in pad: c17_2 TPad *c17_2 = new TPad("c17_2", "Incoherent channe_2",0.262936,0,0.5008721,0.9); c17_2->Draw(); c17_2->cd(); c17_2->Range(5.895345,-0.4888889,352.6198,0.4); c17_2->SetFillColor(0); c17_2->SetBorderMode(0); c17_2->SetBorderSize(2); c17_2->SetGridx(); c17_2->SetGridy(); c17_2->SetLeftMargin(0); c17_2->SetRightMargin(0); c17_2->SetTopMargin(0); c17_2->SetFrameBorderMode(0); c17_2->SetFrameBorderMode(0); multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle("0.21<-t<0.36 [GeV^{2}/c^{2}]"); Double_t Graph_fx1157[9] = { 21.65555, 61.41754, 96.1904, 139.625, 182.9173, 222.6445, 259.1526, 302.149, 336.8596}; Double_t Graph_fy1157[9] = { 0.04372413, 0.1019325, 0.1737435, 0.1708402, 0.2316287, -0.1435087, -0.1227365, -0.1969296, -0.07714485}; Double_t Graph_fex1157[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Graph_fey1157[9] = { 0.0517677, 0.05885852, 0.0646232, 0.09789667, 0.1185262, 0.09557657, 0.06953456, 0.04921871, 0.06282415}; gre = new TGraphErrors(9,Graph_fx1157,Graph_fy1157,Graph_fex1157,Graph_fey1157); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); ci = TColor::GetColor("#00ff00"); gre->SetMarkerColor(ci); gre->SetMarkerStyle(21); TH1F *Graph_Graph1157 = new TH1F("Graph_Graph1157","Graph",100,0,368.38); Graph_Graph1157->SetMinimum(-0.3057786); Graph_Graph1157->SetMaximum(0.4097851); Graph_Graph1157->SetDirectory(0); Graph_Graph1157->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1157->SetLineColor(ci); Graph_Graph1157->GetXaxis()->SetLabelFont(42); Graph_Graph1157->GetXaxis()->SetLabelSize(0.035); Graph_Graph1157->GetXaxis()->SetTitleSize(0.035); Graph_Graph1157->GetXaxis()->SetTitleFont(42); Graph_Graph1157->GetYaxis()->SetLabelFont(42); Graph_Graph1157->GetYaxis()->SetLabelSize(0.035); Graph_Graph1157->GetYaxis()->SetTitleSize(0.035); Graph_Graph1157->GetYaxis()->SetTitleFont(42); Graph_Graph1157->GetZaxis()->SetLabelFont(42); Graph_Graph1157->GetZaxis()->SetLabelSize(0.035); Graph_Graph1157->GetZaxis()->SetTitleSize(0.035); Graph_Graph1157->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1157); TF1 *myfit1158 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,368.38); myfit1158->SetFillColor(19); myfit1158->SetFillStyle(0); myfit1158->SetLineColor(2); myfit1158->SetLineWidth(2); myfit1158->SetChisquare(6.955655); myfit1158->SetNDF(7); myfit1158->GetXaxis()->SetLabelFont(42); myfit1158->GetXaxis()->SetLabelSize(0.035); myfit1158->GetXaxis()->SetTitleSize(0.035); myfit1158->GetXaxis()->SetTitleFont(42); myfit1158->GetYaxis()->SetLabelFont(42); myfit1158->GetYaxis()->SetLabelSize(0.035); myfit1158->GetYaxis()->SetTitleSize(0.035); myfit1158->GetYaxis()->SetTitleFont(42); myfit1158->SetParameter(0,0.1721707); myfit1158->SetParError(0,0.0324291); myfit1158->SetParLimits(0,0,0); myfit1158->SetParameter(1,0.001708824); myfit1158->SetParError(1,0.4101565); myfit1158->SetParLimits(1,0,0); gre->GetListOfFunctions()->Add(myfit1158); ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetTextAlign(12); ptstats->SetTextFont(42); AText = ptstats->AddText("#chi^{2} / ndf = 6.956 / 7"); AText = ptstats->AddText("p0 = 0.1722 #pm 0.03243 "); AText = ptstats->AddText("p1 = 0.001709 #pm 0.4102 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); gre->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(gre->GetListOfFunctions()); multigraph->Add(gre,""); multigraph->Draw("AP"); multigraph->GetXaxis()->SetTitle("#phi [deg.]"); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetLabelSize(0.035); multigraph->GetXaxis()->SetTitleSize(0.035); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetLabelSize(0.035); multigraph->GetYaxis()->SetTitleSize(0.035); multigraph->GetYaxis()->SetTitleFont(42); gPad->Modified(); multigraph->GetYaxis()->SetRangeUser(-0.35, 0.35); pt = new TPaveText(0.2194177,0.9304839,0.7805823,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); AText = pt->AddText("0.21<-t<0.36 [GeV^{2}/c^{2}]"); pt->Draw(); c17_2->Modified(); c17->cd(); // ------------>Primitives in pad: c17_3 TPad *c17_3 = new TPad("c17_3", "Incoherent channe_3",0.5008721,0,0.7388081,0.9); c17_3->Draw(); c17_3->cd(); c17_3->Range(7.121854,-0.4888889,349.9594,0.4); c17_3->SetFillColor(0); c17_3->SetBorderMode(0); c17_3->SetBorderSize(2); c17_3->SetGridx(); c17_3->SetGridy(); c17_3->SetLeftMargin(0); c17_3->SetRightMargin(0); c17_3->SetTopMargin(0); c17_3->SetFrameBorderMode(0); c17_3->SetFrameBorderMode(0); multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle("0.36<-t<0.67 [GeV^{2}/c^{2}]"); Double_t Graph_fx1160[9] = { 22.70538, 60.97743, 94.23011, 138.1892, 183.0975, 222.79, 259.8951, 302.6808, 334.3759}; Double_t Graph_fy1160[9] = { 0.1761498, 0.1945204, 0.1034809, -0.09380414, 0.2967375, -0.1094475, -0.1583282, -0.1819771, -0.09543453}; Double_t Graph_fex1160[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Graph_fey1160[9] = { 0.06358895, 0.0584754, 0.07622601, 0.115077, 0.1268505, 0.1278475, 0.07389284, 0.04701977, 0.07415904}; gre = new TGraphErrors(9,Graph_fx1160,Graph_fy1160,Graph_fex1160,Graph_fey1160); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); ci = TColor::GetColor("#00ff00"); gre->SetMarkerColor(ci); gre->SetMarkerStyle(21); TH1F *Graph_Graph1160 = new TH1F("Graph_Graph1160","Graph",100,0,365.5429); Graph_Graph1160->SetMinimum(-0.3033832); Graph_Graph1160->SetMaximum(0.4896763); Graph_Graph1160->SetDirectory(0); Graph_Graph1160->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1160->SetLineColor(ci); Graph_Graph1160->GetXaxis()->SetLabelFont(42); Graph_Graph1160->GetXaxis()->SetLabelSize(0.035); Graph_Graph1160->GetXaxis()->SetTitleSize(0.035); Graph_Graph1160->GetXaxis()->SetTitleFont(42); Graph_Graph1160->GetYaxis()->SetLabelFont(42); Graph_Graph1160->GetYaxis()->SetLabelSize(0.035); Graph_Graph1160->GetYaxis()->SetTitleSize(0.035); Graph_Graph1160->GetYaxis()->SetTitleFont(42); Graph_Graph1160->GetZaxis()->SetLabelFont(42); Graph_Graph1160->GetZaxis()->SetLabelSize(0.035); Graph_Graph1160->GetZaxis()->SetTitleSize(0.035); Graph_Graph1160->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1160); TF1 *myfit1161 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,365.5429); myfit1161->SetFillColor(19); myfit1161->SetFillStyle(0); myfit1161->SetLineColor(2); myfit1161->SetLineWidth(2); myfit1161->SetChisquare(8.926216); myfit1161->SetNDF(7); myfit1161->GetXaxis()->SetLabelFont(42); myfit1161->GetXaxis()->SetLabelSize(0.035); myfit1161->GetXaxis()->SetTitleSize(0.035); myfit1161->GetXaxis()->SetTitleFont(42); myfit1161->GetYaxis()->SetLabelFont(42); myfit1161->GetYaxis()->SetLabelSize(0.035); myfit1161->GetYaxis()->SetTitleSize(0.035); myfit1161->GetYaxis()->SetTitleFont(42); myfit1161->SetParameter(0,0.1371093); myfit1161->SetParError(0,0.03383483); myfit1161->SetParLimits(0,0,0); myfit1161->SetParameter(1,-0.6800102); myfit1161->SetParError(1,0.1832383); myfit1161->SetParLimits(1,0,0); gre->GetListOfFunctions()->Add(myfit1161); ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetTextAlign(12); ptstats->SetTextFont(42); AText = ptstats->AddText("#chi^{2} / ndf = 8.926 / 7"); AText = ptstats->AddText("p0 = 0.1371 #pm 0.03383 "); AText = ptstats->AddText("p1 = -0.68 #pm 0.1832 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); gre->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(gre->GetListOfFunctions()); multigraph->Add(gre,""); multigraph->Draw("AP"); multigraph->GetXaxis()->SetTitle("#phi [deg.]"); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetLabelSize(0.035); multigraph->GetXaxis()->SetTitleSize(0.035); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetLabelSize(0.035); multigraph->GetYaxis()->SetTitleSize(0.035); multigraph->GetYaxis()->SetTitleFont(42); gPad->Modified(); multigraph->GetYaxis()->SetRangeUser(-0.35, 0.35); pt = new TPaveText(0.2194177,0.9304839,0.7805823,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); AText = pt->AddText("0.36<-t<0.67 [GeV^{2}/c^{2}]"); pt->Draw(); c17_3->Modified(); c17->cd(); // ------------>Primitives in pad: c17_4 TPad *c17_4 = new TPad("c17_4", "Incoherent channe_4",0.7388081,0,0.9767442,0.9); c17_4->Draw(); c17_4->cd(); c17_4->Range(7.951117,-0.4888889,350.3641,0.4); c17_4->SetFillColor(0); c17_4->SetBorderMode(0); c17_4->SetBorderSize(2); c17_4->SetGridx(); c17_4->SetGridy(); c17_4->SetLeftMargin(0); c17_4->SetRightMargin(0); c17_4->SetTopMargin(0); c17_4->SetFrameBorderMode(0); c17_4->SetFrameBorderMode(0); multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle("0.67<-t<0.90 [GeV^{2}/c^{2}]"); Double_t Graph_fx1163[9] = { 23.51534, 59.3759, 90.55341, 131.0631, 176.9476, 229.0094, 260.8643, 304.7922, 334.7999}; Double_t Graph_fy1163[9] = { 0.0123906, 0.195403, 0.18963, -0.1677207, -0.8232306, -0.7760588, -0.2579708, -0.2579435, -0.08614626}; Double_t Graph_fex1163[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Graph_fey1163[9] = { 0.09527872, 0.1168373, 0.1651642, 0.3137499, 0.3909388, 0.4596559, 0.1665094, 0.09339681, 0.09961735}; gre = new TGraphErrors(9,Graph_fx1163,Graph_fy1163,Graph_fex1163,Graph_fey1163); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); ci = TColor::GetColor("#00ff00"); gre->SetMarkerColor(ci); gre->SetMarkerStyle(21); TH1F *Graph_Graph1163 = new TH1F("Graph_Graph1163","Graph",100,0,365.9283); Graph_Graph1163->SetMinimum(-1.394766); Graph_Graph1163->SetMaximum(0.5138451); Graph_Graph1163->SetDirectory(0); Graph_Graph1163->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1163->SetLineColor(ci); Graph_Graph1163->GetXaxis()->SetLabelFont(42); Graph_Graph1163->GetXaxis()->SetLabelSize(0.035); Graph_Graph1163->GetXaxis()->SetTitleSize(0.035); Graph_Graph1163->GetXaxis()->SetTitleFont(42); Graph_Graph1163->GetYaxis()->SetLabelFont(42); Graph_Graph1163->GetYaxis()->SetLabelSize(0.035); Graph_Graph1163->GetYaxis()->SetTitleSize(0.035); Graph_Graph1163->GetYaxis()->SetTitleFont(42); Graph_Graph1163->GetZaxis()->SetLabelFont(42); Graph_Graph1163->GetZaxis()->SetLabelSize(0.035); Graph_Graph1163->GetZaxis()->SetTitleSize(0.035); Graph_Graph1163->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1163); TF1 *myfit1164 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,365.9283); myfit1164->SetFillColor(19); myfit1164->SetFillStyle(0); myfit1164->SetLineColor(2); myfit1164->SetLineWidth(2); myfit1164->SetChisquare(8.810638); myfit1164->SetNDF(7); myfit1164->GetXaxis()->SetLabelFont(42); myfit1164->GetXaxis()->SetLabelSize(0.035); myfit1164->GetXaxis()->SetTitleSize(0.035); myfit1164->GetXaxis()->SetTitleFont(42); myfit1164->GetYaxis()->SetLabelFont(42); myfit1164->GetYaxis()->SetLabelSize(0.035); myfit1164->GetYaxis()->SetTitleSize(0.035); myfit1164->GetYaxis()->SetTitleFont(42); myfit1164->SetParameter(0,0.2352442); myfit1164->SetParError(0,0.0807391); myfit1164->SetParLimits(0,0,0); myfit1164->SetParameter(1,0.003684647); myfit1164->SetParError(1,0.5673774); myfit1164->SetParLimits(1,0,0); gre->GetListOfFunctions()->Add(myfit1164); ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetTextAlign(12); ptstats->SetTextFont(42); AText = ptstats->AddText("#chi^{2} / ndf = 8.811 / 7"); AText = ptstats->AddText("p0 = 0.2352 #pm 0.08074 "); AText = ptstats->AddText("p1 = 0.003685 #pm 0.5674 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); gre->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(gre->GetListOfFunctions()); multigraph->Add(gre,""); multigraph->Draw("AP"); multigraph->GetXaxis()->SetTitle("#phi [deg.]"); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetLabelSize(0.035); multigraph->GetXaxis()->SetTitleSize(0.035); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetLabelSize(0.035); multigraph->GetYaxis()->SetTitleSize(0.035); multigraph->GetYaxis()->SetTitleFont(42); gPad->Modified(); multigraph->GetYaxis()->SetRangeUser(-0.35, 0.35); pt = new TPaveText(0.2194177,0.9304839,0.7805823,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); AText = pt->AddText("0.67<-t<0.90 [GeV^{2}/c^{2}]"); pt->Draw(); c17_4->Modified(); c17->cd(); c17->Modified(); c17->cd(); c17->SetSelected(c17); }
TGraphErrors *ReadMWGraph(const char *name, Int_t flag) { Double_t xreject = 0.49; TGraphErrors *g = new TGraphErrors(name); if (g->IsZombie()) return 0; while (g->GetX()[0] < xreject) g->RemovePoint(0); TGraphErrors *g2 = new TGraphErrors(name); if (g2->IsZombie()) return 0; while (g2->GetX()[0] < xreject) g2->RemovePoint(0); g2->SetMarkerStyle(4); g2->SetMarkerSize(1.00); g2->SetMarkerColor(kBlack); g2->SetLineColor(kBlack); TGraphErrors *gsys = new TGraphErrors(name, "%lg %lg %lg %*lg %lg"); if (gsys->IsZombie()) return 0; while (gsys->GetX()[0] < xreject) gsys->RemovePoint(0); for (Int_t i = 0; i < gsys->GetN(); i++) gsys->SetPointError(i, gsys->GetErrorX(i)*0.75, gsys->GetErrorY(i)); gsys->SetFillColor(kGray+2); gsys->SetLineColor(kGray+2); gsys->SetFillStyle(3000); if (flag == 1 || flag == 3) { TGraphErrors *gt = new TGraphErrors(Form("%s_%s", name, "trues")); if (gt->IsZombie()) return 0; while (gt->GetX()[0] < xreject) gt->RemovePoint(0); gt->SetMarkerStyle(20); gt->SetMarkerSize(0.75); gt->SetMarkerColor(kGreen+1); gt->SetLineColor(kGreen+1); TGraphErrors *gbw = new TGraphErrors(Form("%s_%s", name, "gen")); if (gbw->IsZombie()) return 0; while (gbw->GetX()[0] < xreject) gbw->RemovePoint(0); gbw->SetMarkerStyle(20); gbw->SetMarkerSize(0.75); gbw->SetMarkerColor(kBlue+1); gbw->SetLineColor(kBlue+1); for (Int_t i = 0; i < g->GetN(); i++) { g->SetPointError(i, g->GetEX()[i], 0.); gt->SetPointError(i, gt->GetEX()[i], 0.); gbw->SetPointError(i, gbw->GetEX()[i], 0.); } for (Int_t i = 0; i < g2->GetN(); i++) { g2->SetPoint(i, g2->GetX()[i], g2->GetY()[i] - gt->GetY()[i] + gbw->GetY()[i]); g2->SetPointError(i, g2->GetEX()[i], TMath::Sqrt(g2->GetEY()[i]*g2->GetEY()[i] + gt->GetEY()[i]*gt->GetEY()[i] + gbw->GetEY()[i]*gbw->GetEY()[i])); // g2->SetPoint(i, g2->GetX()[i], g2->GetY()[i] - gt->GetY()[i] + 1.01947); // g2->SetPointError(i, g2->GetEX()[i], TMath::Sqrt(g2->GetEY()[i]*g2->GetEY()[i] + gt->GetEY()[i]*gt->GetEY()[i] + // 7.78680e-06*7.78680e-06)); gsys->SetPoint(i, gsys->GetX()[i], g2->GetY()[i]); } } g->SetTitle(); g->SetName(name); g->GetXaxis()->SetTitle("p_{T}, GeV/c"); g->SetMarkerStyle(20); g->SetMarkerSize(0.95); g->SetMarkerColor(kRed+1); g->SetLineColor(kRed+1); const Double_t mass = 1.019455; const Double_t mass_delta = 0.000020; const Double_t width = 0.00426; const Double_t width_delta = 0.00004; if (flag == 1) { // mass g->GetYaxis()->SetTitleOffset(1.50); g->GetYaxis()->SetTitle("mass, GeV/c^{2}"); g->SetMaximum(mass+0.0015); g->SetMinimum(mass-0.0015); TBox *box = new TBox(g->GetXaxis()->GetXmin(), mass - mass_delta, g->GetXaxis()->GetXmax(), mass + mass_delta); box->SetFillColor(kGray+1); box->SetFillStyle(3001); g->GetListOfFunctions()->Add(box); g->GetListOfFunctions()->Add(g2, "CP"); g->GetListOfFunctions()->Add(gt, "CP"); g->GetListOfFunctions()->Add(gbw, "CP"); } else if (flag == 3) { // mass simple g2->SetTitle(); g2->SetName(Form("%s_only", name)); g2->GetXaxis()->SetTitle("p_{T}, GeV/c"); g2->SetMarkerStyle(20); g2->SetMarkerSize(0.75); g2->SetMarkerColor(kBlack); g2->SetLineColor(kBlack); g2->GetYaxis()->SetTitleOffset(1.50); g2->GetYaxis()->SetTitle("mass, GeV/c^{2}"); g2->SetMaximum(mass+0.0015); g2->SetMinimum(mass-0.0015); TBox *box = new TBox(g->GetXaxis()->GetXmin(), mass - mass_delta, g2->GetXaxis()->GetXmax(), mass + mass_delta); box->SetFillColor(kGray+1); box->SetFillStyle(3001); g2->GetListOfFunctions()->Add(box); g2->GetListOfFunctions()->Add(gsys, "E5"); return g2; } else if (flag == 2) { // width g->SetTitle(); g->SetName(name); g->GetXaxis()->SetTitle("p_{T}, GeV/c"); g->SetMarkerStyle(20); g->SetMarkerSize(0.75); g->SetMarkerColor(kBlack); g->SetLineColor(kBlack); g->GetYaxis()->SetTitleOffset(1.50); g->GetYaxis()->SetTitle("width, GeV/c^{2}"); g->SetMaximum(0.01); g->SetMinimum(0.0); TBox *box = new TBox(g->GetXaxis()->GetXmin(), width - width_delta, g->GetXaxis()->GetXmax(), width + width_delta); box->SetFillColor(kGray+1); box->SetFillStyle(3001); g->GetListOfFunctions()->Add(box); g->GetListOfFunctions()->Add(gsys, "E5"); } return g; }
void BSA_InCoherent_xB() { //=========Macro generated from canvas: c16/Incoherent channe //========= (Tue Aug 21 12:00:25 2018) by ROOT version6.09/01 TCanvas *c16 = new TCanvas("c16", "Incoherent channe",0,0,1200,400); gStyle->SetOptFit(1); c16->Range(0,0,1,1); c16->SetFillColor(0); c16->SetBorderMode(0); c16->SetBorderSize(2); c16->SetLeftMargin(0.025); c16->SetRightMargin(0.02325581); c16->SetFrameBorderMode(0); // ------------>Primitives in pad: c16_1 TPad *c16_1 = new TPad("c16_1", "Incoherent channe_1",0,0,0.262936,0.9); c16_1->Draw(); c16_1->cd(); c16_1->Range(-29.34641,-0.4888889,350.2581,0.4); c16_1->SetFillColor(0); c16_1->SetBorderMode(0); c16_1->SetBorderSize(2); c16_1->SetGridx(); c16_1->SetGridy(); c16_1->SetRightMargin(0); c16_1->SetTopMargin(0); c16_1->SetFrameBorderMode(0); c16_1->SetFrameBorderMode(0); TMultiGraph *multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle("0.12<x_{B}<0.21 "); Double_t Graph_fx1134[9] = { 24.14331, 62.70082, 96.14623, 141.7289, 180.8857, 220.5862, 258.7856, 303.3336, 334.7288}; Double_t Graph_fy1134[9] = { 0.1330996, -0.03883743, 0.1388413, 0.2120595, 0.03749243, -0.09129921, -0.1273289, -0.1643618, 0.03103783}; Double_t Graph_fex1134[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Graph_fey1134[9] = { 0.07077824, 0.06445297, 0.05939535, 0.06833722, 0.08559024, 0.08401363, 0.06136237, 0.05845869, 0.08718727}; TGraphErrors *gre = new TGraphErrors(9,Graph_fx1134,Graph_fy1134,Graph_fex1134,Graph_fey1134); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#00ff00"); gre->SetMarkerColor(ci); gre->SetMarkerStyle(21); TH1F *Graph_Graph1134 = new TH1F("Graph_Graph1134","Graph",100,0,365.7873); Graph_Graph1134->SetMinimum(-0.2731422); Graph_Graph1134->SetMaximum(0.3307184); Graph_Graph1134->SetDirectory(0); Graph_Graph1134->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1134->SetLineColor(ci); Graph_Graph1134->GetXaxis()->SetLabelFont(42); Graph_Graph1134->GetXaxis()->SetLabelSize(0.035); Graph_Graph1134->GetXaxis()->SetTitleSize(0.035); Graph_Graph1134->GetXaxis()->SetTitleFont(42); Graph_Graph1134->GetYaxis()->SetLabelFont(42); Graph_Graph1134->GetYaxis()->SetLabelSize(0.035); Graph_Graph1134->GetYaxis()->SetTitleSize(0.035); Graph_Graph1134->GetYaxis()->SetTitleFont(42); Graph_Graph1134->GetZaxis()->SetLabelFont(42); Graph_Graph1134->GetZaxis()->SetLabelSize(0.035); Graph_Graph1134->GetZaxis()->SetTitleSize(0.035); Graph_Graph1134->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1134); TF1 *myfit1135 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,365.7873); myfit1135->SetFillColor(19); myfit1135->SetFillStyle(0); myfit1135->SetLineColor(2); myfit1135->SetLineWidth(2); myfit1135->SetChisquare(10.13595); myfit1135->SetNDF(7); myfit1135->GetXaxis()->SetLabelFont(42); myfit1135->GetXaxis()->SetLabelSize(0.035); myfit1135->GetXaxis()->SetTitleSize(0.035); myfit1135->GetXaxis()->SetTitleFont(42); myfit1135->GetYaxis()->SetLabelFont(42); myfit1135->GetYaxis()->SetLabelSize(0.035); myfit1135->GetYaxis()->SetTitleSize(0.035); myfit1135->GetYaxis()->SetTitleFont(42); myfit1135->SetParameter(0,0.1205343); myfit1135->SetParError(0,0.03387604); myfit1135->SetParLimits(0,0,0); myfit1135->SetParameter(1,0.6858633); myfit1135->SetParError(1,0.2646153); myfit1135->SetParLimits(1,0,0); gre->GetListOfFunctions()->Add(myfit1135); TPaveStats *ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetTextAlign(12); ptstats->SetTextFont(42); TText *AText = ptstats->AddText("#chi^{2} / ndf = 10.14 / 7"); AText = ptstats->AddText("p0 = 0.1205 #pm 0.03388 "); AText = ptstats->AddText("p1 = 0.6859 #pm 0.2646 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); gre->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(gre->GetListOfFunctions()); multigraph->Add(gre,""); multigraph->Draw("AP"); multigraph->GetXaxis()->SetTitle("#phi [deg.]"); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetLabelSize(0.035); multigraph->GetXaxis()->SetTitleSize(0.035); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetTitle("A_{LU}"); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetLabelSize(0.035); multigraph->GetYaxis()->SetTitleSize(0.035); multigraph->GetYaxis()->SetTitleFont(42); gPad->Modified(); multigraph->GetYaxis()->SetRangeUser(-0.35, 0.35); c16_1->Modified(); c16->cd(); // ------------>Primitives in pad: c16_2 TPad *c16_2 = new TPad("c16_2", "Incoherent channe_2",0.262936,0,0.5008721,0.9); c16_2->Draw(); c16_2->cd(); c16_2->Range(5.85529,-0.4888889,352.0975,0.4); c16_2->SetFillColor(0); c16_2->SetBorderMode(0); c16_2->SetBorderSize(2); c16_2->SetGridx(); c16_2->SetGridy(); c16_2->SetLeftMargin(0); c16_2->SetRightMargin(0); c16_2->SetTopMargin(0); c16_2->SetFrameBorderMode(0); c16_2->SetFrameBorderMode(0); multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle("0.21<x_{B}<0.31 "); Double_t Graph_fx1137[9] = { 21.59357, 60.08662, 95.00395, 140.4897, 181.0443, 224.9978, 260.1264, 302.891, 336.3592}; Double_t Graph_fy1137[9] = { 0.0984356, 0.1891659, 0.2419886, 0.08897874, 0.2077051, -0.3071227, -0.1933684, -0.2875592, -0.08265727}; Double_t Graph_fex1137[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Graph_fey1137[9] = { 0.04446748, 0.058618, 0.06898028, 0.1082398, 0.135301, 0.1152745, 0.0716065, 0.04680018, 0.05547391}; gre = new TGraphErrors(9,Graph_fx1137,Graph_fy1137,Graph_fex1137,Graph_fey1137); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); ci = TColor::GetColor("#00ff00"); gre->SetMarkerColor(ci); gre->SetMarkerStyle(21); TH1F *Graph_Graph1137 = new TH1F("Graph_Graph1137","Graph",100,0,367.8358); Graph_Graph1137->SetMinimum(-0.4989376); Graph_Graph1137->SetMaximum(0.4195464); Graph_Graph1137->SetDirectory(0); Graph_Graph1137->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1137->SetLineColor(ci); Graph_Graph1137->GetXaxis()->SetLabelFont(42); Graph_Graph1137->GetXaxis()->SetLabelSize(0.035); Graph_Graph1137->GetXaxis()->SetTitleSize(0.035); Graph_Graph1137->GetXaxis()->SetTitleFont(42); Graph_Graph1137->GetYaxis()->SetLabelFont(42); Graph_Graph1137->GetYaxis()->SetLabelSize(0.035); Graph_Graph1137->GetYaxis()->SetTitleSize(0.035); Graph_Graph1137->GetYaxis()->SetTitleFont(42); Graph_Graph1137->GetZaxis()->SetLabelFont(42); Graph_Graph1137->GetZaxis()->SetLabelSize(0.035); Graph_Graph1137->GetZaxis()->SetTitleSize(0.035); Graph_Graph1137->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1137); TF1 *myfit1138 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,367.8358); myfit1138->SetFillColor(19); myfit1138->SetFillStyle(0); myfit1138->SetLineColor(2); myfit1138->SetLineWidth(2); myfit1138->SetChisquare(7.336971); myfit1138->SetNDF(7); myfit1138->GetXaxis()->SetLabelFont(42); myfit1138->GetXaxis()->SetLabelSize(0.035); myfit1138->GetXaxis()->SetTitleSize(0.035); myfit1138->GetXaxis()->SetTitleFont(42); myfit1138->GetYaxis()->SetLabelFont(42); myfit1138->GetYaxis()->SetLabelSize(0.035); myfit1138->GetYaxis()->SetTitleSize(0.035); myfit1138->GetYaxis()->SetTitleFont(42); myfit1138->SetParameter(0,0.2508538); myfit1138->SetParError(0,0.03583101); myfit1138->SetParLimits(0,0,0); myfit1138->SetParameter(1,-0.1422748); myfit1138->SetParError(1,0.2426713); myfit1138->SetParLimits(1,0,0); gre->GetListOfFunctions()->Add(myfit1138); ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetTextAlign(12); ptstats->SetTextFont(42); AText = ptstats->AddText("#chi^{2} / ndf = 7.337 / 7"); AText = ptstats->AddText("p0 = 0.2509 #pm 0.03583 "); AText = ptstats->AddText("p1 = -0.1423 #pm 0.2427 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); gre->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(gre->GetListOfFunctions()); multigraph->Add(gre,""); multigraph->Draw("AP"); multigraph->GetXaxis()->SetTitle("#phi [deg.]"); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetLabelSize(0.035); multigraph->GetXaxis()->SetTitleSize(0.035); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetLabelSize(0.035); multigraph->GetYaxis()->SetTitleSize(0.035); multigraph->GetYaxis()->SetTitleFont(42); gPad->Modified(); multigraph->GetYaxis()->SetRangeUser(-0.35, 0.35); c16_2->Modified(); c16->cd(); // ------------>Primitives in pad: c16_3 TPad *c16_3 = new TPad("c16_3", "Incoherent channe_3",0.5008721,0,0.7388081,0.9); c16_3->Draw(); c16_3->cd(); c16_3->Range(4.159976,-0.4888889,357.6921,0.4); c16_3->SetFillColor(0); c16_3->SetBorderMode(0); c16_3->SetBorderSize(2); c16_3->SetGridx(); c16_3->SetGridy(); c16_3->SetLeftMargin(0); c16_3->SetRightMargin(0); c16_3->SetTopMargin(0); c16_3->SetFrameBorderMode(0); c16_3->SetFrameBorderMode(0); multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle("0.31<x_{B}<0.39 "); Double_t Graph_fx1140[9] = { 20.22962, 57.37981, 95.86069, 135.3486, 182.9227, 229.5531, 263.4275, 301.2495, 341.6225}; Double_t Graph_fy1140[9] = { 0.09662004, 0.06965272, 0.269744, -0.170935, -0.1509905, 0.6309487, 0.06270791, -0.2582676, -0.152689}; Double_t Graph_fex1140[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Graph_fey1140[9] = { 0.05297617, 0.09107484, 0.121636, 0.2287053, 0.3066164, 0.3879093, 0.1400804, 0.07623737, 0.06739512}; gre = new TGraphErrors(9,Graph_fx1140,Graph_fy1140,Graph_fex1140,Graph_fey1140); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); ci = TColor::GetColor("#00ff00"); gre->SetMarkerColor(ci); gre->SetMarkerStyle(21); TH1F *Graph_Graph1140 = new TH1F("Graph_Graph1140","Graph",100,0,373.7618); Graph_Graph1140->SetMinimum(-0.6052533); Graph_Graph1140->SetMaximum(1.166504); Graph_Graph1140->SetDirectory(0); Graph_Graph1140->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1140->SetLineColor(ci); Graph_Graph1140->GetXaxis()->SetLabelFont(42); Graph_Graph1140->GetXaxis()->SetLabelSize(0.035); Graph_Graph1140->GetXaxis()->SetTitleSize(0.035); Graph_Graph1140->GetXaxis()->SetTitleFont(42); Graph_Graph1140->GetYaxis()->SetLabelFont(42); Graph_Graph1140->GetYaxis()->SetLabelSize(0.035); Graph_Graph1140->GetYaxis()->SetTitleSize(0.035); Graph_Graph1140->GetYaxis()->SetTitleFont(42); Graph_Graph1140->GetZaxis()->SetLabelFont(42); Graph_Graph1140->GetZaxis()->SetLabelSize(0.035); Graph_Graph1140->GetZaxis()->SetTitleSize(0.035); Graph_Graph1140->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1140); TF1 *myfit1141 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,373.7618); myfit1141->SetFillColor(19); myfit1141->SetFillStyle(0); myfit1141->SetLineColor(2); myfit1141->SetLineWidth(2); myfit1141->SetChisquare(10.84482); myfit1141->SetNDF(7); myfit1141->GetXaxis()->SetLabelFont(42); myfit1141->GetXaxis()->SetLabelSize(0.035); myfit1141->GetXaxis()->SetTitleSize(0.035); myfit1141->GetXaxis()->SetTitleFont(42); myfit1141->GetYaxis()->SetLabelFont(42); myfit1141->GetYaxis()->SetLabelSize(0.035); myfit1141->GetYaxis()->SetTitleSize(0.035); myfit1141->GetYaxis()->SetTitleFont(42); myfit1141->SetParameter(0,0.124049); myfit1141->SetParError(0,0.05069177); myfit1141->SetParLimits(0,0,0); myfit1141->SetParameter(1,-0.6977989); myfit1141->SetParError(1,0.2049165); myfit1141->SetParLimits(1,0,0); gre->GetListOfFunctions()->Add(myfit1141); ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetTextAlign(12); ptstats->SetTextFont(42); AText = ptstats->AddText("#chi^{2} / ndf = 10.84 / 7"); AText = ptstats->AddText("p0 = 0.124 #pm 0.05069 "); AText = ptstats->AddText("p1 = -0.6978 #pm 0.2049 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); gre->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(gre->GetListOfFunctions()); multigraph->Add(gre,""); multigraph->Draw("AP"); multigraph->GetXaxis()->SetTitle("#phi [deg.]"); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetLabelSize(0.035); multigraph->GetXaxis()->SetTitleSize(0.035); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetLabelSize(0.035); multigraph->GetYaxis()->SetTitleSize(0.035); multigraph->GetYaxis()->SetTitleFont(42); gPad->Modified(); multigraph->GetYaxis()->SetRangeUser(-0.35, 0.35); c16_3->Modified(); c16->cd(); // ------------>Primitives in pad: c16_4 TPad *c16_4 = new TPad("c16_4", "Incoherent channe_4",0.7388081,0,0.9767442,0.9); c16_4->Draw(); c16_4->cd(); c16_4->Range(-17.15326,-0.4888889,360.2184,0.4); c16_4->SetFillColor(0); c16_4->SetBorderMode(0); c16_4->SetBorderSize(2); c16_4->SetGridx(); c16_4->SetGridy(); c16_4->SetLeftMargin(0); c16_4->SetRightMargin(0); c16_4->SetTopMargin(0); c16_4->SetFrameBorderMode(0); c16_4->SetFrameBorderMode(0); multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle("0.39<x_{B}<0.60 "); Double_t Graph_fx1143[9] = { 19.13311, 55.36321, 90.36243, 127.5684, 0, 232.109, 268.7816, 302.6639, 343.0651}; Double_t Graph_fy1143[9] = { 0.1307559, 0.1996612, 0.006608881, -2.830736, 0, -2.034047, 0.1276631, -0.2950426, -0.003784223}; Double_t Graph_fex1143[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Graph_fey1143[9] = { 0.05218982, 0.09871893, 0.1820512, 4.457049, 0, 1.502801, 0.207584, 0.0825667, 0.06276702}; gre = new TGraphErrors(9,Graph_fx1143,Graph_fy1143,Graph_fex1143,Graph_fey1143); gre->SetName("Graph"); gre->SetTitle("Graph"); gre->SetFillColor(1); ci = TColor::GetColor("#00ff00"); gre->SetMarkerColor(ci); gre->SetMarkerStyle(21); TH1F *Graph_Graph1143 = new TH1F("Graph_Graph1143","Graph",100,0,377.3716); Graph_Graph1143->SetMinimum(-8.179195); Graph_Graph1143->SetMaximum(2.517722); Graph_Graph1143->SetDirectory(0); Graph_Graph1143->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1143->SetLineColor(ci); Graph_Graph1143->GetXaxis()->SetLabelFont(42); Graph_Graph1143->GetXaxis()->SetLabelSize(0.035); Graph_Graph1143->GetXaxis()->SetTitleSize(0.035); Graph_Graph1143->GetXaxis()->SetTitleFont(42); Graph_Graph1143->GetYaxis()->SetLabelFont(42); Graph_Graph1143->GetYaxis()->SetLabelSize(0.035); Graph_Graph1143->GetYaxis()->SetTitleSize(0.035); Graph_Graph1143->GetYaxis()->SetTitleFont(42); Graph_Graph1143->GetZaxis()->SetLabelFont(42); Graph_Graph1143->GetZaxis()->SetLabelSize(0.035); Graph_Graph1143->GetZaxis()->SetTitleSize(0.035); Graph_Graph1143->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph1143); TF1 *myfit1144 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,377.3716); myfit1144->SetFillColor(19); myfit1144->SetFillStyle(0); myfit1144->SetLineColor(2); myfit1144->SetLineWidth(2); myfit1144->SetChisquare(8.6938); myfit1144->SetNDF(7); myfit1144->GetXaxis()->SetLabelFont(42); myfit1144->GetXaxis()->SetLabelSize(0.035); myfit1144->GetXaxis()->SetTitleSize(0.035); myfit1144->GetXaxis()->SetTitleFont(42); myfit1144->GetYaxis()->SetLabelFont(42); myfit1144->GetYaxis()->SetLabelSize(0.035); myfit1144->GetYaxis()->SetTitleSize(0.035); myfit1144->GetYaxis()->SetTitleFont(42); myfit1144->SetParameter(0,0.1663497); myfit1144->SetParError(0,0.06722025); myfit1144->SetParLimits(0,0,0); myfit1144->SetParameter(1,-0.5093054); myfit1144->SetParError(1,0.2952021); myfit1144->SetParLimits(1,0,0); gre->GetListOfFunctions()->Add(myfit1144); ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetTextAlign(12); ptstats->SetTextFont(42); AText = ptstats->AddText("#chi^{2} / ndf = 8.694 / 7"); AText = ptstats->AddText("p0 = 0.1663 #pm 0.06722 "); AText = ptstats->AddText("p1 = -0.5093 #pm 0.2952 "); ptstats->SetOptStat(0); ptstats->SetOptFit(111); ptstats->Draw(); gre->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(gre->GetListOfFunctions()); multigraph->Add(gre,""); multigraph->Draw("AP"); multigraph->GetXaxis()->SetTitle("#phi [deg.]"); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetLabelSize(0.035); multigraph->GetXaxis()->SetTitleSize(0.035); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetLabelSize(0.035); multigraph->GetYaxis()->SetTitleSize(0.035); multigraph->GetYaxis()->SetTitleFont(42); gPad->Modified(); multigraph->GetYaxis()->SetRangeUser(-0.35, 0.35); c16_4->Modified(); c16->cd(); c16->Modified(); c16->cd(); c16->SetSelected(c16); }