-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathHZZ2L2QRooPdfs2.cc
66 lines (52 loc) · 1.44 KB
/
HZZ2L2QRooPdfs2.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include <iostream>
#include <math.h>
#include "TMath.h"
//#include "../interface/RooDoubleCB.h"
//#include "../interface/RooFermi.h"
//#include "../interface/RooRelBW.h"
#include "../interface/HZZ2L2QRooPdfs2.h"
#include "RooRealVar.h"
#include "RooRealConstant.h"
using namespace RooFit;
using namespace std;
ClassImp(RooLevelledExp2)
RooLevelledExp2::RooLevelledExp2(){}
RooLevelledExp2::RooLevelledExp2(const char *name, const char *title,
RooAbsReal& _x,
RooAbsReal& _sigma,
RooAbsReal& _alpha,
RooAbsReal& _beta,
RooAbsReal& _m,
RooAbsReal& _theta):
RooAbsPdf(name,title),
x("x","x",this,_x),
sigma("sigma","sigma",this,_sigma),
alpha("alpha","alpha",this,_alpha),
beta("beta","beta",this,_beta),
m("m","m",this,_m),
// k("k","k",this,_k),
theta("theta","theta",this,_theta)
{
}
RooLevelledExp2::RooLevelledExp2(const RooLevelledExp2& other, const char* name) :
RooAbsPdf(other,name),
x("x",this,other.x),
sigma("sigma",this,other.sigma),
alpha("alpha",this,other.alpha),
beta("beta",this,other.beta),
m("m",this,other.m),
theta("theta",this,other.theta)
{
}
double RooLevelledExp2::evaluate() const
{
double res=0.0;
double s = cos(theta)*sigma - sin(theta)*alpha;
double a = sin(theta)*sigma + cos(theta)*alpha;
//original
double t = fabs(x-m);
double den = (s + a*t + beta*t*t);
res=exp(-1.0*t/den);
return res;
}
///////////////////