]>
Commit | Line | Data |
---|---|---|
59e49925 | 1 | /***************************************************************************** |
2 | * Project: RooFit * | |
3 | * * | |
4 | * This code was autogenerated by RooClassFactory * | |
5 | *****************************************************************************/ | |
6 | ||
7 | // Your description goes here... | |
8 | ||
9 | #include "Riostream.h" | |
10 | ||
11 | #include "RooInverseGaussianTail.h" | |
12 | #include "RooAbsReal.h" | |
13 | #include "RooAbsCategory.h" | |
14 | #include <math.h> | |
15 | #include "TMath.h" | |
16 | ||
17 | ClassImp(RooInverseGaussianTail) | |
18 | ||
19 | RooInverseGaussianTail::RooInverseGaussianTail(const char *name, const char *title, | |
20 | RooAbsReal& _x, | |
21 | RooAbsReal& _mean, | |
22 | RooAbsReal& _sigma, | |
23 | RooAbsReal& _tail) : | |
24 | RooAbsPdf(name,title), | |
25 | x("x","x",this,_x), | |
26 | mean("mean","mean",this,_mean), | |
27 | sigma("sigma","sigma",this,_sigma), | |
28 | tail("tail","tail",this,_tail) | |
29 | { | |
30 | } | |
31 | ||
32 | ||
33 | RooInverseGaussianTail::RooInverseGaussianTail(const RooInverseGaussianTail& other, const char* name) : | |
34 | RooAbsPdf(other,name), | |
35 | x("x",this,other.x), | |
36 | mean("mean",this,other.mean), | |
37 | sigma("sigma",this,other.sigma), | |
38 | tail("tail",this,other.tail) | |
39 | { | |
40 | } | |
41 | ||
42 | ||
43 | ||
44 | Double_t RooInverseGaussianTail::evaluate() const | |
45 | { | |
46 | Double_t tail2 = tail * sigma; | |
47 | if (x >= (mean - tail2)) | |
48 | return TMath::Gaus(x, mean, sigma); | |
49 | else | |
50 | return TMath::Gaus(mean - tail2, mean, sigma) * TMath::Exp(tail2 * (x + tail2 - mean) / (sigma * sigma)); | |
51 | } | |
52 | ||
53 | ||
54 |