# Re: [ROOT] statistical error of Intergation

From: Ahmed Al-Jamel (ahmed1@rcf.rhic.bnl.gov)
Date: Mon Mar 01 2004 - 04:25:29 MET

Thank you  Arthur. What I really did to avoid this is to re-define my
Gaussian function so that the  constant N is now the number of J/psis:

Gassian =  N/srqrt(2*pi*sigma)
EXP[-0.5((x-\bar x)/sigma)^2].

Then, we have the statistcial error on  N  is the statistical error of
the J/psi  counts., which is COMPUTED directly by root and shown on the
statistical window of the Canvas.  Does this sound correct?.

Sorry if my questions look elementary, but this is the first of my work
with root.

Best Regards, Ahmed

Arthur E. Snyder wrote:

>This not really a root problem ... just propagation of errors. The peak P
>(par[0])) is related to area by A=P*sigma*sqrt(2pi) (no integral function
>needed!), so given error matrix on P and sigma it easy to compute error on
>A.
>
>
>----- Original Message -----
>To: <roottalk@pcroot.cern.ch>
>Cc: <ahmed1@rcf.rhic.bnl.gov>
>Sent: Friday, February 27, 2004 6:18 PM
>Subject: [ROOT] statistical error of Intergation
>
>
>
>
>>Dear Rooters,
>>
>>  I am new to the list, and I have the following which I coud not figure
>>
>>
>out
>
>
>>how to do it under root. I'm fitting my J/psi peaks by a Gaussian function
>>
>>
>:
>
>
>>f=N*Exp[-(x-\bar{x})^2/2 sigma^2]. Then I utilized the function
>>Integral(min,max) to find the area or the number of counts under this fit.
>>.
>>.
>>.
>>n[j]->Fit("Gaus","R");
>>G->SetParameters(par[0],par[1],par[2]);
>>float mean = par[1];
>>float sigma = par[2];
>>float mlo = mean-3.0*sigma;
>>float mhi = mean+3.0*sigma;
>>cout <<mean<<" and "<<sigma<<" and " <<mlo<<"and "<<mhi<<endl;
>>float binw = n[j]->GetBinWidth(1);
>>double COUNTS = G->Integral(mlo,mhi)/binw;
>>.
>>.
>>.
>>
>>
>>I need to know how to find the statistical error of the integral, i.e.
>>
>>
>"COUNTS"
>
>
>>in root.
>>
>>Thank you very much
>>
>>Ahmed.
>>
>>
>>
>>
>>
>>=====
>>"EAST OR WEST, HOME IS BEST".
>>
>> Ahmed Al-Jamel
>> Physics Department(http://www.physics.nmsu.edu)
>> New Mexico State University
>> Box 30001, MSC 3D
>> Las Cruces, NM 88003-8001
>> Tel (off): (505)-646-7614.
>> http://www.feynman.nmsu.edu
>> http://www.phenix.bnl.gov/phenix/WWW/publish/ahmed1/
>>
>>__________________________________
>>Do you Yahoo!?
>>Get better spam protection with Yahoo! Mail.
>>http://antispam.yahoo.com/tools
>>
>>


This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET