JHUGen MELA  JHUGen v7.5.6, MELA v2.4.2
Matrix element calculations as used in JHUGen.
RooTsallisExp.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <cmath>
3 #include "RooTsallisExp.h"
4 #include "RooFit.h"
5 #include "RooRealVar.h"
6 #include "RooRealConstant.h"
7 #include "TH1.h"
8 
9 //ClassImp(RooTsallisExp)
10 
11  RooTsallisExp::RooTsallisExp(const char *name, const char *title,
12  RooAbsReal& _x,
13  RooAbsReal& _mzz,
14  RooAbsReal& _m,
15  RooAbsReal& _n0,
16  RooAbsReal& _n1,
17  RooAbsReal& _n2,
18  RooAbsReal& _ndue,
19  RooAbsReal& _bb0,
20  RooAbsReal& _bb1,
21  RooAbsReal& _bb2,
22  RooAbsReal& _T0,
23  RooAbsReal& _T1,
24  RooAbsReal& _T2,
25  RooAbsReal& _bbdue0,
26  RooAbsReal& _bbdue1,
27  RooAbsReal& _bbdue2,
28  RooAbsReal& _fexp0,
29  RooAbsReal& _fexp1,
30  RooAbsReal& _fexp2):
31 
32 
33  RooAbsPdf(name,title),
34  x("x","x",this,_x),
35  mzz("mzz","mzz",this,_mzz),
36  m("m","m",this,_m),
37  n0("n0","n0",this,_n0),
38  n1("n1","n1",this,_n1),
39  n2("n2","n2",this,_n2),
40  ndue("ndue","ndue",this,_ndue),
41  bb0("bb0","bb0",this,_bb0),
42  bb1("bb1","bb1",this,_bb1),
43  bb2("bb2","bb2",this,_bb2),
44  T0("T0","T0",this,_T0),
45  T1("T1","T1",this,_T1),
46  T2("T2","T2",this,_T2),
47  bbdue0("bbdue0","bbdue0",this,_bbdue0),
48  bbdue1("bbdue1","bbdue1",this,_bbdue1),
49  bbdue2("bbdue2","bbdue2",this,_bbdue2),
50  fexp0("fexp0","fexp0",this,_fexp0),
51  fexp1("fexp1","fexp1",this,_fexp1),
52  fexp2("fexp2","fexp2",this,_fexp2)
53  {
54  }
55 
56 
57  RooTsallisExp::RooTsallisExp(const RooTsallisExp& other, const char* name) :
58  RooAbsPdf(other,name),
59  x("x",this,other.x),
60  mzz("mzz",this,other.mzz),
61  m("m",this,other.m),
62  n0("n0",this,other.n0),
63  n1("n1",this,other.n1),
64  n2("n2",this,other.n2),
65  ndue("ndue",this,other.ndue),
66  bb0("bb0",this,other.bb0),
67  bb1("bb1",this,other.bb1),
68  bb2("bb2",this,other.bb2),
69  T0("T0",this,other.T0),
70  T1("T1",this,other.T1),
71  T2("T2",this,other.T2),
72  bbdue0("bbdue0",this,other.bbdue0),
73  bbdue1("bbdue1",this,other.bbdue1),
74  bbdue2("bbdue2",this,other.bbdue2),
75  fexp0("fexp0",this,other.fexp0),
76  fexp1("fexp1",this,other.fexp1),
77  fexp2("fexp2",this,other.fexp2)
78 
79  {
80  }
81 
82 
83 
84  double RooTsallisExp::evaluate() const
85  {
86  // cout<<"In rooTsallis::evaluate()"<<endl;
87  double T = T0 + mzz*T1 + mzz*mzz*T2;
88  double n = n0 + mzz*n1 + mzz*mzz*n2;
89  double bb = bb0 + mzz*bb1 + mzz*mzz*bb2;
90  double fexp = fexp0 + mzz*fexp1 + mzz*mzz*fexp2;
91  double bbdue = bbdue0 + mzz*bbdue1 + mzz*mzz*bbdue2;
92  double result = pow(x,ndue)*exp(-bb*x)*pow(1 + (sqrt(x*x + m*m) - m)/(fabs(n*T)),-n) + fexp*exp(-bbdue*x);;
93  return result;
94  }
95 
96 
97 // LET ROOFIT COMPUTE IT
98 
99 /* int RooTsallisExp::getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName) const
100 {
101  if (matchArgs(allVars,analVars,x)) return 1 ;
102  return 0 ;
103 }
104 
105 double RooTsallisExp::analyticalIntegral(int code, const char* rangeName) const
106 {
107  switch(code)
108  {
109  case 1:
110  {
111  // mathematica dixit
112  float term1 = x*pow(1 + (sqrt(x*x + m*m) - m)/(n*T),-n);
113  float term2 = m*n*(sqrt(x*x + m*m) + 2*T) - n*n*T*(sqrt(x*x + m*m) + T) -n*m*m - n*x*x + x*x;
114  return -term1*term2/((n-2)*(n-1));
115  }
116  }
117 
118 assert(0) ;
119 return 0 ;
120 } */
121 
122 
123 
124 
125 
RooTsallisExp::T1
RooRealProxy T1
Definition: RooTsallisExp.h:63
RooTsallisExp::x
RooRealProxy x
Definition: RooTsallisExp.h:52
RooTsallisExp::bbdue0
RooRealProxy bbdue0
Definition: RooTsallisExp.h:65
RooTsallisExp::fexp1
RooRealProxy fexp1
Definition: RooTsallisExp.h:69
RooTsallisExp.h
RooTsallisExp
Definition: RooTsallisExp.h:21
RooTsallisExp::RooTsallisExp
RooTsallisExp(const char *name, const char *title, RooAbsReal &_x, RooAbsReal &_mzz, RooAbsReal &_m, RooAbsReal &_n0, RooAbsReal &_n1, RooAbsReal &_n2, RooAbsReal &_ndue, RooAbsReal &_bb0, RooAbsReal &_bb1, RooAbsReal &_bb2, RooAbsReal &_T0, RooAbsReal &_T1, RooAbsReal &_T2, RooAbsReal &_bbdue0, RooAbsReal &_bbdue1, RooAbsReal &_bbdue2, RooAbsReal &_fexp0, RooAbsReal &_fexp1, RooAbsReal &_fexp2)
Definition: RooTsallisExp.cc:11
RooTsallisExp::n1
RooRealProxy n1
Definition: RooTsallisExp.h:56
RooTsallisExp::evaluate
Double_t evaluate() const
Definition: RooTsallisExp.cc:84
RooTsallisExp::n0
RooRealProxy n0
Definition: RooTsallisExp.h:55
RooTsallisExp::n2
RooRealProxy n2
Definition: RooTsallisExp.h:57
RooTsallisExp::m
RooRealProxy m
Definition: RooTsallisExp.h:54
n2
int n2
Definition: TMCFM.hh:63
RooTsallisExp::fexp2
RooRealProxy fexp2
Definition: RooTsallisExp.h:70
RooTsallisExp::bb2
RooRealProxy bb2
Definition: RooTsallisExp.h:61
RooTsallisExp::bbdue2
RooRealProxy bbdue2
Definition: RooTsallisExp.h:67
RooTsallisExp::bb1
RooRealProxy bb1
Definition: RooTsallisExp.h:60
RooTsallisExp::T2
RooRealProxy T2
Definition: RooTsallisExp.h:64
RooTsallisExp::bb0
RooRealProxy bb0
Definition: RooTsallisExp.h:59
RooTsallisExp::bbdue1
RooRealProxy bbdue1
Definition: RooTsallisExp.h:66
RooTsallisExp::fexp0
RooRealProxy fexp0
Definition: RooTsallisExp.h:68
RooTsallisExp::mzz
RooRealProxy mzz
Definition: RooTsallisExp.h:53
RooTsallisExp::T0
RooRealProxy T0
Definition: RooTsallisExp.h:62
RooTsallisExp::ndue
RooRealProxy ndue
Definition: RooTsallisExp.h:58