{ //=========Macro generated from canvas: c1/c1 //========= (Fri Jul 6 16:32:52 2012) by ROOT version5.34/00 TCanvas *c1 = new TCanvas("c1", "c1",18,38,700,500); c1->Range(-21.62162,-1.225651,113.5135,0.4665255); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetTickx(1); c1->SetTicky(1); c1->SetLeftMargin(0.16); c1->SetTopMargin(0.05); c1->SetBottomMargin(0.16); c1->SetFrameBorderMode(0); c1->SetFrameBorderMode(0); Double_t xAxis[41] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100}; TProfile *rebinnedtimeEnProfHighEMBASlot11__1 = new TProfile("rebinnedtimeEnProfHighEMBASlot11","Time Energy profile for High Gain for EMBASlot11",40, xAxis rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(6,144350); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(7,189191); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(8,218730); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(9,230455); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(10,223356); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(11,210160); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(12,182217); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(13,156911); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(14,130612); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(15,103353); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(16,83579); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(17,64366); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(18,49946); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(19,38385); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(20,29584); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(21,22620); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(22,18147); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(23,14398); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(24,10590); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(25,6136); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(26,1921); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(27,21); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(28,10); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(29,5); rebinnedtimeEnProfHighEMBASlot11__1->SetBinEntries(30,2); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(6,45776.11); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(7,44095.17); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(8,34401.47); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(9,21030.91); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(10,7230.198); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(11,-4036.716); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(12,-12116.34); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(13,-16996.37); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(14,-19397.18); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(15,-18259.49); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(16,-17051.94); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(17,-14458.07); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(18,-11807.42); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(19,-9689.656); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(20,-7713.635); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(21,-6175.128); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(22,-5021.775); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(23,-4189.803); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(24,-3172.607); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(25,-1836.316); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(26,-602.8651); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(27,-2.501451); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(28,-3.769867); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(29,-0.9073258); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(30,-1.362034); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(6,203.9189); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(7,202.1904); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(8,193.2853); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(9,181.7136); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(10,168.9699); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(11,160.2943); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(12,147.7456); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(13,139.3903); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(14,130.4914); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(15,119.0463); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(16,110.3466); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(17,98.91989); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(18,88.73053); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(19,79.33291); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(20,70.1824); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(21,62.55335); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(22,56.22011); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(23,51.10227); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(24,44.45312); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(25,33.8695); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(26,19.45959); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(27,1.548143); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(28,1.766166); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(29,0.6894179); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(30,1.053321); rebinnedtimeEnProfHighEMBASlot11__1->SetEntries(2129045); rebinnedtimeEnProfHighEMBASlot11__1->SetDirectory(0); TF1 *energyShapeA = new TF1("energyShapeA","pol5",5.5,28.5); energyShapeA->SetFillColor(19); energyShapeA->SetFillStyle(0); energyShapeA->SetMarkerStyle(20); energyShapeA->SetMarkerSize(1.2); Int_t ci; // for color index setting ci = TColor::GetColor("#ff0000"); energyShapeA->SetLineColor(ci); energyShapeA->SetLineWidth(3); energyShapeA->SetLineStyle(3); energyShapeA->SetChisquare(74.78328); energyShapeA->SetNDF(15); energyShapeA->GetXaxis()->SetLabelFont(42); energyShapeA->GetXaxis()->SetLabelSize(0.05); energyShapeA->GetXaxis()->SetTitleSize(0.05); energyShapeA->GetXaxis()->SetTitleFont(42); energyShapeA->GetYaxis()->SetLabelFont(42); energyShapeA->GetYaxis()->SetLabelSize(0.05); energyShapeA->GetYaxis()->SetTitleSize(0.05); energyShapeA->GetYaxis()->SetTitleFont(42); energyShapeA->SetParameter(0,0.9278378); energyShapeA->SetParError(0,0.001246708); energyShapeA->SetParLimits(0,0,0); energyShapeA->SetParameter(1,-0.1394873); energyShapeA->SetParError(1,0.000201737); energyShapeA->SetParLimits(1,0,0); energyShapeA->SetParameter(2,0.005719341); energyShapeA->SetParError(2,1.360795e-05); energyShapeA->SetParLimits(2,0,0); energyShapeA->SetParameter(3,-0.0001238217); energyShapeA->SetParError(3,7.963925e-07); energyShapeA->SetParLimits(3,0,0); energyShapeA->SetParameter(4,2.878564e-06); energyShapeA->SetParError(4,4.065825e-08); energyShapeA->SetParLimits(4,0,0); energyShapeA->SetParameter(5,-5.175075e-08); energyShapeA->SetParError(5,1.253373e-09); energyShapeA->SetParLimits(5,0,0); rebinnedtimeEnProfHighEMBASlot11__1->GetListOfFunctions()->Add(energyShapeA); TF1 *la = new TF1("la","[0]",28.5,300); la->SetFillColor(19); la->SetFillStyle(0); la->SetMarkerStyle(20); la->SetMarkerSize(1.2); ci = TColor::GetColor("#00ff00"); la->SetLineColor(ci); la->SetLineWidth(3); la->SetLineStyle(3); la->GetXaxis()->SetLabelFont(42); la->GetXaxis()->SetLabelSize(0.05); la->GetXaxis()->SetTitleSize(0.05); la->GetXaxis()->SetTitleFont(42); la->GetYaxis()->SetLabelFont(42); la->GetYaxis()->SetLabelSize(0.05); la->GetYaxis()->SetTitleSize(0.05); la->GetYaxis()->SetTitleFont(42); la->SetParameter(0,-0.3423101); la->SetParError(0,0); la->SetParLimits(0,0,0); rebinnedtimeEnProfHighEMBASlot11__1->GetListOfFunctions()->Add(la); TPaveStats *ptstats = new TPaveStats(0.78,0.795,0.98,0.995,"brNDC"); ptstats->SetName("stats"); ptstats->SetBorderSize(1); ptstats->SetFillColor(0); ptstats->SetFillStyle(1); ptstats->SetTextAlign(12); TText *text = ptstats->AddText("Entries = 2129045"); text = ptstats->AddText("Mean = 10.99"); text = ptstats->AddText("Mean y = 5.219e-09"); text = ptstats->AddText("RMS = 4.026"); text = ptstats->AddText("RMS y = 0.396"); ptstats->SetOptStat(1110); ptstats->SetOptFit(0); ptstats->Draw(); rebinnedtimeEnProfHighEMBASlot11__1->GetListOfFunctions()->Add(ptstats); ptstats->SetParent(rebinnedtimeEnProfHighEMBASlot11__1); ci = TColor::GetColor("#ff00ff"); rebinnedtimeEnProfHighEMBASlot11__1->SetLineColor(ci); rebinnedtimeEnProfHighEMBASlot11__1->SetLineWidth(2); ci = TColor::GetColor("#ff00ff"); rebinnedtimeEnProfHighEMBASlot11__1->SetMarkerColor(ci); rebinnedtimeEnProfHighEMBASlot11__1->SetMarkerStyle(20); rebinnedtimeEnProfHighEMBASlot11__1->SetMarkerSize(1.2); rebinnedtimeEnProfHighEMBASlot11__1->GetXaxis()->SetTitle("Energy [Gev]"); rebinnedtimeEnProfHighEMBASlot11__1->GetXaxis()->SetLabelFont(42); rebinnedtimeEnProfHighEMBASlot11__1->GetXaxis()->SetLabelSize(0.05); rebinnedtimeEnProfHighEMBASlot11__1->GetXaxis()->SetTitleSize(0.05); rebinnedtimeEnProfHighEMBASlot11__1->GetXaxis()->SetTitleFont(42); rebinnedtimeEnProfHighEMBASlot11__1->GetYaxis()->SetTitle("Time [ns]"); rebinnedtimeEnProfHighEMBASlot11__1->GetYaxis()->SetLabelFont(42); rebinnedtimeEnProfHighEMBASlot11__1->GetYaxis()->SetLabelSize(0.05); rebinnedtimeEnProfHighEMBASlot11__1->GetYaxis()->SetTitleSize(0.05); rebinnedtimeEnProfHighEMBASlot11__1->GetYaxis()->SetTitleFont(42); rebinnedtimeEnProfHighEMBASlot11__1->GetZaxis()->SetLabelFont(42); rebinnedtimeEnProfHighEMBASlot11__1->GetZaxis()->SetLabelSize(0.05); rebinnedtimeEnProfHighEMBASlot11__1->GetZaxis()->SetTitleSize(0.05); rebinnedtimeEnProfHighEMBASlot11__1->GetZaxis()->SetTitleFont(42); rebinnedtimeEnProfHighEMBASlot11__1->Draw(""); TPaveText *pt = new TPaveText(0.5,0.9393038,1.2,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); text = pt->AddText("Time Energy profile for High Gain for EMBASlot11"); pt->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }