Dear Marc,
TMath::GammaDist with a shape parameter (called gamma in ROOT, k in wikipedia) n/2 and a scale parameter (called beta in ROOT, theta in wikipedia) of 2, gives you a chi^2 distribution with n degrees of freedom.
http://root.cern.ch/root/html/TMath.html is a useful page for finding such tools (though there's much more available if you dig even deeper).
The Dirac delta function is not a function. Without some framework for specifying integrands and operations on them, how can it be represented in C++? So for the bonus, I'll go with "no".
cheers,
Amnon
-----Original Message-----
From: owner-roottalk_at_root.cern.ch on behalf of Marc Escalier
Sent: Tue 28-Sep-10 3:15 PM
To: roottalk_at_lxroot01.cern.ch
Subject: [ROOT] chi2 function and delta (dirac) function
Dear rooters,
would you know if there exist a existing chi2 function in root
(i wish to draw the chi2 function)
Do i need to write it by hand in a TF1 ?
as a bonus question, would you know if the "Dirac" delta function exists ?
thank you Received on Tue Sep 28 2010 - 23:29:51 CEST
This archive was generated by hypermail 2.2.0 : Tue Sep 28 2010 - 23:50:02 CEST