ShadowKiller' blog

一个公开的网络记事本,并且博主特别的懒。比猪还懒。

[cernRoot] Getting Contours From TH2D

double contours[3] = {chisqmin + 2.3, chisqmin + 6.3, chisqmin + 9};
// double contours[1] = {chisqmin + 2.3};
h2d->SetContour(3, contours);
h2d->Draw("CONT1");
cc->cd(5);
h2d->Draw("CONT Z LIST");
cc->Update();
TObjArray * conts = (TObjArray*)(gROOT->GetListOfSpecials()->FindObject("contours"));
// TObjArray * conts = (TObjArray*)(h2d->FindObject("contours"));
TList * contLevel = NULL;
if (conts == NULL){
printf("*** No Contours Were Extracted!\n");
return;
}
cout << conts->GetSize() << endl;

contLevel = (TList *)conts->At(0);
TGraph * gc = (TGraph *)contLevel->First();
TGraph * gc2 = (TGraph *)gc->Clone();
cc->cd(6);
gc2->SetMarkerStyle(20);
gc2->Draw("ACP");

// contLevel = (TList *)conts->At(1);
// gc = (TGraph *)contLevel->First();
// TGraph * gc3 = (TGraph *)gc->Clone();
// gc3->SetMarkerStyle(4);
// cc->cd(7);
// gc3->Draw("ACP");

// contLevel = ;
gc = (TGraph *)(((TList *)conts->At(1))->First());
TGraph * gc3 = (TGraph *)gc->Clone();
gc3->SetMarkerStyle(4);
cc->cd(7);
gc3->Draw("ACP");

阅读更多
文章标签: c++ cernRoot
个人分类: c++ cernRoot
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭