1 |
#include "Riostream.h"
|
2 |
|
3 |
#include "RooSUSYPolynomial.h"
|
4 |
#include "RooAbsReal.h"
|
5 |
#include "RooAbsCategory.h"
|
6 |
#include "TMath.h"
|
7 |
|
8 |
RooSUSYPolynomial::RooSUSYPolynomial(const char *name, const char *title,
|
9 |
RooAbsReal& _mll,
|
10 |
RooAbsReal& _p0,
|
11 |
RooAbsReal& _p1,
|
12 |
RooAbsReal& _p2,
|
13 |
RooAbsReal& _p3,
|
14 |
RooAbsReal& _p4,
|
15 |
RooAbsReal& _p5,
|
16 |
RooAbsReal& _p6,
|
17 |
RooAbsReal& _p7) :
|
18 |
RooAbsPdf(name,title),
|
19 |
mll("mll","mll",this,_mll),
|
20 |
p0("p0","p0",this,_p0),
|
21 |
p1("p1","p1",this,_p1),
|
22 |
p2("p2","p2",this,_p2),
|
23 |
p3("p3","p3",this,_p3),
|
24 |
p4("p4","p4",this,_p4),
|
25 |
p5("p5","p5",this,_p5),
|
26 |
p6("p6","p6",this,_p6),
|
27 |
p7("p7","p7",this,_p7)
|
28 |
{
|
29 |
}
|
30 |
|
31 |
|
32 |
RooSUSYPolynomial::RooSUSYPolynomial(const RooSUSYPolynomial& other, const char* name) :
|
33 |
RooAbsPdf(other,name),
|
34 |
mll("mll",this,other.mll),
|
35 |
p0("p0",this,other.p0),
|
36 |
p1("p1",this,other.p1),
|
37 |
p2("p2",this,other.p2),
|
38 |
p3("p3",this,other.p3),
|
39 |
p4("p4",this,other.p4),
|
40 |
p5("p5",this,other.p5),
|
41 |
p6("p6",this,other.p6),
|
42 |
p7("p7",this,other.p7)
|
43 |
{
|
44 |
}
|
45 |
|
46 |
|
47 |
|
48 |
Double_t RooSUSYPolynomial::evaluate() const
|
49 |
{
|
50 |
// cout << "Evaluating at mll=" << mll << endl;
|
51 |
float val=p0;
|
52 |
val+=p1*TMath::Power(mll,1);
|
53 |
val+=p2*TMath::Power(mll,2);
|
54 |
val+=p3*TMath::Power(mll,3);
|
55 |
val+=p4*TMath::Power(mll,4);
|
56 |
val+=p5*TMath::Power(mll,5);
|
57 |
val+=p6*TMath::Power(mll,6);
|
58 |
val+=p7*TMath::Power(mll,7);
|
59 |
|
60 |
if(val<0) return 0;
|
61 |
return val;
|
62 |
}
|