3179const Int_t kNMAX = 2000;
3181const Int_t kMAXCONTOUR = 104;
3184static std::unique_ptr<TBox> gXHighlightBox, gYHighlightBox;
3195static TString gStringUnderflow;
3196static TString gStringOverflow;
3197static TString gStringIntegral;
3198static TString gStringIntegralBinWidth;
3199static TString gStringSkewness;
3200static TString gStringSkewnessX;
3201static TString gStringSkewnessY;
3202static TString gStringSkewnessZ;
3203static TString gStringKurtosis;
3204static TString gStringKurtosisX;
3205static TString gStringKurtosisY;
3206static TString gStringKurtosisZ;
3232 gStringEntries =
gEnv->GetValue(
"Hist.Stats.Entries",
"Entries");
3233 gStringMean =
gEnv->GetValue(
"Hist.Stats.Mean",
"Mean");
3234 gStringMeanX =
gEnv->GetValue(
"Hist.Stats.MeanX",
"Mean x");
3235 gStringMeanY =
gEnv->GetValue(
"Hist.Stats.MeanY",
"Mean y");
3236 gStringMeanZ =
gEnv->GetValue(
"Hist.Stats.MeanZ",
"Mean z");
3237 gStringStdDev =
gEnv->GetValue(
"Hist.Stats.StdDev",
"Std Dev");
3238 gStringStdDevX =
gEnv->GetValue(
"Hist.Stats.StdDevX",
"Std Dev x");
3239 gStringStdDevY =
gEnv->GetValue(
"Hist.Stats.StdDevY",
"Std Dev y");
3240 gStringStdDevZ =
gEnv->GetValue(
"Hist.Stats.StdDevZ",
"Std Dev z");
3241 gStringUnderflow =
gEnv->GetValue(
"Hist.Stats.Underflow",
"Underflow");
3242 gStringOverflow =
gEnv->GetValue(
"Hist.Stats.Overflow",
"Overflow");
3243 gStringIntegral =
gEnv->GetValue(
"Hist.Stats.Integral",
"Integral");
3244 gStringIntegralBinWidth =
gEnv->GetValue(
"Hist.Stats.IntegralBinWidth",
"Integral(w)");
3245 gStringSkewness =
gEnv->GetValue(
"Hist.Stats.Skewness",
"Skewness");
3246 gStringSkewnessX =
gEnv->GetValue(
"Hist.Stats.SkewnessX",
"Skewness x");
3247 gStringSkewnessY =
gEnv->GetValue(
"Hist.Stats.SkewnessY",
"Skewness y");
3248 gStringSkewnessZ =
gEnv->GetValue(
"Hist.Stats.SkewnessZ",
"Skewness z");
3249 gStringKurtosis =
gEnv->GetValue(
"Hist.Stats.Kurtosis",
"Kurtosis");
3250 gStringKurtosisX =
gEnv->GetValue(
"Hist.Stats.KurtosisX",
"Kurtosis x");
3251 gStringKurtosisY =
gEnv->GetValue(
"Hist.Stats.KurtosisY",
"Kurtosis y");
3252 gStringKurtosisZ =
gEnv->GetValue(
"Hist.Stats.KurtosisZ",
"Kurtosis z");
3276 const Int_t big = 9999;
3277 const Int_t kMaxDiff = 7;
3280 return fPie->DistancetoPrimitive(px, py);
3289 Int_t curdist = big;
3290 Int_t yxaxis, dyaxis,xyaxis, dxaxis;
3293 if (!PadPointer)
return 0;
3296 if (
fH->GetNormFactor() != 0) {
3297 factor =
fH->GetNormFactor()/
fH->GetSumOfWeights();
3302 TView *view =
gPad->GetView();
3304 if (view &&
Hoption.Contour != 14) {
3307 if (d3 <= kMaxDiff) {
gPad->SetSelected(
fZaxis);
return 0;}
3309 if (d1 <= kMaxDiff) {
gPad->SetSelected(
fXaxis);
return 0;}
3311 if (d2 <= kMaxDiff) {
gPad->SetSelected(
fYaxis);
return 0;}
3312 if ( px > puxmin && px < puxmax && py > puymax && py < puymin) curdist = 1;
3322 xyaxis = puxmax +
Int_t((puxmax-puxmin)*
fYaxis->GetLabelOffset());
3323 if (px <= xyaxis+dyaxis && px >= xyaxis && py >puymax && py < puymin) {
3331 xyaxis = puxmin -
Int_t((puxmax-puxmin)*
fYaxis->GetLabelOffset());
3332 if (px >= xyaxis-dyaxis && px <= xyaxis && py >puymax && py < puymin) {
3343 yxaxis = puymax -
Int_t((puymin-puymax)*
fXaxis->GetLabelOffset());
3344 if (py >= yxaxis-dxaxis && py <= yxaxis && px <puxmax && px > puxmin) {
3352 yxaxis = puymin +
Int_t((puymin-puymax)*
fXaxis->GetLabelOffset());
3353 if (yxaxis < puymin) yxaxis = puymin;
3354 if (py <= yxaxis+dxaxis && py >= yxaxis && px <puxmax && px > puxmin) {
3363 if (
fH->IsHighlight()) {
3364 if ((px > puxmin) && (py < puymin) && (px < puxmax) && (py > puymax))
3369 if (
fH->GetDimension() == 2) {
3371 TH2Poly *
th2 = (TH2Poly*)
fH;
3380 Int_t bin =
th2->FindBin(pxu, pyu);
3381 if (bin>0) curdist = 1;
3387 if ( px > puxmin + delta2
3388 && px < puxmax - delta2
3389 && py > puymax + delta2
3390 && py < puymin - delta2) {curdist =1;
goto FUNCTIONS;}
3394 if (
gPad->IsVertical()) {
3397 Double_t binval = factor*
fH->GetBinContent(bin);
3399 if (binval == 0 && pybin < puymin) pybin = 10000;
3405 for (
Int_t ibin=bin+1; ibin<binsup; ibin++) {
3406 Double_t binvaltmp = factor*
fH->GetBinContent(ibin);
3407 if (binvalmin>binvaltmp) binvalmin=binvaltmp;
3408 if (binvalmax<binvaltmp) binvalmax=binvaltmp;
3410 Int_t pybinmin =
gPad->YtoAbsPixel(
gPad->YtoPad(binvalmax));
3411 Int_t pybinmax =
gPad->YtoAbsPixel(
gPad->YtoPad(binvalmin));
3412 if (py<pybinmax+kMaxDiff/2 && py>pybinmin-kMaxDiff/2) pybin = py;
3414 if (bin != binsup) {
3415 Double_t binsupval = factor*
fH->GetBinContent(binsup);
3416 Int_t pybinsub =
gPad->YtoAbsPixel(
gPad->YtoPad(binsupval));
3417 if (py <=
TMath::Max(pybinsub,pybin) && py >=
TMath::Min(pybinsub,pybin) && pybin != 10000)
return 0;
3425 Double_t binval = factor*
fH->GetBinContent(bin);
3427 if (binval == 0 && pxbin > puxmin) pxbin = 10000;
3433 for (
Int_t ibin=bin+1; ibin<binsup; ibin++) {
3434 Double_t binvaltmp = factor*
fH->GetBinContent(ibin);
3435 if (binvalmin>binvaltmp) binvalmin=binvaltmp;
3436 if (binvalmax<binvaltmp) binvalmax=binvaltmp;
3438 Int_t pxbinmin =
gPad->XtoAbsPixel(
gPad->XtoPad(binvalmax));
3439 Int_t pxbinmax =
gPad->XtoAbsPixel(
gPad->XtoPad(binvalmin));
3440 if (px<pxbinmax+kMaxDiff/2 && px>pxbinmin-kMaxDiff/2) pxbin = px;
3451 else dist =
f->DistancetoPrimitive(px,py);
3452 if (dist < kMaxDiff) {
gPad->SetSelected(
f);
return dist;}
3465 Error(
"DrawPanel",
"need to draw histogram first");
3470 gROOT->ProcessLine(
TString::Format(
"((TCanvas*)0x%zx)->Selected((TVirtualPad*)0x%zx,(TObject*)0x%zx,1)",
3485 static Int_t bin, px1, py1, px2, py2, pyold;
3486 static std::unique_ptr<TBox> zoombox;
3490 Double_t xlow, xup, ylow, binval,
x, baroffset, barwidth, binwidth;
3493 if (!
gPad->IsEditable())
return;
3496 fPie->ExecuteEvent(event, px, py);
3500 TView *view =
gPad->GetView();
3507 TAxis *xaxis =
fH->GetXaxis();
3508 TAxis *yaxis =
fH->GetYaxis();
3509 Int_t dimension =
fH->GetDimension();
3512 TString IsSame =
fH->GetDrawOption();
3514 if (IsSame.
Index(
"same")>=0) {
3516 TIter next(
gPad->GetListOfPrimitives());
3517 while ((
h1 = (TH1 *)next())) {
3526 if (
fH->GetNormFactor() != 0) {
3527 factor =
fH->GetNormFactor()/
fH->GetSumOfWeights();
3534 if (!opaque)
gVirtualX->SetLineColor(-1);
3535 fH->TAttLine::Modify();
3537 if (opaque && dimension ==2) {
3538 zbx1 =
gPad->AbsPixeltoX(px);
3539 zbx2 =
gPad->AbsPixeltoX(px);
3540 zby1 =
gPad->AbsPixeltoY(py);
3541 zby2 =
gPad->AbsPixeltoY(py);
3544 if (
gPad->GetLogx()) {
3548 if (
gPad->GetLogy()) {
3552 if (zoombox)
Error(
"ExecuteEvent",
"Last zoom box was not deleted");
3553 zoombox = std::make_unique<TBox>(zbx1, zby1, zbx2, zby2);
3555 TColor *zoomcolor =
gROOT->GetColor(ci);
3558 zoombox->SetFillColor(ci);
3570 if (dimension ==1) {
3572 baroffset =
fH->GetBarOffset();
3573 barwidth =
fH->GetBarWidth();
3578 x =
gPad->AbsPixeltoX(px);
3580 binwidth =
fXaxis->GetBinWidth(bin);
3581 xlow =
gPad->XtoPad(
fXaxis->GetBinLowEdge(bin) + baroffset*binwidth);
3582 xup =
gPad->XtoPad(xlow + barwidth*binwidth);
3583 ylow =
gPad->GetUymin();
3584 px1 =
gPad->XtoAbsPixel(xlow);
3585 px2 =
gPad->XtoAbsPixel(xup);
3586 py1 =
gPad->YtoAbsPixel(ylow);
3596 if (dimension ==1) {
3597 if (
gROOT->GetEditHistograms()) {
3606 binval =
gPad->PadtoY(
gPad->AbsPixeltoY(py2))/factor;
3607 fH->SetBinContent(bin,binval);
3613 if (opaque && dimension ==2) {
3615 zbx2 =
gPad->AbsPixeltoX(px);
3616 zby2 =
gPad->AbsPixeltoY(py);
3620 zoombox->SetX2(zbx2);
3621 zoombox->SetY2(zby2);
3632 if (dimension ==2) {
3637 if (bin2>bin1) xaxis->
SetRange(bin1,bin2);
3642 if (bin2>bin1) yaxis->
SetRange(bin1,bin2);
3651 if (dimension == 2) {
3657 if (bin2>bin1) xaxis->
SetRange(bin1,bin2);
3664 if (bin2>bin1) yaxis->
SetRange(bin1,bin2);
3673 if (dimension ==1) {
3674 if (
gROOT->GetEditHistograms()) {
3675 binval =
gPad->PadtoY(
gPad->AbsPixeltoY(py2))/factor;
3676 fH->SetBinContent(bin,binval);
3683 if (opaque && dimension ==2) {
3693 if (x1<x2 && y1<y2) {
3701 if (opaque)
gVirtualX->SetLineColor(-1);
3711 event =
gVirtualX->RequestLocator(1, 1, px, py);
3729 TList *hl =
fH->GetListOfFunctions();
3730 TGraphDelaunay2D *dt = (TGraphDelaunay2D*)hl->
FindObject(
"TGraphDelaunay2D");
3732 TGraphDelaunay *dtOld =
nullptr;
3733 if (!dt) dtOld = (TGraphDelaunay*)hl->
FindObject(
"TGraphDelaunay");
3735 if (!dt && !dtOld)
return nullptr;
3740 ((
THistPainter*)
this)->fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
3752 if (!
gPad)
return (
char*)
"";
3757 TString drawOption =
fH->GetDrawOption();
3761 if (
fH->GetDimension() == 2) {
3762 if (
gPad->GetView() || drawOption.
Index(
"cont") >= 0) {
3763 uxmin=
gPad->GetUxmin();
3764 uxmax=
gPad->GetUxmax();
3768 uymin=
gPad->GetUymin();
3769 uymax=
gPad->GetUymax();
3775 Int_t binx,biny,binmin=0,binx1;
3776 if (
gPad->IsVertical()) {
3778 if (drawOption.
Index(
"same") >= 0) {
3780 TIter next(
gPad->GetListOfPrimitives());
3781 while ((
h1 = (TH1 *)next())) {
3787 binmin =
fXaxis->GetFirst();
3789 binx1 =
fXaxis->FindFixBin(x1);
3791 if (binx1-binx>1 &&
fH->GetDimension() == 1) {
3794 for (
Int_t ibin=binx+1; ibin<binx1; ibin++) {
3795 Double_t binvaltmp =
fH->GetBinContent(ibin);
3804 x1 =
gPad->PadtoY(
gPad->AbsPixeltoY(py+1));
3806 if (drawOption.
Index(
"same") >= 0) {
3808 TIter next(
gPad->GetListOfPrimitives());
3809 while ((
h1 = (TH1 *)next())) {
3815 binmin =
fXaxis->GetFirst();
3817 binx1 =
fXaxis->FindFixBin(x1);
3819 if (binx1-binx>1 &&
fH->GetDimension() == 1) {
3822 for (
Int_t ibin=binx+1; ibin<binx1; ibin++) {
3823 Double_t binvaltmp =
fH->GetBinContent(ibin);
3832 if (
fH->GetDimension() == 1) {
3834 TProfile *tp = (TProfile*)
fH;
3835 fObjectInfo.Form(
"(x=%g, y=%g, binx=%d, binc=%g, bine=%g, binn=%d)",
3836 x,
y, binx,
fH->GetBinContent(binx),
fH->GetBinError(binx),
3841 for (
Int_t bin=binmin;bin<=binx;bin++) {integ +=
fH->GetBinContent(bin);}
3842 fObjectInfo.Form(
"(x=%g, y=%g, binx=%d, binc=%g, Sum=%g)",
3843 x,
y,binx,
fH->GetBinContent(binx),integ);
3845 }
else if (
fH->GetDimension() == 2) {
3847 TH2Poly *
th2 = (TH2Poly*)
fH;
3848 biny =
th2->FindBin(
x,
y);
3849 fObjectInfo.Form(
"%s (x=%g, y=%g, bin=%d, binc=%g)",
3850 th2->GetBinTitle(biny),
x,
y,biny,
th2->GetBinContent(biny));
3853 TProfile2D *tp = (TProfile2D*)
fH;
3855 Int_t bin =
fH->GetBin(binx,biny);
3856 fObjectInfo.Form(
"(x=%g, y=%g, binx=%d, biny=%d, binc=%g, bine=%g, binn=%d)",
3857 x,
y, binx, biny,
fH->GetBinContent(bin),
3861 fObjectInfo.Form(
"(x=%g, y=%g, binx=%d, biny=%d, binc=%g bine=%g)",
3862 x,
y,binx,biny,
fH->GetBinContent(binx,biny),
3863 fH->GetBinError(binx,biny));
3879 if (
fH->IsHighlight())
return;
3884 if (gXHighlightBox) gXHighlightBox.reset();
3885 if (gYHighlightBox) gYHighlightBox.reset();
3901 if (!
gPad->IsVertical()) binx =
fXaxis->FindFixBin(
y);
3907 }
else if (
fH->GetDimension() == 1)
return;
3912 if (!changedBin)
return;
3932 if (!
fH->IsHighlight())
return;
3938 if (
gPad->GetLogx()) {
3942 if (
gPad->GetLogy()) {
3949 if (
gPad->IsVertical()) {
3951 if ((hcenter < uxmin) || (hcenter > uxmax))
return;
3954 if ((hcenter < uymin) || (hcenter > uymax))
return;
3956 if (
fH->GetDimension() == 2) {
3958 if ((hcenter < uymin) || (hcenter > uymax))
return;
3963 if (
gPad->IsVertical()) {
3975 if (!gXHighlightBox) {
3976 gXHighlightBox = std::make_unique<TBox>(hbx1, hby1, hbx2, hby2);
3980 else gROOT->GetColor(gXHighlightBox->GetFillColor())->SetAlpha(0.5);
3982 gXHighlightBox->SetX1(hbx1);
3983 gXHighlightBox->SetX2(hbx2);
3984 gXHighlightBox->SetY1(hby1);
3985 gXHighlightBox->SetY2(hby2);
3986 gXHighlightBox->Paint();
3992 if (
fH->GetDimension() != 2)
return;
3998 if (!gYHighlightBox) {
3999 gYHighlightBox = std::make_unique<TBox>(hbx1, hby1, hbx2, hby2);
4001 gYHighlightBox->SetFillColor(gXHighlightBox->GetFillColor());
4002 gYHighlightBox->SetFillStyle(gXHighlightBox->GetFillStyle());
4004 gYHighlightBox->SetX1(hbx1);
4005 gYHighlightBox->SetX2(hbx2);
4006 gYHighlightBox->SetY1(hby1);
4007 gYHighlightBox->SetY2(hby2);
4008 gYHighlightBox->Paint();
4053 Int_t nch = strlen(choptin);
4054 strlcpy(chopt,choptin,128);
4055 Int_t hdim =
fH->GetDimension();
4081 for (
Int_t i=0;i<nch;i++) chopt[i] = toupper(chopt[i]);
4082 if (hdim > 1)
Hoption.Color = 1;
4085 if (
fH->GetSumw2N() && hdim == 1)
Hoption.Error = 2;
4087 char *l1 = strstr(chopt,
"PFC");
4088 char *l2 = strstr(chopt,
"PLC");
4089 char *l3 = strstr(chopt,
"PMC");
4090 if (l1 || l2 || l3) {
4092 if (l1) {memcpy(l1,
" ",3);
fH->SetFillColor(i);}
4093 if (l2) {memcpy(l2,
" ",3);
fH->SetLineColor(i);}
4094 if (l3) {memcpy(l3,
" ",3);
fH->SetMarkerColor(i);}
4098 l = strstr(chopt,
"MIN0");
4104 l = strstr(chopt,
"SPEC");
4109 l = strstr(chopt,
"BF(");
4111 if (sscanf(&
l[3],
"%d",&bs) > 0) {
4124 l = strstr(chopt,
"GL");
4128 l = strstr(chopt,
"X+");
4133 l = strstr(chopt,
"Y+");
4141 l = strstr(chopt,
"SAMES");
4143 if (nch == 5)
Hoption.Hist = 1;
4146 if (
l[5] ==
'0') {
Hoption.Same += 10;
l[5] =
' '; }
4148 l = strstr(chopt,
"SAME");
4150 if (nch == 4)
Hoption.Hist = 1;
4153 if (
l[4] ==
'0') {
Hoption.Same += 10;
l[4] =
' '; }
4156 l = strstr(chopt,
"SCAT");
4158 Warning(
"MakeChopt",
"option SCAT is deprecated.");
4164 l = strstr(chopt,
"PIE");
4171 l = strstr(chopt,
"CANDLE");
4178 l = strstr(chopt,
"VIOLIN");
4185 l = strstr(chopt,
"LEGO");
4189 if (
l[4] ==
'1') {
Hoption.Lego = 11;
l[4] =
' '; }
4190 if (
l[4] ==
'2') {
Hoption.Lego = 12;
l[4] =
' '; }
4191 if (
l[4] ==
'3') {
Hoption.Lego = 13;
l[4] =
' '; }
4192 if (
l[4] ==
'4') {
Hoption.Lego = 14;
l[4] =
' '; }
4193 if (
l[4] ==
'9') {
Hoption.Lego = 19;
l[4] =
' '; }
4194 l = strstr(chopt,
"FB");
if (
l) {
Hoption.FrontBox = 0; memcpy(
l,
" ",2); }
4195 l = strstr(chopt,
"BB");
if (
l) {
Hoption.BackBox = 0; memcpy(
l,
" ",2); }
4196 l = strstr(chopt,
"0");
if (
l) {
Hoption.Zero = 1; memcpy(
l,
" ",1); }
4199 l = strstr(chopt,
"SURF");
4203 if (
l[4] ==
'1') {
Hoption.Surf = 11;
l[4] =
' '; }
4204 if (
l[4] ==
'2') {
Hoption.Surf = 12;
l[4] =
' '; }
4205 if (
l[4] ==
'3') {
Hoption.Surf = 13;
l[4] =
' '; }
4206 if (
l[4] ==
'4') {
Hoption.Surf = 14;
l[4] =
' '; }
4207 if (
l[4] ==
'5') {
Hoption.Surf = 15;
l[4] =
' '; }
4208 if (
l[4] ==
'6') {
Hoption.Surf = 16;
l[4] =
' '; }
4209 if (
l[4] ==
'7') {
Hoption.Surf = 17;
l[4] =
' '; }
4210 l = strstr(chopt,
"FB");
if (
l) {
Hoption.FrontBox = 0; memcpy(
l,
" ",2); }
4211 l = strstr(chopt,
"BB");
if (
l) {
Hoption.BackBox = 0; memcpy(
l,
" ",2); }
4214 l = strstr(chopt,
"TF3");
4217 l = strstr(chopt,
"FB");
if (
l) {
Hoption.FrontBox = 0; memcpy(
l,
" ",2); }
4218 l = strstr(chopt,
"BB");
if (
l) {
Hoption.BackBox = 0; memcpy(
l,
" ",2); }
4221 l = strstr(chopt,
"ISO");
4224 l = strstr(chopt,
"FB");
if (
l) {
Hoption.FrontBox = 0; memcpy(
l,
" ",2); }
4225 l = strstr(chopt,
"BB");
if (
l) {
Hoption.BackBox = 0; memcpy(
l,
" ",2); }
4229 l = strstr(chopt,
"LIST");
if (
l) {
Hoption.List = 1; memcpy(
l,
" ",4);}
4231 l = strstr(chopt,
"CONT");
4237 if (
l[4] ==
'1') {
Hoption.Contour = 11;
l[4] =
' '; }
4238 if (
l[4] ==
'2') {
Hoption.Contour = 12;
l[4] =
' '; }
4239 if (
l[4] ==
'3') {
Hoption.Contour = 13;
l[4] =
' '; }
4240 if (
l[4] ==
'4') {
Hoption.Contour = 14;
l[4] =
' '; }
4241 if (
l[4] ==
'5') {
Hoption.Contour = 15;
l[4] =
' '; }
4246 l = strstr(chopt,
"HBAR");
4250 if (
l[4] ==
'1') {
Hoption.Bar = 21;
l[4] =
' '; }
4251 if (
l[4] ==
'2') {
Hoption.Bar = 22;
l[4] =
' '; }
4252 if (
l[4] ==
'3') {
Hoption.Bar = 23;
l[4] =
' '; }
4253 if (
l[4] ==
'4') {
Hoption.Bar = 24;
l[4] =
' '; }
4255 l = strstr(chopt,
"BAR");
4259 if (
l[3] ==
'1') {
Hoption.Bar = 11;
l[3] =
' '; }
4260 if (
l[3] ==
'2') {
Hoption.Bar = 12;
l[3] =
' '; }
4261 if (
l[3] ==
'3') {
Hoption.Bar = 13;
l[3] =
' '; }
4262 if (
l[3] ==
'4') {
Hoption.Bar = 14;
l[3] =
' '; }
4265 l = strstr(chopt,
"ARR" );
4271 l = strstr(chopt,
"COL");
if (
l) {
Hoption.Arrow = 2; memcpy(
l,
" ",3); }
4272 l = strstr(chopt,
"Z");
if (
l) {
Hoption.Zscale = 1; memcpy(
l,
" ",1); }
4277 l = strstr(chopt,
"BOX" );
4283 if (
l[3] ==
'1') {
Hoption.Box = 11;
l[3] =
' '; }
4284 if (
l[3] ==
'2') {
Hoption.Box = 12;
l[3] =
' '; }
4285 if (
l[3] ==
'3') {
Hoption.Box = 13;
l[3] =
' '; }
4290 l = strstr(chopt,
"TEXT");
4293 if (sscanf(&
l[4],
"%d",&angle) > 0) {
4294 if (angle < 0) angle=0;
4295 if (angle > 90) angle=90;
4301 l = strstr(chopt,
"N");
4305 l = strstr(chopt,
"COLZ");
4309 explicitColor =
kTRUE;
4312 if (
l[4] ==
'2') {
Hoption.Color = 3;
l[4] =
' '; }
4313 l = strstr(chopt,
"0");
if (
l) {
Hoption.Zero = 1; memcpy(
l,
" ",1); }
4314 l = strstr(chopt,
"1");
if (
l) {
Hoption.Color = 2; memcpy(
l,
" ",1); }
4319 l = strstr(chopt,
"COL" );
4323 explicitColor =
kTRUE;
4325 if (
l[3] ==
'2') {
Hoption.Color = 3;
l[3] =
' '; }
4326 l = strstr(chopt,
"0");
if (
l) {
Hoption.Zero = 1; memcpy(
l,
" ",1); }
4327 l = strstr(chopt,
"1");
if (
l) {
Hoption.Color = 2; memcpy(
l,
" ",1); }
4332 l = strstr(chopt,
"FUNC");
if (
l) {
Hoption.Func = 2; memcpy(
l,
" ",4);
Hoption.Hist = 0; }
4334 l = strstr(chopt,
"AXIS");
if (
l) {
Hoption.Axis = 1; memcpy(
l,
" ",4); }
4335 l = strstr(chopt,
"AXIG");
if (
l) {
Hoption.Axis = 2; memcpy(
l,
" ",4); }
4336 l = strstr(chopt,
"SCAT");
if (
l) {
Hoption.Scat = 1; memcpy(
l,
" ",4); }
4337 l = strstr(chopt,
"POL");
if (
l) {
Hoption.System =
kPOLAR; memcpy(
l,
" ",3); }
4342 l = strstr(chopt,
"TRI");
4344 if (!explicitColor)
Hoption.Color = 0;
4346 l = strstr(chopt,
"FB");
if (
l) {
Hoption.FrontBox = 0; memcpy(
l,
" ",2); }
4347 l = strstr(chopt,
"BB");
if (
l) {
Hoption.BackBox = 0; memcpy(
l,
" ",2); }
4348 l = strstr(chopt,
"ERR");
if (
l) memcpy(
l,
" ",3);
4351 l = strstr(chopt,
"AITOFF");
4355 l = strstr(chopt,
"MERCATOR");
4359 l = strstr(chopt,
"SINUSOIDAL");
4361 Hoption.Proj = 3; memcpy(
l,
" ",10);
4363 l = strstr(chopt,
"PARABOLIC");
4367 l = strstr(chopt,
"MOLLWEIDE");
4372 if (!explicitColor)
Hoption.Color = 0;
4376 if (strstr(chopt,
"A"))
Hoption.Axis = -1;
4377 if (strstr(chopt,
"B"))
Hoption.Bar = 1;
4378 if (strstr(chopt,
"C") && !strstr(chopt,
"CJUST")) {
Hoption.Curve =1;
Hoption.Hist = -1;}
4379 if (strstr(chopt,
"F"))
Hoption.Fill =1;
4381 if (strstr(chopt,
"F2"))
Hoption.Fill =2;
4384 if (strstr(chopt,
"Z"))
Hoption.Zscale =1;
4385 if (strstr(chopt,
"*"))
Hoption.Star =1;
4386 if (strstr(chopt,
"H"))
Hoption.Hist =2;
4387 if (strstr(chopt,
"P0"))
Hoption.Mark =10;
4393 if (strstr(chopt,
"E")) {
4396 if (strstr(chopt,
"E1"))
Hoption.Error = 11;
4397 if (strstr(chopt,
"E2"))
Hoption.Error = 12;
4398 if (strstr(chopt,
"E3"))
Hoption.Error = 13;
4399 if (strstr(chopt,
"E4"))
Hoption.Error = 14;
4400 if (strstr(chopt,
"E5"))
Hoption.Error = 15;
4401 if (strstr(chopt,
"E6"))
Hoption.Error = 16;
4402 if (strstr(chopt,
"E0"))
Hoption.Error += 40;
4403 if (strstr(chopt,
"X0")) {
4414 if (!explicitColor)
Hoption.Color = 0;
4426 Warning(
"MakeChopt",
"option SURF5 is not supported in Cartesian and Polar modes");
4447 char *left = (
char*)strchr(choptin,
'[');
4448 if (!left)
return 0;
4449 char *right = (
char*)strchr(choptin,
']');
4450 if (!right)
return 0;
4451 Int_t nch = right-left;
4452 if (nch < 2)
return 0;
4453 char *cuts = left+1;
4455 char *comma, *minus;
4458 comma = strchr(cuts,
',');
4459 if (comma) *comma = 0;
4460 minus = strchr(cuts,
'-');
4461 if (minus) cuts = minus+1;
4462 while (*cuts ==
' ') cuts++;
4463 Int_t nc = strlen(cuts);
4464 while (cuts[nc-1] ==
' ') {cuts[nc-1] = 0; nc--;}
4465 TIter next(
gROOT->GetListOfSpecials());
4468 while ((obj = next())) {
4470 if (strcmp(obj->
GetName(),cuts))
continue;
4483 for (i=0;i<=nch;i++) left[i] =
' ';
4493 if (
fH->GetBuffer())
fH->BufferEmpty(-1);
4496 const TPickerStackGuard topPush(
fH);
4511 gROOT->ProcessLineFast(
TString::Format(
"TSpectrum2Painter::PaintSpectrum((TH2F*)0x%zx,\"%s\",%d)",
4517 if (
fXaxis->CanExtend() &&
fXaxis->IsAlphanumeric())
fH->LabelsDeflate(
"X");
4518 if (
fYaxis->CanExtend() &&
fYaxis->IsAlphanumeric())
fH->LabelsDeflate(
"Y");
4519 if (
fZaxis->CanExtend() &&
fZaxis->IsAlphanumeric())
fH->LabelsDeflate(
"Z");
4522 if (
fH->GetDimension() == 1) {
4524 fPie = std::make_unique<TPie>(
fH);
4525 fPie->Paint(option);
4527 Error(
"Paint",
"Option PIE is for 1D histograms only");
4534 fXbuf.resize(kNMAX);
4535 fYbuf.resize(kNMAX);
4536 if (
fH->GetDimension() > 2) {
4538 fH->SetMinimum(minsav);
4552 TView *view =
gPad->GetView();
4561 Int_t logysav=0, logzsav=0;
4562 if (
fH->GetDimension() == 1) {
4580 fH->SetMinimum(minsav);
4584 if (
fH->GetDimension() == 1) {
4598 gPad->RangeAxisChanged();
4616 if (gridx)
gPad->SetGridx(0);
4617 if (gridy)
gPad->SetGridy(0);
4619 if (gridx)
gPad->SetGridx(1);
4620 if (gridy)
gPad->SetGridy(1);
4655 if (gridx)
gPad->SetGridx(0);
4656 if (gridy)
gPad->SetGridy(0);
4658 if (gridx)
gPad->SetGridx(1);
4659 if (gridy)
gPad->SetGridy(1);
4668 while ((obj = next())) {
4676 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode())
4679 fH->SetMinimum(minsav);
4702 auto arrow =
new TArrow();
4710 Int_t ncolors=0, ndivz=0;
4713 ncolors =
gStyle->GetNumberOfColors();
4714 Int_t ndiv =
fH->GetContour();
4716 ndiv =
gStyle->GetNumberContours();
4717 fH->SetContour(ndiv);
4721 scale = ndivz/(
fH->GetMaximum()-
fH->GetMinimum());
4724 for (
Int_t id=1;
id<=2;
id++) {
4726 yk =
fYaxis->GetBinLowEdge(j);
4727 ystep =
fYaxis->GetBinWidth(j);
4729 xk =
fXaxis->GetBinLowEdge(i);
4730 xstep =
fXaxis->GetBinWidth(i);
4731 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
4749 }
else if (
id == 2) {
4761 if (theColor > ncolors-1) theColor = ncolors-1;
4791 if (drawGridOnly && (
gPad->PadInHighlightMode() ||
gPad->PadInSelectionMode()))
4794 if (
Hoption.Axis == -1)
return;
4799 TAxis *xaxis =
nullptr;
4800 TAxis *yaxis =
nullptr;
4803 TIter next(
gPad->GetListOfPrimitives());
4806 while ((obj = next())) {
4812 if (strstr(opt,
"hbar")) {
4816 if (!strcmp(xaxis->
GetName(),
"xaxis")) {
4826 static char chopt[10] =
"";
4828 Int_t ndiv, ndivx, ndivy, nx1, nx2, ndivsave;
4829 Int_t useHparam = 0;
4830 Double_t umin, umax, uminsave, umaxsave;
4843 if (
Hoption.Contour == 14) useHparam = 1;
4846 TIter next(
gPad->GetListOfPrimitives());
4847 while ((obj=next())) {
4858 if (
gPad->PadInSelectionMode())
4862 if (
gPad->PadInSelectionMode() || !
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() &&
gPad->GetSelected() ==
fXaxis)) {
4863 ndivx =
fXaxis->GetNdivisions();
4873 strlcat(chopt,
"SDH",10);
4874 if (ndivx < 0) strlcat(chopt,
"N",10);
4875 if (
gPad->GetGridx()) {
4876 gridl = (aymax-aymin)/(
gPad->GetY2() -
gPad->GetY1());
4877 strlcat(chopt,
"W",10);
4882 strlcat(chopt,
"G",10);
4903 if (
fXaxis->GetTimeDisplay()) {
4904 strlcat(chopt,
"t",10);
4905 if (strlen(
fXaxis->GetTimeFormatOnly()) == 0) {
4912 if (xAxisPos == 1) {
4928 strlcat(chopt,
"-",10);
4937 umin, umax, ndiv, chopt, gridl, drawGridOnly);
4942 if (
gPad->GetTickx() && !
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
4944 cw=strstr(chopt,
"-");
4947 strlcat(chopt,
"-",10);
4949 if (
gPad->GetTickx() < 2) strlcat(chopt,
"U",10);
4950 if ((cw=strstr(chopt,
"W"))) *cw=
'z';
4954 uminsave, umaxsave, ndivsave, chopt, gridl, drawGridOnly);
4960 if (
gPad->PadInSelectionMode())
4964 if (
gPad->PadInSelectionMode() || !
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() &&
gPad->GetSelected() ==
fYaxis)) {
4965 ndivy =
fYaxis->GetNdivisions();
4969 strlcat(chopt,
"SDH",10);
4970 if (ndivy < 0) strlcat(chopt,
"N",10);
4971 if (
gPad->GetGridy()) {
4972 gridl = (axmax-axmin)/(
gPad->GetX2() -
gPad->GetX1());
4973 strlcat(chopt,
"W",10);
4978 strlcat(chopt,
"G",10);
4999 if (
fYaxis->GetTimeDisplay()) {
5000 strlcat(chopt,
"t",10);
5001 if (strlen(
fYaxis->GetTimeFormatOnly()) == 0) {
5008 if (yAxisPos == 1) {
5024 strlcat(chopt,
"+L",10);
5033 umin, umax, ndiv, chopt, gridl, drawGridOnly);
5038 if (
gPad->GetTicky() && !
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
5039 if (
gPad->GetTicky() < 2) {
5040 strlcat(chopt,
"U",10);
5043 strlcat(chopt,
"+L",10);
5045 if ((cw=strstr(chopt,
"W"))) *cw=
'z';
5049 uminsave, umaxsave, ndivsave, chopt, gridl, drawGridOnly);
5071 Int_t hcolor =
fH->GetFillColor();
5072 if (hcolor ==
gPad->GetFrameFillColor()) ++hcolor;
5073 Int_t hstyle =
fH->GetFillStyle();
5074 box.SetFillColor(hcolor);
5075 box.SetFillStyle(hstyle);
5076 box.SetLineStyle(
fH->GetLineStyle());
5077 box.SetLineColor(
fH->GetLineColor());
5078 box.SetLineWidth(
fH->GetLineWidth());
5079 for (
Int_t bin=
fXaxis->GetFirst();bin<=fXaxis->GetLast();bin++) {
5080 y =
fH->GetBinContent(bin);
5100 box.SetFillColor(hcolor);
5120 if (!strcmp(xaxis->
GetName(),
"xaxis")) {
5133 Int_t hcolor =
fH->GetFillColor();
5134 if (hcolor ==
gPad->GetFrameFillColor()) ++hcolor;
5135 Int_t hstyle =
fH->GetFillStyle();
5136 box.SetFillColor(hcolor);
5137 box.SetFillStyle(hstyle);
5138 box.SetLineStyle(
fH->GetLineStyle());
5139 box.SetLineColor(
fH->GetLineColor());
5140 box.SetLineWidth(
fH->GetLineWidth());
5141 for (
Int_t bin=
fYaxis->GetFirst();bin<=fYaxis->GetLast();bin++) {
5161 box.SetFillColor(hcolor);
5174 while ((obj = next())) {
5193 if (
fH->GetFillColor() == 0)
fH->SetFillStyle(0);
5194 if (
Hoption.Box == 11)
fH->SetFillStyle(1001);
5195 fH->TAttLine::Modify();
5196 fH->TAttFill::Modify();
5198 Double_t z, xk,xstep, yk, ystep, xcent, ycent, xlow, xup, ylow, yup;
5209 Double_t zminlin = zmin, zmaxlin = zmax;
5215 TIter next(
gPad->GetListOfPrimitives());
5216 while ((h2 = (TH2 *)next())) {
5246 if (
fH->GetMinimum()<0) kZminNeg =
kTRUE;
5259 yk =
fYaxis->GetBinLowEdge(j);
5260 ystep =
fYaxis->GetBinWidth(j);
5264 xk =
fXaxis->GetBinLowEdge(i);
5265 xstep =
fXaxis->GetBinWidth(i);
5266 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
5273 if (kZminNeg && z==0)
continue;
5285 if (dz == 0)
continue;
5287 if (zratio == 0)
continue;
5289 xup = xcent*zratio + xk + xcent;
5290 xlow = 2*(xk + xcent) - xup;
5291 if (xup-xlow < dxmin) xup = xlow+dxmin;
5299 yup = ycent*zratio + yk + ycent;
5300 ylow = 2*(yk + ycent) - yup;
5301 if (yup-ylow < dymin) yup = ylow+dymin;
5314 if (xlow >= xup)
continue;
5315 if (ylow >= yup)
continue;
5318 fH->SetFillColor(color);
5319 fH->TAttFill::Modify();
5320 gPad->PaintBox(xlow, ylow, xup, yup);
5322 gPad->PaintLine(xlow, ylow, xup, yup);
5323 gPad->PaintLine(xlow, yup, xup, ylow);
5325 }
else if (
Hoption.Box == 11) {
5327 fH->SetFillColor(color);
5328 fH->TAttFill::Modify();
5329 gPad->PaintBox(xlow, ylow, xup, yup);
5334 x[0] = xlow;
y[0] = ylow;
5335 x[1] = xlow + bwidth*(xup-xlow);
y[1] = ylow + bwidth*(yup-ylow);
5336 x[2] =
x[1];
y[2] = yup - bwidth*(yup-ylow);
5337 x[3] = xup - bwidth*(xup-xlow);
y[3] =
y[2];
5338 x[4] = xup;
y[4] = yup;
5339 x[5] = xlow;
y[5] = yup;
5340 x[6] = xlow;
y[6] = ylow;
5341 if (kZNeg)
fH->SetFillColor(dark);
5342 else fH->SetFillColor(light);
5343 fH->TAttFill::Modify();
5344 gPad->PaintFillArea(7,
x,
y);
5347 x[0] = xlow;
y[0] = ylow;
5348 x[1] = xlow + bwidth*(xup-xlow);
y[1] = ylow + bwidth*(yup-ylow);
5349 x[2] = xup - bwidth*(xup-xlow);
y[2] =
y[1];
5350 x[3] =
x[2];
y[3] = yup - bwidth*(yup-ylow);
5351 x[4] = xup;
y[4] = yup;
5352 x[5] = xup;
y[5] = ylow;
5353 x[6] = xlow;
y[6] = ylow;
5354 if (kZNeg)
fH->SetFillColor(light);
5355 else fH->SetFillColor(dark);
5356 fH->TAttFill::Modify();
5357 gPad->PaintFillArea(7,
x,
y);
5363 fH->SetFillStyle(fillsav);
5364 fH->SetFillColor(colsav);
5365 fH->TAttFill::Modify();
5375 TH1D *hproj =
nullptr;
5376 TH2D *h2 = (TH2D*)
fH;
5390 const Double_t standardCandleWidth = 0.66;
5391 const Double_t standardHistoWidth = 0.8;
5393 double allMaxContent = 0, allMaxIntegral = 0;
5402 if (hproj->
Integral() > allMaxIntegral) allMaxIntegral = hproj->
Integral();
5410 Double_t offset =
fH->GetBarOffset()*binWidth;
5412 double myIntegral = hproj->
Integral();
5414 if (candleWidth > 0.999 && candleWidth < 1.001) {
5415 candleWidth = standardCandleWidth;
5416 histoWidth = standardHistoWidth;
5418 if (
Hoption.Logz && myMaxContent > 0) {
5420 if (myCandle.
IsViolinScaled() && myMaxContent > 0 && allMaxContent > 0)
5423 histoWidth *= myMaxContent/allMaxContent;
5425 candleWidth *= myIntegral/allMaxIntegral;
5439 if (hproj->
Integral() > allMaxIntegral) allMaxIntegral = hproj->
Integral();
5447 Double_t offset =
fH->GetBarOffset()*binWidth;
5449 double myIntegral = hproj->
Integral();
5451 if (candleWidth > 0.999 && candleWidth < 1.001) {
5452 candleWidth = standardCandleWidth;
5453 histoWidth = standardHistoWidth;
5455 if (
Hoption.Logz && myMaxContent > 0) {
5457 if (myCandle.
IsViolinScaled() && myMaxContent > 0 && allMaxContent > 0)
5460 histoWidth *= myMaxContent/allMaxContent;
5462 candleWidth *= myIntegral/allMaxIntegral;
5491std::vector<THistRenderingRegion>
5494 std::vector<THistRenderingRegion> regions;
5496 enum STRATEGY {
Bins, Pixels } strategy;
5500 if (nBins >= nPixels) {
5512 while (xMin <= 0 && ((pAxis->
GetFirst()+binOffset) != pAxis->
GetLast()) ) {
5522 if (strategy == Bins) {
5531 for (
Int_t bin=pAxis->
GetFirst()+binOffset; bin<=pAxis->GetLast(); bin++) {
5539 THistRenderingRegion region = {std::make_pair(xPx0, xPx1),
5540 std::make_pair(bin, bin+1)};
5541 regions.push_back(region);
5550 for (
Int_t pixelIndex=0; pixelIndex<(nPixels-1); pixelIndex++) {
5554 THistRenderingRegion region = { std::make_pair(pixelIndex, pixelIndex+1),
5555 std::make_pair(binLow, binHigh)};
5556 regions.push_back(region);
5562 if (strategy == Bins) {
5564 for (
Int_t bin=pAxis->
GetFirst(); bin<=pAxis->GetLast(); bin++) {
5569 Int_t xPx1 = xPx0 + nPixels/nBins;
5572 if (xPx1>= nPixels) xPx1 = nPixels-1;
5574 THistRenderingRegion region = {std::make_pair(xPx0, xPx1),
5575 std::make_pair(bin, bin+1)};
5576 regions.push_back(region);
5580 for (
Int_t pixelIndex=0; pixelIndex<nPixels-1; pixelIndex++) {
5582 Int_t binLow = (nBins*pixelIndex)/nPixels + pAxis->
GetFirst();
5583 Int_t binHigh = binLow + nBins/nPixels;
5584 THistRenderingRegion region = { std::make_pair(pixelIndex, pixelIndex+1),
5585 std::make_pair(binLow, binHigh)};
5586 regions.push_back(region);
5601 Error(
"THistPainter::PaintColorLevelsFast(Option_t*)",
5602 "Only cartesian coordinates supported by 'COL2' option. Using 'COL' option instead.");
5615 if ((zmin == -1111) && (zmax == -1111)) {
5616 fH->GetMinimumAndMaximum(zmin, zmax);
5617 fH->SetMinimum(zmin);
5618 fH->SetMaximum(zmax);
5619 }
else if (zmin == -1111) {
5620 zmin =
fH->GetMinimum();
5621 fH->SetMinimum(zmin);
5622 }
else if (zmax == -1111) {
5623 zmax =
fH->GetMaximum();
5624 fH->SetMaximum(zmax);
5640 Error(
"THistPainter::PaintColorLevelsFast(Option_t*)",
5641 "Cannot plot logz because bin content is less than 0.");
5647 Int_t ndiv =
fH->GetContour();
5649 ndiv =
gStyle->GetNumberContours();
5650 fH->SetContour(ndiv);
5652 std::vector<Double_t> colorBounds(ndiv);
5653 std::vector<Double_t> contours(ndiv, 0);
5655 fH->SetContour(ndiv);
5657 fH->GetContour(contours.data());
5661 for (
Int_t i=0; i<ndiv; ++i) {
5662 colorBounds[i] = step*i;
5665 auto pFrame =
gPad->GetFrame();
5666 Int_t px0 =
gPad->XtoPixel(pFrame->GetX1());
5667 Int_t px1 =
gPad->XtoPixel(pFrame->GetX2());
5668 Int_t py0 =
gPad->YtoPixel(pFrame->GetY1());
5669 Int_t py1 =
gPad->YtoPixel(pFrame->GetY2());
5670 Int_t nXPixels = px1-px0;
5671 Int_t nYPixels = py0-py1;
5673 std::vector<Double_t> buffer(nXPixels*nYPixels, 0);
5677 if (xRegions.empty() || yRegions.empty()) {
5678 Error(
"THistPainter::PaintColorLevelFast(Option_t*)",
5679 "Encountered error while computing rendering regions.");
5687 for (
auto& yRegion : yRegions) {
5688 for (
auto& xRegion : xRegions ) {
5690 const auto& xBinRange = xRegion.fBinRange;
5691 const auto& yBinRange = yRegion.fBinRange;
5702 if (z > zmax) z = zmax;
5703 if (z < zmin) z = zmin;
5708 z = colorBounds[index];
5715 if (index ==
static_cast<Int_t>(colorBounds.size())) {
5723 }
else if (index ==
static_cast<Int_t>(colorBounds.size()-1)) {
5727 z = colorBounds[index];
5738 const auto& xPixelRange = xRegion.fPixelRange;
5739 const auto& yPixelRange = yRegion.fPixelRange;
5740 for (
Int_t xPx = xPixelRange.first; xPx <= xPixelRange.second; ++xPx) {
5741 for (
Int_t yPx = yPixelRange.first; yPx <= yPixelRange.second; ++yPx) {
5742 Int_t pixel = yPx*nXPixels + xPx;
5753 if (minValue != maxValue) {
5759 buffer[buffer.size()-nXPixels] = 0.95;
5767 pImage->
SetImage(buffer.data(), nXPixels, nYPixels, pPalette);
5771 pImage->
PaintImage(wid, px0, py1, 0, 0, nXPixels, nYPixels);
5779 fH->SetMinimum(originalZMin);
5780 fH->SetMaximum(originalZMax);
5788 Double_t z,
e, zc, xk, xstep, yk, ystep, xlow, xup, ylow, yup;
5804 TIter next(
gPad->GetListOfPrimitives());
5805 while ((h2 = (TH2 *)next())) {
5809 fH->SetMinimum(zmin);
5810 fH->SetMaximum(zmax);
5836 fH->SetFillStyle(1001);
5837 fH->TAttFill::Modify();
5841 Int_t ndiv =
fH->GetContour();
5843 ndiv =
gStyle->GetNumberContours();
5844 fH->SetContour(ndiv);
5851 TProfile2D* prof2d =
dynamic_cast<TProfile2D*
>(
fH);
5853 yk =
fYaxis->GetBinLowEdge(j);
5854 ystep =
fYaxis->GetBinWidth(j);
5857 xk =
fXaxis->GetBinLowEdge(i);
5858 xstep =
fXaxis->GetBinWidth(i);
5859 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
5861 e =
fH->GetBinError(bin);
5865 if (binEntries == 0)
5870 if (z == 0 &&
e == 0) {
5871 if (zmin >= 0 ||
Hoption.Logz)
continue;
5872 if (
Hoption.Color == 2)
continue;
5880 if (z < zmin && !
Hoption.Zero)
continue;
5897 if (xup < gPad->GetUxmin())
continue;
5898 if (yup < gPad->GetUymin())
continue;
5899 if (xlow >
gPad->GetUxmax())
continue;
5900 if (ylow >
gPad->GetUymax())
continue;
5901 if (xlow < gPad->GetUxmin()) xlow =
gPad->GetUxmin();
5902 if (ylow < gPad->GetUymin()) ylow =
gPad->GetUymin();
5903 if (xup >
gPad->GetUxmax()) xup =
gPad->GetUxmax();
5904 if (yup >
gPad->GetUymax()) yup =
gPad->GetUymax();
5907 zc =
fH->GetContourLevelPad(0);
5908 if (z < zc)
continue;
5910 for (
Int_t k=0; k<ndiv; k++) {
5911 zc =
fH->GetContourLevelPad(k);
5923 if (theColor > ncolors-1) theColor = ncolors-1;
5924 auto fillColor =
gStyle->GetColorPalette(theColor);
5926 fH->SetFillColor(fillColor);
5927 fH->TAttFill::Modify();
5928 gPad->PaintBox(xlow, ylow, xup, yup);
5931 midy = (
gPad->GetUymin() +
gPad->GetUymax()) / 2,
5932 a1 = (xlow -
gPad->GetUxmin()) / (
gPad->GetUxmax() -
gPad->GetUxmin()) * 360,
5933 a2 = (xup -
gPad->GetUxmin()) / (
gPad->GetUxmax() -
gPad->GetUxmin()) * 360,
5934 rx =
gPad->GetUxmax() -
gPad->GetUxmin(),
5935 ry =
gPad->GetUymax() -
gPad->GetUymin(),
5936 r1 = (ylow -
gPad->GetUymin()) / (
gPad->GetUymax() -
gPad->GetUymin()) * rx / 2,
5937 r2 = (yup -
gPad->GetUymin()) / (
gPad->GetUymax() -
gPad->GetUymin()) * rx / 2;
5939 TCrown crown(midx, midy, r1, r2, a1, a2);
5940 crown.SetYXRatio(rx > 0 ? ry / rx : 1);
5941 crown.SetFillColor(fillColor);
5942 crown.SetLineColor(
fH->GetLineColor());
5943 crown.SetLineWidth(
fH->GetLineWidth());
5944 crown.SetLineStyle(
fH->GetLineStyle());
5952 fH->SetFillStyle(fillsav);
5953 fH->SetFillColor(colsav);
5954 fH->TAttFill::Modify();
5964 Int_t i, j, count, ncontour, icol,
n, lj,
m, ix, jx, ljfill;
5965 Int_t itars, mode, ir[4];
5966 Double_t xsave, ysave, thesave,phisave,
x[4],
y[4], zc[4];
5971 thesave =
gPad->GetTheta();
5972 phisave =
gPad->GetPhi();
5974 gPad->SetTheta(90.);
5976 gPad->SetPhi(phisave);
5977 gPad->SetTheta(thesave);
5978 TView *view =
gPad->GetView();
5979 if (view) view->
SetBit(kCannotRotate);
5988 TIter next(
gPad->GetListOfPrimitives());
5989 while ((obj=next())) {
6001 TGraphDelaunay2D *dt =
nullptr;
6002 TGraphDelaunay *dtOld =
nullptr;
6003 TList *hl =
fH->GetListOfFunctions();
6004 dt = (TGraphDelaunay2D*)hl->
FindObject(
"TGraphDelaunay2D");
6005 if (!dt) dtOld = (TGraphDelaunay*)hl->
FindObject(
"TGraphDelaunay");
6006 if (!dt && !dtOld)
return;
6008 fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
6015 std::vector<Double_t> levels(2*kMAXCONTOUR);
6016 std::vector<Double_t> xarr(2*kMAXCONTOUR);
6017 std::vector<Double_t> yarr(2*kMAXCONTOUR);
6018 std::vector<Int_t> itarr(2*kMAXCONTOUR);
6021 for (i=0;i<2*kMAXCONTOUR;i++) itarr[i] = 0;
6023 ncontour =
fH->GetContour();
6024 if (ncontour == 0) {
6025 ncontour =
gStyle->GetNumberContours();
6026 fH->SetContour(ncontour);
6028 if (ncontour > kMAXCONTOUR) {
6029 Warning(
"PaintContour",
"maximum number of contours is %d, asked for %d",
6030 kMAXCONTOUR, ncontour);
6031 ncontour = kMAXCONTOUR-1;
6035 for (i=0;i<ncontour;i++) levels[i] =
fH->GetContourLevelPad(i);
6036 Int_t linesav =
fH->GetLineStyle();
6037 Int_t colorsav =
fH->GetLineColor();
6038 Int_t fillsav =
fH->GetFillColor();
6040 fH->TAttLine::Modify();
6043 std::vector<std::unique_ptr<TPolyLine>>
polys;
6044 TObjArray *contours =
nullptr;
6045 TList *list =
nullptr;
6046 TGraph *graph =
nullptr;
6047 std::vector<Int_t> np;
6049 np.resize(ncontour);
6050 for (i=0;i<ncontour;i++)
6052 for (i=0;i<ncontour;i++)
6053 polys.emplace_back(std::make_unique<TPolyLine>(100));
6055 contours = (TObjArray*)
gROOT->GetListOfSpecials()->
FindObject(
"contours");
6057 gROOT->GetListOfSpecials()->Remove(contours);
6059 for (i=0;i<count;i++) {
6060 list = (TList*)contours->
At(i);
6061 if (list) list->
Delete();
6066 contours =
new TObjArray(ncontour);
6067 contours->
SetName(
"contours");
6068 gROOT->GetListOfSpecials()->Add(contours);
6069 for (i=0;i<ncontour;i++) {
6071 contours->
Add(list);
6081 y[0] =
fYaxis->GetBinCenter(j);
6083 y[2] =
fYaxis->GetBinCenter(j+1);
6086 zc[0] =
fH->GetBinContent(i, j);
6087 zc[1] =
fH->GetBinContent(i+1, j);
6088 zc[2] =
fH->GetBinContent(i+1, j+1);
6089 zc[3] =
fH->GetBinContent(i, j+1);
6104 if (ir[0] != ir[1] || ir[1] != ir[2] || ir[2] != ir[3] || ir[3] != ir[0]) {
6105 x[0] =
fXaxis->GetBinCenter(i);
6107 x[1] =
fXaxis->GetBinCenter(i+1);
6109 if (zc[0] <= zc[1])
n = 0;
else n = 1;
6110 if (zc[2] <= zc[3])
m = 2;
else m = 3;
6111 if (zc[
n] > zc[
m])
n =
m;
6114 for (ix=1;ix<=4;ix++) {
6117 ir[
m-1],
x[
m-1],
y[
m-1], xarr.data()+lj-1,yarr.data()+lj-1,itarr.data()+lj-1, levels.data());
6122 if (zc[0] <= zc[1])
n = 0;
else n = 1;
6123 if (zc[2] <= zc[3])
m = 2;
else m = 3;
6124 if (zc[
n] > zc[
m])
n =
m;
6127 for (ix=1;ix<=4;ix++) {
6131 ir[
m-1],
x[
m-1],
y[
m-1],xarr.data()+lj-1,yarr.data()+lj-1,itarr.data()+lj-1, levels.data());
6139 for (ix=1; ix<=lj-5; ix +=2) {
6141 while (itarr[ix-1] != itarr[ix]) {
6145 for (jx=ix; jx<=lj-5; jx +=2) {
6146 xarr[jx] = xarr[jx+2];
6147 yarr[jx] = yarr[jx+2];
6148 itarr[jx] = itarr[jx+2];
6152 itarr[lj-3] = itars;
6153 if (count > 100)
break;
6158 if (count > 100)
continue;
6159 for (ix=1; ix<=lj-2; ix +=2) {
6161 icol =
gStyle->GetColorPalette(theColor);
6163 fH->SetLineColor(icol);
6167 if (mode == 0) mode = 5;
6168 fH->SetLineStyle(mode);
6171 fH->TAttLine::Modify();
6172 gPad->PaintPolyLine(2,xarr.data()+ix-1,yarr.data()+ix-1);
6177 ipoly = itarr[ix-1];
6178 if (ipoly >=0 && ipoly <ncontour) {
6179 polys[ipoly]->SetPoint(np[ipoly] ,xarr[ix-1],yarr[ix-1]);
6180 polys[ipoly]->SetPoint(np[ipoly]+1,xarr[ix], yarr[ix]);
6182 if (npmax < np[ipoly]) npmax = np[ipoly];
6190 std::vector<Double_t> xp, yp;
6191 Int_t nadd,iminus,iplus;
6193 Int_t first = ncontour;
6194 std::vector<Int_t> polysort;
6209 polysort.resize(ncontour);
6211 for (ipoly=0;ipoly<ncontour;ipoly++) {
6212 if (levels[ipoly] >= 0) {first = ipoly;
break;}
6216 for (ipoly=first-1;ipoly>=0;ipoly--) {polysort[k] = ipoly; k++;}
6217 for (ipoly=first;ipoly<ncontour;ipoly++) {polysort[k] = ipoly; k++;}
6220 if (
Hoption.Contour == 1)
fH->SetFillStyle(1001);
6221 for (k=0;k<ncontour;k++) {
6222 ipoly = polysort[k];
6223 if (
Hoption.List) list = (TList*)contours->
At(contListNb);
6233 xp[iminus]= xx[istart]; yp[iminus] = yy[istart];
6234 xp[iplus] = xx[istart+1]; yp[iplus] = yy[istart+1];
6235 xx[istart] =
xmin; yy[istart] =
ymin;
6236 xx[istart+1] =
xmin; yy[istart+1] =
ymin;
6239 for (i=2;i<np[ipoly];i+=2) {
6240 if ((iplus < 2*npmax-1) && (xx[i] == xp[iplus]) && (yy[i] == yp[iplus])) {
6242 xp[iplus] = xx[i+1]; yp[iplus] = yy[i+1];
6247 if ((iminus > 0) && (xx[i+1] == xp[iminus]) && (yy[i+1] == yp[iminus])) {
6249 xp[iminus] = xx[i]; yp[iminus] = yy[i];
6255 if (nadd == 0)
break;
6258 icol =
gStyle->GetColorPalette(theColor);
6260 if (ndivz > 1)
fH->SetFillColor(icol);
6261 fH->TAttFill::Modify();
6262 gPad->PaintFillArea(iplus-iminus+1,xp.data()+iminus,yp.data()+iminus);
6265 graph =
new TGraph(iplus-iminus+1,xp.data()+iminus,yp.data()+iminus);
6268 else if (
Hoption.Contour == 11)
6270 else if (
Hoption.Contour == 12) {
6272 if (mode == 0) mode = 5;
6280 for (i=2;i<np[ipoly];i+=2) {
6281 if (xx[i] !=
xmin && yy[i] !=
ymin) {
6286 if (istart == 0)
break;
6293 fH->SetLineStyle(linesav);
6294 fH->SetLineColor(colorsav);
6295 fH->SetFillColor(fillsav);
6307 Double_t tlen, tdif, elev, diff, pdif, xlen;
6319 tdif = elev2 - elev1;
6322 while (
n <= icont2 && i <= kMAXCONTOUR/2 -3) {
6325 diff = elev - elev1;
6336 yarr[i] = y1 + xlen;
6341 xarr[i] = x1 + xlen;
6364 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
return;
6366 const Int_t kBASEMARKER=8;
6367 Double_t xp, yp, ex1, ex2, ey1, ey2;
6369 Double_t s2x, s2y, bxsize, bysize, symbolsize, xerror, sbasex, sbasey;
6370 Double_t xi1, xi2, xi3, xi4, yi1, yi2, yi3, yi4;
6376 Int_t i, k, npoints, first, last, fixbin;
6381 Int_t option0, option1, option2, option3, option4, optionE, optionEX0, optionI0;
6382 static Float_t cxx[30] = {1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.6,1.0,0.5,0.5,1.0,0.5,0.6,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
6383 static Float_t cyy[30] = {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.5,0.5,0.5,1.0};
6385 std::vector<Double_t> xline, yline, xsegm, ysegm, xmarker, ymarker;
6386 option0 = option1 = option2 = option3 = option4 = optionE = optionEX0 = optionI0 = 0;
6390 if (
Hoption.Error == 11) option1 = 1;
6391 if (
Hoption.Error == 12) option2 = 1;
6392 if (
Hoption.Error == 13) option3 = 1;
6393 if (
Hoption.Error == 14) {option4 = 1; option3 = 1;}
6394 if (
Hoption.Error == 15) {optionI0 = 1; option3 = 1;}
6395 if (
Hoption.Error == 16) {optionI0 = 1; option4 = 1; option3 = 1;}
6396 if (option2+option3 == 0) optionE = 1;
6397 if (
Hoption.Error == 0) optionE = 0;
6398 if (
fXaxis->GetXbins()->fN) fixbin = 0;
6401 offset =
fH->GetBarOffset();
6402 width =
fH->GetBarWidth();
6408 xerror =
gStyle->GetErrorX();
6410 symbolsize =
fH->GetMarkerSize();
6411 if (errormarker == 1) symbolsize = 0.01;
6412 sbasex = sbasey = symbolsize*kBASEMARKER;
6413 if (errormarker >= 20 && errormarker <= 49) {
6414 sbasex *= cxx[errormarker-20];
6415 sbasey *= cyy[errormarker-20];
6419 fH->TAttLine::Modify();
6420 fH->TAttFill::Modify();
6421 fH->TAttMarker::Modify();
6428 npoints = last - first +1;
6434 xsegm.reserve(1024);
6435 ysegm.reserve(1024);
6436 if (!xsegm.capacity() || !ysegm.capacity()) {
6437 Error(
"PaintErrors",
"out of memory for lines painting");
6441 auto flush_segmentes = [&]() {
6442 if (xsegm.size() > 0) {
6443 gPad->PaintSegments(xsegm.size()/2, xsegm.data(), ysegm.data());
6450 xsegm.emplace_back(x1);
6451 xsegm.emplace_back(x2);
6452 ysegm.emplace_back(y1);
6453 ysegm.emplace_back(y2);
6454 if (xsegm.size() == xsegm.capacity())
6458 auto flush_markers = [&]() {
6459 if (xmarker.size() > 0) {
6460 gPad->PaintPolyMarker(xmarker.size(), xmarker.data(), ymarker.data());
6467 if (xmarker.capacity() == 0) {
6468 xmarker.reserve(256);
6469 ymarker.reserve(256);
6472 xmarker.emplace_back(
x);
6473 ymarker.emplace_back(
y);
6474 if (xmarker.size() == xmarker.capacity()) {
6482 xline.resize(2*npoints);
6483 yline.resize(2*npoints);
6484 if ((npoints > 0) && (xline.empty() || yline.empty())) {
6485 Error(
"PaintErrors",
"too many points, out of memory");
6493 s2x =
gPad->PixeltoX(
Int_t(0.5*sbasex)) -
gPad->PixeltoX(0);
6494 s2y =-
gPad->PixeltoY(
Int_t(0.5*sbasey)) +
gPad->PixeltoY(0);
6498 bxsize =
gPad->PixeltoX(dxend) -
gPad->PixeltoX(0);
6499 bysize =-
gPad->PixeltoY(dxend) +
gPad->PixeltoY(0);
6506 delta =
fH->GetBinWidth(first);
6507 xp =
fH->GetBinLowEdge(first) + 0.5*delta;
6515 for (k=first; k<=last; k++) {
6533 Double_t w = (xmaxTmp-xminTmp)*width;
6534 xminTmp += offset*(xmaxTmp-xminTmp);
6535 xmaxTmp = xminTmp + w;
6536 xp = (xminTmp+xmaxTmp)/2.;
6539 if (xp <= 0)
goto L30;
6540 if (xp < logxmin)
goto L30;
6543 if (xp <
xmin)
goto L30;
6544 if (xp >
xmax)
break;
6546 yp = factor*
fH->GetBinContent(k);
6547 if (optionI0 && yp==0)
goto L30;
6551 delta =
fH->GetBinWidth(k);
6555 ey1 = factor*
fH->GetBinError(k);
6558 ey1 = factor*
fH->GetBinErrorLow(k);
6559 ey2 = factor*
fH->GetBinErrorUp(k);
6599 if (!option0 && !option3) {
6600 if (
Hoption.Logy && yp < logymin)
goto L30;
6601 if (yi1 < ymin || yi1 >
ymax)
goto L30;
6602 if (
Hoption.Error != 0 && yp == 0 && ey1 <= 0) drawmarker =
kFALSE;
6604 if (!symbolsize || !errormarker) drawmarker =
kFALSE;
6608 if ((yi3 >=
ymax) || (yi4 <=
ymin))
6610 gPad->PaintBox(xi1,yi3,xi2,yi4);
6624 if (
Hoption.Logy && yp < logymin)
6626 if (optionE && drawmarker) {
6627 if ((yi3 < yi1 - s2y) && (yi3 <
ymax))
6629 if ((yi1 + s2y < yi4) && (yi4 >
ymin))
6633 if (yi1<ymax && yi1>
ymin) {
6634 if (xi1 < xi3 - s2x)
6635 add_segment(xi1,yi1,xi3 - s2x,yi2);
6636 if (xi3 + s2x < xi2)
6637 add_segment(xi3 + s2x,yi1,xi2,yi2);
6641 if (optionE && !drawmarker && (ey1 != 0 || ey2 !=0)) {
6642 if ((yi3 < yi1) && (yi3 <
ymax))
6644 if ((yi1 < yi4) && (yi4 >
ymin))
6648 if (yi1<ymax && yi1>
ymin) {
6650 add_segment(xi1,yi1,xi3,yi2);
6652 add_segment(xi3,yi1,xi2,yi2);
6659 if (option1 && drawmarker) {
6661 if (yi3 < yi1-s2y && yi3 < ymax && yi3 >
ymin)
6662 add_segment(xi3 - bxsize, yi3, xi3 + bxsize, yi3);
6663 if (yi4 > yi1+s2y && yi4 < ymax && yi4 >
ymin)
6664 add_segment(xi3 - bxsize, yi4, xi3 + bxsize, yi4);
6665 if (yi1 <= ymax && yi1 >=
ymin) {
6667 add_segment(xi1, yi1 - bysize, xi1, yi1 + bysize);
6669 add_segment(xi2, yi1 - bysize, xi2, yi1 + bysize);
6676 add_marker(xi3, yi1);
6682 delta =
fH->GetBinWidth(k+1);
6683 xp =
fH->GetBinLowEdge(k+1) + 0.5*delta;
6710 if (if2 > npoints) {
6711 for (i=1; i<if1; i++) {
6712 xline[if1-2+i] = xline[if2-1+i];
6713 yline[if1-2+i] = yline[if2-1+i];
6717 if (option4) graph.
PaintGraph(2*npoints,xline.data(),yline.data(),
"FC");
6718 else graph.
PaintGraph(2*npoints,xline.data(),yline.data(),
"F");
6719 gPad->SetLogx(logx);
6720 gPad->SetLogy(logy);
6730 fH->TAttMarker::Modify();
6731 fH->TAttLine::Modify();
6740 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
6741 TView *view =
gPad ?
gPad->GetView() :
nullptr;
6743 Error(
"Paint2DErrors",
"no TView in current pad");
6750 view->
SetView(phideg, thedeg, psideg, irep);
6753 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
6754 fLego->SetFillColor(
gPad->GetFrameFillColor());
6755 fLego->TAttFill::Modify();
6756 Int_t backcolor =
gPad->GetFrameFillColor();
6759 fLego->SetFillStyle(
fH->GetFillStyle());
6760 fLego->SetFillColor(
fH->GetFillColor());
6761 fLego->TAttFill::Modify();
6765 fLego->InitMoveScreen(-1.1,1.1);
6766 fLego->DefineGridLevels(
fZaxis->GetNdivisions()%100);
6780 xyerror =
gStyle->GetErrorX();
6786 ey =
fYaxis->GetBinWidth(j)*xyerror;
6797 yk =
fYaxis->GetBinLowEdge(j);
6798 ystep =
fYaxis->GetBinWidth(j);
6800 xk =
fXaxis->GetBinLowEdge(i);
6801 xstep =
fXaxis->GetBinWidth(i);
6802 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
6805 ex =
fXaxis->GetBinWidth(i)*xyerror;
6818 ez1 =
fH->GetBinError(bin);
6822 ez1 =
fH->GetBinErrorLow(bin);
6823 ez2 =
fH->GetBinErrorUp(bin);
6845 gPad->PaintLine3D(temp1, temp2);
6852 gPad->PaintLine3D(temp1, temp2);
6859 gPad->PaintLine3D(temp1, temp2);
6863 view->
WCtoNDC(temp1, &temp2[0]);
6864 gPad->PaintPolyMarker(1, &temp2[0], &temp2[1]);
6870 fLego->InitMoveScreen(-1.1,1.1);
6872 fLego->FrontBox(90);
6897 if (frame)
gPad->Remove(frame);
6903 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode())
6915 auto obj = lnk->GetObject();
6916 TVirtualPad::TContext ctxt(
true);
6920 TF2 *f2 = (TF2*)obj;
6923 f2->
SetRange(
fH->GetXaxis()->GetXmin(),
fH->GetYaxis()->GetXmin(),
fH->GetXaxis()->GetXmax(),
fH->GetYaxis()->GetXmax() );
6924 f2->
Paint(
"surf same");
6926 obj->
Paint(
"cont3 same");
6933 gPad->PushSelectableObject(obj);
6937 if (!
gPad->PadInHighlightMode() || (
gPad->PadInHighlightMode() && obj ==
gPad->GetSelected()))
6938 obj->
Paint(lnk->GetOption());
6952 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
6955 static char chopth[17];
6957 Int_t htype, oldhtype;
6958 Int_t i, j, first, last, nbins, fixbin;
6962 strlcpy(chopth,
" ",17);
6970 gStyle->SetBarOffset(baroffset);
6971 gStyle->SetBarWidth(barwidth);
6977 nbins = last - first + 1;
6979 std::vector<Double_t> keepx, keepy;
6980 if (
fXaxis->GetXbins()->fN) fixbin = 0;
6982 if (fixbin) keepx.resize(2);
6983 else keepx.resize(nbins+1);
6984 keepy.resize(nbins);
6990 for (j=first; j<=last;j++) {
7000 keepy[j-first] = yb;
7007 for (i=0; i<nbins; i++) keepx[i] =
fXaxis->GetBinLowEdge(i+first);
7008 keepx[nbins] =
fXaxis->GetBinUpEdge(nbins-1+first);
7013 oldhtype =
fH->GetFillStyle();
7016 if (htype == 0 || htype == 1000) htype = 1001;
7023 if (
Hoption.Line) chopth[0] =
'L';
7024 if (
Hoption.Star) chopth[1] =
'*';
7025 if (
Hoption.Mark) chopth[2] =
'P';
7026 if (
Hoption.Mark == 10) chopth[3] =
'0';
7028 if (
Hoption.Curve) chopth[3] =
'C';
7029 if (
Hoption.Hist > 0) chopth[4] =
'H';
7030 else if (
Hoption.Bar) chopth[5] =
'B';
7031 if (
Hoption.Logy) chopth[6] =
'1';
7032 if (
fH->GetFillColor() && htype) {
7038 if (!fixbin && strlen(chopth)) {
7042 if (
Hoption.Fill == 2) chopth[13] =
'2';
7073 graph.
PaintGrapHist(nbins, keepx.data(), keepy.data() ,chopth);
7075 gStyle->SetBarOffset(baroffsetsave);
7076 gStyle->SetBarWidth(barwidthsave);
7088 TString opt = option;
7112 if (strstr(opt,
"iso")) {
7118 TView *view =
gPad ?
gPad->GetView() :
nullptr;
7121 if (strstr(opt,
"fb"))
Hoption.FrontBox = 0;
7122 if (strstr(opt,
"bb"))
Hoption.BackBox = 0;
7127 view->
SetView(phideg, thedeg, psideg, irep);
7130 cmd.
Form(
"TPolyMarker3D::PaintH3((TH1 *)0x%zx,\"%s\");",(
size_t)
fH,option);
7133 TAxis* xAxis =
fH->GetXaxis();
7134 TAxis* yAxis =
fH->GetYaxis();
7135 TAxis* zAxis =
fH->GetZaxis();
7160 if (
fH->GetDrawOption() && strstr(opt,
"colz")) {
7161 Int_t ndiv =
fH->GetContour();
7163 ndiv =
gStyle->GetNumberContours();
7164 fH->SetContour(ndiv);
7175 while (
auto obj = next()) {
7198 static const char *where =
"PaintInit";
7202 if (
fH->GetMaximumStored() != -1111) maximum = 1;
7203 if (
fH->GetMinimumStored() != -1111) minimum = 1;
7219 Error(where,
"cannot set X axis to log scale");
7226 TIter next(
gPad->GetListOfPrimitives());
7227 while ((obj = (
TObject *)next())) {
7238 Error(where,
"undefined user's coordinates. Cannot use option SAME");
7242 for (i=first; i<=last; i++) {
7248 if (binLow == 0 &&
fH->GetBinContent(i) !=0) {
7254 Error(where,
"cannot set X axis to log scale");
7278 Int_t nonNullErrors = 0;
7280 for (i=first; i<=last;i++) {
7281 c1 =
fH->GetBinContent(i);
7290 e1 =
fH->GetBinError(i);
7292 e1 =
fH->GetBinErrorUp(i);
7293 if (e1 > 0) nonNullErrors++;
7296 e1 =
fH->GetBinErrorLow(i);
7305 xv[0] =
fXaxis->GetBinCenter(i);
7310 fval =
f1->
Eval(xv[0],0,0);
7322 if (!nonNullErrors) {
7338 if (maximum)
ymax =
fH->GetMaximumStored();
7339 if (minimum) xm =
fH->GetMinimumStored();
7341 Error(where,
"log scale requested with a negative argument (%f)", xm);
7354 if (!
Hoption.Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)",
ymax);
7362 }
else if (
ymin < 0) {
7381 if (
fH->GetNormFactor() > 0) factor =
fH->GetNormFactor();
7382 if (allchan) factor /= allchan;
7383 if (factor == 0) factor = 1;
7401 Error(where,
"Cannot set Y axis to log scale");
7447 static const char *where =
"PaintInitH";
7451 if (
fH->GetMaximumStored() != -1111) maximum = 1;
7452 if (
fH->GetMinimumStored() != -1111) minimum = 1;
7472 Error(where,
"cannot set Y axis to log scale");
7494 for (i=first; i<=last;i++) {
7495 c1 =
fH->GetBinContent(i);
7499 e1 =
fH->GetBinError(i);
7504 xv[0] =
fXaxis->GetBinCenter(i);
7509 fval =
f1->
Eval(xv[0],0,0);
7528 if (maximum)
xmax =
fH->GetMaximumStored();
7529 if (minimum) xm =
fH->GetMinimumStored();
7530 if (
Hoption.Logx && xm <= 0) {
7531 Error(where,
"log scale requested with zero or negative argument (%f)", xm);
7539 if (!
Hoption.Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)",
xmax);
7547 }
else if (
xmin < 0) {
7560 if (
fH->GetNormFactor() > 0) factor =
fH->GetNormFactor();
7561 if (allchan) factor /= allchan;
7562 if (factor == 0) factor = 1;
7573 Error(where,
"Cannot set Y axis to log scale");
7612 Double_t wxyz[8][3] = { {-1,-1,-1}, {1,-1,-1}, {1,1,-1}, {-1,1,-1},
7613 {-1,-1, 1}, {1,-1, 1}, {1,1, 1}, {-1,1, 1} };
7614 Int_t iface[6][4] = { {0,3,2,1}, {4,5,6,7},
7615 {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7} };
7618 TAxis *xaxis =
fH->GetXaxis();
7619 TAxis *yaxis =
fH->GetYaxis();
7620 TAxis *zaxis =
fH->GetZaxis();
7629 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
7632 TView *view =
gPad ?
gPad->GetView() :
nullptr;
7634 Error(
"PaintH3",
"no TView in current pad");
7641 view->
SetView(phideg, thedeg, psideg, irep);
7643 Int_t backcolor =
gPad->GetFrameFillColor();
7647 fLego->InitMoveScreen(-1.1,1.1);
7649 fLego->DefineGridLevels(
fZaxis->GetNdivisions()%100);
7659 Int_t incrx = (tnorm[ 8] < 0.) ? -1 : +1;
7660 Int_t incry = (tnorm[ 9] < 0.) ? -1 : +1;
7661 Int_t incrz = (tnorm[10] < 0.) ? -1 : +1;
7675 fH->SetFillStyle(1001);
7676 fH->TAttFill::Modify();
7677 fH->TAttLine::Modify();
7686 Double_t pmin[3], pmax[3], sxyz[8][3];
7687 for (
Int_t ix = ix1; ix !=ix2+incrx; ix += incrx) {
7690 for (
Int_t iy = iy1; iy != iy2+incry; iy += incry) {
7693 for (
Int_t iz = iz1; iz != iz2+incrz; iz += incrz) {
7703 if (w < wmin)
continue;
7704 if (w > wmax) w = wmax;
7706 if (scale == 0)
continue;
7707 for (
Int_t i=0; i<3; ++i) {
7710 for (
Int_t k=0; k<8; ++k) {
7711 sxyz[k][i] = wxyz[k][i]*
d +
c;
7714 for (
Int_t k=0; k<8; ++k) {
7715 view->
WCtoNDC(&sxyz[k][0],&sxyz[k][0]);
7718 for (
Int_t k=0; k<6; ++k) {
7719 for (
Int_t i=0; i<4; ++i) {
7720 Int_t iv = iface[k][i];
7724 x[4] =
x[0] ;
y[4] =
y[0];
7726 x[5] =
x[2] ;
y[5] =
y[2];
7727 x[6] =
x[3] ;
y[6] =
y[3];
7728 x[7] =
x[1] ;
y[7] =
y[1];
7734 if (z <= 0.)
continue;
7736 theColor = ncolors*((w-wmin)/(wmax-wmin)) -1;
7737 fH->SetFillColor(
gStyle->GetColorPalette(theColor));
7739 if (k == 3 || k == 5) {
7740 fH->SetFillColor(coldark);
7741 }
else if (k == 0 || k == 1) {
7742 fH->SetFillColor(colbright);
7744 fH->SetFillColor(colsav);
7747 fH->TAttFill::Modify();
7748 gPad->PaintFillArea(4,
x,
y);
7749 if (iopt != 3)
gPad->PaintPolyLine(
n,
x,
y);
7767 Int_t ndiv =
fH->GetContour();
7769 ndiv =
gStyle->GetNumberContours();
7770 fH->SetContour(ndiv);
7778 while (
auto obj = next()) {
7792 fH->SetFillStyle(fillsav);
7793 fH->SetFillColor(colsav);
7794 fH->TAttFill::Modify();
7804 {-1,-1,-1}, {1,-1,-1}, {1,1,-1}, {-1,1,-1},
7805 {-1,-1, 1}, {1,-1, 1}, {1,1, 1}, {-1,1, 1}
7807 Int_t iface[6][4] = {
7808 {0,3,2,1}, {4,5,6,7},
7809 {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7}
7813 {0,-1,0}, {1,0,0}, {0,1,0}, {-1,0,0}
7817 TAxis *xaxis =
fH->GetXaxis();
7818 TAxis *yaxis =
fH->GetYaxis();
7819 TAxis *zaxis =
fH->GetZaxis();
7828 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
7831 TView *view =
gPad ?
gPad->GetView() :
nullptr;
7833 Error(
"PaintH3",
"no TView in current pad");
7840 view->
SetView(phideg, thedeg, psideg, irep);
7842 Int_t backcolor =
gPad->GetFrameFillColor();
7847 fLego->InitMoveScreen(-1.1,1.1);
7852 fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
7857 Int_t incrx = (tnorm[ 8] < 0.) ? +1 : -1;
7858 Int_t incry = (tnorm[ 9] < 0.) ? +1 : -1;
7859 Int_t incrz = (tnorm[10] < 0.) ? +1 : -1;
7868 fH->TAttLine::Modify();
7871 const Int_t NTMAX = 100;
7876 Double_t pmin[3], pmax[3], sxyz[8][3], pp[4][2];
7877 for (
Int_t ix = ix1; ix !=ix2+incrx; ix += incrx) {
7880 for (
Int_t iy = iy1; iy != iy2+incry; iy += incry) {
7883 for (
Int_t iz = iz1; iz != iz2+incrz; iz += incrz) {
7892 if (w < wmin)
continue;
7893 if (w > wmax) w = wmax;
7895 if (scale == 0)
continue;
7896 for (
Int_t i=0; i<3; ++i) {
7899 for (
Int_t k=0; k<8; ++k) {
7900 sxyz[k][i] = wxyz[k][i]*
d +
c;
7903 for (
Int_t k=0; k<8; ++k) {
7904 view->
WCtoNDC(&sxyz[k][0],&sxyz[k][0]);
7906 for (
Int_t k=0; k<6; ++k) {
7908 view->
FindNormal(normal[k][0], normal[k][1], normal[k][2], zn);
7909 if (zn <= 0)
continue;
7910 for (
Int_t i=0; i<4; ++i) {
7911 Int_t ip = iface[k][i];
7912 pp[i][0] = sxyz[ip][0];
7913 pp[i][1] = sxyz[ip][1];
7915 for (
Int_t i=0; i<4; ++i) {
7917 Int_t i2 = (i == 3) ? 0 : i + 1;
7919 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7920 Double_t xdel = pp[i2][0] - pp[i1][0];
7921 Double_t ydel = pp[i2][1] - pp[i1][1];
7923 for (
Int_t it = 0; it < nt; ++it) {
7924 x[0] = pp[i1][0] + xdel*
tt[it][0];
7925 y[0] = pp[i1][1] + ydel*
tt[it][0];
7926 x[1] = pp[i1][0] + xdel*
tt[it][1];
7927 y[1] = pp[i1][1] + ydel*
tt[it][1];
7928 gPad->PaintPolyLine(2,
x,
y);
7935 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7936 Double_t xdel = pp[i2][0] - pp[i1][0];
7937 Double_t ydel = pp[i2][1] - pp[i1][1];
7939 for (
Int_t it = 0; it < nt; ++it) {
7940 x[0] = pp[i1][0] + xdel*
tt[it][0];
7941 y[0] = pp[i1][1] + ydel*
tt[it][0];
7942 x[1] = pp[i1][0] + xdel*
tt[it][1];
7943 y[1] = pp[i1][1] + ydel*
tt[it][1];
7944 gPad->PaintPolyLine(2,
x,
y);
7948 fLego->FindVisibleLine(&pp[i1][0], &pp[i2][0], NTMAX, nt, &
tt[0][0]);
7949 xdel = pp[i2][0] - pp[i1][0];
7950 ydel = pp[i2][1] - pp[i1][1];
7951 for (
Int_t it = 0; it < nt; ++it) {
7952 x[0] = pp[i1][0] + xdel*
tt[it][0];
7953 y[0] = pp[i1][1] + ydel*
tt[it][0];
7954 x[1] = pp[i1][0] + xdel*
tt[it][1];
7955 y[1] = pp[i1][1] + ydel*
tt[it][1];
7956 gPad->PaintPolyLine(2,
x,
y);
7959 fLego->FillPolygonBorder(4, &pp[0][0]);
7967 fLego->DefineGridLevels(
fZaxis->GetNdivisions()%100);
7984 while (
auto obj = next()) {
8015 Int_t ic2 = ic1+nbcol;
8016 Int_t ic3 = ic2+nbcol;
8018 TAxis *xaxis =
fH->GetXaxis();
8019 TAxis *yaxis =
fH->GetYaxis();
8020 TAxis *zaxis =
fH->GetZaxis();
8026 std::vector<Double_t>
x(nx);
8027 std::vector<Double_t>
y(ny);
8028 std::vector<Double_t> z(nz);
8042 s[0] =
fH->GetSumOfWeights()/(
fH->GetNbinsX()*
fH->GetNbinsY()*
fH->GetNbinsZ());
8046 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
8048 TView *view =
gPad ?
gPad->GetView() :
nullptr;
8050 Error(
"PaintH3Iso",
"no TView in current pad");
8056 view->
SetView(phideg, thedeg, psideg, irep);
8058 Int_t backcolor =
gPad->GetFrameFillColor();
8063 TColor *colref =
gROOT->GetColor(
fH->GetFillColor());
8071 for (
Int_t col=0;col<nbcol;col++) {
8077 fLego->InitMoveScreen(-1.1,1.1);
8080 fLego->DefineGridLevels(
fZaxis->GetNdivisions()%100);
8085 fLego->LightSource(0, ydiff, 0, 0, 0, irep);
8086 fLego->LightSource(1, yligh1, 1, 1, 1, irep);
8087 fLego->SurfaceProperty(qa, qd, qs, 1, irep);
8089 fmax = ydiff*qa + (yligh1+0.1)*(qd+qs);
8090 fLego->SetIsoSurfaceParameters(fmin, fmax, nbcol, ic1, ic2, ic3);
8092 fLego->IsoSurface(1, s, nx, ny, nz,
x.data(),
y.data(), z.data(),
"BF");
8095 fLego->InitMoveScreen(-1.1,1.1);
8097 fLego->FrontBox(90);
8109 while (
auto obj = next()) {
8142 if (deltaz == 0) deltaz = 1;
8148 Double_t z2c = zmin + (zmax-zmin)*(1+
gStyle->GetHistTopMargin());
8189 TH1 * hid =
nullptr;
8190 Color_t colormain = -1, colordark = -1;
8201 drawShadowsInLego1 =
kFALSE;
8205 Int_t ndiv =
fH->GetContour();
8207 ndiv =
gStyle->GetNumberContours();
8208 fH->SetContour(ndiv);
8215 fLego->SetEdgeAtt(
fH->GetLineColor(),
fH->GetLineStyle(),
fH->GetLineWidth(),0);
8218 hid = (TH1*)
fStack->At((
id==0)?
id:
id-1);
8227 for (
Int_t id=0;
id<=nids;
id++) {
8230 if (colormain == 1) colormain = 17;
8232 else colordark = colormain;
8233 fLego->SetColorMain(colormain,
id);
8234 fLego->SetColorDark(colordark,
id);
8235 if (
id <= 1)
fLego->SetColorMain(colormain,-1);
8236 if (
id == nids)
fLego->SetColorMain(colormain,99);
8243 TView *view =
gPad ?
gPad->GetView() :
nullptr;
8245 Error(
"PaintLego",
"no TView in current pad");
8252 view->
SetView(phideg, thedeg, psideg, irep);
8255 fLego->SetFillStyle(
fH->GetFillStyle());
8258 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
8259 fLego->SetFillColor(
gPad->GetFrameFillColor());
8260 fLego->TAttFill::Modify();
8262 Int_t backcolor =
gPad->GetFrameFillColor();
8266 fLego->SetFillStyle(
fH->GetFillStyle());
8267 fLego->SetFillColor(
fH->GetFillColor());
8268 fLego->TAttFill::Modify();
8270 fLego->DefineGridLevels(
fZaxis->GetNdivisions()%100);
8272 if (raster)
fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
8273 else fLego->InitMoveScreen(-1.1,1.1);
8298 if (
Hoption.Lego == 11)
fLego->LegoPolar(1,nx,ny,
"BF");
8299 if (
Hoption.Lego == 12)
fLego->LegoPolar(1,nx,ny,
"BF");
8301 if (
Hoption.Lego == 1)
fLego->LegoCylindrical(1,nx,ny,
"FB");
8302 if (
Hoption.Lego == 11)
fLego->LegoCylindrical(1,nx,ny,
"BF");
8303 if (
Hoption.Lego == 12)
fLego->LegoCylindrical(1,nx,ny,
"BF");
8305 if (
Hoption.Lego == 1)
fLego->LegoSpherical(0,1,nx,ny,
"FB");
8306 if (
Hoption.Lego == 11)
fLego->LegoSpherical(0,1,nx,ny,
"BF");
8307 if (
Hoption.Lego == 12)
fLego->LegoSpherical(0,1,nx,ny,
"BF");
8309 if (
Hoption.Lego == 1)
fLego->LegoSpherical(1,1,nx,ny,
"FB");
8310 if (
Hoption.Lego == 11)
fLego->LegoSpherical(1,1,nx,ny,
"BF");
8311 if (
Hoption.Lego == 12)
fLego->LegoSpherical(1,1,nx,ny,
"BF");
8315 fLego->LegoCartesian(90,nx,ny,
"FB");}
8316 if (
Hoption.Lego == 11)
fLego->LegoCartesian(90,nx,ny,
"BF");
8317 if (
Hoption.Lego == 12)
fLego->LegoCartesian(90,nx,ny,
"BF");
8327 fLego->InitMoveScreen(-1.1,1.1);
8350 Int_t ndivx, ndivy, ndivz, i;
8351 Double_t x1[3], x2[3], y1[3], y2[3], z1[3], z2[3], av[24] ;
8352 static char chopax[8], chopay[8], chopaz[8];
8353 Int_t ix1, ix2, iy1, iy2, iz1, iz2;
8356 TView *view =
gPad ?
gPad->GetView() :
nullptr;
8358 Error(
"PaintLegoAxis",
"no TView in current pad");
8373 gPad->PaintLine(x1[0],x1[1],x2[0],x2[1]);
8383 view->
AxisVertex(ang, av, ix1, ix2, iy1, iy2, iz1, iz2);
8384 for (i = 1; i <= 8; ++i) {
8385 r[i*3 - 3] = av[i*3 - 3] + av[i*3 - 2]*cosa;
8386 r[i*3 - 2] = av[i*3 - 2]*sina;
8387 r[i*3 - 1] = av[i*3 - 1];
8401 if (!rmin || !rmax)
return;
8404 if (x1[0] > x2[0]) strlcpy(chopax,
"SDH=+",8);
8405 else strlcpy(chopax,
"SDH=-",8);
8406 if (y1[0] > y2[0]) strlcpy(chopay,
"SDH=+",8);
8407 else strlcpy(chopay,
"SDH=-",8);
8408 if (z2[1] > z1[1]) strlcpy(chopaz,
"SDH=+",8);
8409 else strlcpy(chopaz,
"SDH=-",8);
8412 if (
Hoption.Logx) strlcat(chopax,
"G",8);
8413 if (
Hoption.Logy) strlcat(chopay,
"G",8);
8414 if (
Hoption.Logz) strlcat(chopaz,
"G",8);
8418 ndivx =
fXaxis->GetNdivisions();
8419 ndivy =
fYaxis->GetNdivisions();
8420 ndivz =
fZaxis->GetNdivisions();
8423 strlcat(chopax,
"N",8);
8427 strlcat(chopay,
"N",8);
8431 strlcat(chopaz,
"N",8);
8452 if (
fXaxis->GetTimeDisplay()) {
8453 strlcat(chopax,
"t",8);
8454 if (strlen(
fXaxis->GetTimeFormatOnly()) == 0) {
8461 axis->
PaintAxis(x1[0], x1[1], x2[0], x2[1], bmin, bmax, ndivx, chopax);
8470 if (
fH->GetDimension() < 2) {
8471 strlcpy(chopay,
"V=+UN",8);
8485 if (
fYaxis->GetTimeDisplay()) {
8486 strlcat(chopay,
"t",8);
8487 if (strlen(
fYaxis->GetTimeFormatOnly()) == 0) {
8494 axis->
PaintAxis(y1[0], y1[1], y2[0], y2[1], bmin, bmax, ndivy, chopay);
8508 if (
fZaxis->GetTimeDisplay()) {
8509 strlcat(chopaz,
"t",8);
8510 if (strlen(
fZaxis->GetTimeFormatOnly()) == 0) {
8517 TString ztit =
fZaxis->GetTitle();
8518 if (ztit.
Index(
";")>0) {
8522 axis->
PaintAxis(z1[0], z1[1], z2[0], z2[1], bmin, bmax, ndivz, chopaz);
8533 TPaletteAxis *palette = (TPaletteAxis*)
fFunctions->FindObject(
"palette");
8534 TView *view =
gPad ?
gPad->GetView() :
nullptr;
8539 delete palette; palette =
nullptr;
8544 delete palette; palette =
nullptr;
8572 fH->TAttMarker::Modify();
8580 if (zmin == 0 && zmax == 0)
return;
8591 if (zmin == 0 && zmax == 0)
return;
8594 if (ncells > 10000) scale /= 5;
8598 if (dz >= kNMAX || zmax < 1) {
8599 scale = (kNMAX-1)/dz;
8600 if (ncells > 10000) scale /= 5;
8604 if (
fH->GetMinimumStored() == -1111) {
8607 if (zmin >= 0) zmin = 0;
8608 else zmin -= yMARGIN*(zmax-zmin);
8610 Double_t dzmin = yMARGIN*(zmax-zmin);
8611 if (zmin >= 0 && (zmin-dzmin <= 0)) zmin = 0;
8616 TString opt = option;
8620 strlcpy(optscat,opt.
Data(),100);
8621 char *oscat = strstr(optscat,
"scat=");
8622 char *blank = strstr(oscat,
" ");
if (blank) *blank = 0;
8623 sscanf(oscat+5,
"%lg",&scale);
8631 yk =
fYaxis->GetBinLowEdge(j);
8632 ystep =
fYaxis->GetBinWidth(j);
8635 xk =
fXaxis->GetBinLowEdge(i);
8636 xstep =
fXaxis->GetBinWidth(i);
8637 if (!
IsInside(xk+0.5*xstep,yk+0.5*ystep))
continue;
8639 if (z < zmin) z = zmin;
8640 if (z > zmax) z = zmax;
8646 if (z <= 0)
continue;
8650 for (
Int_t loop=0; loop<k; loop++) {
8651 if (k+marker >= kNMAX) {
8655 fXbuf[marker] = (random.
Rndm()*xstep) + xk;
8656 fYbuf[marker] = (random.
Rndm()*ystep) + yk;
8665 if (
fXbuf[marker] <
gPad->GetUxmin())
break;
8666 if (
fYbuf[marker] <
gPad->GetUymin())
break;
8667 if (
fXbuf[marker] >
gPad->GetUxmax())
break;
8668 if (
fYbuf[marker] >
gPad->GetUymax())
break;
8674 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
8693 TH2F *R__TMatrixFBase =
new TH2F((
TMatrixFBase &)*obj);
8695 R__TMatrixFBase->
Draw(option);
8699 TH2D *R__TMatrixDBase =
new TH2D((
TMatrixDBase &)*obj);
8701 R__TMatrixDBase->
Draw(option);
8705 TH1F *R__TVectorF =
new TH1F((
TVectorF &)*obj);
8707 R__TVectorF->
Draw(option);
8711 TH1D *R__TVectorD =
new TH1D((
TVectorD &)*obj);
8713 R__TVectorD->
Draw(option);
8724 TPaveStats *stats =
nullptr;
8726 while (
auto obj = next()) {
8728 stats = (TPaveStats*)obj;
8733 if (stats && dostat) {
8737 dofit =
gStyle->GetOptFit();
8739 if (!dofit) fit =
nullptr;
8740 if (dofit == 1) dofit = 111;
8741 if (dostat == 1) dostat = 1111;
8742 Int_t print_name = dostat%10;
8743 Int_t print_entries = (dostat/10)%10;
8744 Int_t print_mean = (dostat/100)%10;
8745 Int_t print_stddev = (dostat/1000)%10;
8746 Int_t print_under = (dostat/10000)%10;
8747 Int_t print_over = (dostat/100000)%10;
8748 Int_t print_integral= (dostat/1000000)%10;
8749 Int_t print_skew = (dostat/10000000)%10;
8750 Int_t print_kurt = (dostat/100000000)%10;
8751 Int_t nlines = print_name + print_entries + print_mean + print_stddev +
8752 print_under + print_over + print_integral +
8753 print_skew + print_kurt;
8754 Int_t print_fval = dofit%10;
8755 Int_t print_ferrors = (dofit/10)%10;
8756 Int_t print_fchi2 = (dofit/100)%10;
8757 Int_t print_fprob = (dofit/1000)%10;
8758 Int_t nlinesf = print_fval + print_fchi2 + print_fprob;
8761 else nlinesf += fit->
GetNpar();
8767 if (!dostat && !fit) {
8768 if (stats) {
fFunctions->Remove(stats);
delete stats;}
8772 if (fit) statw = 1.8*
gStyle->GetStatW();
8774 if (stath <= 0 || 3 == (
gStyle->GetStatFont()%10)) {
8775 stath = 0.25*(nlines+nlinesf)*
gStyle->GetStatH();
8781 stats =
new TPaveStats(
8782 gStyle->GetStatX()-statw,
8783 gStyle->GetStatY()-stath,
8785 gStyle->GetStatY(),
"brNDC");
8794 if (
gStyle->GetStatFont()%10 > 2)
8805 if (print_name) stats->
AddText(
fH->GetName());
8806 if (print_entries) {
8807 if (
fH->GetEntries() < 1e7)
tt.Form(
"%s = %-7d",gStringEntries.
Data(),
Int_t(
fH->GetEntries()+0.5));
8808 else tt.Form(
"%s = %14.7g",gStringEntries.
Data(),
Float_t(
fH->GetEntries()));
8812 if (print_mean == 1) {
8818 tt.Form(tf.
Data(),
fH->GetMean(1),
fH->GetMeanError(1));
8822 if (print_mean == 1) {
8828 tt.Form(tf.
Data(),
fH->GetMean(2),
fH->GetMeanError(2));
8834 if (print_stddev == 1) {
8836 tt.Form(tf.
Data(),
fH->GetStdDev(1));
8840 tt.Form(tf.
Data(),
fH->GetStdDev(1),
fH->GetStdDevError(1));
8844 if (print_stddev == 1) {
8846 tt.Form(tf.
Data(),
fH->GetStdDev(2));
8850 tt.Form(tf.
Data(),
fH->GetStdDev(2),
fH->GetStdDevError(2));
8857 tt.Form(tf.
Data(),
fH->GetBinContent(0));
8865 if (print_integral) {
8866 if (print_integral == 1) {
8871 tt.Form(tf.
Data(),
fH->Integral(
"width"));
8876 if (print_skew == 1) {
8878 tt.Form(tf.
Data(),
fH->GetSkewness(1));
8882 tt.Form(tf.
Data(),
fH->GetSkewness(1),
fH->GetSkewness(11));
8887 if (print_kurt == 1) {
8889 tt.Form(tf.
Data(),
fH->GetKurtosis(1));
8893 tt.Form(tf.
Data(),
fH->GetKurtosis(1),
fH->GetKurtosis(11));
8903 if (print_fchi2) stats->
AddText(
tt.Data());
8909 if (print_fval || print_ferrors) {
8913 if (print_fval < 2 && parmin*parmax != 0 && parmin >= parmax)
continue;
8914 if (print_ferrors) {
8938 if (
fH->GetDimension() != 2)
return;
8943 TPaveStats *stats =
nullptr;
8945 while (
auto obj = next()) {
8947 stats = (TPaveStats*)obj;
8951 if (stats && dostat) {
8955 dofit =
gStyle->GetOptFit();
8957 if (dostat == 1) dostat = 1111;
8958 Int_t print_name = dostat%10;
8959 Int_t print_entries = (dostat/10)%10;
8960 Int_t print_mean = (dostat/100)%10;
8961 Int_t print_stddev = (dostat/1000)%10;
8962 Int_t print_under = (dostat/10000)%10;
8963 Int_t print_over = (dostat/100000)%10;
8964 Int_t print_integral= (dostat/1000000)%10;
8965 Int_t print_skew = (dostat/10000000)%10;
8966 Int_t print_kurt = (dostat/100000000)%10;
8967 Int_t nlines = print_name + print_entries + 2*print_mean + 2*print_stddev + print_integral;
8968 if (print_under || print_over) nlines += 3;
8971 if (!
gStyle->GetOptFit()) fit =
nullptr;
8973 if (!dostat && !fit) {
8974 if (stats) {
fFunctions->Remove(stats);
delete stats;}
8978 if (fit) statw = 1.8*
gStyle->GetStatW();
8980 if (stath <= 0 || 3 == (
gStyle->GetStatFont()%10)) {
8981 stath = 0.25*nlines*
gStyle->GetStatH();
8983 if (fit) stath +=
gStyle->GetStatH();
8988 stats =
new TPaveStats(
8989 gStyle->GetStatX()-statw,
8990 gStyle->GetStatY()-stath,
8992 gStyle->GetStatY(),
"brNDC");
9005 if (
gStyle->GetStatFont()%10 > 2)
9013 if (print_entries) {
9019 if (print_mean == 1) {
9038 if (print_stddev == 1) {
9056 if (print_integral) {
9062 if (print_skew == 1) {
9081 if (print_kurt == 1) {
9099 if (print_under || print_over) {
9110 unov[0] = h2->
Integral( 0, firstX-1, lastY+1, cellsY );
9111 unov[1] = h2->
Integral(firstX , lastX , lastY+1, cellsY );
9112 unov[2] = h2->
Integral(lastX+1, cellsX , lastY+1, cellsY );
9113 unov[3] = h2->
Integral( 0, firstX-1, firstY , lastY );
9114 unov[4] = h2->
Integral(firstX , lastX , firstY , lastY );
9115 unov[5] = h2->
Integral(lastX+1, cellsX , firstY , lastY );
9116 unov[6] = h2->
Integral( 0, firstX-1, 0, firstY-1);
9117 unov[7] = h2->
Integral(firstX, lastX, 0, firstY-1);
9118 unov[8] = h2->
Integral(lastX+1, cellsX , 0, firstY-1);
9120 tt.Form(
"%g|%g|%g\n", unov[0], unov[1], unov[2]);
9122 tt.Form(
"%g|%g|%g\n", unov[3], unov[4], unov[5]);
9124 tt.Form(
"%g|%g|%g\n", unov[6], unov[7], unov[8]);
9134 tt.Form(
"%-8s = %5.4g #pm %5.4g ",fit->
GetParName(ipar)
9151 if (
fH->GetDimension() != 3)
return;
9156 TPaveStats *stats =
nullptr;
9158 while (
auto obj = next()) {
9160 stats = (TPaveStats*)obj;
9164 if (stats && dostat) {
9168 dofit =
gStyle->GetOptFit();
9170 if (dostat == 1) dostat = 1111;
9171 Int_t print_name = dostat%10;
9172 Int_t print_entries = (dostat/10)%10;
9173 Int_t print_mean = (dostat/100)%10;
9174 Int_t print_stddev = (dostat/1000)%10;
9175 Int_t print_under = (dostat/10000)%10;
9176 Int_t print_over = (dostat/100000)%10;
9177 Int_t print_integral= (dostat/1000000)%10;
9178 Int_t print_skew = (dostat/10000000)%10;
9179 Int_t print_kurt = (dostat/100000000)%10;
9180 Int_t nlines = print_name + print_entries + 3*print_mean + 3*print_stddev + print_integral;
9181 if (print_under || print_over) nlines += 3;
9184 if (!
gStyle->GetOptFit()) fit =
nullptr;
9186 if (!dostat && !fit) {
9187 if (stats) {
fFunctions->Remove(stats);
delete stats;}
9191 if (fit) statw = 1.8*
gStyle->GetStatW();
9193 if (stath <= 0 || 3 == (
gStyle->GetStatFont()%10)) {
9194 stath = 0.25*nlines*
gStyle->GetStatH();
9196 if (fit) stath +=
gStyle->GetStatH();
9201 stats =
new TPaveStats(
9202 gStyle->GetStatX()-statw,
9203 gStyle->GetStatY()-stath,
9205 gStyle->GetStatY(),
"brNDC");
9224 if (print_entries) {
9230 if (print_mean == 1) {
9256 if (print_stddev == 1) {
9281 if (print_integral) {
9286 if (print_skew == 1) {
9312 if (print_kurt == 1) {
9337 if (print_under || print_over) {
9348 tt.Form(
"%-8s = %5.4g #pm %5.4g ",fit->
GetParName(ipar)
9385 if (deltaz == 0) deltaz = 1;
9391 Double_t z2c = zmin + (zmax-zmin)*(1+
gStyle->GetHistTopMargin());
9429 fLego->SetEdgeAtt(
fH->GetLineColor(),
fH->GetLineStyle(),
fH->GetLineWidth(),0);
9430 fLego->SetFillColor(
fH->GetFillColor());
9433 Int_t ndiv =
fH->GetContour();
9435 ndiv =
gStyle->GetNumberContours();
9436 fH->SetContour(ndiv);
9450 TView *view =
gPad ?
gPad->GetView() :
nullptr;
9452 Error(
"PaintSurface",
"no TView in current pad");
9459 view->
SetView(phideg, thedeg, psideg, irep);
9463 fLego->SetFillStyle(0);
9464 fLego->SetFillColor(1);
9466 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
9467 fLego->SetFillColor(
gPad->GetFrameFillColor());
9469 fLego->TAttFill::Modify();
9471 Int_t backcolor =
gPad->GetFrameFillColor();
9475 fLego->SetFillStyle(
fH->GetFillStyle());
9476 fLego->SetFillColor(
fH->GetFillColor());
9477 fLego->TAttFill::Modify();
9480 Int_t icol1 =
fH->GetFillColor();
9497 if (raster)
fLego->InitRaster(-1.1,-1.1,1.1,1.1,1000,800);
9498 else fLego->InitMoveScreen(-1.1,1.1);
9501 fLego->DefineGridLevels(
fZaxis->GetNdivisions()%100);
9511 fLego->LightSource(0, ydiff, 0,0,0,irep);
9512 fLego->LightSource(1, yligh1 ,1,1,1,irep);
9513 fLego->SurfaceProperty(qa, qd, qs, 1, irep);
9515 fmax = fmin + (yligh1+0.1)*(qd+qs);
9520 if (!colref)
return;
9525 for (
Int_t col=0;col<nbcol;col++) {
9530 fLego->Spectrum(nbcol, fmin, fmax, icol1, 1, irep);
9538 }
else if (
Hoption.Surf == 15) {
9545 fLego->DefineGridLevels(
fZaxis->GetNdivisions()%100);
9572 fLego->InitMoveScreen(-1.1,1.1);
9573 fLego->DefineGridLevels(
fZaxis->GetNdivisions()%100);
9592 fLego->InitMoveScreen(-1.1,1.1);
9612 TGraphDelaunay2D *dt =
nullptr;
9613 TGraphDelaunay *dtOld =
nullptr;
9616 TList *hl =
fH->GetListOfFunctions();
9617 dt = (TGraphDelaunay2D*)hl->
FindObject(
"TGraphDelaunay2D");
9618 if (!dt) dtOld = (TGraphDelaunay*)hl->
FindObject(
"TGraphDelaunay");
9619 if (!dt && !dtOld)
return;
9623 fGraph2DPainter = dt ? std::make_unique<TGraph2DPainter>(dt) : std::make_unique<TGraph2DPainter>(dtOld);
9628 TView *viewsame = gPad ? gPad->GetView() : nullptr;
9630 Error(
"PaintTriangles",
"no TView in current pad, do not use option SAME");
9633 Double_t *rmin = viewsame->GetRmin();
9634 Double_t *rmax = viewsame->GetRmax();
9635 if (!rmin || !rmax)
return;
9642 fH->SetMaximum(rmax[2]);
9643 fH->SetMinimum(rmin[2]);
9644 fH->GetXaxis()->SetRangeUser(rmin[0],rmax[0]);
9645 fH->GetYaxis()->SetRangeUser(rmin[1],rmax[1]);
9655 fLego = std::make_unique<TPainter3dAlgorithms>(fXbuf.data(), fYbuf.data());
9658 Error(
"PaintTriangles",
"no TView in current pad");
9665 view->
SetView(phideg, thedeg, psideg, irep);
9668 fLego->SetFillStyle(
gPad->GetFrameFillStyle());
9669 fLego->SetFillColor(
gPad->GetFrameFillColor());
9670 fLego->TAttFill::Modify();
9671 Int_t backcolor =
gPad->GetFrameFillColor();
9674 fLego->SetFillStyle(fH->GetFillStyle());
9675 fLego->SetFillColor(fH->GetFillColor());
9676 fLego->TAttFill::Modify();
9680 fLego->InitMoveScreen(-1.1,1.1);
9681 fLego->DefineGridLevels(fZaxis->GetNdivisions()%100);
9687 fGraph2DPainter->Paint(option);
9691 fLego->InitMoveScreen(-1.1,1.1);
9693 fLego->FrontBox(90);
9699 PaintLegoAxis(&axis, 90);
9702 if (
Hoption.Zscale) PaintPalette();
9717 Warning(
"PaintSurface",
"too many color levels, %d >= 100, reset to 99", ndivz);
9720 std::vector<Double_t> funlevel(ndivz+1);
9721 std::vector<Int_t> colorlevel(ndivz+1);
9724 for (i = 0; i < ndivz; ++i) {
9725 funlevel[i] =
fH->GetContourLevelPad(i);
9727 colorlevel[i] =
gStyle->GetColorPalette(theColor);
9729 colorlevel[ndivz] =
gStyle->GetColorPalette(ncolors-1);
9730 fLego->ColorFunction(ndivz, funlevel.data(), colorlevel.data(), irep);
9748 if (palette) {
fFunctions->Remove(palette);
delete palette;}
9754 Int_t ndiv =
fH->GetContour();
9756 ndiv =
gStyle->GetNumberContours();
9757 fH->SetContour(ndiv);
9798 while (
auto obj = next()) {
9806 if (!
gPad->PadInSelectionMode() && !
gPad->PadInHighlightMode()) {
9826 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
return;
9828 TString opt = option;
9840 TIter next(((TH2Poly*)
fH)->GetBins());
9843 while ((obj=next())) {
9844 b = (TH2PolyBin*)obj;
9846 if (z==0 &&
Hoption.Zero)
continue;
9847 poly =
b->GetPolygon();
9851 TGraph *
g = (TGraph*)poly;
9852 g->TAttLine::Modify();
9853 g->TAttMarker::Modify();
9854 g->TAttFill::Modify();
9856 Int_t fs =
g->GetFillStyle();
9859 gStyle->SetDrawBorder(1);
9861 gStyle->SetDrawBorder(db);
9862 g->SetFillStyle(fs);
9864 if (fill)
g->Paint(
"F");
9865 if (mark)
g->Paint(
"P");
9870 TMultiGraph *mg = (TMultiGraph*)poly;
9875 while ((
g = (TGraph*) nextg())) {
9876 g->TAttLine::Modify();
9877 g->TAttMarker::Modify();
9878 g->TAttFill::Modify();
9880 Int_t fs =
g->GetFillStyle();
9883 gStyle->SetDrawBorder(1);
9885 gStyle->SetDrawBorder(db);
9886 g->SetFillStyle(fs);
9888 if (fill)
g->Paint(
"F");
9889 if (mark)
g->Paint(
"P");
9902 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
9905 Int_t ncolors, color, theColor;
9921 ncolors =
gStyle->GetNumberOfColors();
9922 Int_t ndiv =
fH->GetContour();
9924 ndiv =
gStyle->GetNumberContours();
9925 fH->SetContour(ndiv);
9931 TIter next(((TH2Poly*)
fH)->GetBins());
9933 while (
auto obj = next()) {
9934 TH2PolyBin *
b = (TH2PolyBin*)obj;
9938 if (z==0 &&
Hoption.Zero)
continue;
9943 if (z < zmin)
continue;
9947 zc =
fH->GetContourLevelPad(0);
9948 if (z < zc)
continue;
9950 for (
Int_t k=0; k<ndiv; k++) {
9951 zc =
fH->GetContourLevelPad(k);
9962 if (theColor > ncolors-1) theColor = ncolors-1;
9964 auto rootColor =
gStyle->GetColorPalette(theColor);
9968 TGraph *
g = (TGraph*)poly;
9969 auto origin =
g->GetFillColor();
9970 g->SetFillColor(rootColor);
9971 g->TAttFill::Modify();
9973 g->SetFillColor(origin);
9978 TMultiGraph *mg = (TMultiGraph*)poly;
9980 while (
auto g = (TGraph*) nextg()) {
9981 auto origin =
g->GetFillColor();
9982 g->SetFillColor(rootColor);
9983 g->TAttFill::Modify();
9985 g->SetFillColor(origin);
9999 if (
gPad->PadInHighlightMode() &&
gPad->GetSelected() !=
fH)
10002 Int_t k, loop, marker=0;
10003 Double_t z, xk,xstep, yk, ystep, xp, yp;
10017 scale = (kNMAX-1)/dz;
10027 TIter next(((TH2Poly*)
fH)->GetBins());
10031 while ((obj=next())) {
10032 b = (TH2PolyBin*)obj;
10034 if (
a>maxarea) maxarea =
a;
10039 while ((obj=next())) {
10040 b = (TH2PolyBin*)obj;
10041 poly =
b->GetPolygon();
10043 if (z < zmin) z = zmin;
10044 if (z > zmax) z = zmax;
10050 k =
Int_t((z*scale)*(
b->GetArea()/maxarea));
10053 xstep =
b->GetXMax()-xk;
10054 ystep =
b->GetYMax()-yk;
10058 TGraph *
g = (TGraph*)poly;
10059 if (k <= 0 || z <= 0)
continue;
10062 if (k+marker >= kNMAX) {
10066 xp = (random.
Rndm()*xstep) + xk;
10067 yp = (random.
Rndm()*ystep) + yk;
10068 if (
g->IsInside(xp,yp)) {
10069 fXbuf[marker] = xp;
10070 fYbuf[marker] = yp;
10075 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
10080 TMultiGraph *mg = (TMultiGraph*)poly;
10083 if (k <= 0 || z <= 0)
continue;
10086 if (k+marker >= kNMAX) {
10090 xp = (random.
Rndm()*xstep) + xk;
10091 yp = (random.
Rndm()*ystep) + yk;
10093 fXbuf[marker] = xp;
10094 fYbuf[marker] = yp;
10099 if (marker > 0)
gPad->PaintPolyMarker(marker,
fXbuf.data(),
fYbuf.data());
10118 tf.
Form(
"%s%s",
"%",
gStyle->GetPaintTextFormat());
10123 if (
Hoption.Text == 1) angle = 0;
10125 text.TAttText::Modify();
10129 TIter next(((TH2Poly*)
fH)->GetBins());
10132 while ((obj=next())) {
10133 b = (TH2PolyBin*)obj;
10134 p =
b->GetPolygon();
10135 x = (
b->GetXMin()+
b->GetXMax())/2;
10140 y = (
b->GetYMin()+
b->GetYMax())/2;
10146 if (z < fH->GetMinimum() || (z == 0 && !
Hoption.MinimumZero))
continue;
10148 e =
fH->GetBinError(
b->GetBinNumber());
10149 tf.
Form(
"#splitline{%s%s}{#pm %s%s}",
10150 "%",
gStyle->GetPaintTextFormat(),
10151 "%",
gStyle->GetPaintTextFormat());
10156 if (opt==3)
text.PaintLatex(
x,
y,angle,0.02*
fH->GetMarkerSize(),p->
GetName());
10157 else text.PaintLatex(
x,
y,angle,0.02*
fH->GetMarkerSize(),
tt.Data());
10176 tf.
Form(
"%s%s",
"%",
gStyle->GetPaintTextFormat());
10180 if (
fH->GetDimension() == 1) {
10183 TProfile *hp = (TProfile*)
fH;
10186 getentries =
kTRUE;
10188 if (
Hoption.Text == 1) angle = 90;
10192 text.TAttText::Modify();
10196 x =
fH->GetXaxis()->GetBinLowEdge(i)+
10197 fH->GetXaxis()->GetBinWidth(i)*
10198 (
fH->GetBarOffset()+0.5*
fH->GetBarWidth());
10200 x =
fH->GetXaxis()->GetBinCenter(i);
10202 y =
fH->GetBinContent(i);
10206 if (yt == 0.)
continue;
10216 if (
y >=
gPad->GetY2())
continue;
10218 text.PaintLatex(
x,
y+0.2*dt,angle,0.02*
fH->GetMarkerSize(),
tt.Data());
10227 if (
Hoption.Text == 1) angle = 0;
10229 text.TAttText::Modify();
10245 if (z < zmin || (z == 0 && !
Hoption.MinimumZero))
continue;
10247 e =
fH->GetBinError(bin);
10248 tf.
Form(
"#splitline{%s%s}{#pm %s%s}",
10249 "%",
gStyle->GetPaintTextFormat(),
10250 "%",
gStyle->GetPaintTextFormat());
10256 angle,0.02*
fH->GetMarkerSize(),
tt.Data());
10270 TAxis *xaxis =
fH->GetXaxis();
10271 TAxis *yaxis =
fH->GetYaxis();
10272 TAxis *zaxis =
fH->GetZaxis();
10281 fLego = std::make_unique<TPainter3dAlgorithms>(
fXbuf.data(),
fYbuf.data());
10283 TView *view =
gPad ?
gPad->GetView() :
nullptr;
10285 Error(
"PaintTF3",
"no TView in current pad");
10291 view->
SetView(phideg, thedeg, psideg, irep);
10293 fLego->InitMoveScreen(-1.1,1.1);
10296 fLego->DefineGridLevels(
fZaxis->GetNdivisions()%100);
10298 fLego->BackBox(90);
10305 fH->GetNbinsZ(),
"BF");
10308 fLego->InitMoveScreen(-1.1,1.1);
10310 fLego->FrontBox(90);
10344 Int_t nt = strlen(
fH->GetTitle());
10345 TPaveText *title =
nullptr;
10347 TIter next(
gPad->GetListOfPrimitives());
10348 while ((obj = next())) {
10350 title = (TPaveText*)obj;
10354 if (nt == 0 ||
gStyle->GetOptTitle() <= 0) {
10355 if (title)
delete title;
10362 if (
gStyle->GetTitleFont(
"")%10 == 3) {
10365 ht = 1.1 * (
gStyle->GetTitleSize(
"")/hw);
10367 ht = 1.1*
gStyle->GetTitleFontSize();
10370 if (ht <= 0) ht = 0.05;
10374 l.SetTitle(
fH->GetTitle());
10381 TText *t0 = (TText*)title->GetLine(0);
10383 if (!strcmp(t0->
GetTitle(),
fH->GetTitle()))
return;
10391 if (talh < 1) talh = 1;
else if (talh > 3) talh = 3;
10393 if (talv < 1) talv = 1;
else if (talv > 3) talv = 3;
10395 xpos =
gStyle->GetTitleX();
10396 ypos =
gStyle->GetTitleY();
10397 if (talh == 2) xpos = xpos-wt/2.;
10398 if (talh == 3) xpos = xpos-wt;
10399 if (talv == 2) ypos = ypos+ht/2.;
10400 if (talv == 1) ypos = ypos+ht;
10402 TPaveText *ptitle =
new TPaveText(xpos, ypos-ht, xpos+wt, ypos,
"blNDC");
10411 if (
gStyle->GetTitleFont(
"")%10 > 2)
10416 ptitle->
Paint(
"blNDC");
10418 if(!
gPad->IsEditable())
delete ptitle;
10426 if (!strcmp(mess,
"SetF3")) {
10530 for (
int i = 0; i < 100; i++) {
10539 theta -= num / den;
10570 }
else if (
Hoption.Proj == 2) {
10578 }
else if (
Hoption.Proj == 3) {
10580 }
else if (
Hoption.Proj == 4) {
10582 }
else if (
Hoption.Proj == 5) {
10587 Double_t xmin_aid, ymin_aid, xmax_aid, ymax_aid;
10594 if (
xmin > xmin_aid)
xmin = xmin_aid;
10595 if (
ymin > ymin_aid)
ymin = ymin_aid;
10596 if (
xmax < xmax_aid)
xmax = xmax_aid;
10597 if (
ymax < ymax_aid)
ymax = ymax_aid;
10600 func(
Hparam.
xmin*xscale, 0, xmin_aid, ymin_aid);
10601 func(
Hparam.
xmax*xscale, 0, xmax_aid, ymin_aid);
10602 if (
xmin > xmin_aid)
xmin = xmin_aid;
10603 if (
xmax < xmax_aid)
xmax = xmax_aid;
10608 if (
ymin > ymin_aid)
ymin = ymin_aid;
10609 if (
ymax < ymax_aid)
ymax = ymax_aid;
10626 ymin - dyr*
gPad->GetBottomMargin(),
10627 xmax + dxr*
gPad->GetRightMargin(),
10638 if (
h ==
nullptr)
return;
10652 static const char *where =
"TableInit";
10659 if (
fH->GetMaximumStored() != -1111) maximum = 1;
10660 if (
fH->GetMinimumStored() != -1111) minimum = 1;
10663 first =
fXaxis->GetFirst();
10664 last =
fXaxis->GetLast();
10680 Error(where,
"cannot set X axis to log scale");
10692 first =
fYaxis->GetFirst();
10693 last =
fYaxis->GetLast();
10709 Error(where,
"cannot set Y axis to log scale");
10729 c1 =
fH->GetBinContent(i,j);
10732 e1 =
fH->GetBinError(i,j);
10742 if (maximum) zmax =
fH->GetMaximumStored();
10743 if (minimum) zmin =
fH->GetMinimumStored();
10744 if (
Hoption.Logz && zmax < 0) {
10745 if (!
Hoption.Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)", zmax);
10747 }
else if (
Hoption.Logz && zmin>=0 && zmax==0) {
10751 if (zmin >= zmax) {
10753 if (zmax > 0) zmin = 0.001*zmax;
10755 if (!
Hoption.Same)
Error(where,
"log scale is requested but maximum is less or equal 0 (%f)", zmax);
10764 if (
fH->GetNormFactor() > 0) factor =
fH->GetNormFactor();
10765 if (allchan) factor /= allchan;
10766 if (factor == 0) factor = 1;
10768 zmax = factor*zmax;
10769 zmin = factor*zmin;
10780 fH->SetMinimum(zmin);
10795 zmax += yMARGIN*(zmax-zmin);
10803 if (zmin >= 0) zmin = 0;
10804 else zmin -= yMARGIN*(zmax-zmin);
10806 Double_t dzmin = yMARGIN*(zmax-zmin);
10807 if (zmin >= 0 && (zmin-dzmin <= 0)) zmin = 0;
10808 else zmin -= dzmin;
10834 tf.
Form(
"%s%s",
"%",
f);
10838 int ie = tv.
Index(
"e");
10839 int iE = tv.
Index(
"E");
10840 int id = tv.
Index(
".");
10844 if (ie >= 0 || iE >= 0) {
10845 if (tv.
Index(
"+") >= 0) {
10847 ef.
Form(
"%s.1f",
"%");
10850 ef.
Form(
"%s.%de",
"%",ie-
id-1);
10852 ef.
Form(
"%s.%dE",
"%",iE-
id-1);
10857 ef.
Form(
"%s.%de",
"%",ie-
id-1);
10859 ef.
Form(
"%s.%dE",
"%",iE-
id-1);
10864 }
else if (
id < 0) {
10865 ef.
Form(
"%s.1f",
"%");
10883 auto c2 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->
FindObject(name2.Data()));
10884 if (
c2)
c2->Close();
10889 auto c1 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->
FindObject(name1.Data()));
10890 if (
c1)
c1->Close();
10894 if (nbins <= 0)
return;
10896 TString opt = option;
10898 Int_t projection = 0;
10899 if (opt.
Contains(
"x")) projection = 1;
10900 if (opt.
Contains(
"y")) projection = 2;
10901 if (opt.
Contains(
"z")) projection = 3;
10902 if (opt.
Contains(
"xy")) projection = 4;
10903 if (opt.
Contains(
"yx")) projection = 5;
10904 if (opt.
Contains(
"xz")) projection = 6;
10905 if (opt.
Contains(
"zx")) projection = 7;
10906 if (opt.
Contains(
"yz")) projection = 8;
10907 if (opt.
Contains(
"zy")) projection = 9;
10912 gROOT->MakeDefCanvas();
10921 auto c2 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->
FindObject(name2.Data()));
10922 if (
c2)
c2->Close();
10927 auto c1 =
static_cast<TVirtualPad *
>(
gROOT->GetListOfCanvases()->
FindObject(name1.Data()));
10928 if (
c1)
c1->Close();
10932 if ((nbinsX <= 0) || (nbinsY <= 0))
return;
10935 TString opt = option;
10937 Int_t projection = 0;
10938 if (opt.
Contains(
"x")) projection = 1;
10939 if (opt.
Contains(
"y")) projection = 2;
10940 if (opt.
Contains(
"z")) projection = 3;
10941 if (opt.
Contains(
"xy")) projection = 4;
10942 if (opt.
Contains(
"yx")) projection = 5;
10943 if (opt.
Contains(
"xz")) projection = 6;
10944 if (opt.
Contains(
"zx")) projection = 7;
10945 if (opt.
Contains(
"yz")) projection = 8;
10946 if (opt.
Contains(
"zy")) projection = 9;
10951 gROOT->MakeDefCanvas();
10954 gROOT->MakeDefCanvas();
10967 gPad->SetDoubleBuffer(0);
10971 static int pyold1 = 0;
10972 static int pyold2 = 0;
10973 float uxmin =
gPad->GetUxmin();
10974 float uxmax =
gPad->GetUxmax();
10975 int pxmin =
gPad->XtoAbsPixel(uxmin);
10976 int pxmax =
gPad->XtoAbsPixel(uxmax);
10979 Int_t biny1 =
fH->GetYaxis()->FindBin(
y);
10981 Int_t py1 =
gPad->YtoAbsPixel(
gPad->GetLogy() ?
TMath::Log10(
fH->GetYaxis()->GetBinLowEdge(biny1)) :
fH->GetYaxis()->GetBinLowEdge(biny1));
10990 TVirtualPad::TContext ctxt(
true);
10992 TVirtualPad *
c = (TVirtualPad*)
gROOT->GetListOfCanvases()->FindObject(name1.Data());
11003 c->SetLogy(ctxt.GetSaved()->GetLogz());
11004 c->SetLogx(ctxt.GetSaved()->GetLogx());
11013 if (biny1 == biny2) {
11014 Double_t valueFrom =
fH->GetYaxis()->GetBinLowEdge(biny1);
11015 Double_t valueTo =
fH->GetYaxis()->GetBinUpEdge(biny1);
11018 if (
fH->GetYaxis()->GetLabels() !=
nullptr) {
11019 hp->
SetTitle(
TString::Format(
"ProjectionX of biny=%d [y=%.*lf..%.*lf] %s", biny1, valuePrecision, valueFrom, valuePrecision, valueTo,
fH->GetYaxis()->GetBinLabel(biny1)));
11021 hp->
SetTitle(
TString::Format(
"ProjectionX of biny=%d [y=%.*lf..%.*lf]", biny1, valuePrecision, valueFrom, valuePrecision, valueTo));
11024 Double_t valueFrom =
fH->GetYaxis()->GetBinLowEdge(biny1);
11025 Double_t valueTo =
fH->GetYaxis()->GetBinUpEdge(biny2);
11030 if (
fH->GetYaxis()->GetLabels() !=
nullptr) {
11031 hp->
SetTitle(
TString::Format(
"ProjectionX of biny=[%d,%d] [y=%.*lf..%.*lf] [%s..%s]", biny1, biny2, valuePrecision, valueFrom, valuePrecision, valueTo,
fH->GetYaxis()->GetBinLabel(biny1),
fH->GetYaxis()->GetBinLabel(biny2)));
11033 hp->
SetTitle(
TString::Format(
"ProjectionX of biny=[%d,%d] [y=%.*lf..%.*lf]", biny1, biny2, valuePrecision, valueFrom, valuePrecision, valueTo));
11052 gPad->SetDoubleBuffer(0);
11056 static int pxold1 = 0;
11057 static int pxold2 = 0;
11058 float uymin =
gPad->GetUymin();
11059 float uymax =
gPad->GetUymax();
11060 int pymin =
gPad->YtoAbsPixel(uymin);
11061 int pymax =
gPad->YtoAbsPixel(uymax);
11064 Int_t binx1 =
fH->GetXaxis()->FindBin(
x);
11066 Int_t px1 =
gPad->XtoAbsPixel(
gPad->GetLogx() ?
TMath::Log10(
fH->GetXaxis()->GetBinLowEdge(binx1)) :
fH->GetXaxis()->GetBinLowEdge(binx1));
11075 TVirtualPad::TContext ctxt(
true);
11080 TVirtualPad *
c = (TVirtualPad*)
gROOT->GetListOfCanvases()->FindObject(name2.
Data());
11091 c->SetLogy(ctxt.GetSaved()->GetLogz());
11092 c->SetLogx(ctxt.GetSaved()->GetLogy());
11096 TH1D *hp = ((TH2*)
fH)->ProjectionY(prjName, binx1, binx2);
11101 if (binx1 == binx2) {
11102 Double_t valueFrom =
fH->GetXaxis()->GetBinLowEdge(binx1);
11103 Double_t valueTo =
fH->GetXaxis()->GetBinUpEdge(binx1);
11106 if (
fH->GetXaxis()->GetLabels() !=
nullptr) {
11107 hp->
SetTitle(
TString::Format(
"ProjectionY of binx=%d [x=%.*lf..%.*lf] [%s]", binx1, valuePrecision, valueFrom, valuePrecision, valueTo,
fH->GetXaxis()->GetBinLabel(binx1)));
11109 hp->
SetTitle(
TString::Format(
"ProjectionY of binx=%d [x=%.*lf..%.*lf]", binx1, valuePrecision, valueFrom, valuePrecision, valueTo));
11112 Double_t valueFrom =
fH->GetXaxis()->GetBinLowEdge(binx1);
11113 Double_t valueTo =
fH->GetXaxis()->GetBinUpEdge(binx2);
11118 if (
fH->GetXaxis()->GetLabels() !=
nullptr) {
11119 hp->
SetTitle(
TString::Format(
"ProjectionY of binx=[%d,%d] [x=%.*lf..%.*lf] [%s..%s]", binx1, binx2, valuePrecision, valueFrom, valuePrecision, valueTo,
fH->GetXaxis()->GetBinLabel(binx1),
fH->GetXaxis()->GetBinLabel(binx2)));
11121 hp->
SetTitle(
TString::Format(
"ProjectionY of binx=[%d,%d] [x=%.*lf..%.*lf]", binx1, binx2, valuePrecision, valueFrom, valuePrecision, valueTo));
11143 if (
fH->GetDimension() < 3) {
11157 gPad->SetDoubleBuffer(0);
11161 TView *view =
gPad->GetView();
11163 TH3 *h3 = (TH3*)
fH;
11169 static TPoint line1[2];
11170 static TPoint line2[2];
11171 static TPoint line3[2];
11172 static TPoint line4[2];
11173 static TPoint endface1[5];
11174 static TPoint endface2[5];
11175 static TPoint rect1[5];
11176 static TPoint rect2[5];
11183 int pxmin =
gPad->XtoAbsPixel(uxmin);
11184 int pxmax =
gPad->XtoAbsPixel(uxmax);
11185 if (pxmin==pxmax)
return;
11186 int pymin =
gPad->YtoAbsPixel(uymin);
11187 int pymax =
gPad->YtoAbsPixel(uymax);
11188 if (pymin==pymax)
return;
11189 Double_t cx = (pxmax-pxmin)/(uxmax-uxmin);
11190 Double_t cy = (pymax-pymin)/(uymax-uymin);
11191 TVirtualPad *
c = (TVirtualPad*)
gROOT->GetListOfCanvases()->FindObject(
TString::Format(
"c_%zx_projection_%d",
11198 TVirtualPad::TContext ctxt(
true);
11206 Int_t biny = firstY +
Int_t((lastY-firstY)*(px-pxmin)/(pxmax-pxmin));
11211 Int_t binz = firstZ +
Int_t((lastZ-firstZ)*(py-pymin)/(pymax-pymin));
11214 if (line1[0].GetX())
gVirtualX->DrawPolyLine(2,line1);
11215 if (nbins>1 && line1[0].GetX()) {
11226 line1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11227 line1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11230 line1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11231 line1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11238 line2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11239 line2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11242 line2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11243 line2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11249 line3[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11250 line3[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11253 line3[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11254 line3[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11260 line4[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11261 line4[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11264 line4[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11265 line4[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11267 endface1[0].
SetX(line1[0].GetX());
11268 endface1[0].
SetY(line1[0].GetY());
11269 endface1[1].
SetX(line2[0].GetX());
11270 endface1[1].
SetY(line2[0].GetY());
11271 endface1[2].
SetX(line3[0].GetX());
11272 endface1[2].
SetY(line3[0].GetY());
11273 endface1[3].
SetX(line4[0].GetX());
11274 endface1[3].
SetY(line4[0].GetY());
11275 endface1[4].
SetX(line1[0].GetX());
11276 endface1[4].
SetY(line1[0].GetY());
11278 endface2[0].
SetX(line1[1].GetX());
11279 endface2[0].
SetY(line1[1].GetY());
11280 endface2[1].
SetX(line2[1].GetX());
11281 endface2[1].
SetY(line2[1].GetY());
11282 endface2[2].
SetX(line3[1].GetX());
11283 endface2[2].
SetY(line3[1].GetY());
11284 endface2[3].
SetX(line4[1].GetX());
11285 endface2[3].
SetY(line4[1].GetY());
11286 endface2[4].
SetX(line1[1].GetX());
11287 endface2[4].
SetY(line1[1].GetY());
11321 Int_t binx = firstX +
Int_t((lastX-firstX)*(px-pxmin)/(pxmax-pxmin));
11326 Int_t binz = firstZ +
Int_t((lastZ-firstZ)*(py-pymin)/(pymax-pymin));
11329 if (line1[0].GetX())
gVirtualX->DrawPolyLine(2,line1);
11330 if (nbins>1 && line1[0].GetX()) {
11341 line1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11342 line1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11345 line1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11346 line1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11353 line2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11354 line2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11357 line2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11358 line2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11364 line3[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11365 line3[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11368 line3[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11369 line3[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11375 line4[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11376 line4[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11379 line4[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11380 line4[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11382 endface1[0].
SetX(line1[0].GetX());
11383 endface1[0].
SetY(line1[0].GetY());
11384 endface1[1].
SetX(line2[0].GetX());
11385 endface1[1].
SetY(line2[0].GetY());
11386 endface1[2].
SetX(line3[0].GetX());
11387 endface1[2].
SetY(line3[0].GetY());
11388 endface1[3].
SetX(line4[0].GetX());
11389 endface1[3].
SetY(line4[0].GetY());
11390 endface1[4].
SetX(line1[0].GetX());
11391 endface1[4].
SetY(line1[0].GetY());
11393 endface2[0].
SetX(line1[1].GetX());
11394 endface2[0].
SetY(line1[1].GetY());
11395 endface2[1].
SetX(line2[1].GetX());
11396 endface2[1].
SetY(line2[1].GetY());
11397 endface2[2].
SetX(line3[1].GetX());
11398 endface2[2].
SetY(line3[1].GetY());
11399 endface2[3].
SetX(line4[1].GetX());
11400 endface2[3].
SetY(line4[1].GetY());
11401 endface2[4].
SetX(line1[1].GetX());
11402 endface2[4].
SetY(line1[1].GetY());
11435 Int_t binx = firstX +
Int_t((lastX-firstX)*(px-pxmin)/(pxmax-pxmin));
11440 Int_t biny = firstY +
Int_t((lastY-firstY)*(py-pymin)/(pymax-pymin));
11443 if (line1[0].GetX())
gVirtualX->DrawPolyLine(2,line1);
11444 if (nbins>1 && line1[0].GetX()) {
11455 line1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11456 line1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11459 line1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11460 line1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11467 line2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11468 line2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11471 line2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11472 line2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11478 line3[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11479 line3[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11482 line3[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11483 line3[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11489 line4[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11490 line4[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11493 line4[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11494 line4[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11496 endface1[0].
SetX(line1[0].GetX());
11497 endface1[0].
SetY(line1[0].GetY());
11498 endface1[1].
SetX(line2[0].GetX());
11499 endface1[1].
SetY(line2[0].GetY());
11500 endface1[2].
SetX(line3[0].GetX());
11501 endface1[2].
SetY(line3[0].GetY());
11502 endface1[3].
SetX(line4[0].GetX());
11503 endface1[3].
SetY(line4[0].GetY());
11504 endface1[4].
SetX(line1[0].GetX());
11505 endface1[4].
SetY(line1[0].GetY());
11507 endface2[0].
SetX(line1[1].GetX());
11508 endface2[0].
SetY(line1[1].GetY());
11509 endface2[1].
SetX(line2[1].GetX());
11510 endface2[1].
SetY(line2[1].GetY());
11511 endface2[2].
SetX(line3[1].GetX());
11512 endface2[2].
SetY(line3[1].GetY());
11513 endface2[3].
SetX(line4[1].GetX());
11514 endface2[3].
SetY(line4[1].GetY());
11515 endface2[4].
SetX(line1[1].GetX());
11516 endface2[4].
SetY(line1[1].GetY());
11549 Int_t binz = first +
Int_t((last-first)*(py-pymin)/(pymax-pymin));
11552 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11553 if (nbins>1 && rect2[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11558 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11559 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11560 rect1[4].
SetX(rect1[0].GetX());
11561 rect1[4].
SetY(rect1[0].GetY());
11564 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11565 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11568 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11569 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11572 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11573 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11580 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11581 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11582 rect2[4].
SetX(rect2[0].GetX());
11583 rect2[4].
SetY(rect2[0].GetY());
11586 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11587 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11590 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11591 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11594 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11595 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11620 Int_t binz = first +
Int_t((last-first)*(py-pymin)/(pymax-pymin));
11623 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11624 if (nbins>1 && rect2[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11629 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11630 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11631 rect1[4].
SetX(rect1[0].GetX());
11632 rect1[4].
SetY(rect1[0].GetY());
11635 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11636 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11639 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11640 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11643 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11644 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11651 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11652 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11653 rect2[4].
SetX(rect2[0].GetX());
11654 rect2[4].
SetY(rect2[0].GetY());
11657 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11658 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11661 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11662 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11665 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11666 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11690 Int_t biny = first +
Int_t((last-first)*(py-pymin)/(pymax-pymin));
11693 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11694 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11699 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11700 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11701 rect1[4].
SetX(rect1[0].GetX());
11702 rect1[4].
SetY(rect1[0].GetY());
11705 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11706 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11709 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11710 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11713 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11714 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11721 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11722 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11723 rect2[4].
SetX(rect2[0].GetX());
11724 rect2[4].
SetY(rect2[0].GetY());
11727 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11728 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11731 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11732 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11735 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11736 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11760 Int_t biny = first +
Int_t((last-first)*(py-pymin)/(pymax-pymin));
11763 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11764 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11769 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11770 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11771 rect1[4].
SetX(rect1[0].GetX());
11772 rect1[4].
SetY(rect1[0].GetY());
11775 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11776 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11779 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11780 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11783 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11784 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11791 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11792 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11793 rect2[4].
SetX(rect2[0].GetX());
11794 rect2[4].
SetY(rect2[0].GetY());
11797 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11798 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11801 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11802 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11805 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11806 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11830 Int_t binx = first +
Int_t((last-first)*(px-pxmin)/(pxmax-pxmin));
11833 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11834 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11839 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11840 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11841 rect1[4].
SetX(rect1[0].GetX());
11842 rect1[4].
SetY(rect1[0].GetY());
11845 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11846 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11849 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11850 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11853 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11854 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11861 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11862 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11863 rect2[4].
SetX(rect2[0].GetX());
11864 rect2[4].
SetY(rect2[0].GetY());
11867 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11868 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11871 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11872 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11875 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11876 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11900 Int_t binx = first +
Int_t((last-first)*(px-pxmin)/(pxmax-pxmin));
11903 if (rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect1);
11904 if (nbins>1 && rect1[0].GetX())
gVirtualX->DrawPolyLine(5,rect2);
11909 rect1[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11910 rect1[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11911 rect1[4].
SetX(rect1[0].GetX());
11912 rect1[4].
SetY(rect1[0].GetY());
11915 rect1[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11916 rect1[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11919 rect1[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11920 rect1[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11923 rect1[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11924 rect1[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11931 rect2[0].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11932 rect2[0].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11933 rect2[4].
SetX(rect2[0].GetX());
11934 rect2[4].
SetY(rect2[0].GetY());
11937 rect2[1].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11938 rect2[1].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11941 rect2[2].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11942 rect2[2].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
11945 rect2[3].
SetX(pxmin +
Int_t((u[0]-uxmin)*cx));
11946 rect2[3].
SetY(pymin +
Int_t((u[1]-uymin)*cy));
Handle_t Window_t
Window handle.
struct Hoption_t Hoption_t
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
short Width_t
Line width (short).
bool Bool_t
Boolean (0=false, 1=true) (bool).
short Short_t
Signed Short integer 2 bytes (short).
double Double_t
Double 8 bytes.
short Color_t
Color number (short).
short Style_t
Style number (short).
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
TMatrixTBase< Double_t > TMatrixDBase
TMatrixTBase< Float_t > TMatrixFBase
if(err< fMinRelativeError)
static char * Format(const char *format, va_list ap)
Format a string in a circular formatting buffer (using a printf style format descriptor).
TVectorT< Double_t > TVectorD
TVectorT< Float_t > TVectorF
virtual void PaintArrow(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Float_t arrowsize=0.05, Option_t *option=">")
virtual void SetAngle(Float_t angle=60)
virtual Color_t GetFillColor() const
Return the fill area color.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetImageQuality(EImageQuality lquality)
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
static Style_t GetMarkerStyleBase(Style_t style)
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Class to manage histogram axis.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Int_t GetLast() const
Return last bin on the axis i.e.
virtual void SetRangeUser(Double_t ufirst, Double_t ulast)
Set the viewing range for the axis from ufirst to ulast (in user coordinates, that is,...
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis using bin numbers.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Int_t GetFirst() const
Return first bin on the axis i.e.
void SetLog(int x, int y, int z)
void SetHistoWidth(const Double_t width)
virtual void Paint(Option_t *option="")
Paint one candle with its current attributes.
Bool_t IsViolinScaled() const
Returns true if violin plot should be scaled.
Bool_t IsHorizontal() const
int ParseOption(char *optin)
Parsing of the option-string.
void SetOption(CandleOption opt)
void SetHistogram(TH1D *proj)
Bool_t IsCandleScaled() const
Returns true if candle plot should be scaled.
void SetCandleWidth(const Double_t width)
void SetAxisPosition(const Double_t candlePos)
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
void SetName(const char *name)
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
void Paint(Option_t *option="") override
Paint all objects in this collection.
static Int_t GetColorDark(Int_t color)
static void RGBtoHLS(Float_t r, Float_t g, Float_t b, Float_t &h, Float_t &l, Float_t &s)
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
static Int_t GetColorBright(Int_t color)
static Int_t GetColor(const char *hexcolor)
static void HLStoRGB(Float_t h, Float_t l, Float_t s, Float_t &r, Float_t &g, Float_t &b)
virtual void SetAlpha(Float_t a)
virtual void SetRGB(Float_t r, Float_t g, Float_t b)
virtual Double_t GetXmax() const
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Double_t GetChisquare() const
Return the Chisquare after fitting. See ROOT::Fit::FitResult::Chi2().
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
virtual Double_t GetMaximumStored() const
virtual Int_t GetNpar() const
virtual Int_t GetNumberFreeParameters() const
virtual Double_t GetParError(Int_t ipar) const
virtual void SetMaximum(Double_t maximum=-1111)
virtual const char * GetParName(Int_t ipar) const
virtual Int_t GetNDF() const
virtual void SetMinimum(Double_t minimum=-1111)
virtual Double_t GetXmin() const
virtual Double_t GetParameter(Int_t ipar) const
void Paint(Option_t *option="") override
This method must be overridden if a class wants to paint itself.
void SetRange(Double_t xmin, Double_t xmax) override
void SetTimeFormat(const char *tformat)
void SetTitleOffset(Float_t titleoffset=1)
virtual void PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t &wmin, Double_t &wmax, Int_t &ndiv, Option_t *chopt="", Double_t gridlength=0, Bool_t drawGridOnly=kFALSE)
void SetLabelOffset(Float_t labeloffset)
virtual void ImportAxisAttributes(TAxis *axis)
void SetTickSize(Float_t ticksize)
void SetLabelSize(Float_t labelsize)
virtual void SetTitle(const char *title="")
void SetOption(Option_t *option="")
@ kClipFrame
Clip to the frame boundary.
void PaintGraph(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
void PaintGrapHist(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
TH1 is the base class of all histogram classes in ROOT.
void SetTitle(const char *title) override
Change/set the title.
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
virtual Double_t GetMean(Int_t axis=1) const
For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis.
virtual Double_t GetSkewness(Int_t axis=1) const
virtual void SetXTitle(const char *title)
@ kNoTitle
Don't draw the histogram title.
@ kUserContour
User specified contour levels.
@ kNoStats
Don't draw stats box.
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
virtual Double_t GetEntries() const
Return the current number of entries.
virtual void SetZTitle(const char *title)
virtual Double_t GetMeanError(Int_t axis=1) const
Return standard error of mean of this histogram along the X axis.
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
@ kNormal
Errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N).
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void SetYTitle(const char *title)
virtual Double_t GetStdDevError(Int_t axis=1) const
Return error of standard deviation estimation for Normal distribution.
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
virtual Double_t GetKurtosis(Int_t axis=1) const
TH1D * ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along Y (integration along X).
TH1D * ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along X (integration along Y).
Double_t GetBinContent(Int_t binx, Int_t biny) const override
Double_t Integral(Option_t *option="") const override
Return integral of bin contents.
virtual TH1 * Project3D(Option_t *option="x") const
Project a 3-d histogram into 1 or 2-d histograms depending on the option parameter,...
Double_t Integral(Option_t *option="") const override
Return integral of bin contents.
void Paint(Option_t *option="") override
This method must be overridden if a class wants to paint itself.
TAxis * fYaxis
Pointer to Y axis.
virtual Int_t MakeChopt(Option_t *option)
std::unique_ptr< TPainter3dAlgorithms > fLego
Pointer to a TPainter3dAlgorithms object.
std::vector< Double_t > fXbuf
X buffer coordinates.
Int_t fXHighlightBin
X highlight bin.
TF3 * fCurrentF3
Current TF3 function.
virtual void PaintContour(Option_t *option)
virtual Int_t PaintInit()
virtual void ShowProjectionX(Int_t px, Int_t py)
virtual void PaintText(Option_t *option)
Int_t fShowProjection2
True if a second projection must be drawn (when calling SetShowProjectionXY on a TH2).
static const char * GetBestFormat(Double_t v, Double_t e, const char *f)
virtual void PaintAxis(Bool_t drawGridOnly=kFALSE)
virtual void PaintHist(Option_t *option)
virtual void PaintBoxes(Option_t *option)
virtual void PaintScatterPlot(Option_t *option)
virtual void PaintSurface(Option_t *option)
virtual void PaintLego(Option_t *option)
virtual void PaintBar(Option_t *option)
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Computes distance from point (px,py) to the object.
Int_t fYHighlightBin
Y highlight bin.
virtual void PaintH3(Option_t *option="")
void SetShowProjectionXY(const char *option, Int_t nbinsY, Int_t nbinsX) override
Int_t fNcuts
Number of graphical cuts.
TString fShowOption
Option to draw the projection.
static Int_t ProjectMercator2xy(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
Int_t fShowProjection
True if a projection must be drawn.
virtual void PaintColorLevelsFast(Option_t *option)
virtual void PaintLegoAxis(TGaxis *axis, Double_t ang)
static Int_t ProjectMollweide2xy(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
virtual void PaintArrows(Option_t *option)
virtual void PaintErrors(Option_t *option)
Int_t MakeCuts(char *cutsopt) override
virtual void PaintStat3(Int_t dostat, TF1 *fit)
virtual void DefineColorLevels(Int_t ndivz)
virtual void PaintTitle()
TList * fFunctions
Pointer to histogram list of functions.
void DrawPanel() override
virtual void PaintFunction(Option_t *option)
std::unique_ptr< TPie > fPie
Pointer to a TPie in case of option PIE.
virtual void PaintH3Box(Int_t iopt)
virtual void PaintColorLevels(Option_t *option)
virtual Int_t TableInit()
virtual void HighlightBin(Int_t px, Int_t py)
virtual void PaintTriangles(Option_t *option)
TAxis * fXaxis
Pointer to X axis.
void PaintStat(Int_t dostat, TF1 *fit) override
virtual void PaintFrame()
virtual void RecalculateRange()
static Int_t ProjectAitoff2xy(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
std::unique_ptr< TGraph2DPainter > fGraph2DPainter
Pointer to a TGraph2DPainter object.
virtual void PaintTable(Option_t *option)
virtual std::vector< THistRenderingRegion > ComputeRenderingRegions(TAxis *pAxis, Int_t nPixels, bool isLog)
static Int_t ProjectParabolic2xy(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
TList * fStack
Pointer to stack of histograms (if any).
virtual void ShowProjectionY(Int_t px, Int_t py)
virtual void PaintTH2PolyColorLevels(Option_t *option)
virtual void PaintTH2PolyScatterPlot(Option_t *option)
TH1 * fH
Pointer to histogram to paint.
TAxis * fZaxis
Pointer to Z axis.
virtual void PaintBarH(Option_t *option)
void SetHistogram(TH1 *h) override
virtual void PaintTH2PolyText(Option_t *option)
virtual Int_t PaintContourLine(Double_t elev1, Int_t icont1, Double_t x1, Double_t y1, Double_t elev2, Int_t icont2, Double_t x2, Double_t y2, Double_t *xarr, Double_t *yarr, Int_t *itarr, Double_t *levels)
char * GetObjectInfo(Int_t px, Int_t py) const override
Returns string containing info about the object at position (px,py).
TList * GetContourList(Double_t contour) const override
void ProcessMessage(const char *mess, const TObject *obj) override
void SetShowProjection(const char *option, Int_t nbins) override
virtual void PaintH3BoxRaster()
virtual void PaintPalette()
virtual void PaintH3Iso()
TCutG * fCuts[kMaxCuts]
Pointers to graphical cuts.
virtual void ShowProjection3(Int_t px, Int_t py)
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to an event at (px,py).
virtual Int_t PaintInitH()
Int_t fCutsOpt[kMaxCuts]
Sign of each cut.
virtual void PaintHighlightBin(Option_t *option="")
virtual void PaintStat2(Int_t dostat, TF1 *fit)
static Int_t ProjectSinusoidal2xy(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
std::vector< Double_t > fYbuf
Y buffer coordinates.
void SetHighlight() override
static void PaintSpecialObjects(const TObject *obj, Option_t *option)
virtual void PaintTH2PolyBins(Option_t *option)
virtual void PaintCandlePlot(Option_t *option)
virtual void Paint2DErrors(Option_t *option)
Bool_t IsInside(Int_t x, Int_t y) override
static TImagePalette * CreateCOLPalette(Int_t nContours)
Factory method to creates an image palette for histogram plotting.
static TImage * Create()
Create an image.
virtual void SetImage(const Double_t *, UInt_t, UInt_t, TImagePalette *=nullptr)
virtual void PaintImage(Drawable_t, Int_t, Int_t, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0, Option_t *="")
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void Add(TObject *obj) override
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
virtual Int_t IsInside(Double_t x, Double_t y) const
TList * GetListOfGraphs() const
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const override
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
void Add(TObject *obj) override
Mother of all ROOT objects.
Bool_t TestBit(UInt_t f) const
virtual const char * GetName() const
Returns name of object.
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual const char * GetTitle() const
Returns title of object.
virtual TClass * IsA() const
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
TObject()
TObject constructor.
@ kCannotPick
if object in a pad cannot be picked
@ kCanDelete
if object in a list can be deleted
@ kMustCleanup
if object destructor must call RecursiveRemove()
void DrawFaceMove3(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 3rd variant for "MOVING SCREEN" algorithm (draw level lines only).
void DrawLevelLines(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw level lines without hidden line removal.
void SurfaceFunction(Int_t ia, Int_t ib, Double_t *f, Double_t *t)
Service function for Surfaces.
void DrawFaceMode1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t)
Draw face - 1st variant (2 colors: 1st for external surface, 2nd for internal).
void GouraudFunction(Int_t ia, Int_t ib, Double_t *f, Double_t *t)
Find part of surface with luminosity in the corners.
void DrawFaceMove1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 1st variant for "MOVING SCREEN" algorithm (draw face with level lines).
void DrawFaceRaster2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 2nd variant for "RASTER SCREEN" algorithm (draw face for stacked lego plot).
void LegoFunction(Int_t ia, Int_t ib, Int_t &nv, Double_t *ab, Double_t *vv, Double_t *t)
Service function for Legos.
void DrawFaceMove2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 2nd variant for "MOVING SCREEN" algorithm (draw face for stacked lego plot).
void DrawFaceRaster1(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *tt)
Draw face - 1st variant for "RASTER SCREEN" algorithm (draw face with level lines).
void DrawFaceMode3(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t)
Draw face - 3rd option (draw face for stacked lego plot).
void DrawFaceMode2(Int_t *icodes, Double_t *xyz, Int_t np, Int_t *iface, Double_t *t)
Draw face - 2nd option (fill in correspondence with function levels).
void Paint(Option_t *option="") override
Paint this box with its current attributes.
void SetHistogram(TH1 *h)
void SetOptStat(Int_t stat=1)
virtual void SetStatFormat(const char *format="6.4g")
virtual const char * GetFitFormat() const
void SetParent(TObject *obj) override
void SetOptFit(Int_t fit=1)
virtual const char * GetStatFormat() const
void Paint(Option_t *option="") override
Paint this pave with its current attributes.
virtual void SetFitFormat(const char *format="5.4g")
void Clear(Option_t *option="") override
void Draw(Option_t *option="") override
Draw this pave with its current attributes.
void Paint(Option_t *option="") override
Paint this pave with its current attributes.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
virtual void SetName(const char *name="")
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
Option_t * GetOption() const override
virtual Double_t GetBinEntries(Int_t bin) const
Return bin entries of a Profile2D histogram.
TH1D * ProjectionX(const char *name="_px", Option_t *option="e") const
Project this profile into a 1-D histogram along X.
virtual Double_t GetBinEntries(Int_t bin) const
Return bin entries of a Profile histogram.
Double_t Rndm() override
TausWorth generator from L'Ecuyer, uses as seed 3x32bits integers Use a mask of 0xffffffffUL to make ...
void ToLower()
Change string to lower-case.
const char * Data() const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual Double_t GetPsi()=0
virtual Double_t * GetRmax()=0
virtual void SetAxisNDC(const Double_t *x1, const Double_t *x2, const Double_t *y1, const Double_t *y2, const Double_t *z1, const Double_t *z2)=0
virtual Double_t * GetRmin()=0
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
virtual void SetOutlineToCube()=0
virtual Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio)=0
virtual Double_t * GetTnorm()=0
virtual void ExecuteRotateView(Int_t event, Int_t px, Int_t py)=0
virtual TSeqCollection * GetOutline()=0
virtual void PadRange(Int_t rback)=0
virtual void SetRange(const Double_t *min, const Double_t *max)=0
virtual void FindNormal(Double_t x, Double_t y, Double_t z, Double_t &zn)=0
virtual void AxisVertex(Double_t ang, Double_t *av, Int_t &ix1, Int_t &ix2, Int_t &iy1, Int_t &iy2, Int_t &iz1, Int_t &iz2)=0
virtual void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)=0
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
RooCmdArg Bins(Int_t nbin)
double beta(double x, double y)
Calculates the beta function.
RVec< PromoteType< T > > cos(const RVec< T > &v)
double dist(Rotation3D const &r1, Rotation3D const &r2)
double ratio(double numerator, double denominator)
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Prob(Double_t chi2, Int_t ndf)
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
constexpr Double_t PiOver2()
constexpr Double_t E()
Base of natural log: .
Double_t Log(Double_t x)
Returns the natural logarithm of x.
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Bool_t AreEqualRel(Double_t af, Double_t bf, Double_t relPrec)
Comparing floating points.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
Long64_t BinarySearch(Long64_t n, const T *array, T value)
Binary search in an array of n values to locate value.
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Histograms' drawing options structure.
Histogram parameters structure.
Double_t baroffset
Offset of bin for bars or legos [0,1].
Double_t ylowedge
Low edge of axis.
Double_t xmin
Minimum value along X.
Int_t ylast
Last bin number along Y.
Int_t xfirst
First bin number along X.
Double_t zmin
Minimum value along Z.
Double_t xbinsize
Bin size in case of equidistant bins.
Double_t ymin
Minimum value along y.
Double_t allchan
Integrated sum of contents.
Double_t xlowedge
Low edge of axis.
Double_t ymax
Maximum value along y.
Double_t factor
Multiplication factor (normalization).
Int_t xlast
Last bin number along X.
Double_t ybinsize
Bin size in case of equidistant bins.
Double_t barwidth
Width of bin for bars and legos [0,1].
Double_t zmax
Maximum value along Z.
Double_t xmax
Maximum value along X.
Int_t yfirst
First bin number along Y.