BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtBtoXsgammaFermiUtil Class Reference

#include <EvtBtoXsgammaFermiUtil.hh>

Public Member Functions

 EvtBtoXsgammaFermiUtil ()
 
virtual ~EvtBtoXsgammaFermiUtil ()
 

Static Public Member Functions

static double FermiExpFunc (double var, const std::vector< double > &coeffs)
 
static double FermiGaussFunc (double, std::vector< double > const &coeffs)
 
static double FermiGaussFuncRoot (double, double, double, std::vector< double > &coeffs)
 
static double FermiGaussRootFcnA (double, const std::vector< double > &coeffs1, const std::vector< double > &coeffs2)
 
static double FermiGaussRootFcnB (double, const std::vector< double > &coeffs1, const std::vector< double > &coeffs2)
 
static double Gamma (double, const std::vector< double > &coeffs)
 
static double BesselI1 (double)
 
static double BesselK1 (double)
 
static double FermiRomanFuncRoot (double, double)
 
static double FermiRomanRootFcnA (double)
 
static double FermiRomanFunc (double, std::vector< double > const &coeffs)
 

Detailed Description

Definition at line 28 of file EvtBtoXsgammaFermiUtil.hh.

Constructor & Destructor Documentation

◆ EvtBtoXsgammaFermiUtil()

EvtBtoXsgammaFermiUtil::EvtBtoXsgammaFermiUtil ( )
inline

Definition at line 37 of file EvtBtoXsgammaFermiUtil.hh.

37{ };

◆ ~EvtBtoXsgammaFermiUtil()

virtual EvtBtoXsgammaFermiUtil::~EvtBtoXsgammaFermiUtil ( )
inlinevirtual

Definition at line 38 of file EvtBtoXsgammaFermiUtil.hh.

38{ };

Member Function Documentation

◆ BesselI1()

double EvtBtoXsgammaFermiUtil::BesselI1 ( double  x)
static

Definition at line 142 of file EvtBtoXsgammaFermiUtil.cc.

142 {
143 //Lifted from Numerical Recipies in C : Returns the modified Bessel
144 //function I_1(x) for any real x
145
146 double ax, ans;
147 double y;
148
149 if ((ax=fabs(x)) < 3.75) {
150 y=x/3.75;
151 y*=y;
152 ans=ax*(0.5+y*(0.87890594+y*(0.51498869+y*(0.15084934+y*(0.2658733e-1+y*(0.301532e-2+y*0.32411e-3))))));
153 }
154 else {
155 y=3.75/ax;
156 ans=0.2282967e-1+y*(-0.2895312e-1+y*(0.1787654e-1 -y*0.420059e-2));
157 ans=0.398914228+y*(-0.3988024e-1+y*(-0.362018e-2+y*(0.163801e-2+y*(-0.1031555e-1+y*ans))));
158 ans*=(exp(ax)/sqrt(ax));
159 }
160 return x < 0.0 ? -ans:ans;
161}
Double_t x[10]
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:252
double y[1000]

Referenced by BesselK1().

◆ BesselK1()

double EvtBtoXsgammaFermiUtil::BesselK1 ( double  x)
static

Definition at line 122 of file EvtBtoXsgammaFermiUtil.cc.

122 {
123
124 //Lifted from Numerical Recipies in C : Returns the modified Bessel
125 //function K_1(x) for positive real x
126 if (x<0.0) report(INFO,"EvtGen") <<"x is negative !"<<endl;
127
128 double y, ans;
129
130 if (x <= 2.0) {
131 y=x*x/4.0;
132 ans = (log(x/2.0)*BesselI1(x))+(1.0/x)*(1.0+y*(0.15443144+y*(-0.67278579+y*(-0.18156897+y*(-0.1919402e-1+y*(-0.110404e-2+y*(-0.4686e-4)))))));
133 }
134 else {
135 y=2.0/x;
136 ans=(exp(-x)/sqrt(x))*(1.25331414+y*(0.23498619+y*(-0.3655620e-1+y*(0.1504268e-1+y*(-0.780353e-2+y*(0.325614e-2+y*(-0.68245e-3)))))));
137 }
138 return ans;
139
140}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ INFO
Definition: EvtReport.hh:52
static double BesselI1(double)

Referenced by FermiRomanFunc(), FermiRomanFuncRoot(), and FermiRomanRootFcnA().

◆ FermiExpFunc()

double EvtBtoXsgammaFermiUtil::FermiExpFunc ( double  var,
const std::vector< double > &  coeffs 
)
static

Definition at line 40 of file EvtBtoXsgammaFermiUtil.cc.

40 {
41
42 //coeffs: 1 = lambdabar, 2 = a, 3 = lam1, 4 = norm
43 // report(INFO,"EvtGen")<<coeffs[4]<<endl;
44 return (pow(1. - (y/coeffs[1]),coeffs[2])*exp((-3.*pow(coeffs[1],2.)/coeffs[3])*y/coeffs[1]))/coeffs[4];
45
46}

Referenced by EvtBtoXsgammaKagan::computeHadronicMass().

◆ FermiGaussFunc()

double EvtBtoXsgammaFermiUtil::FermiGaussFunc ( double  y,
std::vector< double > const &  coeffs 
)
static

Definition at line 48 of file EvtBtoXsgammaFermiUtil.cc.

48 {
49
50 //coeffs: 1 = lambdabar, 2 = a, 3 = c, 4 = norm
51 return (pow(1. - (y/coeffs[1]),coeffs[2])*exp(-pow(coeffs[3],2.)*pow(1. - (y/coeffs[1]),2.)))/coeffs[4];
52
53}

Referenced by EvtBtoXsgammaKagan::computeHadronicMass().

◆ FermiGaussFuncRoot()

double EvtBtoXsgammaFermiUtil::FermiGaussFuncRoot ( double  lambdabar,
double  lam1,
double  mb,
std::vector< double > &  coeffs 
)
static

Definition at line 55 of file EvtBtoXsgammaFermiUtil.cc.

55 {
56
57 std::vector<double> coeffs1(3);
58 std::vector<double> coeffs2(3);
59
60 coeffs1[0]=0.2;
61 coeffs1[1]=lambdabar;
62 coeffs1[2]=0.0;
63
64 coeffs2[0]=0.2;
65 coeffs2[1]=lambdabar;
66 coeffs2[2]=-lam1/3.;
67
68 EvtItgTwoCoeffFcn *lhFunc = new EvtItgTwoCoeffFcn(&FermiGaussRootFcnA, -mb, lambdabar, coeffs1, gammaCoeffs);
69 EvtItgTwoCoeffFcn *rhFunc = new EvtItgTwoCoeffFcn(&FermiGaussRootFcnB, -mb, lambdabar, coeffs2, gammaCoeffs);
70
72
73 double root = rootFinder->GetGaussIntegFcnRoot(lhFunc, rhFunc, 1.0e-4, 1.0e-4, 40, 40, -mb, lambdabar, 0.2, 0.4, 1.0e-6);
74
75 delete rootFinder; rootFinder=0;
76 delete lhFunc; lhFunc=0;
77 delete rhFunc; rhFunc=0;
78 return root;
79
80}
std::string root
Definition: CalibModel.cxx:39
static double FermiGaussRootFcnB(double, const std::vector< double > &coeffs1, const std::vector< double > &coeffs2)
static double FermiGaussRootFcnA(double, const std::vector< double > &coeffs1, const std::vector< double > &coeffs2)
double GetGaussIntegFcnRoot(EvtItgAbsFunction *theFunc1, EvtItgAbsFunction *theFunc2, double integ1Precision, double integ2Precision, int maxLoop1, int maxLoop2, double integLower, double integUpper, double lowerValue, double upperValue, double precision)

Referenced by EvtBtoXsgammaKagan::computeHadronicMass().

◆ FermiGaussRootFcnA()

double EvtBtoXsgammaFermiUtil::FermiGaussRootFcnA ( double  y,
const std::vector< double > &  coeffs1,
const std::vector< double > &  coeffs2 
)
static

Definition at line 82 of file EvtBtoXsgammaFermiUtil.cc.

82 {
83
84
85 //coeffs1: 0=ap, 1=lambdabar, coeffs2=gamma function coeffs
86 double cp = Gamma((2.0 + coeffs1[0])/2., coeffs2)/Gamma((1.0 + coeffs1[0])/2., coeffs2);
87
88 return (y*y)*pow((1. - (y/coeffs1[1])),coeffs1[0])*exp(-pow(cp,2)*pow((1.-(y/coeffs1[1])),2.));
89
90}
static double Gamma(double, const std::vector< double > &coeffs)

Referenced by FermiGaussFuncRoot().

◆ FermiGaussRootFcnB()

double EvtBtoXsgammaFermiUtil::FermiGaussRootFcnB ( double  y,
const std::vector< double > &  coeffs1,
const std::vector< double > &  coeffs2 
)
static

Definition at line 92 of file EvtBtoXsgammaFermiUtil.cc.

92 {
93
94 //coeffs1: 0=ap, 1=lambdabar, coeffs2=gamma function coeffs
95 double cp = Gamma((2.0 + coeffs1[0])/2., coeffs2)/Gamma((1.0 + coeffs1[0])/2., coeffs2);
96 return pow((1. - (y/coeffs1[1])),coeffs1[0])*exp(-pow(cp,2)*pow((1.-(y/coeffs1[1])),2.));
97
98}

Referenced by FermiGaussFuncRoot().

◆ FermiRomanFunc()

double EvtBtoXsgammaFermiUtil::FermiRomanFunc ( double  y,
std::vector< double > const &  coeffs 
)
static

Definition at line 187 of file EvtBtoXsgammaFermiUtil.cc.

187 {
188 if (y == (coeffs[1]-coeffs[2])) y=0.99999999*(coeffs[1]-coeffs[2]);
189
190 //coeffs: 1 = mB, 2=mb, 3=rho, 4=lambdabar, 5=norm
191 double pF = coeffs[4]*sqrt(EvtConst::pi)/(coeffs[3]*exp(coeffs[3]/2.)*BesselK1(coeffs[3]/2.));
192 // report(INFO,"EvtGen")<<" pf "<<y<<" "<<pF<<" "<<coeffs[1]<<" "<<coeffs[2]<<" "<<coeffs[3]<<" "<<coeffs[4]<<" "<<coeffs[5]<<endl;
193 //double pF=0.382533;
194
195 //report(INFO,"EvtGen")<<(coeffs[1]-coeffs[2])*(1./(sqrt(EvtConst::pi)*pF))<<endl;
196 //report(INFO,"EvtGen")<<(1.-y/(coeffs[1]-coeffs[2]))<<endl;
197 //report(INFO,"EvtGen")<<(coeffs[1]-coeffs[2])<<endl;
198 //report(INFO,"EvtGen")<<(coeffs[1]-coeffs[2])*(1.-y/(coeffs[1]-coeffs[2]))<<endl;
199
200 //report(INFO,"EvtGen")<<" "<<pF*coeffs[3]/((coeffs[1]-coeffs[2])*(1.-y/(coeffs[1]-coeffs[2])))<<endl;
201 // report(INFO,"EvtGen")<<" "<<((coeffs[1]-coeffs[2])/pF)*(1. -y/(coeffs[1]-coeffs[2]))<<endl;
202
203 //report(INFO,"EvtGen")<<"result "<<(coeffs[1]-coeffs[2])*(1./(sqrt(EvtConst::pi)*pF))*exp(-(1./4.)*pow(pF*(coeffs[3]/((coeffs[1]-coeffs[2])*(1.-y/(coeffs[1]-coeffs[2])))) - ((coeffs[1]-coeffs[2])/pF)*(1. -y/(coeffs[1]-coeffs[2])),2.))/coeffs[5];
204
205 //report(INFO,"EvtGen")<<"leaving"<<endl;
206 return (coeffs[1]-coeffs[2])*(1./(sqrt(EvtConst::pi)*pF))*exp(-(1./4.)*pow(pF*(coeffs[3]/((coeffs[1]-coeffs[2])*(1.-y/(coeffs[1]-coeffs[2])))) - ((coeffs[1]-coeffs[2])/pF)*(1. -y/(coeffs[1]-coeffs[2])),2.))/coeffs[5];
207
208
209}
static double BesselK1(double)
static const double pi
Definition: EvtConst.hh:28

Referenced by EvtBtoXsgammaKagan::computeHadronicMass().

◆ FermiRomanFuncRoot()

double EvtBtoXsgammaFermiUtil::FermiRomanFuncRoot ( double  lambdabar,
double  lam1 
)
static

Definition at line 163 of file EvtBtoXsgammaFermiUtil.cc.

163 {
164
165 EvtItgFunction *lhFunc = new EvtItgFunction(&FermiRomanRootFcnA, -1.e-6, 1.e6);
166
168 double rhSide = 1.0 - (lam1/(3.0*lambdabar*lambdabar));
169
170 double rho = rootFinder->GetRootSingleFunc(lhFunc, rhSide, 0.1, 0.4, 1.0e-6);
171 //rho=0.250353;
172 report(INFO,"EvtGen")<<"rho/2 "<<rho/2.<<" bessel "<<BesselK1(rho/2.)<<endl;
173 double pF = lambdabar*sqrt(EvtConst::pi)/(rho*exp(rho/2.)*BesselK1(rho/2.));
174 report(INFO,"EvtGen")<<"rho "<<rho<<" pf "<<pF<<endl;
175
176 delete lhFunc; lhFunc=0;
177 delete rootFinder; rootFinder=0;
178 return rho;
179
180}
static double FermiRomanRootFcnA(double)
double GetRootSingleFunc(const EvtItgAbsFunction *theFunc, double functionValue, double lowerValue, double upperValue, double precision)

Referenced by EvtBtoXsgammaKagan::computeHadronicMass().

◆ FermiRomanRootFcnA()

double EvtBtoXsgammaFermiUtil::FermiRomanRootFcnA ( double  y)
static

Definition at line 182 of file EvtBtoXsgammaFermiUtil.cc.

182 {
183
184 return EvtConst::pi*(2. + y)*pow(y,-2.)*exp(-y)*pow(BesselK1(y/2.),-2.);
185
186}

Referenced by FermiRomanFuncRoot().

◆ Gamma()

double EvtBtoXsgammaFermiUtil::Gamma ( double  z,
const std::vector< double > &  coeffs 
)
static

Definition at line 100 of file EvtBtoXsgammaFermiUtil.cc.

100 {
101
102 //Lifted from Numerical Recipies in C
103 double x, y, tmp, ser;
104
105 int j;
106 y = z;
107 x = z;
108
109 tmp = x + 5.5;
110 tmp = tmp - (x+0.5)*log(tmp);
111 ser=1.000000000190015;
112
113 for (j=0;j<6;j++) {
114 y = y +1.0;
115 ser = ser + coeffs[j]/y;
116 }
117
118 return exp(-tmp+log(2.5066282746310005*ser/x));
119
120}

Referenced by EvtBtoXsgammaKagan::computeHadronicMass(), FermiGaussRootFcnA(), and FermiGaussRootFcnB().


The documentation for this class was generated from the following files: