BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtVubNLO.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information:
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtVubNLO.cc
12//
13// Description: Routine to decay B->Xulnu according to Bosch, Lange, Neubert, and Paz
14// hep-ph/0402094
15// Equation numbers refer to this paper
16//
17// Modification history:
18//
19// Riccardo Faccini Feb. 11, 2004
20//
21//------------------------------------------------------------------------
22//
23#include "EvtVubNLO.hh"
32#include "EvtItgPtrFunction.hh"
34#include "EvtPFermi.hh"
35#include <stdlib.h>
36#include <string>
37using std::cout;
38using std::endl;
39
41 delete[] _masses;
42 delete[] _weights;
43 cout << " max pdf : " << _gmax << endl;
44 cout << " efficiency : " << (float)_ngood / (float)_ntot << endl;
45}
46
47extern "C" {
48double ddilog_( const double* );
49}
50
51void EvtVubNLO::getName( std::string& model_name ) { model_name = "VUB_NLO"; }
52
54
56
57 // max pdf
58 _gmax = 0;
59 _ntot = 0;
60 _ngood = 0;
61 _lbar = -1000;
62 _mupi2 = -1000;
63
64 // check that there are at least 6 arguments
65 int npar = 8;
66 if ( getNArg() < npar )
67 {
68
69 report( ERROR, "EvtGen" ) << "EvtVubNLO generator expected "
70 << " at least npar arguments but found: " << getNArg() << endl;
71 report( ERROR, "EvtGen" ) << "Will terminate execution!" << endl;
72 ::abort();
73 }
74 // this is the shape function parameter
75 _mb = getArg( 0 );
76 _b = getArg( 1 );
77 _lambdaSF = getArg( 2 ); // shape function lambda is different from lambda
78 _mui = 1.5; // GeV (scale)
79 _kpar = getArg( 3 ); // 0
80 _idSF = abs( (int)getArg( 4 ) ); // type of shape function 1: exponential (from Neubert)
81 _nbins = abs( (int)getArg( 5 ) );
82 _masses = new double[_nbins];
83 _weights = new double[_nbins];
84
85 // Shape function normalization
86 _mB = 5.28; // temporary B meson mass for normalization
87
88 std::vector<double> sCoeffs( 11 );
89 sCoeffs[3] = _b;
90 sCoeffs[4] = _mb;
91 sCoeffs[5] = _mB;
92 sCoeffs[6] = _idSF;
93 sCoeffs[7] = lambda_SF();
94 sCoeffs[8] = mu_h();
95 sCoeffs[9] = mu_i();
96 sCoeffs[10] = 1.;
97 _SFNorm = SFNorm( sCoeffs ); // SF normalization;
98
99 cout << " pdf 0.66, 1.32 , 4.32 " << tripleDiff( 0.66, 1.32, 4.32 ) << endl;
100 cout << " pdf 0.23,0.37,3.76 " << tripleDiff( 0.23, 0.37, 3.76 ) << endl;
101 cout << " pdf 0.97,4.32,4.42 " << tripleDiff( 0.97, 4.32, 4.42 ) << endl;
102 cout << " pdf 0.52,1.02,2.01 " << tripleDiff( 0.52, 1.02, 2.01 ) << endl;
103 cout << " pdf 1.35,1.39,2.73 " << tripleDiff( 1.35, 1.39, 2.73 ) << endl;
104
105 if ( getNArg() - npar + 2 != 2 * _nbins )
106 {
107 report( ERROR, "EvtGen" ) << "EvtVubNLO generator expected " << _nbins
108 << " masses and weights but found: " << ( getNArg() - npar ) / 2
109 << endl;
110 report( ERROR, "EvtGen" ) << "Will terminate execution!" << endl;
111 ::abort();
112 }
113 int i, j = npar - 2;
114 double maxw = 0.;
115 for ( i = 0; i < _nbins; i++ )
116 {
117 _masses[i] = getArg( j++ );
118 if ( i > 0 && _masses[i] <= _masses[i - 1] )
119 {
120 report( ERROR, "EvtGen" ) << "EvtVubNLO generator expected "
121 << " mass bins in ascending order!"
122 << "Will terminate execution!" << endl;
123 ::abort();
124 }
125 _weights[i] = getArg( j++ );
126 if ( _weights[i] < 0 )
127 {
128 report( ERROR, "EvtGen" ) << "EvtVubNLO generator expected "
129 << " weights >= 0, but found: " << _weights[i] << endl;
130 report( ERROR, "EvtGen" ) << "Will terminate execution!" << endl;
131 ::abort();
132 }
133 if ( _weights[i] > maxw ) maxw = _weights[i];
134 }
135 if ( maxw == 0 )
136 {
137 report( ERROR, "EvtGen" ) << "EvtVubNLO generator expected at least one "
138 << " weight > 0, but found none! "
139 << "Will terminate execution!" << endl;
140 ::abort();
141 }
142 for ( i = 0; i < _nbins; i++ ) _weights[i] /= maxw;
143
144 // the maximum dGamma*p2 value depends on alpha_s only:
145
146 // _dGMax = 0.05;
147 _dGMax = 150.;
148
149 // for the Fermi Motion we need a B-Meso\n mass - but it's not critical
150 // to get an exact value; in order to stay in the phase space for
151 // B+- and B0 use the smaller mass
152
153 // check that there are 3 daughters
154 checkNDaug( 3 );
155}
156
158
160
161 int j;
162 // B+ -> u-bar specflav l+ nu
163
164 EvtParticle *xuhad, *lepton, *neutrino;
165 EvtVector4R p4;
166
167 double pp, pm, pl, ml, El( 0.0 ), Eh( 0.0 ), sh( 0.0 );
168
170
171 xuhad = p->getDaug( 0 );
172 lepton = p->getDaug( 1 );
173 neutrino = p->getDaug( 2 );
174
175 _mB = p->mass();
176 ml = lepton->mass();
177
178 bool tryit = true;
179
180 while ( tryit )
181 {
182 // pm=(E_H+P_H)
183 pm = EvtRandom::Flat( 0., 1 );
184 pm = pow( pm, 1. / 3. ) * _mB;
185 // pl=mB-2*El
186 pl = EvtRandom::Flat( 0., 1 );
187 pl = sqrt( pl ) * pm;
188 // pp=(E_H-P_H)
189 pp = EvtRandom::Flat( 0., pl );
190
191 _ntot++;
192
193 El = ( _mB - pl ) / 2.;
194 Eh = ( pp + pm ) / 2;
195 sh = pp * pm;
196
197 double pdf( 0. );
198 if ( pp < pl && El > ml && sh > _masses[0] * _masses[0] &&
199 _mB * _mB + sh - 2 * _mB * Eh > ml * ml )
200 {
201 double xran = EvtRandom::Flat( 0, _dGMax );
202 pdf = tripleDiff( pp, pl, pm ); // triple differential distribution
203 // cout <<" P+,P-,Pl,Pdf= "<<pp <<" "<<pm<<" "<<pl<<" "<<pdf<<endl;
204 if ( pdf > _dGMax )
205 {
206 report( ERROR, "EvtGen" )
207 << "EvtVubNLO pdf above maximum: " << pdf << " P+,P-,Pl,Pdf= " << pp << " " << pm
208 << " " << pl << " " << pdf << endl;
209 //::abort();
210 }
211 if ( pdf >= xran ) tryit = false;
212
213 if ( pdf > _gmax ) _gmax = pdf;
214 }
215 else
216 {
217 // cout <<" EvtVubNLO incorrect kinematics sh= "<<sh<<"EH "<<Eh<<endl;
218 }
219
220 // reweight the Mx distribution
221 if ( !tryit && _nbins > 0 )
222 {
223 _ngood++;
224 double xran1 = EvtRandom::Flat();
225 double m = sqrt( sh );
226 j = 0;
227 while ( j < _nbins && m > _masses[j] ) j++;
228 double w = _weights[j - 1];
229 if ( w < xran1 ) tryit = true; // through away this candidate
230 }
231 }
232
233 // cout <<" max prob "<<gmax<<" " << pp<<" "<<y<<" "<<x<<endl;
234
235 // o.k. we have the three kineamtic variables
236 // now calculate a flat cos Theta_H [-1,1] distribution of the
237 // hadron flight direction w.r.t the B flight direction
238 // because the B is a scalar and should decay isotropic.
239 // Then chose a flat Phi_H [0,2Pi] w.r.t the B flight direction
240 // and and a flat Phi_L [0,2Pi] in the W restframe w.r.t the
241 // W flight direction.
242
243 double ctH = EvtRandom::Flat( -1, 1 );
244 double phH = EvtRandom::Flat( 0, 2 * M_PI );
245 double phL = EvtRandom::Flat( 0, 2 * M_PI );
246
247 // now compute the four vectors in the B Meson restframe
248
249 double ptmp, sttmp;
250 // calculate the hadron 4 vector in the B Meson restframe
251
252 sttmp = sqrt( 1 - ctH * ctH );
253 ptmp = sqrt( Eh * Eh - sh );
254 double pHB[4] = { Eh, ptmp * sttmp * cos( phH ), ptmp * sttmp * sin( phH ), ptmp * ctH };
255 p4.set( pHB[0], pHB[1], pHB[2], pHB[3] );
256 xuhad->init( getDaug( 0 ), p4 );
257
258 // calculate the W 4 vector in the B Meson restrframe
259
260 double apWB = ptmp;
261 double pWB[4] = { _mB - Eh, -pHB[1], -pHB[2], -pHB[3] };
262
263 // first go in the W restframe and calculate the lepton and
264 // the neutrino in the W frame
265
266 double mW2 = _mB * _mB + sh - 2 * _mB * Eh;
267 // if(mW2<0.1){
268 // cout <<" low Q2! "<<pp<<" "<<epp<<" "<<x<<" "<<y<<endl;
269 //}
270 double beta = ptmp / pWB[0];
271 double gamma = pWB[0] / sqrt( mW2 );
272
273 double pLW[4];
274
275 ptmp = ( mW2 - ml * ml ) / 2 / sqrt( mW2 );
276 pLW[0] = sqrt( ml * ml + ptmp * ptmp );
277
278 double ctL = ( El - gamma * pLW[0] ) / beta / gamma / ptmp;
279 if ( ctL < -1 ) ctL = -1;
280 if ( ctL > 1 ) ctL = 1;
281 sttmp = sqrt( 1 - ctL * ctL );
282
283 // eX' = eZ x eW
284 double xW[3] = { -pWB[2], pWB[1], 0 };
285 // eZ' = eW
286 double zW[3] = { pWB[1] / apWB, pWB[2] / apWB, pWB[3] / apWB };
287
288 double lx = sqrt( xW[0] * xW[0] + xW[1] * xW[1] );
289 for ( j = 0; j < 2; j++ ) xW[j] /= lx;
290
291 // eY' = eZ' x eX'
292 double yW[3] = { -pWB[1] * pWB[3], -pWB[2] * pWB[3], pWB[1] * pWB[1] + pWB[2] * pWB[2] };
293 double ly = sqrt( yW[0] * yW[0] + yW[1] * yW[1] + yW[2] * yW[2] );
294 for ( j = 0; j < 3; j++ ) yW[j] /= ly;
295
296 // p_lep = |p_lep| * ( sin(Theta) * cos(Phi) * eX'
297 // + sin(Theta) * sin(Phi) * eY'
298 // + cos(Theta) * eZ')
299 for ( j = 0; j < 3; j++ )
300 pLW[j + 1] = sttmp * cos( phL ) * ptmp * xW[j] + sttmp * sin( phL ) * ptmp * yW[j] +
301 ctL * ptmp * zW[j];
302
303 double apLW = ptmp;
304
305 // boost them back in the B Meson restframe
306
307 double appLB = beta * gamma * pLW[0] + gamma * ctL * apLW;
308
309 ptmp = sqrt( El * El - ml * ml );
310 double ctLL = appLB / ptmp;
311
312 if ( ctLL > 1 ) ctLL = 1;
313 if ( ctLL < -1 ) ctLL = -1;
314
315 double pLB[4] = { El, 0, 0, 0 };
316 double pNB[8] = { pWB[0] - El, 0, 0, 0 };
317
318 for ( j = 1; j < 4; j++ )
319 {
320 pLB[j] = pLW[j] + ( ctLL * ptmp - ctL * apLW ) / apWB * pWB[j];
321 pNB[j] = pWB[j] - pLB[j];
322 }
323
324 p4.set( pLB[0], pLB[1], pLB[2], pLB[3] );
325 lepton->init( getDaug( 1 ), p4 );
326
327 p4.set( pNB[0], pNB[1], pNB[2], pNB[3] );
328 neutrino->init( getDaug( 2 ), p4 );
329
330 return;
331}
332
333double EvtVubNLO::tripleDiff( double pp, double pl, double pm ) {
334
335 std::vector<double> sCoeffs( 11 );
336 sCoeffs[0] = pp;
337 sCoeffs[1] = pl;
338 sCoeffs[2] = pm;
339 sCoeffs[3] = _b;
340 sCoeffs[4] = _mb;
341 sCoeffs[5] = _mB;
342 sCoeffs[6] = _idSF;
343 sCoeffs[7] = lambda_SF();
344 sCoeffs[8] = mu_h();
345 sCoeffs[9] = mu_i();
346 sCoeffs[10] = _SFNorm; // SF normalization;
347
348 double c1 = ( _mB + pl - pp - pm ) * ( pm - pl );
349 double c2 = 2 * ( pl - pp ) * ( pm - pl );
350 double c3 = ( _mB - pm ) * ( pm - pp );
351 double aF1 = F10( sCoeffs );
352 double aF2 = F20( sCoeffs );
353 double aF3 = F30( sCoeffs );
354 double td0 = c1 * aF1 + c2 * aF2 + c3 * aF3;
355
356 EvtItgPtrFunction* func = new EvtItgPtrFunction( &integrand, 0., _mB, sCoeffs );
357 EvtItgAbsIntegrator* jetSF = new EvtItgSimpsonIntegrator( *func, 0.01, 25 );
358 double smallfrac =
359 0.000001; // stop a bit before the end to avoid problems with numerical integration
360 double tdInt = jetSF->evaluate( 0, pp * ( 1 - smallfrac ) );
361 delete jetSF;
362
363 double SU =
364 U1lo( mu_h(), mu_i() ) * pow( ( pm - pp ) / ( _mB - pp ), alo( mu_h(), mu_i() ) );
365 double TD = ( _mB - pp ) * SU * ( td0 + tdInt );
366
367 return TD;
368}
369
370double EvtVubNLO::integrand( double omega, const std::vector<double>& coeffs ) {
371 // double pp=coeffs[0];
372 double c1 = ( coeffs[5] + coeffs[1] - coeffs[0] - coeffs[2] ) * ( coeffs[2] - coeffs[1] );
373 double c2 = 2 * ( coeffs[1] - coeffs[0] ) * ( coeffs[2] - coeffs[1] );
374 double c3 = ( coeffs[5] - coeffs[2] ) * ( coeffs[2] - coeffs[0] );
375
376 return c1 * F1Int( omega, coeffs ) + c2 * F2Int( omega, coeffs ) +
377 c3 * F3Int( omega, coeffs );
378}
379
380double EvtVubNLO::F10( const std::vector<double>& coeffs ) {
381 double pp = coeffs[0];
382 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
383 double mui = coeffs[9];
384 double muh = coeffs[8];
385 double z = 1 - y;
386 double result = U1nlo( muh, mui ) / U1lo( muh, mui );
387
388 result += anlo( muh, mui ) * log( y );
389
390 result += C_F( muh ) *
391 ( -4 * pow( log( y * coeffs[4] / muh ), 2 ) + 10 * log( y * coeffs[4] / muh ) -
392 4 * log( y ) - 2 * log( y ) / ( 1 - y ) - 4.0 * ddilog_( &z ) -
393 pow( EvtConst::pi, 2 ) / 6. - 12 );
394
395 result += C_F( mui ) *
396 ( 2 * pow( log( y * coeffs[4] * pp / pow( mui, 2 ) ), 2 ) -
397 3 * log( y * coeffs[4] * pp / pow( mui, 2 ) ) + 7 - pow( EvtConst::pi, 2 ) );
398 result *= shapeFunction( pp, coeffs );
399 // changes due to SSF
400 result += ( -subS( coeffs ) + 2 * subT( coeffs ) +
401 ( subU( coeffs ) - subV( coeffs ) ) * ( 1 / y - 1. ) ) /
402 ( coeffs[5] - pp );
403 result += shapeFunction( pp, coeffs ) / pow( ( coeffs[5] - coeffs[0] ), 2 ) *
404 ( -5 * ( lambda1() + 3 * lambda2() ) / 6 +
405 2 * ( 2 * lambda1() / 3 - lambda2() ) / pow( y, 2 ) );
406 // result += (subS(coeffs)+subT(coeffs)+(subU(coeffs)-subV(coeffs))/y)/(coeffs[5]-pp);
407 // this part has been added after Feb '05
408
409 // result +=
410 // shapeFunction(pp,coeffs)/pow((coeffs[5]-coeffs[0]),2)*((lambda1()+3*lambda2())/6+2*(2*lambda1()/3-lambda2())/pow(y,2));
411 return result;
412}
413
414double EvtVubNLO::F1Int( double omega, const std::vector<double>& coeffs ) {
415 double pp = coeffs[0];
416 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
417 // mubar == mui
418 return C_F( coeffs[9] ) *
419 ( ( shapeFunction( omega, coeffs ) - shapeFunction( pp, coeffs ) ) *
420 ( 4 * log( y * coeffs[4] * ( pp - omega ) / pow( coeffs[9], 2 ) ) - 3 ) /
421 ( pp - omega ) +
422 ( g1( y, ( pp - omega ) / ( coeffs[5] - coeffs[0] ) ) / ( coeffs[5] - pp ) *
423 shapeFunction( omega, coeffs ) ) );
424}
425
426double EvtVubNLO::F20( const std::vector<double>& coeffs ) {
427 double pp = coeffs[0];
428 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
429 double result =
430 C_F( coeffs[8] ) * log( y ) / ( 1 - y ) * shapeFunction( pp, coeffs ) -
431 1 / y *
432 ( subS( coeffs ) + 2 * subT( coeffs ) - ( subT( coeffs ) + subV( coeffs ) ) / y ) /
433 ( coeffs[5] - pp );
434 // added after Feb '05
435 result += shapeFunction( pp, coeffs ) / pow( ( coeffs[5] - coeffs[0] ) * y, 2 ) *
436 ( 2 * lambda1() / 3 + 4 * lambda2() - y * ( 7 / 6 * lambda1() + 3 * lambda2() ) );
437 return result;
438}
439
440double EvtVubNLO::F2Int( double omega, const std::vector<double>& coeffs ) {
441 double pp = coeffs[0];
442 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
443 return C_F( coeffs[9] ) * g3( y, ( pp - omega ) / ( coeffs[5] - coeffs[0] ) ) *
444 shapeFunction( omega, coeffs ) / ( coeffs[5] - pp );
445}
446
447double EvtVubNLO::F30( const std::vector<double>& coeffs ) {
448 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
449 return shapeFunction( coeffs[0], coeffs ) / pow( ( coeffs[5] - coeffs[0] ) * y, 2 ) *
450 ( -2 * lambda1() / 3 + lambda2() );
451}
452
453double EvtVubNLO::F3Int( double omega, const std::vector<double>& coeffs ) {
454 double pp = coeffs[0];
455 double y = ( coeffs[2] - coeffs[0] ) / ( coeffs[5] - coeffs[0] );
456 return C_F( coeffs[9] ) * g3( y, ( pp - omega ) / ( coeffs[5] - coeffs[0] ) ) / 2 *
457 shapeFunction( omega, coeffs ) / ( coeffs[2] - coeffs[0] );
458}
459
460double EvtVubNLO::g1( double y, double x ) {
461 double result =
462 ( y * ( -9 + 10 * y ) + x * x * ( -12 + 13 * y ) + 2 * x * ( -8 + 6 * y + 3 * y * y ) ) /
463 y / pow( 1 + x, 2 ) / ( x + y );
464 result -= 4 * log( ( 1 + 1 / x ) * y ) / x;
465 result -= 2 * log( 1 + y / x ) *
466 ( 3 * pow( x, 4 ) * ( -2 + y ) - 2 * pow( y, 3 ) - 4 * pow( x, 3 ) * ( 2 + y ) -
467 2 * x * y * y * ( 4 + y ) - x * x * y * ( 12 + 4 * y + y * y ) ) /
468 x / pow( ( 1 + x ) * y, 2 ) / ( x + y );
469 return result;
470}
471
472double EvtVubNLO::g2( double y, double x ) {
473 double result = y * ( 10 * pow( x, 4 ) + y * y + 3 * x * x * y * ( 10 + y ) +
474 pow( x, 3 ) * ( 12 + 19 * y ) + x * y * ( 8 + 4 * y + y * y ) );
475 result -= 2 * x * log( 1 + y / x ) *
476 ( 5 * pow( x, 4 ) + 2 * y * y + 6 * pow( x, 3 ) * ( 1 + 2 * y ) +
477 4 * y * x * ( 1 + 2 * y ) + x * x * y * ( 18 + 5 * y ) );
478 result *= 2 / ( pow( y * ( 1 + x ), 2 ) * y * ( x + y ) );
479 return result;
480}
481
482double EvtVubNLO::g3( double y, double x ) {
483 double result =
484 ( 2 * pow( y, 3 ) * ( -11 + 2 * y ) - 10 * pow( x, 4 ) * ( 6 - 6 * y + y * y ) +
485 x * y * y * ( -94 + 29 * y + 2 * y * y ) +
486 2 * x * x * y * ( -72 + 18 * y + 13 * y * y ) -
487 pow( x, 3 ) * ( 72 + 42 * y - 70 * y * y + 3 * pow( y, 3 ) ) ) /
488 ( pow( y * ( 1 + x ), 2 ) * y * ( x + y ) );
489 result += 2 * log( 1 + y / x ) *
490 ( -6 * x * pow( y, 3 ) * ( -5 + y ) + 4 * pow( y, 4 ) +
491 5 * pow( x, 5 ) * ( 6 - 6 * y + y * y ) -
492 4 * pow( x * y, 2 ) * ( -20 + 6 * y + y * y ) +
493 pow( x, 3 ) * y * ( 90 - 10 * y - 28 * y * y + pow( y, 3 ) ) +
494 pow( x, 4 ) * ( 36 + 36 * y - 50 * y * y + 4 * pow( y, 3 ) ) ) /
495 ( pow( ( 1 + x ) * y * y, 2 ) * ( x + y ) );
496 return result;
497}
498
499/* old version (before Feb 05 notebook from NNeubert
500
501double
502EvtVubNLO::F1Int(double omega,const std::vector<double> &coeffs){
503 double pp=coeffs[0];
504 double y=(coeffs[2]-coeffs[0])/(coeffs[5]-coeffs[0]);
505 // mubar == mui
506 return C_F(coeffs[9])*(
507 (shapeFunction(omega,coeffs)-shapeFunction(pp,coeffs))*(4*log(y*coeffs[4]*(pp-omega)/pow(coeffs[9],2))-3)/(pp-omega)-
508 (1./y/(coeffs[5]-pp)*shapeFunction(omega,coeffs)*(5-6*y+4*(3-y)*log((pp-omega)/y/coeffs[4])))
509 );
510}
511
512
513double
514EvtVubNLO::F2Int(double omega,const std::vector<double> &coeffs){
515 double pp=coeffs[0];
516 double y=(coeffs[2]-coeffs[0])/(coeffs[5]-coeffs[0]);
517 return
518C_F(coeffs[9])*shapeFunction(omega,coeffs)*(2-11/y-4/y*log((pp-omega)/y/coeffs[4]))/(coeffs[5]-pp);
519}
520
521double
522EvtVubNLO::F3(const std::vector<double> &coeffs){
523 return C_F(coeffs[9])*shapeFunction(omega,coeffs)/(coeffs[2]-coeffs[0]);
524}
525*/
526
527double EvtVubNLO::SFNorm( const std::vector<double>& coeffs ) {
528
529 double omega0 = 1.68; // normalization scale (mB-2*1.8)
530 if ( _idSF == 1 )
531 { // exponential SF
532 double omega0 = 1.68; // normalization scale (mB-2*1.8)
533 return M0( mu_i(), omega0 ) * pow( _b, _b ) / lambda_SF() /
534 ( Gamma( _b ) - Gamma( _b, _b * omega0 / lambda_SF() ) );
535 }
536 else if ( _idSF == 2 )
537 { // Gaussian SF
538 double c = cGaus( _b );
539 return M0( mu_i(), omega0 ) * 2 / lambda_SF() / pow( c, -( 1 + _b ) / 2. ) /
540 ( Gamma( ( 1 + _b ) / 2 ) -
541 Gamma( ( 1 + _b ) / 2, pow( omega0 / lambda_SF(), 2 ) * c ) );
542 }
543 else
544 {
545 report( ERROR, "EvtGen" ) << "unknown SF " << _idSF << endl;
546 return -1;
547 }
548}
549
550double EvtVubNLO::shapeFunction( double omega, const std::vector<double>& sCoeffs ) {
551 if ( sCoeffs[6] == 1 ) { return sCoeffs[10] * expShapeFunction( omega, sCoeffs ); }
552 else if ( sCoeffs[6] == 2 ) { return sCoeffs[10] * gausShapeFunction( omega, sCoeffs ); }
553 else
554 {
555 report( ERROR, "EvtGen" ) << "EvtVubNLO : unknown shape function # " << sCoeffs[6] << endl;
556 }
557 return -1.;
558}
559
560// SSF
561double EvtVubNLO::subS( const std::vector<double>& c ) {
562 return ( lambda_bar( 1.68 ) - c[0] ) * shapeFunction( c[0], c );
563}
564double EvtVubNLO::subT( const std::vector<double>& c ) {
565 return -3 * lambda2() * subS( c ) / mu_pi2( 1.68 );
566}
567double EvtVubNLO::subU( const std::vector<double>& c ) { return -2 * subS( c ); }
568double EvtVubNLO::subV( const std::vector<double>& c ) { return -subT( c ); }
569
570double EvtVubNLO::lambda_bar( double omega0 ) {
571 if ( _lbar < 0 )
572 {
573 if ( _idSF == 1 )
574 { // exponential SF
575 double rat = omega0 * _b / lambda_SF();
576 _lbar = lambda_SF() / _b * ( Gamma( 1 + _b ) - Gamma( 1 + _b, rat ) ) /
577 ( Gamma( _b ) - Gamma( _b, rat ) );
578 }
579 else if ( _idSF == 2 )
580 { // Gaussian SF
581 double c = cGaus( _b );
582 _lbar =
583 lambda_SF() *
584 ( Gamma( 1 + _b / 2 ) - Gamma( 1 + _b / 2, pow( omega0 / lambda_SF(), 2 ) * c ) ) /
585 ( Gamma( ( 1 + _b ) / 2 ) -
586 Gamma( ( 1 + _b ) / 2, pow( omega0 / lambda_SF(), 2 ) * c ) ) /
587 sqrt( c );
588 }
589 }
590 return _lbar;
591}
592
593double EvtVubNLO::mu_pi2( double omega0 ) {
594 if ( _mupi2 < 0 )
595 {
596 if ( _idSF == 1 )
597 { // exponential SF
598 double rat = omega0 * _b / lambda_SF();
599 _mupi2 = 3 * ( pow( lambda_SF() / _b, 2 ) * ( Gamma( 2 + _b ) - Gamma( 2 + _b, rat ) ) /
600 ( Gamma( _b ) - Gamma( _b, rat ) ) -
601 pow( lambda_bar( omega0 ), 2 ) );
602 }
603 else if ( _idSF == 2 )
604 { // Gaussian SF
605 double c = cGaus( _b );
606 double m1 = Gamma( ( 3 + _b ) / 2 ) -
607 Gamma( ( 3 + _b ) / 2, pow( omega0 / lambda_SF(), 2 ) * c );
608 double m2 =
609 Gamma( 1 + _b / 2 ) - Gamma( 1 + _b / 2, pow( omega0 / lambda_SF(), 2 ) * c );
610 double m3 = Gamma( ( 1 + _b ) / 2 ) -
611 Gamma( ( 1 + _b ) / 2, pow( omega0 / lambda_SF(), 2 ) * c );
612 _mupi2 = 3 * pow( lambda_SF(), 2 ) * ( m1 / m3 - pow( m2 / m3, 2 ) ) / c;
613 }
614 }
615 return _mupi2;
616}
617
618double EvtVubNLO::M0( double mui, double omega0 ) {
619 double mf = omega0 - lambda_bar( omega0 );
620 return 1 +
621 4 * C_F( mui ) *
622 ( -pow( log( mf / mui ), 2 ) - log( mf / mui ) - pow( EvtConst::pi / 2, 2 ) / 6. +
623 mu_pi2( omega0 ) / 3 / pow( mf, 2 ) * ( log( mf / mui ) - 0.5 ) );
624}
625
626double EvtVubNLO::alphas( double mu ) {
627 double Lambda4 = 0.302932;
628 double lg = 2 * log( mu / Lambda4 );
629 return 4 * EvtConst::pi / lg / beta0() *
630 ( 1 - beta1() * log( lg ) / pow( beta0(), 2 ) / lg +
631 pow( beta1() / lg, 2 ) / pow( beta0(), 4 ) *
632 ( pow( log( lg ) - 0.5, 2 ) - 1.25 + beta2() * beta0() / pow( beta1(), 2 ) ) );
633}
634
635double EvtVubNLO::gausShapeFunction( double omega, const std::vector<double>& sCoeffs ) {
636 double b = sCoeffs[3];
637 double l = sCoeffs[7];
638 double wL = omega / l;
639
640 return pow( wL, b ) * exp( -cGaus( b ) * wL * wL );
641}
642
643double EvtVubNLO::expShapeFunction( double omega, const std::vector<double>& sCoeffs ) {
644 double b = sCoeffs[3];
645 double l = sCoeffs[7];
646 double wL = omega / l;
647
648 return pow( wL, b - 1 ) * exp( -b * wL );
649}
650
651double EvtVubNLO::Gamma( double z ) {
652
653 std::vector<double> gammaCoeffs( 6 );
654 gammaCoeffs[0] = 76.18009172947146;
655 gammaCoeffs[1] = -86.50532032941677;
656 gammaCoeffs[2] = 24.01409824083091;
657 gammaCoeffs[3] = -1.231739572450155;
658 gammaCoeffs[4] = 0.1208650973866179e-2;
659 gammaCoeffs[5] = -0.5395239384953e-5;
660
661 // Lifted from Numerical Recipies in C
662 double x, y, tmp, ser;
663
664 int j;
665 y = z;
666 x = z;
667
668 tmp = x + 5.5;
669 tmp = tmp - ( x + 0.5 ) * log( tmp );
670 ser = 1.000000000190015;
671
672 for ( j = 0; j < 6; j++ )
673 {
674 y = y + 1.0;
675 ser = ser + gammaCoeffs[j] / y;
676 }
677
678 return exp( -tmp + log( 2.5066282746310005 * ser / x ) );
679}
680
681double EvtVubNLO::Gamma( double z, double tmin ) {
682 std::vector<double> c( 1 );
683 c[0] = z;
684 EvtItgPtrFunction* func = new EvtItgPtrFunction( &dgamma, tmin, 100., c );
685 EvtItgAbsIntegrator* jetSF = new EvtItgSimpsonIntegrator( *func, 0.001 );
686 return jetSF->evaluate( tmin, 100. );
687}
TF1 * g1
Double_t x[10]
character *LEPTONflag integer iresonances real zeta5 real adp3 real large_3 real zeta5 common params adp3 common switch large_3 common lepton LEPTONflag common RESFIT IRESON common RES iresonances common alpgmu era0 common physparams ERMW common leptomass ml
EvtComplex exp(const EvtComplex &c)
double w
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
double ddilog_(const double *)
double ddilog_(const double &sh)
#define M_PI
Definition TConstant.h:4
static const double pi
Definition EvtConst.hh:27
double getArg(int j)
void checkNDaug(int d1, int d2=-1)
EvtId * getDaugs()
EvtId getDaug(int i)
double evaluate(double lower, double upper) const
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtParticle * getDaug(int i)
double mass() const
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static double Flat()
Definition EvtRandom.cc:69
void set(int i, double d)
void getName(std::string &name)
Definition EvtVubNLO.cc:51
void initProbMax()
Definition EvtVubNLO.cc:157
virtual ~EvtVubNLO()
Definition EvtVubNLO.cc:40
EvtDecayBase * clone()
Definition EvtVubNLO.cc:53
void init()
Definition EvtVubNLO.cc:55
void decay(EvtParticle *p)
Definition EvtVubNLO.cc:159
double double * m2
Definition qcdloop1.h:83
double * m1
Definition qcdloop1.h:83