AmpGen
2.1
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
{
8
class
SimFit
9
{
10
public
:
11
SimFit
() =
default
;
12
double
getVal
()
13
{
14
double
LL = 0;
15
for
(
auto
& pdf : m_pdfs ) LL += pdf();
16
return
LL;
17
}
18
19
template
<
class
PDF>
20
void
add
( PDF& pdf )
21
{
22
INFO
(
"Adding "
<< &pdf <<
" to sim fit"
);
23
m_pdfs.emplace_back( [&pdf]() ->
double
{
return
pdf.getVal(); } );
24
}
25
26
private
:
27
std::vector<std::function<double(
void
)>> m_pdfs;
28
29
};
30
}
// namespace AmpGen
31
32
#endif
AmpGen::SimFit::SimFit
SimFit()=default
AmpGen::SimFit::getVal
double getVal()
Definition
SimPDF.h:12
AmpGen::SimFit::add
void add(PDF &pdf)
Definition
SimPDF.h:20
INFO
#define INFO(X)
Used for printing information messages, and will always be printed.
Definition
MsgService.h:75
AmpGen
Definition
AddCPConjugate.h:2
AmpGen
SimPDF.h
Generated on Tue Feb 11 2025 14:01:02 for AmpGen by
1.13.2