void pedestal_width_rate(void) { char string[256]; //=========Macro generated from canvas: c4/c4 //========= (Mon Apr 20 17:49:02 2015) by ROOT version5.34/09 TCanvas *c4 = new TCanvas("c4", "c4",200,32,700,700); gStyle->SetOptFit(1); c4->Range(0,0,1,1); c4->SetFillColor(0); c4->SetBorderMode(0); c4->SetBorderSize(2); c4->SetGridx(); c4->SetGridy(); c4->SetLeftMargin(0.15); c4->SetRightMargin(0.15); c4->SetBottomMargin(0.15); c4->SetFrameBorderMode(0); gStyle->SetOptStat(kFALSE); gStyle->SetOptFit(kFALSE); // gStyle->SetOptFit(1111); // ------------>Primitives in pad: c4_3 TH1D *h2_rate_1 = new TH1D("h2_rate_1","",20,0,150); h2_rate_1->SetBinContent(1,1.209905); h2_rate_1->SetBinContent(2,1.228047); h2_rate_1->SetBinContent(3,1.260545); h2_rate_1->SetBinContent(4,1.368952); h2_rate_1->SetBinError(1,0.004805519); h2_rate_1->SetBinError(2,0.005029714); h2_rate_1->SetBinError(3,0.006349917); h2_rate_1->SetBinError(4,0.005728688); h2_rate_1->SetMinimum(1); h2_rate_1->SetMaximum(2.2); h2_rate_1->SetEntries(4); TF1 *sqroot_func = new TF1("*sqroot_func",0,150,2); //The original function : sqroot_func had originally been created by: //TF1 *sqroot_func = new TF1("sqroot_func",sqroot_func,0,150,2); sqroot_func->SetRange(0,150); sqroot_func->SetName("sqroot_func"); sqroot_func->SetTitle("sqroot_func"); sqroot_func->SetSavedPoint(0,1.199006); sqroot_func->SetSavedPoint(1,1.199563); sqroot_func->SetSavedPoint(2,1.20123); sqroot_func->SetSavedPoint(3,1.204005); sqroot_func->SetSavedPoint(4,1.207879); sqroot_func->SetSavedPoint(5,1.212841); sqroot_func->SetSavedPoint(6,1.218879); sqroot_func->SetSavedPoint(7,1.225976); sqroot_func->SetSavedPoint(8,1.234114); sqroot_func->SetSavedPoint(9,1.243273); sqroot_func->SetSavedPoint(10,1.253431); sqroot_func->SetSavedPoint(11,1.264562); sqroot_func->SetSavedPoint(12,1.276643); sqroot_func->SetSavedPoint(13,1.289645); sqroot_func->SetSavedPoint(14,1.303542); sqroot_func->SetSavedPoint(15,1.318305); sqroot_func->SetSavedPoint(16,1.333906); sqroot_func->SetSavedPoint(17,1.350315); sqroot_func->SetSavedPoint(18,1.367504); sqroot_func->SetSavedPoint(19,1.385443); sqroot_func->SetSavedPoint(20,1.404103); sqroot_func->SetSavedPoint(21,1.423457); sqroot_func->SetSavedPoint(22,1.443476); sqroot_func->SetSavedPoint(23,1.464133); sqroot_func->SetSavedPoint(24,1.485402); sqroot_func->SetSavedPoint(25,1.507256); sqroot_func->SetSavedPoint(26,1.52967); sqroot_func->SetSavedPoint(27,1.552621); sqroot_func->SetSavedPoint(28,1.576084); sqroot_func->SetSavedPoint(29,1.600038); sqroot_func->SetSavedPoint(30,1.62446); sqroot_func->SetSavedPoint(31,1.64933); sqroot_func->SetSavedPoint(32,1.674627); sqroot_func->SetSavedPoint(33,1.700334); sqroot_func->SetSavedPoint(34,1.72643); sqroot_func->SetSavedPoint(35,1.7529); sqroot_func->SetSavedPoint(36,1.779725); sqroot_func->SetSavedPoint(37,1.806892); sqroot_func->SetSavedPoint(38,1.834383); sqroot_func->SetSavedPoint(39,1.862186); sqroot_func->SetSavedPoint(40,1.890286); sqroot_func->SetSavedPoint(41,1.91867); sqroot_func->SetSavedPoint(42,1.947325); sqroot_func->SetSavedPoint(43,1.976241); sqroot_func->SetSavedPoint(44,2.005405); sqroot_func->SetSavedPoint(45,2.034807); sqroot_func->SetSavedPoint(46,2.064437); sqroot_func->SetSavedPoint(47,2.094285); sqroot_func->SetSavedPoint(48,2.124342); sqroot_func->SetSavedPoint(49,2.154599); sqroot_func->SetSavedPoint(50,2.185048); sqroot_func->SetSavedPoint(51,2.215681); sqroot_func->SetSavedPoint(52,2.24649); sqroot_func->SetSavedPoint(53,2.277469); sqroot_func->SetSavedPoint(54,2.30861); sqroot_func->SetSavedPoint(55,2.339907); sqroot_func->SetSavedPoint(56,2.371354); sqroot_func->SetSavedPoint(57,2.402945); sqroot_func->SetSavedPoint(58,2.434674); sqroot_func->SetSavedPoint(59,2.466537); sqroot_func->SetSavedPoint(60,2.498527); sqroot_func->SetSavedPoint(61,2.53064); sqroot_func->SetSavedPoint(62,2.562871); sqroot_func->SetSavedPoint(63,2.595217); sqroot_func->SetSavedPoint(64,2.627672); sqroot_func->SetSavedPoint(65,2.660233); sqroot_func->SetSavedPoint(66,2.692896); sqroot_func->SetSavedPoint(67,2.725657); sqroot_func->SetSavedPoint(68,2.758513); sqroot_func->SetSavedPoint(69,2.791461); sqroot_func->SetSavedPoint(70,2.824497); sqroot_func->SetSavedPoint(71,2.857618); sqroot_func->SetSavedPoint(72,2.890821); sqroot_func->SetSavedPoint(73,2.924103); sqroot_func->SetSavedPoint(74,2.957463); sqroot_func->SetSavedPoint(75,2.990896); sqroot_func->SetSavedPoint(76,3.024401); sqroot_func->SetSavedPoint(77,3.057976); sqroot_func->SetSavedPoint(78,3.091618); sqroot_func->SetSavedPoint(79,3.125324); sqroot_func->SetSavedPoint(80,3.159094); sqroot_func->SetSavedPoint(81,3.192924); sqroot_func->SetSavedPoint(82,3.226813); sqroot_func->SetSavedPoint(83,3.26076); sqroot_func->SetSavedPoint(84,3.294762); sqroot_func->SetSavedPoint(85,3.328817); sqroot_func->SetSavedPoint(86,3.362925); sqroot_func->SetSavedPoint(87,3.397083); sqroot_func->SetSavedPoint(88,3.431289); sqroot_func->SetSavedPoint(89,3.465544); sqroot_func->SetSavedPoint(90,3.499844); sqroot_func->SetSavedPoint(91,3.53419); sqroot_func->SetSavedPoint(92,3.568578); sqroot_func->SetSavedPoint(93,3.603009); sqroot_func->SetSavedPoint(94,3.637481); sqroot_func->SetSavedPoint(95,3.671993); sqroot_func->SetSavedPoint(96,3.706544); sqroot_func->SetSavedPoint(97,3.741132); sqroot_func->SetSavedPoint(98,3.775757); sqroot_func->SetSavedPoint(99,3.810418); sqroot_func->SetSavedPoint(100,3.845113); sqroot_func->SetSavedPoint(101,0); sqroot_func->SetSavedPoint(102,150); sqroot_func->SetFillColor(19); sqroot_func->SetFillStyle(0); sqroot_func->SetLineColor(2); sqroot_func->SetLineWidth(2); sqroot_func->SetChisquare(18.19599); sqroot_func->SetNDF(2); sqroot_func->GetXaxis()->SetLabelFont(42); sqroot_func->GetXaxis()->SetLabelSize(0.035); sqroot_func->GetXaxis()->SetTitleSize(0.035); sqroot_func->GetXaxis()->SetTitleFont(42); sqroot_func->GetYaxis()->SetLabelFont(42); sqroot_func->GetYaxis()->SetLabelSize(0.035); sqroot_func->GetYaxis()->SetTitleSize(0.035); sqroot_func->GetYaxis()->SetTitleFont(42); sqroot_func->SetParameter(0,1.199006); sqroot_func->SetParError(0,0.003859546); sqroot_func->SetParLimits(0,0,0); sqroot_func->SetParameter(1,0.02435595); sqroot_func->SetParError(1,0.0005584079); sqroot_func->SetParLimits(1,0,0); h2_rate_1->GetListOfFunctions()->Add(sqroot_func); ci = TColor::GetColor("#000099"); h2_rate_1->SetLineColor(ci); h2_rate_1->SetMarkerColor(2); h2_rate_1->SetMarkerStyle(20); h2_rate_1->GetXaxis()->SetTitle("Rate (MHz)"); h2_rate_1->GetXaxis()->SetRange(1,20); h2_rate_1->GetXaxis()->SetNdivisions(505); h2_rate_1->GetXaxis()->SetLabelFont(42); h2_rate_1->GetXaxis()->SetLabelSize(0.05); h2_rate_1->GetXaxis()->SetTitleSize(0.05); h2_rate_1->GetXaxis()->SetTitleFont(42); h2_rate_1->GetYaxis()->SetTitle("Width (counts)"); h2_rate_1->GetYaxis()->SetLabelFont(42); h2_rate_1->GetYaxis()->SetLabelSize(0.05); h2_rate_1->GetYaxis()->SetTitleSize(0.05); h2_rate_1->GetYaxis()->SetTitleOffset(1.5); h2_rate_1->GetYaxis()->SetTitleFont(42); h2_rate_1->GetZaxis()->SetLabelFont(42); h2_rate_1->GetZaxis()->SetLabelSize(0.035); h2_rate_1->GetZaxis()->SetTitleSize(0.035); h2_rate_1->GetZaxis()->SetTitleFont(42); h2_rate_1->SetMarkerStyle(20); h2_rate_1->SetMarkerColor(2); h2_rate_1->Draw(""); TH1D *h2_rate_2 = new TH1D("h2_rate_2","",20,0,150); h2_rate_2->SetBinContent(1,1.197222); h2_rate_2->SetBinContent(2,1.212544); h2_rate_2->SetBinContent(3,1.207026); h2_rate_2->SetBinContent(4,1.257926); h2_rate_2->SetBinContent(5,1.296149); h2_rate_2->SetBinContent(6,1.34314); h2_rate_2->SetBinContent(7,1.465094); h2_rate_2->SetBinContent(8,1.57678); h2_rate_2->SetBinError(1,0.00860915); h2_rate_2->SetBinError(2,0.005940993); h2_rate_2->SetBinError(3,0.008472891); h2_rate_2->SetBinError(4,0.006305042); h2_rate_2->SetBinError(5,0.00890298); h2_rate_2->SetBinError(6,0.009387918); h2_rate_2->SetBinError(7,0.007388589); h2_rate_2->SetBinError(8,0.01151018); h2_rate_2->SetMinimum(1); h2_rate_2->SetMaximum(3); h2_rate_2->SetEntries(8); TF1 *sqroot_func = new TF1("*sqroot_func",0,150,2); //The original function : sqroot_func had originally been created by: //TF1 *sqroot_func = new TF1("sqroot_func",sqroot_func,0,150,2); sqroot_func->SetRange(0,150); sqroot_func->SetName("sqroot_func"); sqroot_func->SetTitle("sqroot_func"); sqroot_func->SetSavedPoint(0,1.179639); sqroot_func->SetSavedPoint(1,1.179931); sqroot_func->SetSavedPoint(2,1.180805); sqroot_func->SetSavedPoint(3,1.182261); sqroot_func->SetSavedPoint(4,1.184295); sqroot_func->SetSavedPoint(5,1.186907); sqroot_func->SetSavedPoint(6,1.19009); sqroot_func->SetSavedPoint(7,1.193841); sqroot_func->SetSavedPoint(8,1.198155); sqroot_func->SetSavedPoint(9,1.203026); sqroot_func->SetSavedPoint(10,1.208446); sqroot_func->SetSavedPoint(11,1.214409); sqroot_func->SetSavedPoint(12,1.220906); sqroot_func->SetSavedPoint(13,1.227929); sqroot_func->SetSavedPoint(14,1.235469); sqroot_func->SetSavedPoint(15,1.243517); sqroot_func->SetSavedPoint(16,1.252062); sqroot_func->SetSavedPoint(17,1.261095); sqroot_func->SetSavedPoint(18,1.270606); sqroot_func->SetSavedPoint(19,1.280583); sqroot_func->SetSavedPoint(20,1.291016); sqroot_func->SetSavedPoint(21,1.301894); sqroot_func->SetSavedPoint(22,1.313205); sqroot_func->SetSavedPoint(23,1.32494); sqroot_func->SetSavedPoint(24,1.337086); sqroot_func->SetSavedPoint(25,1.349632); sqroot_func->SetSavedPoint(26,1.362568); sqroot_func->SetSavedPoint(27,1.375882); sqroot_func->SetSavedPoint(28,1.389564); sqroot_func->SetSavedPoint(29,1.403603); sqroot_func->SetSavedPoint(30,1.417988); sqroot_func->SetSavedPoint(31,1.432708); sqroot_func->SetSavedPoint(32,1.447754); sqroot_func->SetSavedPoint(33,1.463116); sqroot_func->SetSavedPoint(34,1.478783); sqroot_func->SetSavedPoint(35,1.494746); sqroot_func->SetSavedPoint(36,1.510996); sqroot_func->SetSavedPoint(37,1.527524); sqroot_func->SetSavedPoint(38,1.54432); sqroot_func->SetSavedPoint(39,1.561376); sqroot_func->SetSavedPoint(40,1.578684); sqroot_func->SetSavedPoint(41,1.596234); sqroot_func->SetSavedPoint(42,1.614021); sqroot_func->SetSavedPoint(43,1.632035); sqroot_func->SetSavedPoint(44,1.650269); sqroot_func->SetSavedPoint(45,1.668716); sqroot_func->SetSavedPoint(46,1.687369); sqroot_func->SetSavedPoint(47,1.706222); sqroot_func->SetSavedPoint(48,1.725267); sqroot_func->SetSavedPoint(49,1.744499); sqroot_func->SetSavedPoint(50,1.763911); sqroot_func->SetSavedPoint(51,1.783497); sqroot_func->SetSavedPoint(52,1.803253); sqroot_func->SetSavedPoint(53,1.823171); sqroot_func->SetSavedPoint(54,1.843248); sqroot_func->SetSavedPoint(55,1.863477); sqroot_func->SetSavedPoint(56,1.883854); sqroot_func->SetSavedPoint(57,1.904375); sqroot_func->SetSavedPoint(58,1.925034); sqroot_func->SetSavedPoint(59,1.945827); sqroot_func->SetSavedPoint(60,1.966751); sqroot_func->SetSavedPoint(61,1.9878); sqroot_func->SetSavedPoint(62,2.008971); sqroot_func->SetSavedPoint(63,2.03026); sqroot_func->SetSavedPoint(64,2.051663); sqroot_func->SetSavedPoint(65,2.073178); sqroot_func->SetSavedPoint(66,2.0948); sqroot_func->SetSavedPoint(67,2.116526); sqroot_func->SetSavedPoint(68,2.138353); sqroot_func->SetSavedPoint(69,2.160277); sqroot_func->SetSavedPoint(70,2.182297); sqroot_func->SetSavedPoint(71,2.204409); sqroot_func->SetSavedPoint(72,2.22661); sqroot_func->SetSavedPoint(73,2.248899); sqroot_func->SetSavedPoint(74,2.271271); sqroot_func->SetSavedPoint(75,2.293725); sqroot_func->SetSavedPoint(76,2.316258); sqroot_func->SetSavedPoint(77,2.338868); sqroot_func->SetSavedPoint(78,2.361553); sqroot_func->SetSavedPoint(79,2.384311); sqroot_func->SetSavedPoint(80,2.40714); sqroot_func->SetSavedPoint(81,2.430037); sqroot_func->SetSavedPoint(82,2.453); sqroot_func->SetSavedPoint(83,2.476029); sqroot_func->SetSavedPoint(84,2.499121); sqroot_func->SetSavedPoint(85,2.522274); sqroot_func->SetSavedPoint(86,2.545487); sqroot_func->SetSavedPoint(87,2.568757); sqroot_func->SetSavedPoint(88,2.592085); sqroot_func->SetSavedPoint(89,2.615467); sqroot_func->SetSavedPoint(90,2.638903); sqroot_func->SetSavedPoint(91,2.662391); sqroot_func->SetSavedPoint(92,2.685929); sqroot_func->SetSavedPoint(93,2.709517); sqroot_func->SetSavedPoint(94,2.733153); sqroot_func->SetSavedPoint(95,2.756836); sqroot_func->SetSavedPoint(96,2.780565); sqroot_func->SetSavedPoint(97,2.804338); sqroot_func->SetSavedPoint(98,2.828155); sqroot_func->SetSavedPoint(99,2.852014); sqroot_func->SetSavedPoint(100,2.875914); sqroot_func->SetSavedPoint(101,0); sqroot_func->SetSavedPoint(102,150); sqroot_func->SetFillColor(19); sqroot_func->SetFillStyle(0); sqroot_func->SetLineColor(2); sqroot_func->SetLineWidth(2); sqroot_func->SetChisquare(55.59157); sqroot_func->SetNDF(6); sqroot_func->GetXaxis()->SetLabelFont(42); sqroot_func->GetXaxis()->SetLabelSize(0.035); sqroot_func->GetXaxis()->SetTitleSize(0.035); sqroot_func->GetXaxis()->SetTitleFont(42); sqroot_func->GetYaxis()->SetLabelFont(42); sqroot_func->GetYaxis()->SetLabelSize(0.035); sqroot_func->GetYaxis()->SetTitleSize(0.035); sqroot_func->GetYaxis()->SetTitleFont(42); sqroot_func->SetParameter(0,1.179639); sqroot_func->SetParError(0,0.00410575); sqroot_func->SetParLimits(0,0,0); sqroot_func->SetParameter(1,0.01748565); sqroot_func->SetParError(1,0.0002284971); sqroot_func->SetParLimits(1,0,0); h2_rate_2->GetListOfFunctions()->Add(sqroot_func); h2_rate_2->SetMarkerStyle(21); h2_rate_2->SetMarkerColor(4); h2_rate_2->Draw("same"); TH1D *h2_rate_3 = new TH1D("h2_rate_3","",20,0,150); h2_rate_3->SetBinContent(1,1.199601); h2_rate_3->SetBinContent(2,1.193964); h2_rate_3->SetBinContent(3,1.230911); h2_rate_3->SetBinContent(4,1.222279); h2_rate_3->SetBinContent(5,1.249017); h2_rate_3->SetBinContent(6,1.299691); h2_rate_3->SetBinContent(7,1.322204); h2_rate_3->SetBinContent(9,1.416378); h2_rate_3->SetBinContent(10,1.510113); h2_rate_3->SetBinContent(11,1.611048); h2_rate_3->SetBinContent(12,1.766366); h2_rate_3->SetBinError(1,0.008656201); h2_rate_3->SetBinError(2,0.008259725); h2_rate_3->SetBinError(3,0.008766172); h2_rate_3->SetBinError(4,0.008551053); h2_rate_3->SetBinError(5,0.008388716); h2_rate_3->SetBinError(6,0.009317507); h2_rate_3->SetBinError(7,0.009165232); h2_rate_3->SetBinError(9,0.01029839); h2_rate_3->SetBinError(10,0.01107577); h2_rate_3->SetBinError(11,0.01137324); h2_rate_3->SetBinError(12,0.01249682); h2_rate_3->SetMinimum(1); h2_rate_3->SetMaximum(3); h2_rate_3->SetEntries(11); TF1 *sqroot_func = new TF1("*sqroot_func",0,150,2); //The original function : sqroot_func had originally been created by: //TF1 *sqroot_func = new TF1("sqroot_func",sqroot_func,0,150,2); sqroot_func->SetRange(0,150); sqroot_func->SetName("sqroot_func"); sqroot_func->SetTitle("sqroot_func"); sqroot_func->SetSavedPoint(0,1.175265); sqroot_func->SetSavedPoint(1,1.175448); sqroot_func->SetSavedPoint(2,1.175996); sqroot_func->SetSavedPoint(3,1.17691); sqroot_func->SetSavedPoint(4,1.178187); sqroot_func->SetSavedPoint(5,1.179827); sqroot_func->SetSavedPoint(6,1.181829); sqroot_func->SetSavedPoint(7,1.18419); sqroot_func->SetSavedPoint(8,1.186909); sqroot_func->SetSavedPoint(9,1.189983); sqroot_func->SetSavedPoint(10,1.193409); sqroot_func->SetSavedPoint(11,1.197184); sqroot_func->SetSavedPoint(12,1.201305); sqroot_func->SetSavedPoint(13,1.205769); sqroot_func->SetSavedPoint(14,1.210571); sqroot_func->SetSavedPoint(15,1.215708); sqroot_func->SetSavedPoint(16,1.221175); sqroot_func->SetSavedPoint(17,1.226968); sqroot_func->SetSavedPoint(18,1.233082); sqroot_func->SetSavedPoint(19,1.239513); sqroot_func->SetSavedPoint(20,1.246256); sqroot_func->SetSavedPoint(21,1.253306); sqroot_func->SetSavedPoint(22,1.260656); sqroot_func->SetSavedPoint(23,1.268304); sqroot_func->SetSavedPoint(24,1.276242); sqroot_func->SetSavedPoint(25,1.284466); sqroot_func->SetSavedPoint(26,1.292969); sqroot_func->SetSavedPoint(27,1.301748); sqroot_func->SetSavedPoint(28,1.310795); sqroot_func->SetSavedPoint(29,1.320106); sqroot_func->SetSavedPoint(30,1.329676); sqroot_func->SetSavedPoint(31,1.339497); sqroot_func->SetSavedPoint(32,1.349566); sqroot_func->SetSavedPoint(33,1.359876); sqroot_func->SetSavedPoint(34,1.370422); sqroot_func->SetSavedPoint(35,1.381199); sqroot_func->SetSavedPoint(36,1.392201); sqroot_func->SetSavedPoint(37,1.403423); sqroot_func->SetSavedPoint(38,1.41486); sqroot_func->SetSavedPoint(39,1.426507); sqroot_func->SetSavedPoint(40,1.438358); sqroot_func->SetSavedPoint(41,1.450408); sqroot_func->SetSavedPoint(42,1.462653); sqroot_func->SetSavedPoint(43,1.475088); sqroot_func->SetSavedPoint(44,1.487708); sqroot_func->SetSavedPoint(45,1.500508); sqroot_func->SetSavedPoint(46,1.513483); sqroot_func->SetSavedPoint(47,1.52663); sqroot_func->SetSavedPoint(48,1.539944); sqroot_func->SetSavedPoint(49,1.553421); sqroot_func->SetSavedPoint(50,1.567055); sqroot_func->SetSavedPoint(51,1.580844); sqroot_func->SetSavedPoint(52,1.594783); sqroot_func->SetSavedPoint(53,1.608869); sqroot_func->SetSavedPoint(54,1.623097); sqroot_func->SetSavedPoint(55,1.637464); sqroot_func->SetSavedPoint(56,1.651966); sqroot_func->SetSavedPoint(57,1.6666); sqroot_func->SetSavedPoint(58,1.681362); sqroot_func->SetSavedPoint(59,1.696249); sqroot_func->SetSavedPoint(60,1.711258); sqroot_func->SetSavedPoint(61,1.726385); sqroot_func->SetSavedPoint(62,1.741628); sqroot_func->SetSavedPoint(63,1.756983); sqroot_func->SetSavedPoint(64,1.772447); sqroot_func->SetSavedPoint(65,1.788018); sqroot_func->SetSavedPoint(66,1.803693); sqroot_func->SetSavedPoint(67,1.819469); sqroot_func->SetSavedPoint(68,1.835343); sqroot_func->SetSavedPoint(69,1.851314); sqroot_func->SetSavedPoint(70,1.867378); sqroot_func->SetSavedPoint(71,1.883533); sqroot_func->SetSavedPoint(72,1.899777); sqroot_func->SetSavedPoint(73,1.916108); sqroot_func->SetSavedPoint(74,1.932523); sqroot_func->SetSavedPoint(75,1.94902); sqroot_func->SetSavedPoint(76,1.965598); sqroot_func->SetSavedPoint(77,1.982253); sqroot_func->SetSavedPoint(78,1.998985); sqroot_func->SetSavedPoint(79,2.015791); sqroot_func->SetSavedPoint(80,2.03267); sqroot_func->SetSavedPoint(81,2.049619); sqroot_func->SetSavedPoint(82,2.066638); sqroot_func->SetSavedPoint(83,2.083723); sqroot_func->SetSavedPoint(84,2.100875); sqroot_func->SetSavedPoint(85,2.11809); sqroot_func->SetSavedPoint(86,2.135367); sqroot_func->SetSavedPoint(87,2.152706); sqroot_func->SetSavedPoint(88,2.170104); sqroot_func->SetSavedPoint(89,2.187561); sqroot_func->SetSavedPoint(90,2.205074); sqroot_func->SetSavedPoint(91,2.222642); sqroot_func->SetSavedPoint(92,2.240264); sqroot_func->SetSavedPoint(93,2.257939); sqroot_func->SetSavedPoint(94,2.275666); sqroot_func->SetSavedPoint(95,2.293443); sqroot_func->SetSavedPoint(96,2.31127); sqroot_func->SetSavedPoint(97,2.329144); sqroot_func->SetSavedPoint(98,2.347066); sqroot_func->SetSavedPoint(99,2.365033); sqroot_func->SetSavedPoint(100,2.383045); sqroot_func->SetSavedPoint(101,0); sqroot_func->SetSavedPoint(102,150); sqroot_func->SetFillColor(19); sqroot_func->SetFillStyle(0); sqroot_func->SetLineColor(2); sqroot_func->SetLineWidth(2); sqroot_func->SetChisquare(120.9195); sqroot_func->SetNDF(9); sqroot_func->GetXaxis()->SetLabelFont(42); sqroot_func->GetXaxis()->SetLabelSize(0.035); sqroot_func->GetXaxis()->SetTitleSize(0.035); sqroot_func->GetXaxis()->SetTitleFont(42); sqroot_func->GetYaxis()->SetLabelFont(42); sqroot_func->GetYaxis()->SetLabelSize(0.035); sqroot_func->GetYaxis()->SetTitleSize(0.035); sqroot_func->GetYaxis()->SetTitleFont(42); sqroot_func->SetParameter(0,1.175265); sqroot_func->SetParError(0,0.00405126); sqroot_func->SetParLimits(0,0,0); sqroot_func->SetParameter(1,0.01382052); sqroot_func->SetParError(1,0.0001347588); sqroot_func->SetParLimits(1,0,0); h2_rate_3->GetListOfFunctions()->Add(sqroot_func); h2_rate_3->SetMarkerStyle(22); h2_rate_3->SetMarkerColor(1); h2_rate_3->Draw("same"); TH1D *h2_rate_4 = new TH1D("h2_rate_4","",20,0,150); h2_rate_4->SetBinContent(1,1.199894); h2_rate_4->SetBinContent(3,1.207158); h2_rate_4->SetBinContent(4,1.217556); h2_rate_4->SetBinContent(5,1.226875); h2_rate_4->SetBinContent(7,1.277582); h2_rate_4->SetBinContent(8,1.338804); h2_rate_4->SetBinContent(10,1.381932); h2_rate_4->SetBinContent(11,1.464386); h2_rate_4->SetBinContent(13,1.580163); h2_rate_4->SetBinContent(14,1.770427); h2_rate_4->SetBinContent(15,1.909945); h2_rate_4->SetBinError(1,0.008603803); h2_rate_4->SetBinError(3,0.008334468); h2_rate_4->SetBinError(4,0.008691162); h2_rate_4->SetBinError(5,0.008653266); h2_rate_4->SetBinError(7,0.008867018); h2_rate_4->SetBinError(8,0.009636698); h2_rate_4->SetBinError(10,0.0100516); h2_rate_4->SetBinError(11,0.009991336); h2_rate_4->SetBinError(13,0.01093789); h2_rate_4->SetBinError(14,0.01292918); h2_rate_4->SetBinError(15,0.01315615); h2_rate_4->SetMinimum(1); h2_rate_4->SetMaximum(3); h2_rate_4->SetEntries(11); TF1 *sqroot_func = new TF1("*sqroot_func",0,150,2); //The original function : sqroot_func had originally been created by: //TF1 *sqroot_func = new TF1("sqroot_func",sqroot_func,0,150,2); sqroot_func->SetRange(0,150); sqroot_func->SetName("sqroot_func"); sqroot_func->SetTitle("sqroot_func"); sqroot_func->SetSavedPoint(0,1.161365); sqroot_func->SetSavedPoint(1,1.161512); sqroot_func->SetSavedPoint(2,1.161951); sqroot_func->SetSavedPoint(3,1.162682); sqroot_func->SetSavedPoint(4,1.163704); sqroot_func->SetSavedPoint(5,1.165018); sqroot_func->SetSavedPoint(6,1.166621); sqroot_func->SetSavedPoint(7,1.168513); sqroot_func->SetSavedPoint(8,1.170692); sqroot_func->SetSavedPoint(9,1.173157); sqroot_func->SetSavedPoint(10,1.175906); sqroot_func->SetSavedPoint(11,1.178937); sqroot_func->SetSavedPoint(12,1.182247); sqroot_func->SetSavedPoint(13,1.185835); sqroot_func->SetSavedPoint(14,1.189698); sqroot_func->SetSavedPoint(15,1.193833); sqroot_func->SetSavedPoint(16,1.198237); sqroot_func->SetSavedPoint(17,1.202908); sqroot_func->SetSavedPoint(18,1.207842); sqroot_func->SetSavedPoint(19,1.213036); sqroot_func->SetSavedPoint(20,1.218487); sqroot_func->SetSavedPoint(21,1.224191); sqroot_func->SetSavedPoint(22,1.230146); sqroot_func->SetSavedPoint(23,1.236346); sqroot_func->SetSavedPoint(24,1.242789); sqroot_func->SetSavedPoint(25,1.249471); sqroot_func->SetSavedPoint(26,1.256388); sqroot_func->SetSavedPoint(27,1.263535); sqroot_func->SetSavedPoint(28,1.270911); sqroot_func->SetSavedPoint(29,1.278509); sqroot_func->SetSavedPoint(30,1.286327); sqroot_func->SetSavedPoint(31,1.29436); sqroot_func->SetSavedPoint(32,1.302604); sqroot_func->SetSavedPoint(33,1.311056); sqroot_func->SetSavedPoint(34,1.319712); sqroot_func->SetSavedPoint(35,1.328566); sqroot_func->SetSavedPoint(36,1.337616); sqroot_func->SetSavedPoint(37,1.346858); sqroot_func->SetSavedPoint(38,1.356288); sqroot_func->SetSavedPoint(39,1.365901); sqroot_func->SetSavedPoint(40,1.375694); sqroot_func->SetSavedPoint(41,1.385663); sqroot_func->SetSavedPoint(42,1.395804); sqroot_func->SetSavedPoint(43,1.406114); sqroot_func->SetSavedPoint(44,1.416589); sqroot_func->SetSavedPoint(45,1.427225); sqroot_func->SetSavedPoint(46,1.438018); sqroot_func->SetSavedPoint(47,1.448966); sqroot_func->SetSavedPoint(48,1.460065); sqroot_func->SetSavedPoint(49,1.47131); sqroot_func->SetSavedPoint(50,1.4827); sqroot_func->SetSavedPoint(51,1.49423); sqroot_func->SetSavedPoint(52,1.505898); sqroot_func->SetSavedPoint(53,1.5177); sqroot_func->SetSavedPoint(54,1.529633); sqroot_func->SetSavedPoint(55,1.541695); sqroot_func->SetSavedPoint(56,1.553881); sqroot_func->SetSavedPoint(57,1.566189); sqroot_func->SetSavedPoint(58,1.578617); sqroot_func->SetSavedPoint(59,1.591161); sqroot_func->SetSavedPoint(60,1.603819); sqroot_func->SetSavedPoint(61,1.616589); sqroot_func->SetSavedPoint(62,1.629466); sqroot_func->SetSavedPoint(63,1.64245); sqroot_func->SetSavedPoint(64,1.655537); sqroot_func->SetSavedPoint(65,1.668725); sqroot_func->SetSavedPoint(66,1.682012); sqroot_func->SetSavedPoint(67,1.695395); sqroot_func->SetSavedPoint(68,1.708873); sqroot_func->SetSavedPoint(69,1.722442); sqroot_func->SetSavedPoint(70,1.7361); sqroot_func->SetSavedPoint(71,1.749847); sqroot_func->SetSavedPoint(72,1.763679); sqroot_func->SetSavedPoint(73,1.777594); sqroot_func->SetSavedPoint(74,1.791591); sqroot_func->SetSavedPoint(75,1.805668); sqroot_func->SetSavedPoint(76,1.819823); sqroot_func->SetSavedPoint(77,1.834053); sqroot_func->SetSavedPoint(78,1.848359); sqroot_func->SetSavedPoint(79,1.862736); sqroot_func->SetSavedPoint(80,1.877185); sqroot_func->SetSavedPoint(81,1.891703); sqroot_func->SetSavedPoint(82,1.906288); sqroot_func->SetSavedPoint(83,1.92094); sqroot_func->SetSavedPoint(84,1.935656); sqroot_func->SetSavedPoint(85,1.950436); sqroot_func->SetSavedPoint(86,1.965277); sqroot_func->SetSavedPoint(87,1.980179); sqroot_func->SetSavedPoint(88,1.99514); sqroot_func->SetSavedPoint(89,2.010159); sqroot_func->SetSavedPoint(90,2.025234); sqroot_func->SetSavedPoint(91,2.040364); sqroot_func->SetSavedPoint(92,2.055548); sqroot_func->SetSavedPoint(93,2.070785); sqroot_func->SetSavedPoint(94,2.086073); sqroot_func->SetSavedPoint(95,2.101412); sqroot_func->SetSavedPoint(96,2.116801); sqroot_func->SetSavedPoint(97,2.132238); sqroot_func->SetSavedPoint(98,2.147722); sqroot_func->SetSavedPoint(99,2.163252); sqroot_func->SetSavedPoint(100,2.178828); sqroot_func->SetSavedPoint(101,0); sqroot_func->SetSavedPoint(102,150); sqroot_func->SetFillColor(19); sqroot_func->SetFillStyle(0); sqroot_func->SetLineColor(2); sqroot_func->SetLineWidth(2); sqroot_func->SetChisquare(282.6319); sqroot_func->SetNDF(9); sqroot_func->GetXaxis()->SetLabelFont(42); sqroot_func->GetXaxis()->SetLabelSize(0.035); sqroot_func->GetXaxis()->SetTitleSize(0.035); sqroot_func->GetXaxis()->SetTitleFont(42); sqroot_func->GetYaxis()->SetLabelFont(42); sqroot_func->GetYaxis()->SetLabelSize(0.035); sqroot_func->GetYaxis()->SetTitleSize(0.035); sqroot_func->GetYaxis()->SetTitleFont(42); sqroot_func->SetParameter(0,1.161365); sqroot_func->SetParError(0,0.004302337); sqroot_func->SetParLimits(0,0,0); sqroot_func->SetParameter(1,0.01229005); sqroot_func->SetParError(1,9.945748e-05); sqroot_func->SetParLimits(1,0,0); h2_rate_4->GetListOfFunctions()->Add(sqroot_func); h2_rate_4->SetMarkerStyle(23); h2_rate_4->SetMarkerColor(3); h2_rate_4->Draw("same"); // add Legend sprintf (string,"Layer Dependence\n"); printf("string=%s",string); TLegend *leg = new TLegend(0.2,0.65,0.5,0.9,string); leg->AddEntry(h2_rate_1,"Layer 1","p"); leg->AddEntry(h2_rate_2,"Layer 2","p"); leg->AddEntry(h2_rate_3,"Layer 3","p"); leg->AddEntry(h2_rate_4,"Layer 4","p"); leg->Draw(); sprintf (string,"pedestal_width_amplitude.pdf"); c4->SaveAs(string); }