ROOT logo
// @(#)root/mathmore:$Id: VavilovAccuratePdf.h 34195 2010-06-30 04:33:36Z brun $
// Authors: B. List 29.4.2010

 /**********************************************************************
  *                                                                    *
  * Copyright (c) 2004 ROOT Foundation,  CERN/PH-SFT                   *
  *                                                                    *
  * This library is free software; you can redistribute it and/or      *
  * modify it under the terms of the GNU General Public License        *
  * as published by the Free Software Foundation; either version 2     *
  * of the License, or (at your option) any later version.             *
  *                                                                    *
  * This library is distributed in the hope that it will be useful,    *
  * but WITHOUT ANY WARRANTY; without even the implied warranty of     *
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
  * General Public License for more details.                           *
  *                                                                    *
  * You should have received a copy of the GNU General Public License  *
  * along with this library (see file COPYING); if not, write          *
  * to the Free Software Foundation, Inc., 59 Temple Place, Suite      *
  * 330, Boston, MA 02111-1307 USA, or contact the author.             *
  *                                                                    *
  **********************************************************************/

// Header file for class VavilovAccuratePdf
// 
// Created by: blist  at Thu Apr 29 11:19:00 2010
// 
// Last update: Thu Apr 29 11:19:00 2010
// 
#ifndef ROOT_Math_VavilovAccuratePdf
#define ROOT_Math_VavilovAccuratePdf


#include "Math/IParamFunction.h"
#include "Math/VavilovAccurate.h"

namespace ROOT {
namespace Math {

//____________________________________________________________________________
/**
   Class describing the Vavilov pdf.
   
   The probability density function of the Vavilov distribution
   is given by:
  \f[ p(\lambda; \kappa, \beta^2) =  
  \frac{1}{2 \pi i}\int_{c-i\infty}^{c+i\infty} \phi(s) e^{\lambda s} ds\f]
   where \f$\phi(s) = e^{C} e^{\psi(s)}\f$
   with  \f$ C = \kappa (1+\beta^2 \gamma )\f$
   and \f$\psi(s)&=& s \ln \kappa + (s+\beta^2 \kappa)
               \cdot \left ( \int \limits_{0}^{1}
               \frac{1 - e^{\frac{-st}{\kappa}}}{t} \,\der t- \gamma \right )
               - \kappa \, e^{\frac{-s}{\kappa}}\f$.
   \f$ \gamma = 0.5772156649\dots\f$ is Euler's constant.
   
   The parameters are:
   - 0: Norm: Normalization constant
   - 1: x0:   Location parameter
   - 2: xi:   Width parameter
   - 3: kappa: Parameter \f$\kappa\f$ of the Vavilov distribution
   - 4: beta2: Parameter \f$\beta^2\f$ of the Vavilov distribution
   
   Benno List, June 2010
     
   @ingroup StatFunc
 */


class VavilovAccuratePdf: public IParametricFunctionOneDim {
   public:
   
      /**
         Default constructor
      */
      VavilovAccuratePdf();
      
      /**
         Constructor with parameter values
         @param p vector of doubles containing the parameter values (Norm, x0, xi, kappa, beta2). 
      */
      VavilovAccuratePdf (const double *p);
      
      /**
         Destructor
      */
      virtual ~VavilovAccuratePdf ();
      
      /**
         Access the parameter values
      */
      virtual const double * Parameters() const;

      /**
         Set the parameter values

         @param p vector of doubles containing the parameter values (Norm, x0, xi, kappa, beta2). 

      */
      virtual void SetParameters(const double * p );
       
      /**
         Return the number of Parameters
      */
      virtual unsigned int NPar() const;

      /**
         Return the name of the i-th parameter (starting from zero)
       */
      virtual std::string ParameterName(unsigned int i) const;
            
      /**
         Evaluate the function

       @param x The Landau parameter \f$x = \lambda_L\f$ 
       */
      virtual double DoEval(double x) const;
   
      /**
         Evaluate the function, using parameters p

       @param x The Landau parameter \f$x = \lambda_L\f$ 
         @param p vector of doubles containing the parameter values (Norm, x0, xi, kappa, beta2). 
       */
      virtual double DoEvalPar(double x, const double * p) const;
   
      /**
         Return a clone of the object
       */
      virtual IBaseFunctionOneDim  * Clone() const;
   
   private:
      double fP[5];    

};


} // namespace Math
} // namespace ROOT

#endif /* ROOT_Math_VavilovAccuratePdf */
 VavilovAccuratePdf.h:1
 VavilovAccuratePdf.h:2
 VavilovAccuratePdf.h:3
 VavilovAccuratePdf.h:4
 VavilovAccuratePdf.h:5
 VavilovAccuratePdf.h:6
 VavilovAccuratePdf.h:7
 VavilovAccuratePdf.h:8
 VavilovAccuratePdf.h:9
 VavilovAccuratePdf.h:10
 VavilovAccuratePdf.h:11
 VavilovAccuratePdf.h:12
 VavilovAccuratePdf.h:13
 VavilovAccuratePdf.h:14
 VavilovAccuratePdf.h:15
 VavilovAccuratePdf.h:16
 VavilovAccuratePdf.h:17
 VavilovAccuratePdf.h:18
 VavilovAccuratePdf.h:19
 VavilovAccuratePdf.h:20
 VavilovAccuratePdf.h:21
 VavilovAccuratePdf.h:22
 VavilovAccuratePdf.h:23
 VavilovAccuratePdf.h:24
 VavilovAccuratePdf.h:25
 VavilovAccuratePdf.h:26
 VavilovAccuratePdf.h:27
 VavilovAccuratePdf.h:28
 VavilovAccuratePdf.h:29
 VavilovAccuratePdf.h:30
 VavilovAccuratePdf.h:31
 VavilovAccuratePdf.h:32
 VavilovAccuratePdf.h:33
 VavilovAccuratePdf.h:34
 VavilovAccuratePdf.h:35
 VavilovAccuratePdf.h:36
 VavilovAccuratePdf.h:37
 VavilovAccuratePdf.h:38
 VavilovAccuratePdf.h:39
 VavilovAccuratePdf.h:40
 VavilovAccuratePdf.h:41
 VavilovAccuratePdf.h:42
 VavilovAccuratePdf.h:43
 VavilovAccuratePdf.h:44
 VavilovAccuratePdf.h:45
 VavilovAccuratePdf.h:46
 VavilovAccuratePdf.h:47
 VavilovAccuratePdf.h:48
 VavilovAccuratePdf.h:49
 VavilovAccuratePdf.h:50
 VavilovAccuratePdf.h:51
 VavilovAccuratePdf.h:52
 VavilovAccuratePdf.h:53
 VavilovAccuratePdf.h:54
 VavilovAccuratePdf.h:55
 VavilovAccuratePdf.h:56
 VavilovAccuratePdf.h:57
 VavilovAccuratePdf.h:58
 VavilovAccuratePdf.h:59
 VavilovAccuratePdf.h:60
 VavilovAccuratePdf.h:61
 VavilovAccuratePdf.h:62
 VavilovAccuratePdf.h:63
 VavilovAccuratePdf.h:64
 VavilovAccuratePdf.h:65
 VavilovAccuratePdf.h:66
 VavilovAccuratePdf.h:67
 VavilovAccuratePdf.h:68
 VavilovAccuratePdf.h:69
 VavilovAccuratePdf.h:70
 VavilovAccuratePdf.h:71
 VavilovAccuratePdf.h:72
 VavilovAccuratePdf.h:73
 VavilovAccuratePdf.h:74
 VavilovAccuratePdf.h:75
 VavilovAccuratePdf.h:76
 VavilovAccuratePdf.h:77
 VavilovAccuratePdf.h:78
 VavilovAccuratePdf.h:79
 VavilovAccuratePdf.h:80
 VavilovAccuratePdf.h:81
 VavilovAccuratePdf.h:82
 VavilovAccuratePdf.h:83
 VavilovAccuratePdf.h:84
 VavilovAccuratePdf.h:85
 VavilovAccuratePdf.h:86
 VavilovAccuratePdf.h:87
 VavilovAccuratePdf.h:88
 VavilovAccuratePdf.h:89
 VavilovAccuratePdf.h:90
 VavilovAccuratePdf.h:91
 VavilovAccuratePdf.h:92
 VavilovAccuratePdf.h:93
 VavilovAccuratePdf.h:94
 VavilovAccuratePdf.h:95
 VavilovAccuratePdf.h:96
 VavilovAccuratePdf.h:97
 VavilovAccuratePdf.h:98
 VavilovAccuratePdf.h:99
 VavilovAccuratePdf.h:100
 VavilovAccuratePdf.h:101
 VavilovAccuratePdf.h:102
 VavilovAccuratePdf.h:103
 VavilovAccuratePdf.h:104
 VavilovAccuratePdf.h:105
 VavilovAccuratePdf.h:106
 VavilovAccuratePdf.h:107
 VavilovAccuratePdf.h:108
 VavilovAccuratePdf.h:109
 VavilovAccuratePdf.h:110
 VavilovAccuratePdf.h:111
 VavilovAccuratePdf.h:112
 VavilovAccuratePdf.h:113
 VavilovAccuratePdf.h:114
 VavilovAccuratePdf.h:115
 VavilovAccuratePdf.h:116
 VavilovAccuratePdf.h:117
 VavilovAccuratePdf.h:118
 VavilovAccuratePdf.h:119
 VavilovAccuratePdf.h:120
 VavilovAccuratePdf.h:121
 VavilovAccuratePdf.h:122
 VavilovAccuratePdf.h:123
 VavilovAccuratePdf.h:124
 VavilovAccuratePdf.h:125
 VavilovAccuratePdf.h:126
 VavilovAccuratePdf.h:127
 VavilovAccuratePdf.h:128
 VavilovAccuratePdf.h:129
 VavilovAccuratePdf.h:130
 VavilovAccuratePdf.h:131
 VavilovAccuratePdf.h:132
 VavilovAccuratePdf.h:133
 VavilovAccuratePdf.h:134
 VavilovAccuratePdf.h:135
 VavilovAccuratePdf.h:136
 VavilovAccuratePdf.h:137
 VavilovAccuratePdf.h:138
 VavilovAccuratePdf.h:139
 VavilovAccuratePdf.h:140
 VavilovAccuratePdf.h:141