ROOTPWA
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
src
TLogMultiGaus.h
Go to the documentation of this file.
1
2
//
3
// Copyright 2009 Sebastian Neubert
4
//
5
// This file is part of rootpwa
6
//
7
// rootpwa is free software: you can redistribute it and/or modify
8
// it under the terms of the GNU General Public License as published by
9
// the Free Software Foundation, either version 3 of the License, or
10
// (at your option) any later version.
11
//
12
// rootpwa is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
// GNU General Public License for more details.
16
//
17
// You should have received a copy of the GNU General Public License
18
// along with rootpwa. If not, see <http://www.gnu.org/licenses/>.
19
//
21
//-----------------------------------------------------------
22
// File and Version Information:
23
// $Id$
24
//
25
// Description:
26
// Likelihood function Object to use with ROOT minimizers
27
//
28
//
29
// Author List:
30
// Sebastian Neubert TUM (original author)
31
//
32
//
33
//-----------------------------------------------------------
34
35
#ifndef TLOGMULTIGAUS_HH
36
#define TLOGMULTIGAUS_HH
37
38
// Base Class Headers ----------------
39
40
41
// Collaborating Class Headers -------
42
#include <vector>
43
using
std::vector;
44
#include <string>
45
using
std::string;
46
#include <complex>
47
using
std::complex;
48
49
50
#include "TString.h"
51
#include "TMatrixD.h"
52
#include "Math/IFunction.h"
53
using namespace
ROOT;
54
55
56
// Collaborating Class Declarations --
57
58
59
class
TLogMultiGaus
:
public
Math::IGradientFunctionMultiDim {
60
public
:
61
62
// Constructors/Destructors ---------
63
TLogMultiGaus
();
64
~
TLogMultiGaus
();
65
TLogMultiGaus
*
Clone
()
const
{
return
new
TLogMultiGaus
(*
this
);}
66
// Accessors -----------------------
67
68
unsigned
int
NDim()
const
;
69
70
71
// Modifiers -----------------------
72
// Precisions = 1/sigma^2
73
void
Set
(
const
TMatrixT<double>& prec){_dim=prec.GetNrows();_precs.ResizeTo(_dim,_dim);_precs=prec;}
74
75
// Operations ----------------------
76
// Load Amplitudes into memory
77
78
79
virtual
double
DoEval(
const
double
*)
const
;
80
virtual
double
DoDerivative(
const
double
*,
unsigned
int
)
const
;
81
82
// Calculate Function f and Derivatives df in one go
83
virtual
void
FdF(
const
double
* x,
double
& f,
double
* df)
const
;
84
85
private
:
86
unsigned
int
_dim
;
87
TMatrixT<double>
_precs
;
88
89
};
90
91
#endif
92
93
//--------------------------------------------------------------
94
// $Log$
95
//--------------------------------------------------------------
Generated by
1.8.1.2