AmpGen
2.1
Toggle main menu visibility
Loading...
Searching...
No Matches
SimPDF.h
Go to the documentation of this file.
1
#ifndef AMPGEN_SIMPDF_H
2
#define AMPGEN_SIMPDF_H
3
4
#include <tuple>
5
6
namespace
AmpGen
{
7
class
SimFit
{
8
public
:
9
SimFit
() =
default
;
10
double
getVal
() {
11
double
LL = 0;
12
for
(
auto
&pdf : m_pdfs) LL += pdf();
13
return
LL;
14
}
15
16
template
<
class
PDF>
void
add
(PDF &pdf) {
17
INFO
(
"Adding "
<< &pdf <<
" to sim fit"
);
18
m_pdfs.emplace_back([&pdf]() ->
double
{
return
pdf.getVal(); });
19
}
20
21
private
:
22
std::vector<std::function<double(
void
)>> m_pdfs;
23
};
24
}
// namespace AmpGen
25
26
#endif
AmpGen::SimFit::SimFit
SimFit()=default
AmpGen::SimFit::getVal
double getVal()
Definition
SimPDF.h:10
AmpGen::SimFit::add
void add(PDF &pdf)
Definition
SimPDF.h:16
INFO
#define INFO(X)
Used for printing information messages, and will always be printed.
Definition
MsgService.h:81
AmpGen
Definition
AddCPConjugate.h:2
AmpGen
SimPDF.h
Generated on
for AmpGen by
1.17.0