Re: TH1 projection to different axis bin defenition

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Wed, 7 Oct 2009 09:24:49 +0200


see TH1::Merge and the REMARKS about binning in the doc of this function http://root.cern.ch/root/html/TH1.html#TH1:Merge

Rene Brun

Akira OKUMURA wrote:
> Hello ROOTers,
>
> TH1D* h1 = new TH1D("h1", "", 100, -5, 5); // original histo
> h1->FillRandom("gaus");
>
> TH1D* h2 = new TH1D("h2", "", 83, -9, 13); // empty one with different
> bin definition
>
> Is there any direct way to project h1 to h2? I am looking for a method
> which automatically calculate bin contents and errors for a different
> axis bins.
>
> Regards,
>
> OKUMURA, Akira oxon_at_juno.phys.s.u-tokyo.ac.jp
> Department of Physics, The University of Tokyo
> 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
> TEL/FAX +81 3-5841-4173/4059
> Skype : okumura.akira
>
Received on Wed Oct 07 2009 - 09:24:34 CEST

This archive was generated by hypermail 2.2.0 : Wed Oct 07 2009 - 23:50:03 CEST