169 {
170
171 int j;
172
173
176
177
179 double sh=0.0;
180 double mB,ml,
xlow,xhigh,qplus;
181 double El=0.0;
182 double Eh=0.0;
183 double kplus;
184 const double lp2epsilon=-10;
185 bool rew(true);
186 while(rew){
187
189
193
196
198 xhigh = mB-_mb;
199
200
201
202
203
204
205
206
207
208 kplus = 2*xhigh;
209
210 while( kplus >= xhigh || kplus <=
xlow
211 || (_alphas == 0 && kplus >= mB/2-_mb
212 + sqrt(mB*mB/4-_masses[0]*_masses[0]))) {
213 kplus = findPFermi();
215 }
216 qplus = mB-_mb-kplus;
217 if( (mB-qplus)/2.<=ml)continue;
218
219 int tryit = 1;
220 while (tryit) {
221
225 p2 = pow(10,lp2epsilon*
p2);
226
228 if ( El > ml && El < mB/2) {
229
230 Eh = z*(mB-qplus)/2+qplus;
231 if ( Eh > 0 && Eh < mB ) {
232
233 sh =
p2*pow(mB-qplus,2)+2*qplus*(Eh-qplus)+qplus*qplus;
234 if ( sh > _masses[0]*_masses[0]
235 && mB*mB + sh - 2*mB*Eh > ml*ml) {
236
238
240
241 if (
y > 1 )
report(
WARNING,
"EvtGen")<<
"EvtVub decay probability > 1 found: " <<
y << endl;
242 if (
y >= xran ) tryit = 0;
243 }
244 }
245 }
246 }
247
248 if(_nbins>0){
250 double m = sqrt(sh);j=0;
251 while ( j < _nbins && m > _masses[j] ) j++;
252 double w = _weights[j-1];
253 if (
w >= xran1 ) rew =
false;
254 } else {
255 rew = false;
256 }
257
258 }
259
260
261
262
263
264
265
266
267
271
272
273
274 double ptmp,sttmp;
275
276
277 sttmp = sqrt(1-ctH*ctH);
278 ptmp = sqrt(Eh*Eh-sh);
279 double pHB[4] = {Eh,ptmp*sttmp*
cos(phH),ptmp*sttmp*
sin(phH),ptmp*ctH};
280 p4.set(pHB[0],pHB[1],pHB[2],pHB[3]);
282
283 if (_storeQplus ) {
284
285
286
287
288
289
290
291
292
293
294
295
296
298 }
299
300
301
302 double apWB = ptmp;
303 double pWB[4] = {mB-Eh,-pHB[1],-pHB[2],-pHB[3]};
304
305
306
307
308 double mW2 = mB*mB + sh - 2*mB*Eh;
309 double beta = ptmp/pWB[0];
310 double gamma = pWB[0]/sqrt(mW2);
311
312 double pLW[4];
313
314 ptmp = (mW2-ml*ml)/2/sqrt(mW2);
315 pLW[0] = sqrt(ml*ml + ptmp*ptmp);
316
317 double ctL = (El - gamma*pLW[0])/beta/gamma/ptmp;
318 if ( ctL < -1 ) ctL = -1;
319 if ( ctL > 1 ) ctL = 1;
320 sttmp = sqrt(1-ctL*ctL);
321
322
323 double xW[3] = {-pWB[2],pWB[1],0};
324
325 double zW[3] = {pWB[1]/apWB,pWB[2]/apWB,pWB[3]/apWB};
326
327 double lx = sqrt(xW[0]*xW[0]+xW[1]*xW[1]);
328 for (j=0;j<2;j++)
329 xW[j] /= lx;
330
331
332 double yW[3] = {-pWB[1]*pWB[3],-pWB[2]*pWB[3],pWB[1]*pWB[1]+pWB[2]*pWB[2]};
333 double ly = sqrt(yW[0]*yW[0]+yW[1]*yW[1]+yW[2]*yW[2]);
334 for (j=0;j<3;j++)
335 yW[j] /= ly;
336
337
338
339
340 for (j=0;j<3;j++)
341 pLW[j+1] = sttmp*
cos(phL)*ptmp*xW[j]
342 + sttmp*
sin(phL)*ptmp*yW[j]
343 + ctL *ptmp*zW[j];
344
345 double apLW = ptmp;
346
347
348
349
350
351 double appLB = beta*gamma*pLW[0] + gamma*ctL*apLW;
352
353 ptmp = sqrt(El*El-ml*ml);
354 double ctLL = appLB/ptmp;
355
356 if ( ctLL > 1 ) ctLL = 1;
357 if ( ctLL < -1 ) ctLL = -1;
358
359 double pLB[4] = {El,0,0,0};
360 double pNB[4] = {pWB[0]-El,0,0,0};
361
362 for (j=1;j<4;j++) {
363 pLB[j] = pLW[j] + (ctLL*ptmp - ctL*apLW)/apWB*pWB[j];
364 pNB[j] = pWB[j] - pLB[j];
365 }
366
367 p4.set(pLB[0],pLB[1],pLB[2],pLB[3]);
369
370 p4.set(pNB[0],pNB[1],pNB[2],pNB[3]);
372
373 return ;
374}
double sin(const BesAngle a)
double cos(const BesAngle a)
DOUBLE_PRECISION xlow[20]
ostream & report(Severity severity, const char *facility)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
void setLifetime(double tau)
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double getdGdxdzdp(const double &x, const double &z, const double &p2)
double double double * p4