void DrawEmpirical(const char* filename="Empirical.root", Bool_t fmd=true) { gStyle->SetOptTitle(0); TFile* file = TFile::Open(filename, "READ"); if (!file) return; Double_t yr = 0.3; TCanvas* c = new TCanvas("c","c", 1000,1000); TPad* p1 = new TPad("p1","p1",0,0,1,yr); TPad* p2 = new TPad("p2","p2",0,yr,1,1); c->cd(); p1->Draw(); c->cd(); p2->Draw(); gDirectory->cd("Forward"); THStack* r = DrawOne(p1, yr, false, gDirectory, "ratios"); THStack* e = DrawOne(p2, yr, true, gDirectory, "empirical"); r->SetMinimum(0.945); r->SetMaximum(1.055); r->GetXaxis()->SetTitle("#it{#eta}"); r->GetYaxis()->SetTitle("Ratio to mean"); e->SetMinimum(0.005); e->GetYaxis()->SetTitle("#it{E_{c}}(#it{#eta})"); TIter nextE(e->GetHists()); TIter nextR(r->GetHists()); TH1* hist = 0; Color_t cols[] = { kRed+2, kGreen+2, kBlue+2, kMagenta+2, 0 }; Color_t *ptr = cols; Style_t stys[] = { 20, 21, 22, 23 }; Style_t* sty = stys; while (*ptr) { hist = static_cast<TH1*>(nextE()); hist->SetMarkerColor(*ptr); hist->SetMarkerSize(2); hist->SetMarkerStyle(*sty); hist = static_cast<TH1*>(nextR()); hist->SetMarkerColor(*ptr); hist->SetMarkerSize(2); hist->SetMarkerStyle(*sty); ptr++; sty++; } TLegend* l = p2->BuildLegend(0.35, .2, .65, .8); l->SetFillColor(0); l->SetFillStyle(0); l->SetBorderSize(0); c->Modified(); c->Update(); c->cd(); c->Print("empirical.png"); }
void Tabuleiro::Draw (void) { int i,j; clrscr (); _setcursortype (_NOCURSOR); for (i=0; i<8; i++) for (j=0; j<8; j++) DrawOne (i,j,tab[i][j]); }