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");
[cernRoot] Getting Contours From TH2D
最新推荐文章于 2024-08-18 17:42:33 发布