{ //=========Macro generated from canvas: c1/c1 //========= (Wed Jul 18 13:19:34 2012) by ROOT version5.34/00 TCanvas *c1 = new TCanvas("c1", "c1",10,32,700,500); gStyle->SetOptTitle(0); c1->Range(-56.03884,0.1392335,295.3398,0.5336153); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetTickx(1); c1->SetTicky(1); c1->SetLeftMargin(0.1594828); c1->SetTopMargin(0.04872881); c1->SetBottomMargin(0.161017); c1->SetFrameBorderMode(0); c1->SetFrameBorderMode(0); Double_t xAxis53[23] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 100, 120, 140, 160, 210, 260}; TH1D *energyGraphEmec = new TH1D("energyGraphEmec","MEDIUM gain, All EMEC",22, xAxis53); energyGraphEmec->SetBinContent(6,0.2751403); energyGraphEmec->SetBinContent(7,0.3322967); energyGraphEmec->SetBinContent(8,0.3904024); energyGraphEmec->SetBinContent(9,0.3708937); energyGraphEmec->SetBinContent(10,0.3462916); energyGraphEmec->SetBinContent(11,0.3247178); energyGraphEmec->SetBinContent(12,0.3073995); energyGraphEmec->SetBinContent(13,0.3055357); energyGraphEmec->SetBinContent(14,0.2977093); energyGraphEmec->SetBinContent(15,0.2959239); energyGraphEmec->SetBinContent(16,0.2891645); energyGraphEmec->SetBinContent(17,0.284355); energyGraphEmec->SetBinContent(18,0.2874418); energyGraphEmec->SetBinContent(19,0.2832262); energyGraphEmec->SetBinContent(20,0.2792096); energyGraphEmec->SetBinContent(21,0.2697095); energyGraphEmec->SetBinContent(22,0.270935); energyGraphEmec->SetBinError(6,0.01660789); energyGraphEmec->SetBinError(7,0.00189958); energyGraphEmec->SetBinError(8,0.002092018); energyGraphEmec->SetBinError(9,0.001798068); energyGraphEmec->SetBinError(10,0.00161997); energyGraphEmec->SetBinError(11,0.00151481); energyGraphEmec->SetBinError(12,0.001581865); energyGraphEmec->SetBinError(13,0.001751272); energyGraphEmec->SetBinError(14,0.00200639); energyGraphEmec->SetBinError(15,0.002331); energyGraphEmec->SetBinError(16,0.002470837); energyGraphEmec->SetBinError(17,0.001911778); energyGraphEmec->SetBinError(18,0.003747481); energyGraphEmec->SetBinError(19,0.006366445); energyGraphEmec->SetBinError(20,0.009273417); energyGraphEmec->SetBinError(21,0.008882607); energyGraphEmec->SetBinError(22,0.02587466); energyGraphEmec->SetMinimum(0.2027356); energyGraphEmec->SetMaximum(0.5143975); energyGraphEmec->SetEntries(17); energyGraphEmec->SetDirectory(0); TPaveStats *ptstats = new TPaveStats(0.625,0.7139831,0.8505747,0.9025424,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetFillStyle(1); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("energyGraphEmec"); text->SetTextSize(0.02891243); text = ptstats->AddText("Entries = 17 "); text = ptstats->AddText("Mean = 83"); text = ptstats->AddText("RMS = 54.47"); text = ptstats->AddText("p0 = 8.275 #pm 0.099 "); text = ptstats->AddText("p1 = 0.2796 #pm 0.0012 "); ptstats->SetOptStat(1111); ptstats->SetOptFit(11); ptstats->Draw(); energyGraphEmec->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(energyGraphEmec); TF1 *PrevFitTMP = new TF1("PrevFitTMP","sqrt(sq([0]/x)+sq([1]))",0,260); PrevFitTMP->SetFillColor(19); PrevFitTMP->SetFillStyle(0); PrevFitTMP->SetMarkerStyle(20); PrevFitTMP->SetMarkerSize(1.2); PrevFitTMP->SetLineColor(2); PrevFitTMP->SetLineWidth(3); PrevFitTMP->SetChisquare(1406.553); PrevFitTMP->SetNDF(15); PrevFitTMP->GetXaxis()->SetLabelFont(42); PrevFitTMP->GetXaxis()->SetLabelSize(0.05); PrevFitTMP->GetXaxis()->SetTitleSize(0.05); PrevFitTMP->GetXaxis()->SetTitleFont(42); PrevFitTMP->GetYaxis()->SetLabelFont(42); PrevFitTMP->GetYaxis()->SetLabelSize(0.05); PrevFitTMP->GetYaxis()->SetTitleSize(0.05); PrevFitTMP->GetYaxis()->SetTitleFont(42); PrevFitTMP->SetParameter(0,8.27499); PrevFitTMP->SetParError(0,0.09881348); PrevFitTMP->SetParLimits(0,0,0); PrevFitTMP->SetParameter(1,0.2795688); PrevFitTMP->SetParError(1,0.001210877); PrevFitTMP->SetParLimits(1,0,0); energyGraphEmec->GetListOfFunctions()->Add(PrevFitTMP); energyGraphEmec->SetLineWidth(2); energyGraphEmec->SetMarkerStyle(20); energyGraphEmec->SetMarkerSize(1.2); energyGraphEmec->GetXaxis()->SetTitle("Cell Energy [GeV]"); energyGraphEmec->GetXaxis()->SetLabelFont(42); energyGraphEmec->GetXaxis()->SetLabelSize(0.05); energyGraphEmec->GetXaxis()->SetTitleSize(0.05); energyGraphEmec->GetXaxis()->SetTitleFont(42); energyGraphEmec->GetYaxis()->SetTitle("Timing Resolution [ns]"); energyGraphEmec->GetYaxis()->SetLabelFont(42); energyGraphEmec->GetYaxis()->SetLabelSize(0.05); energyGraphEmec->GetYaxis()->SetTitleSize(0.05); energyGraphEmec->GetYaxis()->SetTitleFont(42); energyGraphEmec->GetZaxis()->SetLabelFont(42); energyGraphEmec->GetZaxis()->SetLabelSize(0.05); energyGraphEmec->GetZaxis()->SetTitleSize(0.05); energyGraphEmec->GetZaxis()->SetTitleFont(42); energyGraphEmec->Draw(""); c1->Modified(); c1->cd(); c1->SetSelected(c1); }