{ // Example of the fit of correction function for B=8 events sample gROOT->SetStyle("Plain"); gStyle->SetOptTitle(0); gStyle->SetPadRightMargin(0.01); gStyle->SetPadTopMargin(0.02); gStyle->SetPadLeftMargin(0.16); gStyle->SetPadBottomMargin(0.14); gStyle->SetLabelSize(0.05, "xy"); gStyle->SetTitleSize(0.07, "x"); gStyle->SetTitleSize(0.07, "y"); gStyle->SetTitleOffset(1.1, "y"); gStyle->SetTitleOffset(0.8, "x"); gStyle->SetLabelOffset(0.02, "y"); TCanvas *ceta = new TCanvas("c_eta_correction_fit_B8", "eta_correction_fit",600,400); TGraph *graph = new TGraph(83); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); graph->SetLineStyle(0); graph->SetMarkerColor(2); graph->SetMarkerStyle(24); graph->SetMarkerSize(1.3); graph->SetPoint(0,-2.075,0.544807); graph->SetPoint(1,-2.025,0.896559); graph->SetPoint(2,-1.975,1.4641); graph->SetPoint(3,-1.925,1.96396); graph->SetPoint(4,-1.875,2.36052); graph->SetPoint(5,-1.825,2.93644); graph->SetPoint(6,-1.775,3.18122); graph->SetPoint(7,-1.725,3.45987); graph->SetPoint(8,-1.675,3.21259); graph->SetPoint(9,-1.625,3.28903); graph->SetPoint(10,-1.575,3.18383); graph->SetPoint(11,-1.525,3.10906); graph->SetPoint(12,-1.475,3.06555); graph->SetPoint(13,-1.425,2.95667); graph->SetPoint(14,-1.375,2.88711); graph->SetPoint(15,-1.325,2.77219); graph->SetPoint(16,-1.275,2.80976); graph->SetPoint(17,-1.225,2.66843); graph->SetPoint(18,-1.175,2.56885); graph->SetPoint(19,-1.125,2.50648); graph->SetPoint(20,-1.075,2.44461); graph->SetPoint(21,-1.025,2.52432); graph->SetPoint(22,-0.975,2.46458); graph->SetPoint(23,-0.925,2.31144); graph->SetPoint(24,-0.875,2.30721); graph->SetPoint(25,-0.825,2.25425); graph->SetPoint(26,-0.775,2.23402); graph->SetPoint(27,-0.725,2.15652); graph->SetPoint(28,-0.675,2.15321); graph->SetPoint(29,-0.625,2.06295); graph->SetPoint(30,-0.575,2.04883); graph->SetPoint(31,-0.525,2.05832); graph->SetPoint(32,-0.475,2.02008); graph->SetPoint(33,-0.425,1.99422); graph->SetPoint(34,-0.375,1.94805); graph->SetPoint(35,-0.325,2.0315); graph->SetPoint(36,-0.275,2.05993); graph->SetPoint(37,-0.225,1.92324); graph->SetPoint(38,-0.175,1.98348); graph->SetPoint(39,-0.125,1.94066); graph->SetPoint(40,-0.075,1.97398); graph->SetPoint(41,-0.025,1.89757); graph->SetPoint(42,0.025,1.99236); graph->SetPoint(43,0.075,1.93972); graph->SetPoint(44,0.125,2.0077); graph->SetPoint(45,0.175,1.94182); graph->SetPoint(46,0.225,1.95855); graph->SetPoint(47,0.275,1.99164); graph->SetPoint(48,0.325,1.97962); graph->SetPoint(49,0.375,1.99774); graph->SetPoint(50,0.425,2.05995); graph->SetPoint(51,0.475,2.06341); graph->SetPoint(52,0.525,2.05785); graph->SetPoint(53,0.575,2.07149); graph->SetPoint(54,0.625,2.12861); graph->SetPoint(55,0.675,2.16791); graph->SetPoint(56,0.725,2.16663); graph->SetPoint(57,0.775,2.27864); graph->SetPoint(58,0.825,2.21726); graph->SetPoint(59,0.875,2.21812); graph->SetPoint(60,0.925,2.40544); graph->SetPoint(61,0.975,2.42597); graph->SetPoint(62,1.025,2.55526); graph->SetPoint(63,1.075,2.56734); graph->SetPoint(64,1.125,2.45037); graph->SetPoint(65,1.175,2.65331); graph->SetPoint(66,1.225,2.60673); graph->SetPoint(67,1.275,2.70685); graph->SetPoint(68,1.325,2.76859); graph->SetPoint(69,1.375,2.88394); graph->SetPoint(70,1.425,2.99477); graph->SetPoint(71,1.475,3.08557); graph->SetPoint(72,1.525,3.24468); graph->SetPoint(73,1.575,3.28272); graph->SetPoint(74,1.625,3.22019); graph->SetPoint(75,1.675,3.12828); graph->SetPoint(76,1.725,3.10207); graph->SetPoint(77,1.775,3.0085); graph->SetPoint(78,1.825,2.64098); graph->SetPoint(79,1.875,2.16169); graph->SetPoint(80,1.925,1.71934); graph->SetPoint(81,1.975,1.17499); graph->SetPoint(82,2.025,0.660596); TH1 *Graph1 = new TH1F("Graph1","Graph",100,-3,3); Graph1->SetMinimum(0); Graph1->SetMaximum(3.6); Graph1->SetDirectory(0); Graph1->SetStats(0); Graph1->GetXaxis()->SetTitle("#eta"); Graph1->GetYaxis()->SetTitle("correction"); graph->SetHistogram(Graph1); graph->Draw("ap"); TF1 *etacorr3 = new TF1("etacorr3","[0]+[1]*x*x+[2]*x*x*x*x",-1.7,1.7); etacorr3->SetFillColor(19); etacorr3->SetFillStyle(0); etacorr3->SetLineColor(2); etacorr3->SetLineWidth(3); etacorr3->SetChisquare(0.0841948); etacorr3->SetParameter(0,1.93512); etacorr3->SetParError(0,0.325865); etacorr3->SetParLimits(0,0,0); etacorr3->SetParameter(1,0.491503); etacorr3->SetParError(1,0.765746); etacorr3->SetParLimits(1,0,0); etacorr3->SetParameter(2,0.00157914); etacorr3->SetParError(2,0.307598); etacorr3->SetParLimits(2,0,0); etacorr3->Draw("lsame"); TF1 *etacorr3 = new TF1("etacorr3","[0]+[1]*x*x+[2]*x*x*x*x",-1.7,1.7); etacorr3->SetFillColor(19); etacorr3->SetFillStyle(0); etacorr3->SetLineColor(2); etacorr3->SetLineWidth(3); etacorr3->SetChisquare(0.0841948); etacorr3->SetParameter(0,1.93512); etacorr3->SetParError(0,0.325865); etacorr3->SetParLimits(0,0,0); etacorr3->SetParameter(1,0.491503); etacorr3->SetParError(1,0.765746); etacorr3->SetParLimits(1,0,0); etacorr3->SetParameter(2,0.00157914); etacorr3->SetParError(2,0.307598); etacorr3->SetParLimits(2,0,0); etacorr3->Draw("lsame"); graph = new TGraph(95); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); graph->SetMarkerColor(4); graph->SetMarkerStyle(26); graph->SetPoint(0,-2.375,0.631062); graph->SetPoint(1,-2.325,1.04738); graph->SetPoint(2,-2.275,1.56126); graph->SetPoint(3,-2.225,2.08536); graph->SetPoint(4,-2.175,2.63148); graph->SetPoint(5,-2.125,3.02906); graph->SetPoint(6,-2.075,3.17332); graph->SetPoint(7,-2.025,3.19259); graph->SetPoint(8,-1.975,3.34567); graph->SetPoint(9,-1.925,3.13964); graph->SetPoint(10,-1.875,2.97636); graph->SetPoint(11,-1.825,3.00838); graph->SetPoint(12,-1.775,2.95879); graph->SetPoint(13,-1.725,2.87588); graph->SetPoint(14,-1.675,2.76881); graph->SetPoint(15,-1.625,2.7809); graph->SetPoint(16,-1.575,2.69171); graph->SetPoint(17,-1.525,2.56477); graph->SetPoint(18,-1.475,2.47849); graph->SetPoint(19,-1.425,2.38744); graph->SetPoint(20,-1.375,2.38278); graph->SetPoint(21,-1.325,2.3139); graph->SetPoint(22,-1.275,2.30711); graph->SetPoint(23,-1.225,2.20853); graph->SetPoint(24,-1.175,2.12653); graph->SetPoint(25,-1.125,2.09815); graph->SetPoint(26,-1.075,2.07964); graph->SetPoint(27,-1.025,2.064); graph->SetPoint(28,-0.975,2.09169); graph->SetPoint(29,-0.925,1.98674); graph->SetPoint(30,-0.875,1.97532); graph->SetPoint(31,-0.825,1.92385); graph->SetPoint(32,-0.775,1.85244); graph->SetPoint(33,-0.725,1.79524); graph->SetPoint(34,-0.675,1.84176); graph->SetPoint(35,-0.625,1.77143); graph->SetPoint(36,-0.575,1.75843); graph->SetPoint(37,-0.525,1.76604); graph->SetPoint(38,-0.475,1.77622); graph->SetPoint(39,-0.425,1.77294); graph->SetPoint(40,-0.375,1.75062); graph->SetPoint(41,-0.325,1.75452); graph->SetPoint(42,-0.275,1.74779); graph->SetPoint(43,-0.225,1.67111); graph->SetPoint(44,-0.175,1.67142); graph->SetPoint(45,-0.125,1.64948); graph->SetPoint(46,-0.075,1.63481); graph->SetPoint(47,-0.025,1.7028); graph->SetPoint(48,0.025,1.73367); graph->SetPoint(49,0.075,1.68881); graph->SetPoint(50,0.125,1.71559); graph->SetPoint(51,0.175,1.65364); graph->SetPoint(52,0.225,1.71978); graph->SetPoint(53,0.275,1.72565); graph->SetPoint(54,0.325,1.76236); graph->SetPoint(55,0.375,1.74428); graph->SetPoint(56,0.425,1.75906); graph->SetPoint(57,0.475,1.77603); graph->SetPoint(58,0.525,1.78176); graph->SetPoint(59,0.575,1.78879); graph->SetPoint(60,0.625,1.82243); graph->SetPoint(61,0.675,1.84343); graph->SetPoint(62,0.725,1.89924); graph->SetPoint(63,0.775,1.89345); graph->SetPoint(64,0.825,1.87871); graph->SetPoint(65,0.875,1.88479); graph->SetPoint(66,0.925,1.97349); graph->SetPoint(67,0.975,2.00887); graph->SetPoint(68,1.025,2.05581); graph->SetPoint(69,1.075,2.06384); graph->SetPoint(70,1.125,2.09885); graph->SetPoint(71,1.175,2.18681); graph->SetPoint(72,1.225,2.14933); graph->SetPoint(73,1.275,2.18609); graph->SetPoint(74,1.325,2.3368); graph->SetPoint(75,1.375,2.40545); graph->SetPoint(76,1.425,2.41618); graph->SetPoint(77,1.475,2.43173); graph->SetPoint(78,1.525,2.49223); graph->SetPoint(79,1.575,2.58909); graph->SetPoint(80,1.625,2.67781); graph->SetPoint(81,1.675,2.7506); graph->SetPoint(82,1.725,2.79811); graph->SetPoint(83,1.775,2.91661); graph->SetPoint(84,1.825,3.0708); graph->SetPoint(85,1.875,3.13702); graph->SetPoint(86,1.925,3.11386); graph->SetPoint(87,1.975,3.16534); graph->SetPoint(88,2.025,3.06126); graph->SetPoint(89,2.075,2.88271); graph->SetPoint(90,2.125,2.71789); graph->SetPoint(91,2.175,2.22833); graph->SetPoint(92,2.225,1.85506); graph->SetPoint(93,2.275,1.34277); graph->SetPoint(94,2.325,0.813182); graph->Draw("p"); TF1 *etacorr2 = new TF1("etacorr2","[0]+[1]*x*x+[2]*x*x*x*x",-2,2); etacorr2->SetFillColor(19); etacorr2->SetFillStyle(0); etacorr2->SetLineColor(4); etacorr2->SetLineWidth(3); etacorr2->SetChisquare(0.0553475); etacorr2->SetParameter(0,1.68748); etacorr2->SetParError(0,0.281138); etacorr2->SetParLimits(0,0,0); etacorr2->SetParameter(1,0.314859); etacorr2->SetParError(1,0.484599); etacorr2->SetParLimits(1,0,0); etacorr2->SetParameter(2,0.0231178); etacorr2->SetParError(2,0.142079); etacorr2->SetParLimits(2,0,0); etacorr2->Draw("lsame"); graph = new TGraph(117); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); graph->SetMarkerStyle(25); graph->SetMarkerSize(1.3); graph->SetPoint(0,-2.925,0.657331); graph->SetPoint(1,-2.875,1.12552); graph->SetPoint(2,-2.825,1.57202); graph->SetPoint(3,-2.775,2.10296); graph->SetPoint(4,-2.725,2.53354); graph->SetPoint(5,-2.675,2.91735); graph->SetPoint(6,-2.625,3.18346); graph->SetPoint(7,-2.575,3.13231); graph->SetPoint(8,-2.525,3.05652); graph->SetPoint(9,-2.475,3.02747); graph->SetPoint(10,-2.425,2.93835); graph->SetPoint(11,-2.375,2.95351); graph->SetPoint(12,-2.325,2.73419); graph->SetPoint(13,-2.275,2.67417); graph->SetPoint(14,-2.225,2.55724); graph->SetPoint(15,-2.175,2.55185); graph->SetPoint(16,-2.125,2.52833); graph->SetPoint(17,-2.075,2.38758); graph->SetPoint(18,-2.025,2.31837); graph->SetPoint(19,-1.975,2.24177); graph->SetPoint(20,-1.925,2.26228); graph->SetPoint(21,-1.875,2.05575); graph->SetPoint(22,-1.825,2.10995); graph->SetPoint(23,-1.775,2.041); graph->SetPoint(24,-1.725,2.00476); graph->SetPoint(25,-1.675,1.89064); graph->SetPoint(26,-1.625,1.95288); graph->SetPoint(27,-1.575,1.88557); graph->SetPoint(28,-1.525,1.75309); graph->SetPoint(29,-1.475,1.78226); graph->SetPoint(30,-1.425,1.73748); graph->SetPoint(31,-1.375,1.73644); graph->SetPoint(32,-1.325,1.70031); graph->SetPoint(33,-1.275,1.71877); graph->SetPoint(34,-1.225,1.64816); graph->SetPoint(35,-1.175,1.59702); graph->SetPoint(36,-1.125,1.60633); graph->SetPoint(37,-1.075,1.57382); graph->SetPoint(38,-1.025,1.57795); graph->SetPoint(39,-0.975,1.51393); graph->SetPoint(40,-0.925,1.5031); graph->SetPoint(41,-0.875,1.53778); graph->SetPoint(42,-0.825,1.49753); graph->SetPoint(43,-0.775,1.50206); graph->SetPoint(44,-0.725,1.47304); graph->SetPoint(45,-0.675,1.47844); graph->SetPoint(46,-0.625,1.46994); graph->SetPoint(47,-0.575,1.4408); graph->SetPoint(48,-0.525,1.45828); graph->SetPoint(49,-0.475,1.43864); graph->SetPoint(50,-0.425,1.44834); graph->SetPoint(51,-0.375,1.41601); graph->SetPoint(52,-0.325,1.44002); graph->SetPoint(53,-0.275,1.43632); graph->SetPoint(54,-0.225,1.40175); graph->SetPoint(55,-0.175,1.39692); graph->SetPoint(56,-0.125,1.4362); graph->SetPoint(57,-0.075,1.38315); graph->SetPoint(58,-0.025,1.41155); graph->SetPoint(59,0.025,1.42821); graph->SetPoint(60,0.075,1.37534); graph->SetPoint(61,0.125,1.38684); graph->SetPoint(62,0.175,1.43386); graph->SetPoint(63,0.225,1.42574); graph->SetPoint(64,0.275,1.41853); graph->SetPoint(65,0.325,1.39721); graph->SetPoint(66,0.375,1.42265); graph->SetPoint(67,0.425,1.42945); graph->SetPoint(68,0.475,1.47088); graph->SetPoint(69,0.525,1.42536); graph->SetPoint(70,0.575,1.4096); graph->SetPoint(71,0.625,1.4463); graph->SetPoint(72,0.675,1.4629); graph->SetPoint(73,0.725,1.49793); graph->SetPoint(74,0.775,1.51828); graph->SetPoint(75,0.825,1.51486); graph->SetPoint(76,0.875,1.48824); graph->SetPoint(77,0.925,1.50331); graph->SetPoint(78,0.975,1.56948); graph->SetPoint(79,1.025,1.59867); graph->SetPoint(80,1.075,1.60822); graph->SetPoint(81,1.125,1.60588); graph->SetPoint(82,1.175,1.61429); graph->SetPoint(83,1.225,1.61926); graph->SetPoint(84,1.275,1.647); graph->SetPoint(85,1.325,1.70888); graph->SetPoint(86,1.375,1.77215); graph->SetPoint(87,1.425,1.75857); graph->SetPoint(88,1.475,1.78465); graph->SetPoint(89,1.525,1.75962); graph->SetPoint(90,1.575,1.83157); graph->SetPoint(91,1.625,1.92293); graph->SetPoint(92,1.675,1.91269); graph->SetPoint(93,1.725,1.96618); graph->SetPoint(94,1.775,2.04584); graph->SetPoint(95,1.825,2.06913); graph->SetPoint(96,1.875,2.13889); graph->SetPoint(97,1.925,2.20871); graph->SetPoint(98,1.975,2.28661); graph->SetPoint(99,2.025,2.38783); graph->SetPoint(100,2.075,2.41312); graph->SetPoint(101,2.125,2.46593); graph->SetPoint(102,2.175,2.59648); graph->SetPoint(103,2.225,2.73188); graph->SetPoint(104,2.275,2.78689); graph->SetPoint(105,2.325,2.90239); graph->SetPoint(106,2.375,2.92316); graph->SetPoint(107,2.425,3.00471); graph->SetPoint(108,2.475,3.07871); graph->SetPoint(109,2.525,3.04478); graph->SetPoint(110,2.575,3.03786); graph->SetPoint(111,2.625,2.88004); graph->SetPoint(112,2.675,2.64055); graph->SetPoint(113,2.725,2.35993); graph->SetPoint(114,2.775,1.80913); graph->SetPoint(115,2.825,1.31117); graph->SetPoint(116,2.875,0.854356); graph->Draw("p"); TF1 *etacorr1 = new TF1("etacorr1","[0]+[1]*x*x+[2]*x*x*x*x",-2.5,2.5); etacorr1->SetFillColor(19); etacorr1->SetFillStyle(0); etacorr1->SetLineWidth(3); etacorr1->SetChisquare(0.0550108); etacorr1->SetParameter(0,1.40835); etacorr1->SetParError(0,0.229466); etacorr1->SetParLimits(0,0,0); etacorr1->SetParameter(1,0.118329); etacorr1->SetParError(1,0.25541); etacorr1->SetParLimits(1,0,0); etacorr1->SetParameter(2,0.0259506); etacorr1->SetParError(2,0.0484484); etacorr1->SetParLimits(2,0,0); etacorr1->Draw("lsame"); ceta->Modified(); }