Re: TH3 constructors with both constant and variable bin widths...

From: Pierre-Luc Drouin <pldrouin_at_physics.carleton.ca>
Date: Wed, 16 Jul 2008 16:37:34 -0400


I think I might have found a solution. If I want to define a TH3D having only variable bin width for the x axis, could I simply do the following?

Double_t nbins=10;
Double_t bins[]={0,1,2,3,4,5,6,7,8,9,10}; TH3F th("th","th",nbins,bins[0],bins[nbins],10,0,10,10,0,10); th.GetXaxis()->Set(nbins,bins);

Thank you!
Pierre-Luc Drouin

Rene Brun wrote:
> Pierre-Luc,
>
> I suggest to use THnSparse instead of TH3
>
> Rene Brun
>
> Pierre-Luc Drouin wrote:
>> Hi,
>>
>> I would like to know if there is a particular reason why there is no
>> TH3 constructor having both constant and variable bin widths. This
>> would be nice to be able avoiding binary searches for TH3* objects
>> like it is the case for TH2*, when only some of the axes have a
>> variable bin width...
>>
>> Thank you!
>> Pierre-Luc Drouin
>>
>
Received on Wed Jul 16 2008 - 22:37:43 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 17 2008 - 17:50:01 CEST