26d25 < #include "TProfile2D.h" 418,421d416 < TProfile2D histograms are handled differently because, for this type of 2D < histograms, it is possible to know if an empty bin has been filled or not. So even < if all the bins' contents are positive some empty bins might be painted. And vice versa, < if some bins have a negative content some empty bins might be not painted. 1231,1235d1225 <
TProfile2D histograms are handled differently because, for this type of 2D
< histograms, it is possible to know if an empty bin has been filled or not. So even
< if all the bins' contents are positive some empty bins might be painted. And vice versa,
< if some bins have a negative content some empty bins might be not painted.
<
1603c1593
<
---
>
1659a1650
> gStyle->SetPalette(1);
3232c3223
< static char info[200];
---
> static char info[100];
3292,3301c3283,3286
< if (fH->InheritsFrom(TProfile::Class())) {
< TProfile *tp = (TProfile*)fH;
< snprintf(info,200,"(x=%g, y=%g, binx=%d, binc=%g, bine=%g, binn=%d)", x, y, binx, fH->GetBinContent(binx), fH->GetBinError(binx), (Int_t) tp->GetBinEntries(binx));
< }
< else {
< Double_t integ = 0;
< for (Int_t bin=binmin;bin<=binx;bin++) {integ += fH->GetBinContent(bin);}
< snprintf(info,200,"(x=%g, y=%g, binx=%d, binc=%g, Sum=%g)",x,y,binx,fH->GetBinContent(binx),integ);
< }
< } else if (fH->GetDimension() == 2){
---
> Double_t integ = 0;
> for (Int_t bin=binmin;bin<=binx;bin++) {integ += fH->GetBinContent(bin);}
> snprintf(info,100,"(x=%g, y=%g, binx=%d, binc=%g, Sum=%g)",x,y,binx,fH->GetBinContent(binx),integ);
> } else {
3305,3311c3290
< snprintf(info,200,"%s (x=%g, y=%g, bin=%d, binc=%g)",th2->GetBinTitle(biny),x,y,biny,th2->GetBinContent(biny));
< }
< else if (fH->InheritsFrom(TProfile2D::Class())) {
< TProfile2D *tp = (TProfile2D*)fH;
< biny = fYaxis->FindFixBin(y);
< Int_t bin = fH->GetBin(binx,biny);
< snprintf(info,200,"(x=%g, y=%g, binx=%d, biny=%d, binc=%g, bine=%g, binn=%d)", x, y, binx, biny, fH->GetBinContent(bin), fH->GetBinError(bin), (Int_t) tp->GetBinEntries(bin));
---
> snprintf(info,100,"%s (x=%g, y=%g, bin=%d, binc=%g)",th2->GetBinTitle(biny),x,y,biny,th2->GetBinContent(biny));
3314c3293
< snprintf(info,200,"(x=%g, y=%g, binx=%d, biny=%d, binc=%g)",x,y,binx,biny,fH->GetBinContent(binx,biny));
---
> snprintf(info,100,"(x=%g, y=%g, binx=%d, biny=%d, binc=%g)",x,y,binx,biny,fH->GetCellContent(binx,biny));
3316,3319d3294
< } else {
< // 3d case: retrieving the x,y,z bin is not yet implemented
< // print just the x,y info
< snprintf(info,200,"(x=%g, y=%g)",x,y);
3374d3348
< Int_t hdim = fH->GetDimension();
3400c3374
< if (hdim > 1) Hoption.Scat = 1;
---
> if (fH->GetDimension() > 1) Hoption.Scat = 1;
3403c3377
< if (fH->GetSumw2N() && hdim == 1) Hoption.Error = 2;
---
> if (fH->GetSumw2N() && fH->GetDimension() == 1) Hoption.Error = 2;
3505,3516c3479,3485
< strncpy(l," ",4);
< if (hdim>1) {
< Hoption.Scat = 0;
< Hoption.Contour = 1;
< if (l[4] == '1') { Hoption.Contour = 11; l[4] = ' '; }
< if (l[4] == '2') { Hoption.Contour = 12; l[4] = ' '; }
< if (l[4] == '3') { Hoption.Contour = 13; l[4] = ' '; }
< if (l[4] == '4') { Hoption.Contour = 14; l[4] = ' '; }
< if (l[4] == '5') { Hoption.Contour = 15; l[4] = ' '; }
< } else {
< Hoption.Hist = 1;
< }
---
> Hoption.Scat = 0;
> Hoption.Contour = 1; strncpy(l," ",4);
> if (l[4] == '1') { Hoption.Contour = 11; l[4] = ' '; }
> if (l[4] == '2') { Hoption.Contour = 12; l[4] = ' '; }
> if (l[4] == '3') { Hoption.Contour = 13; l[4] = ' '; }
> if (l[4] == '4') { Hoption.Contour = 14; l[4] = ' '; }
> if (l[4] == '5') { Hoption.Contour = 15; l[4] = ' '; }
3537,3546c3506
< l = strstr(chopt,"ARR" );
< if (l) {
< strncpy(l," ", 3);
< if (hdim>1) {
< Hoption.Arrow = 1;
< Hoption.Scat = 0;
< } else {
< Hoption.Hist = 1;
< }
< }
---
> l = strstr(chopt,"ARR" ); if (l) { Hoption.Arrow = 1; strncpy(l," ", 3); Hoption.Scat = 0; }
3549,3577c3509,3511
< strncpy(l," ", 3);
< if (hdim>1) {
< Hoption.Scat = 0;
< Hoption.Box = 1;
< if (l[3] == '1') { Hoption.Box = 11; l[3] = ' '; }
< } else {
< Hoption.Hist = 1;
< }
< }
< l = strstr(chopt,"COLZ");
< if (l) {
< strncpy(l," ",4);
< if (hdim>1) {
< Hoption.Color = 2;
< Hoption.Scat = 0;
< Hoption.Zscale = 1;
< } else {
< Hoption.Hist = 1;
< }
< }
< l = strstr(chopt,"COL" );
< if (l) {
< strncpy(l," ", 3);
< if (hdim>1) {
< Hoption.Color = 1;
< Hoption.Scat = 0;
< } else {
< Hoption.Hist = 1;
< }
---
> Hoption.Scat = 0;
> Hoption.Box = 1; strncpy(l," ", 3);
> if (l[3] == '1') { Hoption.Box = 11; l[3] = ' '; }
3578a3513,3514
> l = strstr(chopt,"COLZ"); if (l) { Hoption.Color = 2; strncpy(l," ",4); Hoption.Scat = 0; Hoption.Zscale = 1;}
> l = strstr(chopt,"COL" ); if (l) { Hoption.Color = 1; strncpy(l," ", 3); Hoption.Scat = 0; }
3654c3590
< if (hdim == 1) {
---
> if (fH->GetDimension() == 1) {
3972c3908
< dx = fH->GetBinContent(i+1, j) - fH->GetBinContent(i, j);
---
> dx = fH->GetCellContent(i+1, j) - fH->GetCellContent(i, j);
3974c3910
< dx = fH->GetBinContent(i, j) - fH->GetBinContent(i-1, j);
---
> dx = fH->GetCellContent(i, j) - fH->GetCellContent(i-1, j);
3976c3912
< dx = 0.5*(fH->GetBinContent(i+1, j) - fH->GetBinContent(i-1, j));
---
> dx = 0.5*(fH->GetCellContent(i+1, j) - fH->GetCellContent(i-1, j));
3979c3915
< dy = fH->GetBinContent(i, j+1) - fH->GetBinContent(i, j);
---
> dy = fH->GetCellContent(i, j+1) - fH->GetCellContent(i, j);
3981c3917
< dy = fH->GetBinContent(i, j) - fH->GetBinContent(i, j-1);
---
> dy = fH->GetCellContent(i, j) - fH->GetCellContent(i, j-1);
3983c3919
< dy = 0.5*(fH->GetBinContent(i, j+1) - fH->GetBinContent(i, j-1));
---
> dy = 0.5*(fH->GetCellContent(i, j+1) - fH->GetCellContent(i, j-1));
4677d4612
< TProfile2D* prof2d = dynamic_cast