]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RALICE/AliMath.h
bug fixed while filling the object AliPMDcluster
[u/mrichter/AliRoot.git] / RALICE / AliMath.h
index f29aaaced11f42c0443753edf3d0aa4420f4986e..888ce97e26d47b4fb3fa4e7fe6966f509fe5bdd7 100644 (file)
@@ -3,27 +3,8 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-/* $Id$ */
+// $Id$
 
-///////////////////////////////////////////////////////////////////////////
-// Class AliMath
-// Various mathematical tools which may be very convenient while
-// performing physics analysis.
-//
-// Example : Probability of a Chi-squared value
-// =========
-//
-// AliMath M;
-// Float_t chi2=20  ;          // The chi-squared value
-// Int_t ndf=12;               // The number of degrees of freedom
-// Float_t p=M.Prob(chi2,ndf); // The probability that at least a Chi-squared
-//                             // value of chi2 will be observed, even for a
-//                             // correct model
-//
-//--- NvE 14-nov-1998 UU-SAP Utrecht
-///////////////////////////////////////////////////////////////////////////
-#include <iostream.h>
 #include <math.h>
  
 #include "TObject.h"
 class AliMath : public TObject
 {
  public:
-  AliMath();                            // Default constructor
-  ~AliMath();                           // Destructor
-  Float_t Gamma(Float_t z);             // Standard gamma function Gamma(z)
-  Float_t Gamma(Float_t a,Float_t x);   // Incomplete gamma function P(a,x)
-  Float_t LnGamma(Float_t z);           // Compute ln[Gamma(z)]
-  Float_t Erf(Float_t x);               // Error function erf(x)
-  Float_t Erfc(Float_t x);              // Complementary error function erfc(x)
-  Float_t Prob(Float_t chi2,Int_t ndf); // Compute Chi-squared probability
+  AliMath();                              // Default constructor
+  virtual ~AliMath();                     // Destructor
+  AliMath(AliMath& m);                    // Copy constructor
+  Double_t Gamma(Double_t z);             // Standard gamma function Gamma(z)
+  Double_t Gamma(Double_t a,Double_t x);  // Incomplete gamma function P(a,x)
+  Double_t LnGamma(Double_t z);           // Compute ln[Gamma(z)]
+  Double_t Erf(Double_t x);               // Error function erf(x)
+  Double_t Erfc(Double_t x);              // Complementary error function erfc(x)
+  Double_t Prob(Double_t chi2,Int_t ndf); // Compute Chi-squared probability
+  Double_t BesselI(Int_t n,Double_t x);   // Compute integer order modified Bessel function I_n(x)
+  Double_t BesselK(Int_t n,Double_t x);   // Compute integer order modified Bessel function K_n(x)
  
  protected:
-  Float_t GamSer(Float_t a,Float_t x);  // Compute P(a,x) via serial representation
-  Float_t GamCf(Float_t a,Float_t x);   // Compute P(a,x) via continued fractions
+  Double_t GamSer(Double_t a,Double_t x); // Compute P(a,x) via serial representation
+  Double_t GamCf(Double_t a,Double_t x);  // Compute P(a,x) via continued fractions
+  Double_t BesselI0(Double_t x);          // Compute modified Bessel function I_0(x)
+  Double_t BesselK0(Double_t x);          // Compute modified Bessel function K_0(x)
+  Double_t BesselI1(Double_t x);          // Compute modified Bessel function I_1(x)
+  Double_t BesselK1(Double_t x);          // Compute modified Bessel function K_1(x)
  
- ClassDef(AliMath,1) // Class definition to enable ROOT I/O
+ ClassDef(AliMath,2) // Various mathematical tools for physics analysis.
  
 };
 #endif