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