Re: [ROOT] Error propagation in ProjectionX

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Dec 04 2002 - 22:50:57 MET


Hi Bill,

Running your test, I obtain:

root [0] .x Simple.C
 bin 10,10 = 100000 316.228
projection 100000 316.228
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1

Note that a problem was fixed in TH2::ProjectionX,Y a few weeks ago.

Rene Brun

On Wed, 4 Dec 2002, William Love wrote:

>   Roottalk
> 
>   I made a simpler version of my problem.  I forgot to mention
>  that I am running Root  3.03/09 on Linux
> 
> 
> #include "TH2.h";
> #include "TH1.h";
> TH2D *exam;
> void Simple(){
> 
>   exam = new TH2D("exam","demo",36,-1.8,1.8,36,-180,180);
>     for (int i=0;i<36;i++)
>       {
>       for (int j=0;j<36;j++)
>  {
>  exam->SetBinContent(i+1,j+1,100000);
>       }
>     }
>   exam->Sumw2();
>   cout << " bin 10,10 = " << exam->GetBinContent(10,10) <<" " <<
> exam->GetBinError(10,10) <<endl;
>   exam->ProjectionX("pro1",10,10,"e");
>   cout << "projection " << pro1->GetBinContent(10) << " " <<
> pro1->GetBinError(10) << endl;
>   pro1->Draw();
>   return();
> }
> 
>   This code prints
>  *** Start at Date : Wed Dec  4 16:07:41 2002
> QAInfo:You are using STAR_LEVEL : dev, ROOT_LEVEL : 3.03.09 and node :
> rcas6006.rcf.bnl.gov
> root.exe [0]
> Processing Simple.C...
>  bin 10,10 = 100000 316.228
> projection 100000 100000
> <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
> 
>    Bill Love
> He was screaming in agony.  Fortunately I speak it fluently.
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:22 MET