{ //=========Macro generated from canvas: c1/c1 //========= (Wed Jul 11 17:49:38 2012) by ROOT version5.34/00 TCanvas *c1 = new TCanvas("c1", "c1",10,32,700,500); gStyle->SetOptTitle(0); c1->Range(-21.62162,-1.960402,113.5135,0.1882641); 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,-8880.404); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(7,-28374.5); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(8,-50057.26); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(9,-68739.27); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(10,-80094.48); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(11,-86505.64); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(12,-83751.43); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(13,-78467.14); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(14,-70611.27); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(15,-58774.63); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(16,-49763.38); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(17,-39618.21); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(18,-31384.32); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(19,-24680.03); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(20,-19305.23); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(21,-15053.25); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(22,-12159.57); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(23,-9800.466); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(24,-7328.747); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(25,-4133.77); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(26,-1305.352); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(27,-15.42125); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(28,-9.270448); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(29,-3.782058); rebinnedtimeEnProfHighEMBASlot11__1->SetBinContent(30,-2.785334); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(6,195.7654); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(7,221.4271); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(8,244.0653); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(9,262.294); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(10,271.662); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(11,277.1426); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(12,270.4553); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(13,261.4496); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(14,249.1985); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(15,228.2273); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(16,210.9562); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(17,188.7339); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(18,168.7772); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(19,150.3841); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(20,133.3423); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(21,117.7523); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(22,106.0231); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(23,95.50883); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(24,83.26086); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(25,61.92897); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(26,34.5163); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(27,3.628628); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(28,3.093052); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(29,1.711432); rebinnedtimeEnProfHighEMBASlot11__1->SetBinError(30,1.991341); 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(42.64192); 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.6071371); energyShapeA->SetParError(0,0.00157816); energyShapeA->SetParLimits(0,0,0); energyShapeA->SetParameter(1,-0.1549295); energyShapeA->SetParError(1,0.0002602829); energyShapeA->SetParLimits(1,0,0); energyShapeA->SetParameter(2,0.006638006); energyShapeA->SetParError(2,1.780634e-05); energyShapeA->SetParLimits(2,0,0); energyShapeA->SetParameter(3,-0.0001134239); energyShapeA->SetParError(3,1.046579e-06); energyShapeA->SetParLimits(3,0,0); energyShapeA->SetParameter(4,4.521054e-07); energyShapeA->SetParError(4,5.362651e-08); energyShapeA->SetParLimits(4,0,0); energyShapeA->SetParameter(5,3.08582e-09); energyShapeA->SetParError(5,1.644734e-09); energyShapeA->SetParLimits(5,0,0); rebinnedtimeEnProfHighEMBASlot11__1->GetListOfFunctions()->Add(energyShapeA); TF1 *lb = new TF1("lb","[0]",0,5.5); lb->SetFillColor(19); lb->SetFillStyle(0); lb->SetMarkerStyle(20); lb->SetMarkerSize(1.2); ci = TColor::GetColor("#00ff00"); lb->SetLineColor(ci); lb->SetLineWidth(3); lb->SetLineStyle(3); lb->GetXaxis()->SetLabelFont(42); lb->GetXaxis()->SetLabelSize(0.05); lb->GetXaxis()->SetTitleSize(0.05); lb->GetXaxis()->SetTitleFont(42); lb->GetYaxis()->SetLabelFont(42); lb->GetYaxis()->SetLabelSize(0.05); lb->GetYaxis()->SetTitleSize(0.05); lb->GetYaxis()->SetTitleFont(42); lb->SetParameter(0,-0.06261737); lb->SetParError(0,0); lb->SetParLimits(0,0,0); rebinnedtimeEnProfHighEMBASlot11__1->GetListOfFunctions()->Add(lb); 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.6860005); 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 = -0.3893"); text = ptstats->AddText("RMS = 4.026"); text = ptstats->AddText("RMS y = 0.482"); 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(""); c1->Modified(); c1->cd(); c1->SetSelected(c1); }