Re: [ROOT] TH1D

From: Anufriev Sergey Valentinovich (anufriev@pcfarm.pnpi.spb.ru)
Date: Wed Aug 13 2003 - 11:34:52 MEST


On Wed, 13 Aug 2003, Rene Brun wrote:
Thank you for your help. I'd like to know two points more:

1. Is there a difference between h2.Draw() and h2->Draw()

2. To return to the previous question: if i have NTuple with the column 
E_t, how can I get the TH1D I need  (with the XAxis = X_t) from it. It is 
not clear for me how to work with NTuple, I need an exsample. 

> Well, in this case, you have to
>   -create a new histogram with the right limits in X_t
>   - loop on the original histogram bins
>     - getting the bin content
>     - computing the new bin in the new histogram
>     - call SetBinContent(newbin,bincontent)
> 
> You must be careful with bin edge effects. A reason to start from the
> original data (Tree or..) instead of the above procedure.
> 
> Rene Brun
> 
> Anufriev Sergey Valentinovich wrote:
> > 
> > But, in fact E_t is the XAxis. And I need XAxis will be X_t. I  need not
> > to normalize my histogram.
> > 
> > > Hi Sergey,
> > >
> > > Having TH1D* h, do
> > >   h->Scale(2/sqrt(s));
> > >
> > > see also TH1::DrawNormalized
> > >
> > > Rene Brun
> > >
> > > Anufriev Sergey Valentinovich wrote:
> > > >
> > > > Dear ROOTers!
> > > >
> > > > I have the next problem: I can draw TH1D which shows dependense CROSS
> > > > SECTION (E_transeverse), but in fact I need histogram  CROSS
> > > > SECTION(X_transeverse), where X_transeverse=2*E_transeverse/SQRT(s) (just
> > > > one can say X_t=f(E_t)). Question is: how can I get it?
> > > >
> > > > Thank you in advance, Sergey.
> > >
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET