Problems with rebinning TProfile2D

I have a following problem with TProfile2D, although I am not sure if it is a bug, a feature or my lack of understanding of how to use it.

I have a TProfile2D and I want to rebin(2) it along Y axis. When I make a projection of 2 bins along Y axis:

TH1D *proj1 = brvsr_aver2D->ProjectionY(" ", 1, 2, “ed”);

everything looks as expected (prof1_ok.gif attachement).

When I rebin and than do the projection:

brvsr_aver2D->RebinY(2, “mynew”);
TH1D *proj2 = mynew->ProjectionY(" ", 1, 1, “ed”);

the results are quite strange (pro1_wrong attachement). The constant tail that was at the level of 0.03 is not at the level of less than 0.0001, the peak is also about on order of magnitude lower…

Am I doing something wrong?

I also attach the 2D profile C file.

Lech Wiktor Piotrowski




900-1000.C.gz (137 KB)

Hi,

RebinX or RebinY are not yet implemented for the TProfile2D. I added now in CVS an Error message to indicate it.

Best Regards

Lorenzo

Thankyou. I’ll just have to rebin it manually, which shouldn’t be so difficult.