MINT2
DalitzSumPdf.cpp
Go to the documentation of this file.
1 //
2 #include "Mint/SumPdf.h"
3 #include "Mint/IDalitzEvent.h"
4 #include "Mint/PdfBase.h"
5 
6 #include "Mint/IDalitzPdf.h"
7 #include "Mint/FitParameter.h"
8 #include "Mint/IPdf.h"
9 #include "Mint/IEventList.h"
10 
11 #include "Mint/IDalitzEvent.h"
12 
13 #include "Mint/DalitzSumPdf.h"
14 
15 #include <iostream>
16 
17 using namespace std;
18 using namespace MINT;
19 
22  , IPdf<IDalitzEvent>()
23  , IDalitzPdf()
24  , SumPdf<IDalitzEvent>(other)
25  , _dalitz_pdf_1(other._dalitz_pdf_1), _dalitz_pdf_2(other._dalitz_pdf_2)
26 {
27  cout << "DON'T USE copy-constructor WITH DalitzSumPdf!!" << endl;
28 }
29 
31  , IDalitzPdf& pdf_1
32  , IDalitzPdf& pdf_2)
33  : SumPdf<IDalitzEvent>( f1
34  , pdf_1
35  , pdf_2)
36  , _dalitz_pdf_1(pdf_1)
37  , _dalitz_pdf_2(pdf_2)
38 {
39 }
40 
42  return evt.phaseSpace();
43 }
45  bool dbThis=false;
46  if(dbThis) cout << "DalitzSumPdf::getVal(): you called? " << endl;
47  return getVal_noPs(evt);
48 }
50  bool dbThis=false;
51  if(dbThis) {
52  cout << "DalitzSumPdf::getVal_noPs(): you called? " << endl;
53  cout << "DalitzSumPdf::getVal_noPs(): about to return:" << endl;
54  cout << "DalitzSumPdf::getVal_noPs(): " << _f1 << " * " << endl;
55  cout << "DalitzSumPdf::getVal_noPs(): " << _dalitz_pdf_1.getVal_noPs(evt)
56  << " + " << endl;
57  cout << "DalitzSumPdf::getVal_noPs(): (" << 1 - _f1 << ") * "
58  << _dalitz_pdf_1.getVal_noPs(evt) << endl;
59  }
60  double returnVal =
62  (1.0 - _f1) * _dalitz_pdf_2.getVal_noPs(evt);
63  if(dbThis) cout << "DalitzSumPdf::getVal_noPs(): returning "
64  << returnVal << endl;
65  return returnVal;
66 }
68  return getVal_noPs(evt)*phaseSpace(evt);
69 }
70 
71 //
DalitzSumPdf(const DalitzSumPdf &other)
virtual double getVal_withPs(IDalitzEvent &evt)
virtual double phaseSpace() const =0
IDalitzPdf & _dalitz_pdf_1
Definition: DalitzSumPdf.h:23
FitParameter & _f1
Definition: SumPdf.h:19
virtual double phaseSpace(IDalitzEvent &evt)
IDalitzPdf & _dalitz_pdf_2
Definition: DalitzSumPdf.h:24
virtual double getVal(IDalitzEvent &evt)
virtual double getVal_noPs(IDalitzEvent &evt)
virtual double getVal_noPs(IDalitzEvent &evt)=0