-
Notifications
You must be signed in to change notification settings - Fork 429
Expand file tree
/
Copy pathExpGaussExp.cxx
More file actions
46 lines (37 loc) · 1.45 KB
/
ExpGaussExp.cxx
File metadata and controls
46 lines (37 loc) · 1.45 KB
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
/*****************************************************************************
* Project: RooFit *
* *
* This code was autogenerated by RooClassFactory *
*****************************************************************************/
// Gaussian core + exponential tail on high side + exponential tail on low side
// Souvik Das
// 8/23/2013
#include "Riostream.h"
#include "HiggsAnalysis/CombinedLimit/interface/ExpGaussExp.hpp"
#include "RooAbsReal.h"
#include "RooAbsCategory.h"
#include <math.h>
#include "TMath.h"
ClassImp(ExpGaussExp)
ExpGaussExp::ExpGaussExp(const char *name, const char *title, RooAbsReal& _x, RooAbsReal& _p0, RooAbsReal& _p1, RooAbsReal& _p2, RooAbsReal& _p3) :
RooAbsPdf(name,title),
x("x","x",this,_x),
p0("p0","p0",this,_p0),
p1("p1","p1",this,_p1),
p2("p2","p2",this,_p2),
p3("p3","p3",this,_p3)
{
}
ExpGaussExp::ExpGaussExp(const ExpGaussExp& other, const char* name) : RooAbsPdf(other,name), x("x",this,other.x), p0("p0",this,other.p0), p1("p1",this,other.p1), p2("p2",this,other.p2), p3("p3",this,other.p3) { }
Double_t ExpGaussExp::evaluate() const {
Double_t std=(x-p0)/p1;
Double_t result=0;
if (std<-p2){
result=exp(p2*p2/2.+p2*std);
} else if (-p2<=std && std<p3){
result=exp(-0.5*pow(std, 2));
} else {
result=exp(p3*p3/2.-p3*std);
}
return result;
}