CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
GenericFunctions
GenericFunctions/LegendreFit.hh
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id: LegendreFit.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
3
//---------------------LegendreFit------------------------------------------//
4
// //
5
// Class LegendreFit. This is a fitting function consisting of a super //
6
// position of N legendre polynomials. Cascading fractions and phases are //
7
// the input parameters. Function is normalized to one (on [-1,1]) //
8
// //
9
//--------------------------------------------------------------------------//
10
#ifndef LegendreFit_h
11
#define LegendreFit_h 1
12
#include "
CLHEP/GenericFunctions/AbsFunction.hh
"
13
#include "
CLHEP/GenericFunctions/Parameter.hh
"
14
#include "
CLHEP/GenericFunctions/LegendreCoefficientSet.hh
"
15
#include "
CLHEP/GenericFunctions/ClebschGordanCoefficientSet.hh
"
16
namespace
Genfun {
17
22
class
LegendreFit :
public
AbsFunction {
23
24
FUNCTION_OBJECT_DEF
(
LegendreFit
)
25
26
public:
27
28
// Constructor
29
LegendreFit
(
unsigned
int
N);
30
31
// Copy constructor
32
LegendreFit
(const
LegendreFit
&right);
33
34
// Destructor
35
virtual ~
LegendreFit
();
36
37
// Retreive function value
38
virtual
double
operator ()(
double
argument) const;
39
virtual
double
operator ()(const
Argument
&
a
)
const
{
return
operator()
(a[0]);}
40
41
unsigned
int
order
()
const
;
42
43
Parameter
*
getFraction
(
unsigned
int
i);
44
const
Parameter
*
getFraction
(
unsigned
int
i)
const
;
45
46
Parameter
*
getPhase
(
unsigned
int
i);
47
const
Parameter
*
getPhase
(
unsigned
int
i)
const
;
48
49
// Gets the coefficients the coefficients of the function which is
50
// Squared to obtain a probability distribution (amplitude)
51
const
LegendreCoefficientSet
&
coefficientsA
()
const
;
52
53
// Gets the coefficients the coefficients of the function which is
54
// Squared to obtain a probability distribution:
55
const
LegendreCoefficientSet
&
coefficientsASq
()
const
;
56
57
// Recompute coefficients from the parameters:
58
void
recomputeCoefficients
()
const
;
59
60
61
private
:
62
63
// It is illegal to assign an adjustable constant
64
const
LegendreFit
& operator=(
const
LegendreFit
&right);
65
66
//
67
const
unsigned
int
N;
68
std::vector <Genfun::Parameter *> fraction;
69
std::vector <Genfun::Parameter *> phase;
70
mutable
LegendreCoefficientSet
coefA;
71
mutable
LegendreCoefficientSet
coefASq;
72
mutable
ClebschGordanCoefficientSet
ClebschGordan;
73
74
};
75
}
// namespace Genfun
76
#include "CLHEP/GenericFunctions/LegendreFit.icc"
77
#endif
Generated on Mon May 6 2013 04:04:10 for CLHEP by
1.8.1.2