{ /* Macro to make "LEP style" plots. July 10th 2002 F. Sandrelli (Univ. Pisa) */ gStyle->SetLineWidth(2); Int_t nov=18; // Here I define the central values for each variable Float_t Values[nov][4]={ { 0.0020, 0.952, -0.061, -0.959}, /* Nominal */ {-0.0020, 0.952, -0.054, -0.960}, /* GExp */ { 0.0011, 0.953, -0.071, -0.959}, /* Tau Free GG */ { 0.0010, 0.953, -0.059, -0.960}, /* Tau Free GExp */ { 0.0019, 0.951, -0.102, -0.955}, /* Ks only */ { 0.0140, 0.952, -0.070, -0.961}, /* Kl only */ { 0.1720, 0.977, -0.069, -0.968}, /* Cat1 lepton */ {-0.0330, 0.962, -0.058, -0.948}, /* Cat2 kaon */ {-0.0800, 0.928, -0.050, -1.015}, /* Cat3 NT1 */ {-0.0400, 0.925, -0.050, -0.939}, /* Cat4 NT2 */ { 0.0190, 0.938, -0.122, -0.956}, /* Shape Only */ { 0.0160, 0.967, -0.087, -0.959}, /* Moriond tagger */ {-0.0530, 0.974, +0.084, -0.925}, /* Run 1 */ {-0.0700, 0.904, -0.121, -0.963}, /* Run 2a */ { 0.0590, 0.953, -0.098, -0.972}, /* Run 2b */ {-0.0010, 0.955, -0.055, -0.963}, /* D(*)pi(rho,a1) */ {-0.0310, 0.930, +0.052, -0.944}, /* J/psi K* */ { 0.0030, 1.018, -0.060, -0.959}}; /* No time constr */ // Here I define the errors for each variable Float_t Errors[nov][4]={ { 0.046, 0.018, 0.045, 0.016}, /* Nominal */ { 0.048, 0.018, 0.045, 0.016}, /* GExp */ { 0.052, 0.019, 0.043, 0.016}, /* Tau Free GG */ { 0.052, 0.019, 0.045, 0.016}, /* Tau Free GExp */ { 0.052, 0.019, 0.049, 0.016}, /* Ks only */ { 0.070, 0.019, 0.066, 0.017}, /* Kl only */ { 0.074, 0.029, 0.065, 0.036}, /* Cat1 lepton */ { 0.064, 0.022, 0.062, 0.022}, /* Cat2 kaon */ { 0.120, 0.040, 0.130, 0.043}, /* Cat3 NT1 */ { 0.100, 0.034, 0.170, 0.037}, /* Cat4 NT2 */ { 0.043, 0.023, 0.055, 0.014}, /* Shape Only */ { 0.049, 0.019, 0.041, 0.016}, /* Moriond tagger */ { 0.057, 0.033, 0.068, 0.029}, /* Run 1 */ { 0.140, 0.040, 0.055, 0.038}, /* Run 2a */ { 0.065, 0.026, 0.058, 0.023}, /* Run 2b */ { 0.045, 0.019, 0.045, 0.017} /* D(*)pi(rho,a1) */ { 0.059, 0.047, 0.060, 0.040}, /* J/psi K* */ { 0.047, 0.064, 0.045, 0.016}}; /* No time constr. */ /*Definition of the colors */ Int_t Colors[nov]={1,1,2,2,3,3,4,4,4,4,5,6,7,7,7,8,8,9}; /* Definition of the labels for each line */ char* Labels[nov]={"Nominal Fit (#font[12]{GG})", "Nominal Fit (#font[12]{Gexp})", "#tau_{B} free (#font[12]{GG})", "#tau_{B} free (#font[12]{GExp})", "K_{S} CP sample","K_{L} CP sample", "Lepton tag","Kaon tag","NT1 tag","NT2 tag", "Shape only fit","Moriond Tagger", "Run 1","Run 2a","Run 2b", "D^{(*)}#pi(#rho,a_{1}) flavour sample", "J/#psi K^{*} flavour sample","No time integr. constraint"}; /* Definition of plot titles */ char* PlotL[4]={"#frac{#Delta#Gamma}{#Gamma}\n","#||{#frac{q}{p}}\n", "#frac{Re(#lambda)}{#||{#lambda}}Re(z)\n","Im(z)\n"}; Float_t MinX,MaxX,MinY,MaxY; TCanvas * c1=new TCanvas("c1","",600,800); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetFrameBorderMode(0); for (int j=0; j<4;j++){ MinX=-12*Errors[0][j]; MaxX=+8*Errors[0][j]; MinY=0; MaxY=nov+1; frame = new TH2F("frame","",10,MinX,MaxX,10,MinY,MaxY); frame->SetStats(0); frame->Draw(); TString bigtit("Parameter "); bigtit += PlotL[j]; cout << bigtit << endl; TPaveLabel *pl = new TPaveLabel(MinX,MaxY+0.1,MaxX,MaxY+2,bigtit.Data(),"br"); pl->SetBorderSize(0); pl->SetFillColor(0); pl->SetTextSize(0.4); pl->Draw(); (frame->GetYaxis())->SetNdivisions(0); (frame->GetXaxis())->SetLabelFont(32); /* Definition of the reference error band */ /* In my case the first value is the reference one */ band=new TPave(-Errors[0][j],MinY,Errors[0][j],MaxY,4,"b"); /* If you want the band in yellow... band->SetFillColor(5); */ band->Draw(); frame->Draw("axissame"); TLatex label; label.SetTextAlign(22); label.SetTextSize(0.027); for (int i=0;iSetLineColor(Colors[i]); gStyle->SetMarkerColor(Colors[i]); pt=new TMarker(xc,y,20); l=new TLine(x1,y,x2,y); g1=new TLine(x1,y+0.1,x1,y-0.1); g2=new TLine(x2,y+0.1,x2,y-0.1); cp=new TLine(x2,y+0.1,x2,y-0.1); l->Draw(); pt->Draw(); g1->Draw(); g2->Draw(); label.DrawLatex(MinX+(MaxX-MinX)*0.2,y,Labels[i]); } TString fname("check-plot"); fname+=(j+1); fname+=".eps"; cout <Print(fname.Data()); getchar(); delete frame; } c1->Delete(); }