Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
VavilovAccurateCdf.h
Go to the documentation of this file.
1// @(#)root/mathmore:$Id$
2// Authors: B. List 29.4.2010
3
4 /**********************************************************************
5 * *
6 * Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT *
7 * *
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU General Public License *
10 * as published by the Free Software Foundation; either version 2 *
11 * of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this library (see file COPYING); if not, write *
20 * to the Free Software Foundation, Inc., 59 Temple Place, Suite *
21 * 330, Boston, MA 02111-1307 USA, or contact the author. *
22 * *
23 **********************************************************************/
24
25// Header file for class VavilovAccurateCdf
26//
27// Created by: blist at Thu Apr 29 11:19:00 2010
28//
29// Last update: Thu Apr 29 11:19:00 2010
30//
31#ifndef ROOT_Math_VavilovAccurateCdf
32#define ROOT_Math_VavilovAccurateCdf
33
34#include "Math/IParamFunction.h"
36
37#include <string>
38
39namespace ROOT {
40namespace Math {
41
42//____________________________________________________________________________
43/**
44 Class describing the Vavilov cdf.
45
46 The probability density function of the Vavilov distribution
47 is given by:
48 \f[ p(\lambda; \kappa, \beta^2) =
49 \frac{1}{2 \pi i}\int_{c-i\infty}^{c+i\infty} \phi(s) e^{\lambda s} ds\f]
50 where \f$\phi(s) = e^{C} e^{\psi(s)}\f$
51 with \f$ C = \kappa (1+\beta^2 \gamma )\f$
52 and \f[\psi(s) = s \ln \kappa + (s+\beta^2 \kappa)
53 \cdot \left ( \int \limits_{0}^{1}
54 \frac{1 - e^{\frac{-st}{\kappa}}}{t} \, dt - \gamma \right )
55 - \kappa \, e^{\frac{-s}{\kappa}}\f].
56 \f$ \gamma = 0.5772156649\dots\f$ is Euler's constant.
57
58 The parameters are:
59 - 0: Norm: Normalization constant
60 - 1: x0: Location parameter
61 - 2: xi: Width parameter
62 - 3: kappa: Parameter \f$\kappa\f$ of the Vavilov distribution
63 - 4: beta2: Parameter \f$\beta^2\f$ of the Vavilov distribution
64
65 Benno List, June 2010
66
67
68 @ingroup StatFunc
69 */
70
71
73 public:
74
75 /**
76 Default constructor
77 */
79
80 /**
81 Constructor with parameter values
82 @param p vector of doubles containing the parameter values (Norm, x0, xi, kappa, beta2).
83 */
84 VavilovAccurateCdf(const double *p);
85
86 /**
87 Destructor
88 */
89 ~VavilovAccurateCdf () override;
90
91 /**
92 Access the parameter values
93 */
94 const double * Parameters() const override;
95
96 /**
97 Set the parameter values
98 @param p vector of doubles containing the parameter values (Norm, x0, xi, kappa, beta2).
99
100 */
101 void SetParameters(const double * p ) override;
102
103 /**
104 Return the number of Parameters
105 */
106 unsigned int NPar() const override;
107
108 /**
109 Return the name of the i-th parameter (starting from zero)
110 Overwrite if want to avoid the default name ("Par_0, Par_1, ...")
111 */
112 std::string ParameterName(unsigned int i) const override;
113
114 /**
115 Evaluate the function
116
117 @param x The Landau parameter \f$x = \lambda_L\f$
118
119 */
120 double DoEval(double x) const override;
121
122 /**
123 Evaluate the function, using parameters p
124
125 @param x The Landau parameter \f$x = \lambda_L\f$
126 @param p vector of doubles containing the parameter values (Norm, x0, xi, kappa, beta2).
127 */
128 double DoEvalPar(double x, const double * p) const override;
129
130 /**
131 Return a clone of the object
132 */
133 IBaseFunctionOneDim * Clone() const override;
134
135 private:
136 double fP[5];
137
138};
139
140
141} // namespace Math
142} // namespace ROOT
143
144#endif /* ROOT_Math_VavilovAccurateCdf */
winID h TVirtualViewer3D TVirtualGLPainter p
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
Definition IFunction.h:112
Specialized IParamFunction interface (abstract class) for one-dimensional parametric functions It is ...
Class describing the Vavilov cdf.
unsigned int NPar() const override
Return the number of Parameters.
IBaseFunctionOneDim * Clone() const override
Return a clone of the object.
VavilovAccurateCdf()
Default constructor.
~VavilovAccurateCdf() override
Destructor.
const double * Parameters() const override
Access the parameter values.
std::string ParameterName(unsigned int i) const override
Return the name of the i-th parameter (starting from zero) Overwrite if want to avoid the default nam...
void SetParameters(const double *p) override
Set the parameter values.
double DoEvalPar(double x, const double *p) const override
Evaluate the function, using parameters p.
double DoEval(double x) const override
Evaluate the function.
Double_t x[n]
Definition legend1.C:17
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...