|
||||
File indexing completed on 2025-01-18 10:10:22
0001 // @(#)root/mathmore:$Id$ 0002 // Authors: B. List 29.4.2010 0003 0004 /********************************************************************** 0005 * * 0006 * Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT * 0007 * * 0008 * This library is free software; you can redistribute it and/or * 0009 * modify it under the terms of the GNU General Public License * 0010 * as published by the Free Software Foundation; either version 2 * 0011 * of the License, or (at your option) any later version. * 0012 * * 0013 * This library is distributed in the hope that it will be useful, * 0014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 0016 * General Public License for more details. * 0017 * * 0018 * You should have received a copy of the GNU General Public License * 0019 * along with this library (see file COPYING); if not, write * 0020 * to the Free Software Foundation, Inc., 59 Temple Place, Suite * 0021 * 330, Boston, MA 02111-1307 USA, or contact the author. * 0022 * * 0023 **********************************************************************/ 0024 0025 // Header file for class VavilovAccurateCdf 0026 // 0027 // Created by: blist at Thu Apr 29 11:19:00 2010 0028 // 0029 // Last update: Thu Apr 29 11:19:00 2010 0030 // 0031 #ifndef ROOT_Math_VavilovAccurateCdf 0032 #define ROOT_Math_VavilovAccurateCdf 0033 0034 #include "Math/IParamFunction.h" 0035 #include "Math/VavilovAccurate.h" 0036 0037 #include <string> 0038 0039 namespace ROOT { 0040 namespace Math { 0041 0042 //____________________________________________________________________________ 0043 /** 0044 Class describing the Vavilov cdf. 0045 0046 The probability density function of the Vavilov distribution 0047 is given by: 0048 \f[ p(\lambda; \kappa, \beta^2) = 0049 \frac{1}{2 \pi i}\int_{c-i\infty}^{c+i\infty} \phi(s) e^{\lambda s} ds\f] 0050 where \f$\phi(s) = e^{C} e^{\psi(s)}\f$ 0051 with \f$ C = \kappa (1+\beta^2 \gamma )\f$ 0052 and \f[\psi(s) = s \ln \kappa + (s+\beta^2 \kappa) 0053 \cdot \left ( \int \limits_{0}^{1} 0054 \frac{1 - e^{\frac{-st}{\kappa}}}{t} \, dt - \gamma \right ) 0055 - \kappa \, e^{\frac{-s}{\kappa}}\f]. 0056 \f$ \gamma = 0.5772156649\dots\f$ is Euler's constant. 0057 0058 The parameters are: 0059 - 0: Norm: Normalization constant 0060 - 1: x0: Location parameter 0061 - 2: xi: Width parameter 0062 - 3: kappa: Parameter \f$\kappa\f$ of the Vavilov distribution 0063 - 4: beta2: Parameter \f$\beta^2\f$ of the Vavilov distribution 0064 0065 Benno List, June 2010 0066 0067 0068 @ingroup StatFunc 0069 */ 0070 0071 0072 class VavilovAccurateCdf: public IParametricFunctionOneDim { 0073 public: 0074 0075 /** 0076 Default constructor 0077 */ 0078 VavilovAccurateCdf(); 0079 0080 /** 0081 Constructor with parameter values 0082 @param p vector of doubles containing the parameter values (Norm, x0, xi, kappa, beta2). 0083 */ 0084 VavilovAccurateCdf(const double *p); 0085 0086 /** 0087 Destructor 0088 */ 0089 ~VavilovAccurateCdf () override; 0090 0091 /** 0092 Access the parameter values 0093 */ 0094 const double * Parameters() const override; 0095 0096 /** 0097 Set the parameter values 0098 @param p vector of doubles containing the parameter values (Norm, x0, xi, kappa, beta2). 0099 0100 */ 0101 void SetParameters(const double * p ) override; 0102 0103 /** 0104 Return the number of Parameters 0105 */ 0106 unsigned int NPar() const override; 0107 0108 /** 0109 Return the name of the i-th parameter (starting from zero) 0110 Overwrite if want to avoid the default name ("Par_0, Par_1, ...") 0111 */ 0112 std::string ParameterName(unsigned int i) const override; 0113 0114 /** 0115 Evaluate the function 0116 0117 @param x The Landau parameter \f$x = \lambda_L\f$ 0118 0119 */ 0120 double DoEval(double x) const override; 0121 0122 /** 0123 Evaluate the function, using parameters p 0124 0125 @param x The Landau parameter \f$x = \lambda_L\f$ 0126 @param p vector of doubles containing the parameter values (Norm, x0, xi, kappa, beta2). 0127 */ 0128 double DoEvalPar(double x, const double * p) const override; 0129 0130 /** 0131 Return a clone of the object 0132 */ 0133 IBaseFunctionOneDim * Clone() const override; 0134 0135 private: 0136 double fP[5]; 0137 0138 }; 0139 0140 0141 } // namespace Math 0142 } // namespace ROOT 0143 0144 #endif /* ROOT_Math_VavilovAccurateCdf */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |