Re: Projection of a histograms

From: Lorenzo Moneta <lorenzo.moneta_at_cern.ch>
Date: Mon, 10 Mar 2008 17:23:58 +0100


Hello Melinda,

  we will plan to add this new functionality as an option for all the histogram projected functions, not as a new method. It is expected to have this implemented for the development release schedule for April. Anyway I will let you know when it will be in the SVN trunk,

  Best Regards

  Lorenzo
On Mar 5, 2008, at 6:25 PM, Melinda Siciliano wrote:

> Hi Rene and Lorenzo,
>
> I tried as Rene suggested me and it works! Thanks a lot!!!!
>
> May I ask you if when you put the new function in ROOT , could you
> tell me then the name of the function in the way to substite it in
> my gui?
>
> Thanks,
>
> Melinda
>
> On Tue, Mar 4, 2008 at 5:24 PM, Rene Brun <Rene.Brun_at_cern.ch> wrote:
> Hi Melinda,
>
> The projection of the effective entries is currently not implemented.
> It is not too complex to obtain what you want if you have called Sumw2
> on your TH2 object.
> In this case, make the projection using TH2::ProjectionX (or Y) and
> compute the effective entries
> with a code looking like
> TH2 *h2; //your Th2 object where Sumw2 has been called before
> filling
> TH1D *px = h2->ProjectionX();
> Int_t nbins = px->GetXaxis()->GetNbins();
> for (Int_t bin=1;bin<=nbins;bin++) {
> double y = px->GetBinContent(bin);
> double e = px->GetBinError(bin);
> double effe = 0;
> if (e != 0) effe = y*y/e*e;
> px->SetBinContent(bin,effe);
> px->SetBinError(bin,0);
> }
>
> This could be an option when calling TH2::ProjectionX,Y.
> Lorenzo, could you implement this code in all Projection functions?
>
> Rene Brun
>
> Melinda Siciliano wrote:
> > Dear all,
> >
> > I have an 2D-histogram filled using the weight. I would like to ask
> > you if there a way to make the projection of the effective entries
> of
> > the histogram.
> >
> > Thanks,
> >
> > Melinda
>
>
Received on Mon Mar 10 2008 - 17:25:06 CET

This archive was generated by hypermail 2.2.0 : Mon Mar 10 2008 - 23:50:01 CET