Re: 2D hists: slices, bands and projections

From: Pasha Murat (630)840-8237 FNAL (630)859-3463 home (murat@murat.fnal.gov)
Date: Tue Feb 29 2000 - 16:21:05 MET


Dear Rene,

sorry for being so ignorant - bring my deep apologies. Just as an excuse: 
I'd never guessed to search for a method filling the slices in Y inside 
1D histogram class. May be I'm relying on my inuition too much, but 
intuitively Y-slice seems to be something which generic 1D hist doesn't have. 
This caused my confusion. Let me ask one question: may be it is a matter of 
me not being a very good designer, but do you think is it right for 1D 
histogram class to have methods like ProfileY(), even if they don't do 
anything?
						thanks, Pasha
Rene Brun wrote:
> 
> Dear Pasha,
> 
> I am surprised by your question. Root supports ALL projections, bands,
> slices facilities of Hbook and many more. Did you look at the TH1 specs
> ?
> You will find:
> 
>     virtual void     FitSlicesX(TF1 *f1=0,Int_t binmin=1, Int_t
> binmax=0,
>                                 Int_t cut=0 ,Option_t *option="QNR");
>     virtual void     FitSlicesY(TF1 *f1=0,Int_t binmin=1, Int_t
> binmax=0,
>                                 Int_t cut=0 ,Option_t *option="QNR");
>     virtual void     FitSlicesZ(TF1 *f1=0,Int_t binminx=1, Int_t
> binmaxx=0,
>                                 Int_t binminy=1, Int_t binmaxy=0,
>                                 Int_t cut=0 ,Option_t *option="QNR");
>     virtual Stat_t   Integral();
>     virtual Stat_t   Integral(Int_t binx1, Int_t binx2);
>     virtual Stat_t   Integral(Int_t binx1, Int_t binx2, Int_t biny1,
>                               Int_t biny2);
>     virtual Stat_t   Integral(Int_t binx1, Int_t binx2, Int_t biny1,
>                               Int_t biny2, Int_t binz1, Int_t binz2);
>         TProfile    *ProfileX(const char *name="_pfx", Int_t
> firstybin=0,
>                               Int_t lastybin=9999, Option_t *option="");
>         TProfile    *ProfileY(const char *name="_pfy", Int_t
> firstxbin=0,
>                               Int_t lastxbin=9999, Option_t *option="");
>             TH1D    *ProjectionX(const char *name="_px", Int_t
> firstybin=0,                                    Int_t lastybin=9999,
> Option_t *option="");
>             TH1D    *ProjectionY(const char *name="_py", Int_t
> firstxbin=0,                                    Int_t lastxbin=9999,
> Option_t *option="");
>             TH1D    *ProjectionZ(const char *name="_pz", Int_t
> firstxbin=0,                                    Int_t lastxbin=9999,
> Int_t firstybin=0,
>                                  Int_t lastybin=9999, Option_t
> *option="");
>             TH1     *Project3D(Option_t *option="x");
> 
> In addition, the Root functions work from an existing 2-d or 3-d
> histograms.
> No need to prebook the projections, slices, etc as it was the case for
> Hbook.
> 
> Rene Brun
> Pasha Murat (630)840-8237@169G wrote:
> >
> > Hi Rooters,
> >
> > in old good days of HBOOK 2D histograms had a set of nice facilities of
> > slices, banks and projections which were extremely handy for analysis.
> > I'm thinking if it is worth having the equivalent functionality in ROOT
> > classes - it is certainly true that everybody can easily implement such
> > macros for himself, but wouldn't it be nice to have a common set of such
> > utilities ?
> >                                                 thanks, Pasha



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:20 MET