284 MsgStream log(
msgSvc(), name());
286 log << MSG::INFO <<
"in initialize()" << endmsg;
289 IPartPropSvc* p_PartPropSvc;
290 static const bool CREATEIFNOTTHERE(
true);
291 StatusCode PartPropStatus = service(
"PartPropSvc", p_PartPropSvc, CREATEIFNOTTHERE);
292 if (!PartPropStatus.isSuccess() || 0 == p_PartPropSvc)
294 log << MSG::ERROR <<
" Could not initialize Particle Properties Service" << endmsg;
295 return PartPropStatus;
297 m_particleTable = p_PartPropSvc->PDT();
310 double rCF_0 = m_rCF_0 ;
311 double dCF_0 = m_dCF_0 ;
312 double RCF_0 = m_RCF_0 ;
314 double zCF_0 = 2*
cos(dCF_0) ;
315 double rCF2_0 = rCF_0 * rCF_0 ;
316 double zCF2_0 = zCF_0 * zCF_0 ;
317 double rCF_1 = m_rCF_1 ;
318 double dCF_1 = m_dCF_1 ;
319 double RCF_1 = m_RCF_1 ;
321 double zCF_1 = 2*
cos(dCF_1) ;
322 double rCF2_1 = rCF_1 * rCF_1 ;
323 double zCF2_1 = zCF_1 * zCF_1 ;
324 double rCF_3 = m_rCF_3 ;
325 double dCF_3 = m_dCF_3 ;
326 double RCF_3 = m_RCF_3 ;
328 double zCF_3 = 2*
cos(dCF_3) ;
329 double rCF2_3 = rCF_3 * rCF_3 ;
330 double zCF2_3 = zCF_3 * zCF_3 ;
333 double rCS2 = rCS * rCS ;
334 double zCS2 = zCS * zCS ;
336 double rmix = (
x *
x +
y *
y ) / 2. ;
337 double wCF_0 = 2*
cos(dCF_0) ;
338 double wCF_1 = 2*
cos(dCF_1) ;
339 double wCF_3 = 2*
cos(dCF_3) ;
340 double wCS = ( m_wCSSign ? 1. : -1. ) * sqrt( 4. - zCS2 ) ;
341 double vCF_0CSPlus = ( zCF_0 * zCS + wCF_0 * wCS ) / 2. ;
342 double vCF_1CSPlus = ( zCF_1 * zCS + wCF_1 * wCS ) / 2. ;
343 double vCF_3CSPlus = ( zCF_3 * zCS + wCF_3 * wCS ) / 2. ;
344 double vCF_0CSMinus = ( zCF_0 * zCS - wCF_0 * wCS ) / 2. ;
345 double vCF_1CSMinus = ( zCF_1 * zCS - wCF_1 * wCS ) / 2. ;
346 double vCF_3CSMinus = ( zCF_3 * zCS - wCF_3 * wCS ) / 2. ;
348 m_deltaCF_0 = acos( zCF_0 / 2. ) * ( m_wCFSign_0 ? 1. : -1. ) ;
349 m_deltaCF_1 = acos( zCF_1 / 2. ) * ( m_wCFSign_1 ? 1. : -1. ) ;
350 m_deltaCF_3 = acos( zCF_3 / 2. ) * ( m_wCFSign_3 ? 1. : -1. ) ;
351 m_deltaCS = acos( zCS / 2. ) * ( m_wCSSign ? 1. : -1. ) ;
355 double rCF2 = rCF * rCF ;
356 double zCF2 = zCF * zCF ;
357 double wCF = ( m_wCFSign ? 1. : -1. ) * sqrt( 4. - zCF2 ) ;
358 double vCFCSPlus = ( zCF * zCS + wCF * wCS ) / 2. ;
359 double vCFCSMinus = ( zCF * zCS - wCF * wCS ) / 2. ;
360 m_deltaCF = acos( zCF / 2. ) * ( m_wCFSign ? 1. : -1. ) ;
362 double bCF_0 = 1. + 0.5 * rCF_0 * ( zCF_0 *
y + wCF_0 *
x ) + 0.5 * (
y *
y -
x *
x );
363 double bCF_1 = 1. + 0.5 * rCF_1 * ( zCF_1 *
y + wCF_1 *
x ) + 0.5 * (
y *
y -
x *
x );
364 double bCF_3 = 1. + 0.5 * rCF_3 * ( zCF_3 *
y + wCF_3 *
x ) + 0.5 * (
y *
y -
x *
x );
365 double bCS = 1. + 0.5 * rCS * ( zCS *
y + wCS *
x ) + 0.5 * (
y *
y -
x *
x );
366 double bCPPlus = 1. -
y ;
367 double bCPMinus = 1. +
y ;
369 double bCPPlus_PiPiPi0 = 1. - ( 2. * m_FCP_PiPiPi0 - 1. ) *
y ;
371 if( !m_useNewWeights )
385 m_rwsCF_0 = ( rCF2_0 + 0.5 * rCF_0 * ( zCF_0 *
y - wCF_0 *
x ) + rmix ) / bCF_0;
386 m_rwsCF_1 = ( rCF2_1 + 0.5 * rCF_1 * ( zCF_1 *
y - wCF_1 *
x ) + rmix ) / bCF_1;
387 m_rwsCF_3 = ( rCF2_3 + 0.5 * rCF_3 * ( zCF_3 *
y - wCF_3 *
x ) + rmix ) / bCF_3;
388 m_rwsCS = ( rCS2 + 0.5 * rCS * ( zCS *
y - wCS *
x ) + rmix ) / bCS;
390 double bfCF_0 = ( 1. - RCF_0 * rCF_0 * ( 0.5*zCF_0*
y + 0.5*wCF_0*
x ) + 0.5 * ( -1*
x*
x +
y*
y) );
391 double bfCF_1 = ( 1. - RCF_1 * rCF_1 * ( 0.5*zCF_1*
y + 0.5*wCF_1*
x ) + 0.5 * ( -1*
x*
x +
y*
y) );
392 double bfCF_3 = ( 1. - RCF_3 * rCF_3 * ( 0.5*zCF_3*
y + 0.5*wCF_3*
x ) + 0.5 * ( -1*
x*
x +
y*
y) );
393 double bfCFbar_0 = ( rCF2_0 - RCF_0 * rCF_0 * ( 0.5*zCF_0*
y - 0.5*wCF_0*
x ) + 0.5 * (
x*
x +
y*
y) );
394 double bfCFbar_1 = ( rCF2_1 - RCF_1 * rCF_1 * ( 0.5*zCF_1*
y - 0.5*wCF_1*
x ) + 0.5 * (
x*
x +
y*
y) );
395 double bfCFbar_3 = ( rCF2_3 - RCF_3 * rCF_3 * ( 0.5*zCF_3*
y - 0.5*wCF_3*
x ) + 0.5 * (
x*
x +
y*
y) );
418 m_weights[ kFlavoredCF_0 ][ kFlavoredCF_0 ] = ( ( 1 - RCF_0 * RCF_0 ) / ( 1 - RCF_0 * (1./rCF_0) * (0.5*zCF_0*
y - 0.5*wCF_0*
x) + rmix/(2*rCF2_0) ) ) ;
419 m_weights[ kFlavoredCF_0 ][ kFlavoredCFBar_0 ] = ( 1. + rCF2_0 * rCF2_0 - 2. * RCF_0 * RCF_0 * rCF2_0 ) / ( bfCF_0 * bfCF_0 );
420 m_weights[ kFlavoredCF_0 ][ kFlavoredCF_1 ] = ( 1. + ( rCF2_0 / rCF2_1 ) * ( rCF2_0 / rCF2_1 ) - 2. * ( rCF2_0 / rCF2_1 ) * RCF_0 * RCF_1 *
cos( dCF_0 - dCF_1 ) ) / ( 1. + ( rCF2_0 / rCF2_1 ) * ( rCF2_0 / rCF2_1 ) - RCF_1 * (1./rCF_1) * ( 0.5*zCF_1*
y - 0.5*wCF_1*
x ) - (RCF_0*rCF_1/(rCF_0*rCF_0)) * ( 0.5*zCF_0*
y - 0.5*wCF_0*
x ) + rmix/(rCF_0*rCF_0) );
421 cout<<( 1. + ( rCF2_0 / rCF2_1 ) * ( rCF2_0 / rCF2_1 ) - RCF_1 * (1./rCF_1) * ( 0.5*zCF_1*
y - 0.5*wCF_1*
x ) - (RCF_0*rCF_1/(rCF_0*rCF_0)) * ( 0.5*zCF_0*
y - 0.5*wCF_0*
x ) + rmix/(rCF_0*rCF_0) )<<endl;
422 m_weights[ kFlavoredCF_0 ][ kFlavoredCFBar_1 ] = ( 1. + rCF2_0 * rCF2_1 - 2. * RCF_0 * RCF_1 * rCF_0 * rCF_1 ) / ( bfCF_0 * bfCF_1 );
423 m_weights[ kFlavoredCF_0 ][ kFlavoredCF_3 ] = ( 1. + ( rCF2_0 / rCF2_3 ) * ( rCF2_0 / rCF2_3 ) - 2. * ( rCF2_0 / rCF2_3 ) * RCF_0 * RCF_3 *
cos( dCF_0 - dCF_3 ) ) / ( 1. + ( rCF2_0 / rCF2_3 ) * ( rCF2_0 / rCF2_3 ) - RCF_3 * (1./rCF_3) * ( 0.5*zCF_3*
y - 0.5*wCF_3*
x ) - (RCF_0/(rCF_0*rCF_0)) * ( 0.5*zCF_0*
y - 0.5*wCF_0*
x ) + rmix/(rCF_0*rCF_0) );
424 m_weights[ kFlavoredCF_0 ][ kFlavoredCFBar_3 ] = ( 1. + rCF2_0 * rCF2_3 - 2. * RCF_0 * RCF_3 * rCF_0 * rCF_3 ) / ( bfCF_0 * bfCF_3 );
425 m_weights[ kFlavoredCF_0 ][ kFlavoredCSBar ] =
426 1. + rCF2_0 * rCS2 - rCF_0 * rCS * vCFCSMinus ;
427 m_weights[ kFlavoredCF_0 ][ kFlavoredCS ] =
428 rCF2_0 + rCS2 - rCF_0 * rCS * vCF_0CSPlus +
429 rmix *
m_weights[ kFlavoredCF_0 ][ kFlavoredCSBar ] ;
431 m_weights[ kFlavoredCF_0 ][ kSLPlus ] = 1. / bfCF_0 ;
432 m_weights[ kFlavoredCF_0 ][ kSLMinus ] = 1. / bfCF_0 ;
439 ( 1. + rCF2_0 - 2. * rCF_0 * RCF_0 *
cos(dCF_0) ) / ( ( 1. + rCF2_0 - 2. * rCF_0 * RCF_0 *
cos(dCF_0) *
y +
y *
y ) * bCPPlus );
441 ( 1. + rCF2_0 + 2. * rCF_0 * RCF_0 *
cos(dCF_0) ) / ( ( 1. + rCF2_0 - 2. * rCF_0 * RCF_0 *
cos(dCF_0) *
y +
y *
y ) * bCPMinus );
442 m_weights[ kFlavoredCF_0 ][ kDalitz ] = 1. / bfCF_0;
443 m_weights[ kFlavoredCF_0 ][ k2Pip2Pim ] = 1. / bfCF_0;
444 m_weights[ kFlavoredCF_0 ][ kPipPim2Pi0 ] = 1. / bfCF_0;
445 m_weights[ kFlavoredCF_0 ][ kK0PiPiPi0 ] = 1. / bfCF_0;
446 m_weights[ kFlavoredCF_0 ][ kKKPiPi ] = 1. / bfCF_0;
447 m_weights[ kFlavoredCF_0 ][ kK0KK ] = 1. / bfCF_0;
448 m_weights[ kFlavoredCF_0 ][ kPipPimPi0 ] =
449 ( 1. + rCF2_0 - 2. * ( 2. * m_FCP_PiPiPi0 - 1. ) * rCF_0 * RCF_0 *
cos(dCF_0) ) / ( ( 1. + rCF2_0 - 2. * rCF_0 * RCF_0 *
cos(dCF_0) *
y +
y *
y ) * bCPPlus_PiPiPi0 );
452 m_weights[ kFlavoredCFBar_0 ][ kFlavoredCFBar_0 ] =
m_weights[ kFlavoredCF_0 ][ kFlavoredCF_0 ] ;
453 m_weights[ kFlavoredCFBar_0 ][ kFlavoredCF_1 ] =
m_weights[ kFlavoredCF_0 ][ kFlavoredCFBar_1 ] ;
454 m_weights[ kFlavoredCFBar_0 ][ kFlavoredCFBar_1 ] =
m_weights[ kFlavoredCF_0 ][ kFlavoredCF_1 ] ;
455 m_weights[ kFlavoredCFBar_0 ][ kFlavoredCF_3 ] =
m_weights[ kFlavoredCF_0 ][ kFlavoredCFBar_3 ] ;
456 m_weights[ kFlavoredCFBar_0 ][ kFlavoredCFBar_3 ] =
m_weights[ kFlavoredCF_0 ][ kFlavoredCF_3 ] ;
457 m_weights[ kFlavoredCFBar_0 ][ kFlavoredCS ] =
m_weights[ kFlavoredCF_0 ][ kFlavoredCSBar ] ;
458 m_weights[ kFlavoredCFBar_0 ][ kFlavoredCSBar ] =
m_weights[ kFlavoredCF_0 ][ kFlavoredCS ] ;
459 m_weights[ kFlavoredCFBar_0 ][ kSLPlus ] = 1. / bCF_0 ;
460 m_weights[ kFlavoredCFBar_0 ][ kSLMinus ] = 1. / bCF_0 ;
463 m_weights[ kFlavoredCFBar_0 ][ kDalitz ] = 1. / bCF_0;
464 m_weights[ kFlavoredCFBar_0 ][ k2Pip2Pim ] = 1. / bCF_0;
465 m_weights[ kFlavoredCFBar_0 ][ kPipPim2Pi0 ] = 1. / bCF_0;
466 m_weights[ kFlavoredCFBar_0 ][ kK0PiPiPi0 ] = 1. / bCF_0;
467 m_weights[ kFlavoredCFBar_0 ][ kKKPiPi ] = 1. / bCF_0;
468 m_weights[ kFlavoredCFBar_0 ][ kK0KK ] = 1. / bCF_0;
469 m_weights[ kFlavoredCFBar_0 ][ kPipPimPi0 ] =
m_weights[ kFlavoredCF_0 ][ kPipPimPi0 ] ;
471 m_weights[ kFlavoredCF_1 ][ kFlavoredCF_1 ] = ( ( 1 - RCF_1 * RCF_1 ) / ( 1 - RCF_1 * (1./rCF_1) * (0.5*zCF_1*
y - 0.5*wCF_1*
x) + rmix/(2*rCF2_1) ) ) ;
472 m_weights[ kFlavoredCF_1 ][ kFlavoredCFBar_1 ] = ( 1. + rCF2_1 * rCF2_1 - 2. * RCF_1 * RCF_1 * rCF2_1 ) / ( bfCF_1 * bfCF_1 );
473 m_weights[ kFlavoredCF_1 ][ kFlavoredCF_3 ] = ( 1. + ( rCF2_1 / rCF2_3 ) * ( rCF2_1 / rCF2_3 ) - 2. * ( rCF2_1 / rCF2_3 ) * RCF_1 * RCF_3 *
cos( dCF_1 - dCF_3 ) ) / ( 1. + ( rCF2_1 / rCF2_3 ) * ( rCF2_1 / rCF2_3 ) - RCF_3 * (1./rCF_3) * ( 0.5*zCF_3*
y - 0.5*wCF_3*
x ) - (RCF_1/(rCF_1*rCF_1)) * ( 0.5*zCF_1*
y - 0.5*wCF_1*
x ) + rmix/(rCF_1*rCF_1) );;
474 m_weights[ kFlavoredCF_1 ][ kFlavoredCFBar_3 ] = ( 1. + rCF2_1 * rCF2_3 - 2. * RCF_1 * RCF_3 * rCF_1 * rCF_3 ) / ( bfCF_1 * bfCF_3 );;
475 m_weights[ kFlavoredCF_1 ][ kFlavoredCSBar ] =
476 1. + rCF2_1 * rCS2 - rCF_1 * rCS * vCFCSMinus ;
477 m_weights[ kFlavoredCF_1 ][ kFlavoredCS ] =
478 rCF2_1 + rCS2 - rCF_1 * rCS * vCF_1CSPlus +
479 rmix *
m_weights[ kFlavoredCF_1 ][ kFlavoredCSBar ] ;
481 m_weights[ kFlavoredCF_1 ][ kSLPlus ] = 1. / bfCF_1 ;
482 m_weights[ kFlavoredCF_1 ][ kSLMinus ] = 1. / bfCF_1 ;
489 ( 1. + rCF2_1 - 2. * rCF_1 * RCF_1 *
cos(dCF_1) ) / ( ( 1. + rCF2_1 - 2. * rCF_1 * RCF_1 *
cos(dCF_1) *
y +
y *
y ) * bCPPlus );
491 ( 1. + rCF2_1 + 2. * rCF_1 * RCF_1 *
cos(dCF_1) ) / ( ( 1. + rCF2_1 - 2. * rCF_1 * RCF_1 *
cos(dCF_1) *
y +
y *
y ) * bCPMinus );
492 m_weights[ kFlavoredCF_1 ][ kDalitz ] = 1. / bCF_1;
493 m_weights[ kFlavoredCF_1 ][ k2Pip2Pim ] = 1. / bCF_1;
494 m_weights[ kFlavoredCF_1 ][ kPipPim2Pi0 ] = 1. / bCF_1;
495 m_weights[ kFlavoredCF_1 ][ kK0PiPiPi0 ] = 1. / bCF_1;
496 m_weights[ kFlavoredCF_1 ][ kKKPiPi ] = 1. / bCF_1;
497 m_weights[ kFlavoredCF_1 ][ kK0KK ] = 1. / bCF_1;
498 m_weights[ kFlavoredCF_1 ][ kPipPimPi0 ] =
499 ( 1. + rCF2_1 - 2. * ( 2. * m_FCP_PiPiPi0 - 1. ) * rCF_1 * RCF_1 *
cos(dCF_1) ) / ( ( 1. + rCF2_1 - 2. * rCF_1 * RCF_1 *
cos(dCF_1) *
y +
y *
y ) * bCPPlus_PiPiPi0 );
502 m_weights[ kFlavoredCFBar_1 ][ kFlavoredCFBar_1 ] =
m_weights[ kFlavoredCF_1 ][ kFlavoredCF_1 ] ;
503 m_weights[ kFlavoredCFBar_1 ][ kFlavoredCF_3 ] =
m_weights[ kFlavoredCF_1 ][ kFlavoredCFBar_3 ] ;
504 m_weights[ kFlavoredCFBar_1 ][ kFlavoredCFBar_3 ] =
m_weights[ kFlavoredCF_1 ][ kFlavoredCF_3 ] ;
505 m_weights[ kFlavoredCFBar_1 ][ kFlavoredCS ] =
m_weights[ kFlavoredCF_1 ][ kFlavoredCSBar ] ;
506 m_weights[ kFlavoredCFBar_1 ][ kFlavoredCSBar ] =
m_weights[ kFlavoredCF_1 ][ kFlavoredCS ] ;
507 m_weights[ kFlavoredCFBar_1 ][ kSLPlus ] = 1. / bCF_1 ;
508 m_weights[ kFlavoredCFBar_1 ][ kSLMinus ] = 1. / bCF_1 ;
511 m_weights[ kFlavoredCFBar_1 ][ kDalitz ] = 1. / bCF_1;
512 m_weights[ kFlavoredCFBar_1 ][ k2Pip2Pim ] = 1. / bCF_1;
513 m_weights[ kFlavoredCFBar_1 ][ kPipPim2Pi0 ] = 1. / bCF_1;
514 m_weights[ kFlavoredCFBar_1 ][ kK0PiPiPi0 ] = 1. / bCF_1;
515 m_weights[ kFlavoredCFBar_1 ][ kKKPiPi ] = 1. / bCF_1;
516 m_weights[ kFlavoredCFBar_1 ][ kK0KK ] = 1. / bCF_1;
517 m_weights[ kFlavoredCFBar_1 ][ kPipPimPi0 ] =
m_weights[ kFlavoredCF_1 ][ kPipPimPi0 ] ;
519 m_weights[ kFlavoredCF_3 ][ kFlavoredCF_3 ] = ( ( 1 - RCF_3 * RCF_3 ) / ( 1 - RCF_3 * (1./rCF_3) * (0.5*zCF_3*
y - 0.5*wCF_3*
x) + rmix/(2*rCF2_3) ) ) ;
520 m_weights[ kFlavoredCF_3 ][ kFlavoredCFBar_3 ] = ( 1. + rCF2_3 * rCF2_3 - 2. * RCF_3 * RCF_3 * rCF2_3 ) / ( bfCF_3 * bfCF_3 );
521 m_weights[ kFlavoredCF_3 ][ kFlavoredCSBar ] =
522 1. + rCF2_3 * rCS2 - rCF_3 * rCS * vCFCSMinus ;
523 m_weights[ kFlavoredCF_3 ][ kFlavoredCS ] =
524 rCF2_3 + rCS2 - rCF_3 * rCS * vCF_3CSPlus +
525 rmix *
m_weights[ kFlavoredCF_3 ][ kFlavoredCSBar ] ;
527 m_weights[ kFlavoredCF_3 ][ kSLPlus ] = 1. / bfCF_3 ;
528 m_weights[ kFlavoredCF_3 ][ kSLMinus ] = 1. / bfCF_3 ;
535 ( 1. + rCF2_3 - 2. * rCF_3 * RCF_3 *
cos(dCF_3) ) / ( ( 1. + rCF2_3 - 2. * rCF_3 * RCF_3 *
cos(dCF_3) *
y +
y *
y ) * bCPPlus );
537 ( 1. + rCF2_3 + 2. * rCF_3 * RCF_3 *
cos(dCF_3) ) / ( ( 1. + rCF2_3 - 2. * rCF_3 * RCF_3 *
cos(dCF_3) *
y +
y *
y ) * bCPMinus );
538 m_weights[ kFlavoredCF_3 ][ kDalitz ] = 1. / bCF_3;
539 m_weights[ kFlavoredCF_3 ][ k2Pip2Pim ] = 1. / bCF_3;
540 m_weights[ kFlavoredCF_3 ][ kPipPim2Pi0 ] = 1. / bCF_3;
541 m_weights[ kFlavoredCF_3 ][ kK0PiPiPi0 ] = 1. / bCF_3;
542 m_weights[ kFlavoredCF_3 ][ kKKPiPi ] = 1. / bCF_3;
543 m_weights[ kFlavoredCF_3 ][ kK0KK ] = 1. / bCF_3;
544 m_weights[ kFlavoredCF_3 ][ kPipPimPi0 ] =
545 ( 1. + rCF2_3 - 2. * ( 2. * m_FCP_PiPiPi0 - 1. ) * rCF_3 * RCF_3 *
cos(dCF_3) ) / ( ( 1. + rCF2_3 - 2. * rCF_3 * RCF_3 *
cos(dCF_3) *
y +
y *
y ) * bCPPlus_PiPiPi0 );
548 m_weights[ kFlavoredCFBar_3 ][ kFlavoredCFBar_3 ] =
m_weights[ kFlavoredCF_3 ][ kFlavoredCF_3 ] ;
549 m_weights[ kFlavoredCFBar_3 ][ kFlavoredCS ] =
m_weights[ kFlavoredCF_3 ][ kFlavoredCSBar ] ;
550 m_weights[ kFlavoredCFBar_3 ][ kFlavoredCSBar ] =
m_weights[ kFlavoredCF_3 ][ kFlavoredCS ] ;
551 m_weights[ kFlavoredCFBar_3 ][ kSLPlus ] = 1. / bCF_3 ;
552 m_weights[ kFlavoredCFBar_3 ][ kSLMinus ] = 1. / bCF_3 ;
555 m_weights[ kFlavoredCFBar_3 ][ kDalitz ] = 1. / bCF_3;
556 m_weights[ kFlavoredCFBar_3 ][ k2Pip2Pim ] = 1. / bCF_3;
557 m_weights[ kFlavoredCFBar_3 ][ kPipPim2Pi0 ] = 1. / bCF_3;
558 m_weights[ kFlavoredCFBar_3 ][ kK0PiPiPi0 ] = 1. / bCF_3;
559 m_weights[ kFlavoredCFBar_3 ][ kKKPiPi ] = 1. / bCF_3;
560 m_weights[ kFlavoredCFBar_3 ][ kK0KK ] = 1. / bCF_3;
561 m_weights[ kFlavoredCFBar_3 ][ kPipPimPi0 ] =
m_weights[ kFlavoredCF_3 ][ kPipPimPi0 ] ;
566 m_weights[ kFlavoredCS ][ kFlavoredCSBar ] = 1. + rCS2 * ( 2. - zCS2 ) + rCS2 * rCS2 ;
567 m_weights[ kFlavoredCS ][ kFlavoredCS ] = rmix *
m_weights[ kFlavoredCS ][ kFlavoredCSBar ] ;
573 m_weights[ kFlavoredCS ][ kSLPlus ] = 1. / bCS ;
574 m_weights[ kFlavoredCS ][ kSLMinus ] = 1. / bCS ;
576 m_weights[ kFlavoredCS ][ kCPPlus ] = ( 1. + rCS2 + rCS * zCS ) / ( 1. +
m_rwsCS ) / bCS / bCPPlus ;
577 m_weights[ kFlavoredCS ][ kCPMinus ] = ( 1. + rCS2 - rCS * zCS ) / ( 1. +
m_rwsCS ) / bCS / bCPMinus ;
579 m_weights[ kFlavoredCS ][ kDalitz ] = 1. / bCS;
580 m_weights[ kFlavoredCS ][ k2Pip2Pim ] = 1. / bCS;
581 m_weights[ kFlavoredCS ][ kPipPim2Pi0 ] = 1. / bCS;
582 m_weights[ kFlavoredCS ][ kK0PiPiPi0 ] = 1. / bCS;
583 m_weights[ kFlavoredCS ][ kKKPiPi ] = 1. / bCS;
584 m_weights[ kFlavoredCS ][ kK0KK ] = 1. / bCS;
585 m_weights[ kFlavoredCS ][ kPipPimPi0 ] = ( 1. + rCS2 + ( 2. * m_FCP_PiPiPi0 - 1. ) * rCS * zCS ) / ( 1. +
m_rwsCS ) / bCS / bCPPlus_PiPiPi0 ;
589 m_weights[ kFlavoredCSBar ][ kFlavoredCSBar ] =
m_weights[ kFlavoredCS ][ kFlavoredCS ] ;
590 m_weights[ kFlavoredCSBar ][ kSLPlus ] = 1. / bCS ;
591 m_weights[ kFlavoredCSBar ][ kSLMinus ] = 1. / bCS ;
594 m_weights[ kFlavoredCSBar ][ kDalitz ] = 1. / bCS;
595 m_weights[ kFlavoredCSBar ][ k2Pip2Pim ] = 1. / bCS;
596 m_weights[ kFlavoredCSBar ][ kPipPim2Pi0 ] = 1. / bCS;
597 m_weights[ kFlavoredCSBar ][ kK0PiPiPi0 ] = 1. / bCS;
598 m_weights[ kFlavoredCSBar ][ kKKPiPi ] = 1. / bCS;
599 m_weights[ kFlavoredCSBar ][ kK0KK ] = 1. / bCS;
608 m_weights[ kSLPlus ][ kCPPlus ] = 1. / bCPPlus ;
609 m_weights[ kSLPlus ][ kCPMinus ] = 1. / bCPMinus ;
612 m_weights[ kSLPlus ][ kPipPim2Pi0 ] = 1. ;
613 m_weights[ kSLPlus ][ kK0PiPiPi0 ] = 1. ;
616 m_weights[ kSLPlus ][ kPipPimPi0 ] = 1. / bCPPlus_PiPiPi0 ;
621 m_weights[ kSLMinus ][ kCPPlus ] = 1. / bCPPlus ;
622 m_weights[ kSLMinus ][ kCPMinus ] = 1. / bCPMinus ;
624 m_weights[ kSLMinus ][ k2Pip2Pim ] = 1. ;
625 m_weights[ kSLMinus ][ kPipPim2Pi0 ] = 1. ;
626 m_weights[ kSLMinus ][ kK0PiPiPi0 ] = 1. ;
629 m_weights[ kSLMinus ][ kPipPimPi0 ] = 1. / bCPPlus_PiPiPi0 ;
634 m_weights[ kCPPlus ][ kCPMinus ] = 2. / bCPPlus / bCPMinus ;
635 m_weights[ kCPPlus ][ kDalitz ] = 1. / bCPPlus;
636 m_weights[ kCPPlus ][ k2Pip2Pim ] = 1. / bCPPlus;
637 m_weights[ kCPPlus ][ kPipPim2Pi0 ] = 1. / bCPPlus;
638 m_weights[ kCPPlus ][ kK0PiPiPi0 ] = 1. / bCPPlus;
639 m_weights[ kCPPlus ][ kKKPiPi ] = 1. / bCPPlus;
640 m_weights[ kCPPlus ][ kK0KK ] = 1. / bCPPlus;
641 m_weights[ kCPPlus ][ kPipPimPi0 ] = ( 1 - ( 2. * m_FCP_PiPiPi0 - 1. ) ) / bCPPlus / bCPPlus_PiPiPi0;
646 m_weights[ kCPMinus ][ kDalitz ] = 1. / bCPMinus;
647 m_weights[ kCPMinus ][ k2Pip2Pim ] = 1. / bCPMinus;
648 m_weights[ kCPMinus ][ kPipPim2Pi0 ] = 1. / bCPMinus;
649 m_weights[ kCPMinus ][ kK0PiPiPi0 ] = 1. / bCPMinus;
650 m_weights[ kCPMinus ][ kKKPiPi ] = 1. / bCPMinus;
651 m_weights[ kCPMinus ][ kK0KK ] = 1. / bCPMinus;
652 m_weights[ kCPMinus ][ kPipPimPi0 ] = 2. * ( 1 - ( 2. * m_FCP_PiPiPi0 - 1. ) ) / bCPMinus / bCPPlus_PiPiPi0;
664 m_weights[ k2Pip2Pim ][ kPipPim2Pi0 ] = 1;
665 m_weights[ k2Pip2Pim ][ kK0PiPiPi0 ] = 1;
668 m_weights[ k2Pip2Pim ][ kPipPimPi0 ] = 1;
670 m_weights[ kPipPim2Pi0 ][ kPipPim2Pi0 ] = 1;
671 m_weights[ kPipPim2Pi0 ][ kK0PiPiPi0 ] = 1;
674 m_weights[ kPipPim2Pi0 ][ kPipPimPi0 ] = 1;
676 m_weights[ kK0PiPiPi0 ][ kK0PiPiPi0 ] = 1;
679 m_weights[ kK0PiPiPi0 ][ kPipPimPi0 ] = 1;
688 m_weights[ kPipPimPi0 ][ kPipPimPi0 ] = ( 1 - ( 2. * m_FCP_PiPiPi0 - 1. ) * ( 2. * m_FCP_PiPiPi0 - 1. ) ) / bCPPlus_PiPiPi0 / bCPPlus_PiPiPi0;
690 log << MSG::INFO <<
"Weight matrix" <<
m_weights << endmsg ;
693 HepVector fractionsD0( kNDecayTypes+1, 0 ) ;
694 fractionsD0[ kFlavoredCF_0 ] = 0.305 ;
695 fractionsD0[ kFlavoredCFBar_0 ] = 0.0076 ;
696 fractionsD0[ kFlavoredCF_1 ] = 0.144 ;
697 fractionsD0[ kFlavoredCFBar_1 ] = 0.00031 ;
698 fractionsD0[ kFlavoredCF_3 ] = 0.0822 ;
699 fractionsD0[ kFlavoredCFBar_3 ] = 0.00027 ;
700 fractionsD0[ kFlavoredCS ] = 0.031 ;
701 fractionsD0[ kFlavoredCSBar ] = 0.031 ;
702 fractionsD0[ kSLPlus ] = 0.125 ;
703 fractionsD0[ kSLMinus ] = 0. ;
704 fractionsD0[ kCPPlus ] = 0.113 ;
705 fractionsD0[ kCPMinus ] = 0.102 ;
706 fractionsD0[ kDalitz ] = 0.05855 ;
707 fractionsD0[ k2Pip2Pim ] = 0.00720 ;
708 fractionsD0[ kPipPim2Pi0 ] = 0.0102 ;
709 fractionsD0[ kK0PiPiPi0 ] = 0.105 ;
710 fractionsD0[ kKKPiPi ] = 0.00273 ;
711 fractionsD0[ kK0KK ] = 0.00902 ;
712 fractionsD0[ kPipPimPi0 ] = 0.0149 ;
713 HepVector scales =
m_weights * fractionsD0 ;
714 log << MSG::INFO <<
"Integrated scale factors " <<scales << endmsg ;
717 HepVector fractionsD0bar( kNDecayTypes+1, 0 ) ;
718 fractionsD0bar[ kFlavoredCF_0 ] = 0.0076 ;
719 fractionsD0bar[ kFlavoredCFBar_0 ] = 0.305 ;
720 fractionsD0bar[ kFlavoredCF_1 ] = 0.00031 ;
721 fractionsD0bar[ kFlavoredCFBar_1 ] = 0.144 ;
722 fractionsD0bar[ kFlavoredCF_3 ] = 0.00027 ;
723 fractionsD0bar[ kFlavoredCFBar_3 ] = 0.0822 ;
724 fractionsD0bar[ kFlavoredCS ] = 0.031 ;
725 fractionsD0bar[ kFlavoredCSBar ] = 0.031 ;
726 fractionsD0bar[ kSLPlus ] = 0. ;
727 fractionsD0bar[ kSLMinus ] = 0.125 ;
728 fractionsD0bar[ kCPPlus ] = 0.113 ;
729 fractionsD0bar[ kCPMinus ] = 0.102 ;
730 fractionsD0bar[ kDalitz ] = 0.056 ;
731 fractionsD0bar[ k2Pip2Pim ] = 0.00720 ;
732 fractionsD0bar[ kPipPim2Pi0 ] = 0.0102 ;
733 fractionsD0bar[ kK0PiPiPi0 ] = 0.104 ;
734 fractionsD0bar[ kKKPiPi ] = 0.00273 ;
735 fractionsD0bar[ kK0KK ] = 0.00902 ;
736 fractionsD0bar[ kPipPimPi0 ] = 0.0149 ;
737 HepVector weight_norm = fractionsD0bar.T() * scales;
738 log << MSG::INFO <<
"Overall scale factor " << fractionsD0bar.T() * scales << endmsg ;
744 double brCF_0 = ( fractionsD0bar[ kFlavoredCFBar_0 ] * scales[ kFlavoredCFBar_0 ] ) / weight_norm[0] ;
745 double brCF_1 = ( fractionsD0bar[ kFlavoredCFBar_1 ] * scales[ kFlavoredCFBar_1 ] ) / weight_norm[0] ;
746 double brCF_3 = ( fractionsD0bar[ kFlavoredCFBar_3 ] * scales[ kFlavoredCFBar_3 ] ) / weight_norm[0] ;
747 double brCS = ( fractionsD0bar[ kFlavoredCS ] * scales[ kFlavoredCS ] + fractionsD0bar[ kFlavoredCSBar ] * scales[ kFlavoredCSBar ] ) / weight_norm[0] ;
748 double brDCS_0 = ( fractionsD0bar[ kFlavoredCF_0 ] * scales[ kFlavoredCF_0 ] ) / weight_norm[0] ;
749 double brDCS_1 = ( fractionsD0bar[ kFlavoredCF_1 ] * scales[ kFlavoredCF_1 ] ) / weight_norm[0] ;
750 double brDCS_3 = ( fractionsD0bar[ kFlavoredCF_3 ] * scales[ kFlavoredCF_3 ] ) / weight_norm[0] ;
751 double brCPPlus = ( fractionsD0bar[ kCPPlus ] * scales[ kCPPlus ] ) / weight_norm[0] ;
752 double brCPMinus = ( fractionsD0bar[ kCPMinus ] * scales[ kCPMinus ] ) / weight_norm[0] ;
755 double dalitz_y_num = -0.000177536;
756 double dalitz_y_den = -0.0150846;
759 -rCF_0 * zCF_0 * ( 1. - 0.5 * rCF_0 * wCF_0 * m_x ) ;
761 -rCF_1 * zCF_1 * ( 1. - 0.5 * rCF_1 * wCF_1 * m_x ) ;
763 -rCF_3 * zCF_3 * ( 1. - 0.5 * rCF_3 * wCF_3 * m_x ) ;
765 -rCS * zCS * ( 1. - 0.5 * rCS * wCS * m_x ) ;
766 double denFactCF_0 = 0.5 * rCF2_0 * zCF2_0 ;
767 double denFactCF_1 = 0.5 * rCF2_1 * zCF2_1 ;
768 double denFactCF_3 = 0.5 * rCF2_3 * zCF2_3 ;
769 double denFactCS = 0.5 * rCS2 * zCS2 ;
772 brCPPlus - brCPMinus + brCF_0 * numFactCF_0 + brCF_1 * numFactCF_1 + brCF_3 * numFactCF_3 + 0.5 * brCS * numFactCS + dalitz_y_num;
774 1. - brCPPlus - brCPMinus - brCF_0 * denFactCF_0 - brCF_1 * denFactCF_1 - brCF_3 * denFactCF_3 - 0.5 * brCS * denFactCS + dalitz_y_den ;
775 double y_pre = num_pre / den_pre ;
777 fractionsD0bar[ kCPPlus ] - fractionsD0bar[ kCPMinus ] + fractionsD0bar[ kFlavoredCFBar_0 ] * numFactCF_0 + fractionsD0bar[ kFlavoredCFBar_1 ] * numFactCF_1 + fractionsD0bar[ kFlavoredCFBar_3 ] * numFactCF_3 + fractionsD0bar[ kFlavoredCS ] * numFactCS + dalitz_y_num;
779 1. - fractionsD0bar[ kCPPlus ] - fractionsD0bar[ kCPMinus ] - fractionsD0bar[ kFlavoredCFBar_0 ] * denFactCF_0 - fractionsD0bar[ kFlavoredCFBar_1 ] * denFactCF_1 - fractionsD0bar[ kFlavoredCFBar_3 ] * denFactCF_3 - fractionsD0bar[ kFlavoredCS ] * denFactCS + dalitz_y_den;
780 double y_prematrix =
num / den ;
781 double y_test1 = 0.25 * ( ( ( scales[ kCPMinus ] *
m_weights[ kCPPlus ][ kSLPlus ] ) / ( scales[ kCPPlus ] *
m_weights[ kCPMinus ][ kSLPlus ] ) ) -
782 ( ( scales[ kCPPlus ] *
m_weights[ kCPMinus ][ kSLPlus ] ) / ( scales[ kCPMinus ] *
m_weights[ kCPPlus ][ kSLPlus ] ) ) ) ;
784 log << MSG::INFO <<
"An Input Y of " << m_y << endmsg ;
785 log << MSG::INFO <<
"Parent MC has an intrinsic value of y as " << y_prematrix << endmsg ;
786 log << MSG::INFO <<
"The BR method predics a y of " << y_pre << endmsg ;
787 log << MSG::INFO <<
"The CP-SL double tag method predicts y of " <<y_test1 << endmsg ;
790 m_largestWeight = 0. ;
791 for(
int i = 0 ; i < kNDecayTypes ; ++i )
793 for(
int j = 0 ; j < kNDecayTypes ; ++j )
796 if(
m_weights[ i ][ j ] > m_largestWeight )
804 log << MSG::INFO <<
"Renormalized weight matrix " <<
m_weights << endmsg ;
809 double D0Sum[ 10 ], D0barSum[ 10 ] ;
813 for(
int i = 0 ; i < 10 ; ++i )
817 D0D0barSum[ i ] =
TComplex( 0., 0. ) ;
824 double stepsize = ( m2max - m2min ) / (
double ) nsteps ;
826 for(
int i = 0 ; i < nsteps ; ++i )
828 double m2i = m2min + ( ( double ) i + 0.5 ) * stepsize ;
830 for(
int j = 0 ; j < nsteps ; ++j )
832 double m2j = m2min + ( ( double ) j + 0.5 ) * stepsize ;
834 if(
t.Point_on_DP( m2i, m2j ) )
836 double m2k = 1.86450*1.86450 + 0.497648*0.497648 +
837 0.139570*0.139570 + 0.139570*0.139570 - m2i - m2j ;
840 if (m_dalitzModel == 0) {
841 D0 =
t.CLEO_Amplitude( m2i, m2j, m2k ) ;
842 D0bar =
t.CLEO_Amplitude( m2j, m2i, m2k ) ;}
843 if (m_dalitzModel == 1) {
844 D0 =
t.Babar_Amplitude( m2i, m2j, m2k ) ;
845 D0bar =
t.Babar_Amplitude( m2j, m2i, m2k ) ;}
846 if (m_dalitzModel == 2) {
847 D0 =
t.Amplitude( m2i, m2j, m2k ) ;
848 D0bar =
t.Amplitude( m2j, m2i, m2k ) ;}
851 int bin =
t.getBin( m2i, m2j, m2k ) ;
855 D0Sum[
bin ] += norm( D0 ) ;
856 D0barSum[
bin ] += norm( D0bar ) ;
857 D0D0barSum[
bin ] += D0 *
conj( D0bar ) ;
860 D0Sum[ 9 ] += norm( D0 ) ;
861 D0barSum[ 9 ] += norm( D0bar ) ;
862 D0D0barSum[ 9 ] += D0 *
conj( D0bar ) ;
869 for(
int i = 0 ; i < 10 ; ++i )
871 double r2 = D0barSum[ i ] / D0Sum[ i ] ;
872 double c =
real( D0D0barSum[ i ] ) / sqrt( D0barSum[ i ] ) / sqrt( D0Sum[ i ] ) ;
873 double s =
imag( D0D0barSum[ i ] ) / sqrt( D0barSum[ i ] ) / sqrt( D0Sum[ i ] ) ;
875 cout <<
"BIN " << i <<
": "
876 << points[ i ] <<
" pts "
877 << r2 <<
" " << c <<
" " <<
s <<
" " << c*c+
s*
s
881 log << MSG::INFO <<
"successfully return from initialize()" <<endmsg;
882 return StatusCode::SUCCESS;
1569 MsgStream log(
msgSvc(), name());
1570 log << MSG::INFO <<
" In findD0Decay " << endmsg ;
1571 vector<double> d0_info(9);
1572 for(
int i=0; i< 9; i++) d0_info[i]=0;
1573 double decay_mode = 20;
1575 double deltaD0 = -1;
1580 for(
int i=0; i< 26; i++)
num[i]=0;
1587 int kNeutralScalar = 5;
1600 int kKStar0Bar = 18;
1603 int kLeptonPlus = 21;
1604 int kLeptonMinus = 22;
1612 int d0_pdg = charm == 1 ? kD0ID : kD0BarID;
1614 HepLorentzVector piPlus, piMinus, k0;
1615 vector<HepLorentzVector> piPlus_4pi, piMinus_4pi, pi0_p4;
1616 vector<HepLorentzVector> kPlus_kkpipi, kMinus_kkpipi;
1617 piPlus_4pi.clear();piMinus_4pi.clear(), pi0_p4.clear();
1618 kPlus_kkpipi.clear();kMinus_kkpipi.clear();
1621 for( Event::McParticleCol::iterator it = mcParticles->begin(); it != mcParticles->end(); it++)
1623 int pdg_code = (*it)->particleProperty();
1624 if ((*it)->primaryParticle())
continue;
1632 if (pdg_code == kKStar0ID || pdg_code == kKStar0BarID || pdg_code == kK0ID || pdg_code == kK0BarID || pdg_code == kKDPStar0ID || pdg_code == kKDPStar0BarID
1633 || pdg_code == kK10ID || pdg_code == kK10BarID
1634 || pdg_code == kK0Star0ID || pdg_code == kK0Star0BarID || pdg_code == kK0StarPlusID || pdg_code == kK0BarID )
continue;
1636 if (mother_pdg == kK0ID || mother_pdg == kK0BarID) {
1640 if (mother_pdg == kKStar0ID || mother_pdg == kKStar0BarID) {
1643 if (pdg_code == kPiPlusID || pdg_code == kPiMinusID)
continue;
1644 if (mother_pdg == kKStar0ID && pdg_code == kKPlusID) pdg_code = kKStar0ID;
1645 if (mother_pdg == kKStar0BarID && pdg_code == kKMinusID) pdg_code = kKStar0BarID;
1650 if ( mother_pdg == kK0Star0ID || mother_pdg == kK0Star0BarID ) {
1655 if (mother_pdg == kK10ID || mother_pdg == kK10BarID) {
1662 if (mother_pdg == d0_pdg)
1666 if (pdg_code == kPiPlusID || pdg_code == kA0PlusID )
num[0]++;
1667 else if (pdg_code == kPiMinusID || pdg_code == kA0MinusID )
num[1]++;
1668 else if (pdg_code == kPi0ID )
num[2]++;
1669 else if (pdg_code == kEtaID )
num[3]++;
1670 else if (pdg_code == kEtaPrimeID )
num[4]++;
1671 else if (pdg_code == kF0ID || pdg_code == kA00ID
1672 || pdg_code == kFPrime0ID|| pdg_code == kF0m1500ID
1673 || pdg_code == kF2ID || pdg_code == kF0m1710ID || pdg_code == kF0600ID )
num[5]++;
1674 else if (pdg_code == kRhoPlusID || pdg_code == kRho2SPlusID
1675 || pdg_code == kA1PlusID )
num[6]++;
1676 else if (pdg_code == kRhoMinusID || pdg_code == kRho2SMinusID
1677 || pdg_code == kA1MinusID)
num[7]++;
1678 else if (pdg_code == kRho0ID || pdg_code == kRho2S0ID)
num[8]++;
1679 else if (pdg_code == kOmegaID )
num[9]++;
1680 else if (pdg_code == kPhiID )
num[10]++;
1681 else if (pdg_code == kKPlusID )
num[11]++;
1682 else if (pdg_code == kKMinusID )
num[12]++;
1683 else if (pdg_code == kK0SID )
num[13]++;
1684 else if (pdg_code == kK0LID )
num[14]++;
1685 else if (pdg_code == kKStarPlusID || pdg_code == kK1PlusID
1686 || pdg_code == kK2StarPlusID || pdg_code == kK1PrimePlusID
1687 || pdg_code == kK0StarPlusID)
num[15]++;
1688 else if (pdg_code == kKStarMinusID || pdg_code == kK1MinusID
1689 || pdg_code == kK2StarMinusID || pdg_code == kK1PrimeMinusID
1690 || pdg_code == kK0StarMinusID )
num[16]++;
1691 else if (pdg_code == kKStar0ID )
num[17]++;
1692 else if (pdg_code == kKStar0BarID )
num[18]++;
1693 else if (pdg_code == kK10ID || pdg_code == kK1Prime0ID)
num[19]++;
1694 else if (pdg_code == kK10BarID || pdg_code == kK1Prime0BarID)
num[20]++;
1695 else if (pdg_code == kEPlusID || pdg_code == kMuPlusID )
num[21]++;
1696 else if (pdg_code == kEMinusID || pdg_code == kMuMinusID )
num[22]++;
1697 else if (pdg_code == kNuEID || pdg_code == kNuEBarID
1698 || pdg_code == kNuMuID || pdg_code == kNuMuBarID )
num[23]++;
1699 else if (pdg_code == kGammaID )
num[24]++;
1700 else if (pdg_code == kGammaFSRID )
continue;
1703 cout <<
"Unknown particle: "<< pdg_code << endl;
1713 if (pdg_code == kPiPlusID) piPlus.setVectM((*it)->initialFourMomentum().vect(),
xmpion);
1714 if (pdg_code == kPiMinusID) piMinus.setVectM((*it)->initialFourMomentum().vect(),
xmpion);
1715 if (pdg_code == kK0SID) k0.setVectM((*it)->initialFourMomentum().vect(),
xmk0);
1716 if (pdg_code == kK0LID) k0.setVectM((*it)->initialFourMomentum().vect(),
xmk0);
1717 HepLorentzVector daughterP4;
1718 if(piPlus_4pi.size()>2||piMinus_4pi.size()>2)
continue;
1719 if(kPlus_kkpipi.size()>1||kMinus_kkpipi.size()>1)
continue;
1721 if (pdg_code == kPiPlusID) {daughterP4.setVectM((*it)->initialFourMomentum().vect(),
xmpion);piPlus_4pi.push_back(daughterP4);}
1722 if (pdg_code == kPiMinusID) {daughterP4.setVectM((*it)->initialFourMomentum().vect(),
xmpion);piMinus_4pi.push_back(daughterP4);}
1723 if (pdg_code == kKPlusID) {daughterP4.setVectM((*it)->initialFourMomentum().vect(),
xmkaon);kPlus_kkpipi.push_back(daughterP4);}
1724 if (pdg_code == kKMinusID) {daughterP4.setVectM((*it)->initialFourMomentum().vect(),
xmkaon);kMinus_kkpipi.push_back(daughterP4);}
1725 if (pdg_code == kPi0ID) {daughterP4.setVectM((*it)->initialFourMomentum().vect(),
xmpi0);pi0_p4.push_back(daughterP4);}
1730 int nDaughters = 0 ;
1731 for(
int i = 0 ; i < 26 ; i++ )
1733 nDaughters +=
num[ i ] ;
1746 int nUFP0 =
num[ kPi0 ] +
num[ kEta ] +
num[ kEtaPrime ] ;
1747 int nUFV0 =
num[ kRho0 ] +
num[ kPhi ] +
num[ kOmega ] +
num[ kGamma ] ;
1748 int nFV0 =
num[ kKStar0 ] +
num[ kK10 ] ;
1749 int nFV0Bar =
num[ kKStar0Bar ] +
num[ kK10Bar ] ;
1750 int nStrange =
num[ kKMinus ] +
num[ kFVMinus ] + nFV0Bar ;
1751 int nAntiStrange =
num[ kKPlus ] +
num[ kFVPlus ] + nFV0 ;
1752 int nCPPlusEig =
num[ kNeutralScalar ] +
num[ kRho0 ] +
num[ kOmega ] +
num[ kPhi ] +
num[ kK0S ] +
num[ kGamma ] ;
1753 int nCPMinusEig =
num[ kPi0 ] +
num[ kEta ] +
num[ kEtaPrime ] +
num[ kK0L ] ;
1754 int nCPEig = nCPPlusEig + nCPMinusEig ;
1755 int nChargedPiK =
num[ kPiPlus ] +
num[ kPiMinus ] +
num[ kKPlus ] +
num[ kKMinus ] ;
1756 int nK0 =
num[ kK0S ] +
num[ kK0L ] ;
1760 double mnm_gen = 0. ;
1761 double mpn_gen = 0. ;
1762 double mpm_gen = 0. ;
1763 bool isKsPiPi =
false ;
1764 bool isKsKK =
false ;
1765 bool isKsPiPiPi0 =
false ;
1770 if( nK0 == 1 &&
num[ kPiPlus ] == 1 &&
num[ kPiMinus ] && nDaughters == 3 )
1772 decay_mode = kDalitz ;
1779 if(
num[ kK0S ] == 1) isKsPiPi =
true ;
1781 if(
num[ kPiPlus ] == 2&&
num[ kPiMinus ]==2 && nDaughters == 4 )
1783 decay_mode = k2Pip2Pim;
1785 if(
num[ kPiPlus ] == 1&&
num[ kPiMinus ]==1 &&
num[ kPi0 ]==2 && nDaughters == 4 )
1787 decay_mode = kPipPim2Pi0;
1789 if( nK0 == 1 &&
num[ kPiPlus ] == 1&&
num[ kPiMinus ]==1 &&
num[ kPi0 ]==1 && nDaughters == 4 )
1791 decay_mode = kK0PiPiPi0;
1792 if(
num[ kK0S ] == 1) isKsPiPiPi0 =
true ;
1794 if(
num[ kPiPlus ] == 1&&
num[ kPiMinus ]==1 &&
num[ kKPlus ] == 1&&
num[ kKMinus ]==1 && nDaughters == 4 )
1796 decay_mode = kKKPiPi;
1798 if(
num[ kKPlus ] == 1&&
num[ kKMinus ]==1 && nK0 == 1 && nDaughters == 3 )
1801 if(
num[ kK0S ] == 1) isKsKK =
true;
1804 int nDaughters_RhoPlus(0);
int nDaughterPiPlus_RhoPlus(0);
int nDaughterPi0_RhoPlus(0);
1805 int nDaughters_RhoMinus(0);
int nDaughterPiMinus_RhoMinus(0);
int nDaughterPi0_RhoMinus(0);
1806 int nDaughters_Rho0(0);
int nDaughterPiPlus_Rho0(0);
int nDaughterPiMinus_Rho0(0);
1807 int nDaughters_F0600(0);
int nDaughterPiPlus_F0600(0);
int nDaughterPiMinus_F0600(0);
1808 int nDaughters_F0(0);
int nDaughterPiPlus_F0(0);
int nDaughterPiMinus_F0(0);
1809 int nDaughters_FPrime0(0);
int nDaughterPiPlus_FPrime0(0);
int nDaughterPiMinus_FPrime0(0);
1810 int nDaughters_F01500(0);
int nDaughterPiPlus_F01500(0);
int nDaughterPiMinus_F01500(0);
1811 int nDaughters_F01710(0);
int nDaughterPiPlus_F01710(0);
int nDaughterPiMinus_F01710(0);
1812 int nDaughters_F2(0);
int nDaughterPiPlus_F2(0);
int nDaughterPiMinus_F2(0);
1813 int nDaughters_Omega(0);
int nDaughterPiPlus_Omega(0);
int nDaughterPiMinus_Omega(0);
1815 for( Event::McParticleCol::iterator it = mcParticles->begin(); it != mcParticles->end(); it++)
1817 int pdg_code = (*it)->particleProperty();
1818 if ((*it)->primaryParticle())
continue;
1824 if( mother_pdg == kRhoPlusID ) {
Event::McParticle it3 = it2.
mother();
if(it3.
particleProperty()==d0_pdg&&pdg_code!=-22) { nDaughters_RhoPlus++;
if( pdg_code == kPiPlusID) nDaughterPiPlus_RhoPlus++;
if( pdg_code == kPi0ID) nDaughterPi0_RhoPlus++;}}
1825 if( mother_pdg == kRhoMinusID ) {
Event::McParticle it3 = it2.
mother();
if(it3.
particleProperty()==d0_pdg&&pdg_code!=-22) { nDaughters_RhoMinus++;
if( pdg_code == kPiMinusID)nDaughterPiMinus_RhoMinus++;
if( pdg_code == kPi0ID) nDaughterPi0_RhoMinus++;}}
1826 if( mother_pdg == kRho0ID ) {
Event::McParticle it3 = it2.
mother();
if(it3.
particleProperty()==d0_pdg&&pdg_code!=-22) { nDaughters_Rho0++;
if( pdg_code == kPiPlusID) nDaughterPiPlus_Rho0++;
if( pdg_code == kPiMinusID) nDaughterPiMinus_Rho0++;}}
1827 if( mother_pdg == kF0600ID ) {
Event::McParticle it3 = it2.
mother();
if(it3.
particleProperty()==d0_pdg&&pdg_code!=-22) { nDaughters_F0600++;
if( pdg_code == kPiPlusID) nDaughterPiPlus_F0600++;
if( pdg_code == kPiMinusID) nDaughterPiMinus_F0600++;}}
1828 if( mother_pdg == kF0ID ) {
Event::McParticle it3 = it2.
mother();
if(it3.
particleProperty()==d0_pdg&&pdg_code!=-22) { nDaughters_F0++;
if( pdg_code == kPiPlusID) nDaughterPiPlus_F0++;
if( pdg_code == kPiMinusID) nDaughterPiMinus_F0++;}}
1829 if( mother_pdg == kFPrime0ID ) {
Event::McParticle it3 = it2.
mother();
if(it3.
particleProperty()==d0_pdg&&pdg_code!=-22) { nDaughters_FPrime0++;
if( pdg_code == kPiPlusID) nDaughterPiPlus_FPrime0++;
if( pdg_code == kPiMinusID) nDaughterPiMinus_FPrime0++;}}
1830 if( mother_pdg == kF0m1500ID ) {
Event::McParticle it3 = it2.
mother();
if(it3.
particleProperty()==d0_pdg&&pdg_code!=-22) { nDaughters_F01500++;
if( pdg_code == kPiPlusID) nDaughterPiPlus_F01500++;
if( pdg_code == kPiMinusID) nDaughterPiMinus_F01500++;}}
1831 if( mother_pdg == kF0m1710ID ) {
Event::McParticle it3 = it2.
mother();
if(it3.
particleProperty()==d0_pdg&&pdg_code!=-22) { nDaughters_F01710++;
if( pdg_code == kPiPlusID) nDaughterPiPlus_F01710++;
if( pdg_code == kPiMinusID) nDaughterPiMinus_F01710++;}}
1832 if( mother_pdg == kF2ID ) {
Event::McParticle it3 = it2.
mother();
if(it3.
particleProperty()==d0_pdg&&pdg_code!=-22) { nDaughters_F2++;
if( pdg_code == kPiPlusID) nDaughterPiPlus_F2++;
if( pdg_code == kPiMinusID) nDaughterPiMinus_F2++;}}
1833 if( mother_pdg == kOmegaID ) {
Event::McParticle it3 = it2.
mother();
if(it3.
particleProperty()==d0_pdg&&pdg_code!=-22) { nDaughters_Omega++;
if( pdg_code == kPiPlusID) nDaughterPiPlus_Omega++;
if( pdg_code == kPiMinusID) nDaughterPiMinus_Omega++;}}
1838 if( decay_mode == kDalitz )
1855 vector<double> k0l;vector<double> pip;vector<double> pim;
1856 k0l.clear();pip.clear();pim.clear();
1857 k0l.push_back(k0[0]);k0l.push_back(k0[1]);k0l.push_back(k0[2]);k0l.push_back(k0[3]);
1858 pip.push_back(piPlus[0]);pip.push_back(piPlus[1]);pip.push_back(piPlus[2]);pip.push_back(piPlus[3]);
1859 pim.push_back(piMinus[0]);pim.push_back(piMinus[1]);pim.push_back(piMinus[2]);pim.push_back(piMinus[3]);
1864 D0 = tKSpipi.
Amp_PFT(k0l,pip,pim);
1866 vector<double> cpk0l;vector<double> cppip;vector<double> cppim;
1867 cpk0l.clear();pip.clear();pim.clear();
1868 cpk0l.push_back(-k0l[0]);cpk0l.push_back(-k0l[1]);cpk0l.push_back(-k0l[2]);cpk0l.push_back(k0l[3]);
1869 cppim.push_back(-piPlus[0]);cppim.push_back(-piPlus[1]);cppim.push_back(-piPlus[2]);cppim.push_back(piPlus[3]);
1870 cppip.push_back(-piMinus[0]);cppip.push_back(-piMinus[1]);cppip.push_back(-piMinus[2]);cppip.push_back(piMinus[3]);
1871 D0bar = tKSpipi.
Amp_PFT(cpk0l, cppip, cppim);
1875 D0 = tKLpipi.
Amp_PFT(k0l,pip,pim);
1876 vector<double> cpk0l;vector<double> cppip;vector<double> cppim;
1877 cpk0l.clear();pip.clear();pim.clear();
1878 cpk0l.push_back(-k0l[0]);cpk0l.push_back(-k0l[1]);cpk0l.push_back(-k0l[2]);cpk0l.push_back(k0l[3]);
1879 cppim.push_back(-piPlus[0]);cppim.push_back(-piPlus[1]);cppim.push_back(-piPlus[2]);cppim.push_back(piPlus[3]);
1880 cppip.push_back(-piMinus[0]);cppip.push_back(-piMinus[1]);cppip.push_back(-piMinus[2]);cppip.push_back(piMinus[3]);
1881 D0bar = tKLpipi.
Amp_PFT(cpk0l, cppip, cppim);
1886 r2D0 = std::norm(D0bar)/std::norm(D0);
1887 double temp = std::arg(D0)-std::arg(D0bar);
1888 log << MSG::INFO <<
"D0 calculation " << sqrt(r2D0) <<
" "<< temp << endmsg;
1889 while (temp < -TMath::Pi())
1891 temp += 2.0 * TMath::Pi();
1893 while (temp > TMath::Pi())
1895 temp -= 2.0 * TMath::Pi();
1898 deltaD0 = isKsPiPi ? deltaD0 : (deltaD0+
PI);
1900 double cosd =
cos(deltaD0);
1901 double sind =
sin(deltaD0);
1902 if( mpn_gen - mnm_gen > 0. )
1910 r2D0 = std::norm(D0)/std::norm(D0bar);
1911 double temp = std::arg(D0bar)-std::arg(D0);
1912 while (temp < -TMath::Pi())
1914 temp += 2.0 * TMath::Pi();
1916 while (temp > TMath::Pi())
1918 temp -= 2.0 * TMath::Pi();
1921 deltaD0 = isKsPiPi ? deltaD0 : (deltaD0+
PI);
1923 double cosd =
cos( deltaD0 ) ;
1924 double sind =
sin( deltaD0 ) ;
1925 if( mpn_gen - mnm_gen < 0. )
1932 }
else if( decay_mode == k2Pip2Pim ){
1936 HepLorentzVector pip1_4pi = (piPlus_4pi.at(0));
1937 HepLorentzVector pim1_4pi = (piMinus_4pi.at(0));
1938 HepLorentzVector pip2_4pi = (piPlus_4pi.at(1));
1939 HepLorentzVector pim2_4pi = (piMinus_4pi.at(1));
1940 pip1_4pi.boost(-0.011, 0, 0);
1941 pip2_4pi.boost(-0.011, 0, 0);
1942 pim1_4pi.boost(-0.011, 0, 0);
1943 pim2_4pi.boost(-0.011, 0, 0);
1944 std::complex<double> D0, D0bar;
1949 std::vector<double> pip1; pip1.clear(); pip1.push_back(pip1_4pi[0]);pip1.push_back(pip1_4pi[1]);pip1.push_back(pip1_4pi[2]);pip1.push_back(pip1_4pi[3]);
1950 std::vector<double> pim1; pim1.clear(); pim1.push_back(pim1_4pi[0]);pim1.push_back(pim1_4pi[1]);pim1.push_back(pim1_4pi[2]);pim1.push_back(pim1_4pi[3]);
1951 std::vector<double> pip2; pip2.clear(); pip2.push_back(pip2_4pi[0]);pip2.push_back(pip2_4pi[1]);pip2.push_back(pip2_4pi[2]);pip2.push_back(pip2_4pi[3]);
1952 std::vector<double> pim2; pim2.clear(); pim2.push_back(pim2_4pi[0]);pim2.push_back(pim2_4pi[1]);pim2.push_back(pim2_4pi[2]);pim2.push_back(pim2_4pi[3]);
1955 D0 = t2pip2pim.
Amp(pip1,pim1,pip2,pim2);
1960 std::vector<double> cppip1; cppip1.clear(); cppip1.push_back(-pim1_4pi[0]);cppip1.push_back(-pim1_4pi[1]);cppip1.push_back(-pim1_4pi[2]);cppip1.push_back(pim1_4pi[3]);
1961 std::vector<double> cppim1; cppim1.clear(); cppim1.push_back(-pip1_4pi[0]);cppim1.push_back(-pip1_4pi[1]);cppim1.push_back(-pip1_4pi[2]);cppim1.push_back(pip1_4pi[3]);
1962 std::vector<double> cppip2; cppip2.clear(); cppip2.push_back(-pim2_4pi[0]);cppip2.push_back(-pim2_4pi[1]);cppip2.push_back(-pim2_4pi[2]);cppip2.push_back(pim2_4pi[3]);
1963 std::vector<double> cppim2; cppim2.clear(); cppim2.push_back(-pip2_4pi[0]);cppim2.push_back(-pip2_4pi[1]);cppim2.push_back(-pip2_4pi[2]);cppim2.push_back(pip2_4pi[3]);
1965 D0bar = t2pip2pim.
Amp(cppip1, cppim1, cppip2, cppim2);
1969 r2D0 = std::norm(D0bar)/std::norm(D0);
1970 double temp = std::arg(D0)-std::arg(D0bar);
1971 while (temp < -TMath::Pi())
1973 temp += 2.0 * TMath::Pi();
1975 while (temp > TMath::Pi())
1977 temp -= 2.0 * TMath::Pi();
1981 double cosd =
cos(deltaD0);
1982 double sind =
sin(deltaD0);
1991 r2D0 = std::norm(D0)/std::norm(D0bar);
1992 double temp = std::arg(D0bar)-std::arg(D0);
1993 while (temp < -TMath::Pi())
1995 temp += 2.0 * TMath::Pi();
1997 while (temp > TMath::Pi())
1999 temp -= 2.0 * TMath::Pi();
2003 double cosd =
cos( deltaD0 ) ;
2004 double sind =
sin( deltaD0 ) ;
2012 }
else if( decay_mode == kPipPim2Pi0 ){
2017 HepLorentzVector pip1_4pi = (piPlus_4pi.at(0));
2018 HepLorentzVector pim1_4pi = (piMinus_4pi.at(0));
2019 HepLorentzVector pi01_p4 = (pi0_p4.at(0));
2020 HepLorentzVector pi02_p4 = (pi0_p4.at(1));
2021 pip1_4pi.boost(-0.011, 0, 0);
2022 pim1_4pi.boost(-0.011, 0, 0);
2023 pi01_p4.boost(-0.011, 0, 0);
2024 pi02_p4.boost(-0.011, 0, 0);
2025 std::complex<double> D0, D0bar;
2030 std::vector<double> pip1; pip1.clear(); pip1.push_back(pip1_4pi[0]);pip1.push_back(pip1_4pi[1]);pip1.push_back(pip1_4pi[2]);pip1.push_back(pip1_4pi[3]);
2031 std::vector<double> pim1; pim1.clear(); pim1.push_back(pim1_4pi[0]);pim1.push_back(pim1_4pi[1]);pim1.push_back(pim1_4pi[2]);pim1.push_back(pim1_4pi[3]);
2032 std::vector<double> pi01; pi01.clear(); pi01.push_back(pi01_p4[0]);pi01.push_back(pi01_p4[1]);pi01.push_back(pi01_p4[2]);pi01.push_back(pi01_p4[3]);
2033 std::vector<double> pi02; pi02.clear(); pi02.push_back(pi02_p4[0]);pi02.push_back(pi02_p4[1]);pi02.push_back(pi02_p4[2]);pi02.push_back(pi02_p4[3]);
2036 D0 = tpippim2pi0.
Amp(pip1,pim1,pi01,pi02);
2041 std::vector<double> cppip1; cppip1.clear(); cppip1.push_back(-pim1_4pi[0]);cppip1.push_back(-pim1_4pi[1]);cppip1.push_back(-pim1_4pi[2]);cppip1.push_back(pim1_4pi[3]);
2042 std::vector<double> cppim1; cppim1.clear(); cppim1.push_back(-pip1_4pi[0]);cppim1.push_back(-pip1_4pi[1]);cppim1.push_back(-pip1_4pi[2]);cppim1.push_back(pip1_4pi[3]);
2043 std::vector<double> cppi01; cppi01.clear(); cppi01.push_back(-pi01_p4[0]);cppi01.push_back(-pi01_p4[1]);cppi01.push_back(-pi01_p4[2]);cppi01.push_back(pi01_p4[3]);
2044 std::vector<double> cppi02; cppi02.clear(); cppi02.push_back(-pi02_p4[0]);cppi02.push_back(-pi02_p4[1]);cppi02.push_back(-pi02_p4[2]);cppi02.push_back(pi02_p4[3]);
2046 D0bar = tpippim2pi0.
Amp(cppip1, cppim1, cppi01, cppi02);
2050 r2D0 = std::norm(D0bar)/std::norm(D0);
2051 double temp = std::arg(D0)-std::arg(D0bar);
2052 while (temp < -TMath::Pi())
2054 temp += 2.0 * TMath::Pi();
2056 while (temp > TMath::Pi())
2058 temp -= 2.0 * TMath::Pi();
2062 double cosd =
cos(deltaD0);
2063 double sind =
sin(deltaD0);
2072 r2D0 = std::norm(D0)/std::norm(D0bar);
2073 double temp = std::arg(D0bar)-std::arg(D0);
2074 while (temp < -TMath::Pi())
2076 temp += 2.0 * TMath::Pi();
2078 while (temp > TMath::Pi())
2080 temp -= 2.0 * TMath::Pi();
2084 double cosd =
cos( deltaD0 ) ;
2085 double sind =
sin( deltaD0 ) ;
2091 }
else if( decay_mode == kK0PiPiPi0 )
2106 HepLorentzVector pip_kspipipi0 = (piPlus_4pi.at(0));
2107 HepLorentzVector pim_kspipipi0 = (piMinus_4pi.at(0));
2108 HepLorentzVector k0_kspipipi0 = k0;
2109 HepLorentzVector pi0_kspipipi0 = (pi0_p4.at(0));
2110 pip_kspipipi0.boost(-0.011, 0, 0);
2111 pim_kspipipi0.boost(-0.011, 0, 0);
2112 k0_kspipipi0.boost(-0.011, 0, 0);
2113 pi0_kspipipi0.boost(-0.011, 0, 0);
2116 vector<double> k0l;vector<double> pip;vector<double> pim; vector<double> pi0;
2117 k0l.clear();pip.clear();pim.clear();pi0.clear();
2118 k0l.push_back(k0_kspipipi0[0]);k0l.push_back(k0_kspipipi0[1]);k0l.push_back(k0_kspipipi0[2]);k0l.push_back(k0_kspipipi0[3]);
2119 pip.push_back(pip_kspipipi0[0]);pip.push_back(pip_kspipipi0[1]);pip.push_back(pip_kspipipi0[2]);pip.push_back(pip_kspipipi0[3]);
2120 pim.push_back(pim_kspipipi0[0]);pim.push_back(pim_kspipipi0[1]);pim.push_back(pim_kspipipi0[2]);pim.push_back(pim_kspipipi0[3]);
2121 pi0.push_back(pi0_kspipipi0[0]);pi0.push_back(pi0_kspipipi0[1]);pi0.push_back(pi0_kspipipi0[2]);pi0.push_back(pi0_kspipipi0[3]);
2125 D0 = tKSpipipi0.
Amp(k0l,pip,pim,pi0);
2127 vector<double> cpk0l;vector<double> cppip;vector<double> cppim;vector<double> cppi0;
2128 cpk0l.clear();cppip.clear();cppim.clear();cppi0.clear();
2129 cpk0l.push_back(-k0l[0]);cpk0l.push_back(-k0l[1]);cpk0l.push_back(-k0l[2]);cpk0l.push_back(k0l[3]);
2130 cppim.push_back(-pip[0]);cppim.push_back(-pip[1]);cppim.push_back(-pip[2]);cppim.push_back(pip[3]);
2131 cppip.push_back(-pim[0]);cppip.push_back(-pim[1]);cppip.push_back(-pim[2]);cppip.push_back(pim[3]);
2132 cppi0.push_back(-pi0[0]);cppi0.push_back(-pi0[1]);cppi0.push_back(-pi0[2]);cppi0.push_back(pi0[3]);
2133 D0bar = tKSpipipi0.
Amp(cpk0l, cppip, cppim, cppi0);
2136 D0 = tKSpipipi0.
Amp(k0l,pip,pim,pi0);
2138 vector<double> cpk0l;vector<double> cppip;vector<double> cppim;vector<double> cppi0;
2139 cpk0l.clear();cppip.clear();cppim.clear();cppi0.clear();
2140 cpk0l.push_back(-k0l[0]);cpk0l.push_back(-k0l[1]);cpk0l.push_back(-k0l[2]);cpk0l.push_back(k0l[3]);
2141 cppim.push_back(-pip[0]);cppim.push_back(-pip[1]);cppim.push_back(-pip[2]);cppim.push_back(pip[3]);
2142 cppip.push_back(-pim[0]);cppip.push_back(-pim[1]);cppip.push_back(-pim[2]);cppip.push_back(pim[3]);
2143 cppi0.push_back(-pi0[0]);cppi0.push_back(-pi0[1]);cppi0.push_back(-pi0[2]);cppi0.push_back(pi0[3]);
2144 D0bar = tKSpipipi0.
Amp(cpk0l, cppip, cppim, cppi0);
2157 r2D0 = std::norm(D0bar)/std::norm(D0);
2158 double temp = std::arg(D0)-std::arg(D0bar);
2159 log << MSG::INFO <<
"D0 calculation " << sqrt(r2D0) <<
" "<< temp << endmsg;
2160 while (temp < -TMath::Pi())
2162 temp += 2.0 * TMath::Pi();
2164 while (temp > TMath::Pi())
2166 temp -= 2.0 * TMath::Pi();
2169 deltaD0 = isKsPiPiPi0 ? (deltaD0+
PI) : (deltaD0);
2171 double cosd =
cos(deltaD0);
2172 double sind =
sin(deltaD0);
2173 if( mpn_gen - mnm_gen > 0. )
2181 r2D0 = std::norm(D0)/std::norm(D0bar);
2182 double temp = std::arg(D0bar)-std::arg(D0);
2183 while (temp < -TMath::Pi())
2185 temp += 2.0 * TMath::Pi();
2187 while (temp > TMath::Pi())
2189 temp -= 2.0 * TMath::Pi();
2192 deltaD0 = isKsPiPiPi0 ? (deltaD0+
PI) : (deltaD0);
2194 double cosd =
cos( deltaD0 ) ;
2195 double sind =
sin( deltaD0 ) ;
2196 if( mpn_gen - mnm_gen < 0. )
2203 }
else if( decay_mode == kKKPiPi ){
2208 vector<double> kp; vector<double> km; vector<double> pip;vector<double> pim;
2210 pip.clear();pim.clear();
2211 kp.clear();km.clear();
2213 HepLorentzVector pip_kkpipi = (piPlus_4pi.at(0));
2214 HepLorentzVector pim_kkpipi = (piMinus_4pi.at(0));
2215 HepLorentzVector kp_kkpipi = (kPlus_kkpipi.at(0));
2216 HepLorentzVector km_kkpipi = (kMinus_kkpipi.at(0));
2218 pip.push_back(pip_kkpipi[0]);pip.push_back(pip_kkpipi[1]);pip.push_back(pip_kkpipi[2]);pip.push_back(pip_kkpipi[3]);
2219 pim.push_back(pim_kkpipi[0]);pim.push_back(pim_kkpipi[1]);pim.push_back(pim_kkpipi[2]);pim.push_back(pim_kkpipi[3]);
2220 kp.push_back(kp_kkpipi[0]);kp.push_back(kp_kkpipi[1]);kp.push_back(kp_kkpipi[2]);kp.push_back(kp_kkpipi[3]);
2221 km.push_back(km_kkpipi[0]);km.push_back(km_kkpipi[1]);km.push_back(km_kkpipi[2]);km.push_back(km_kkpipi[3]);
2223 pdau[0]=kp_kkpipi[0]; pdau[1]=kp_kkpipi[1]; pdau[2]=kp_kkpipi[2]; pdau[3]=kp_kkpipi[3];
2224 pdau[4]=km_kkpipi[0]; pdau[5]=km_kkpipi[1]; pdau[6]=km_kkpipi[2]; pdau[7]=km_kkpipi[3];
2225 pdau[8]=pip_kkpipi[0];pdau[9]=pip_kkpipi[1];pdau[10]=pip_kkpipi[2];pdau[11]=pip_kkpipi[3];
2226 pdau[12]=pim_kkpipi[0];pdau[13]=pim_kkpipi[1];pdau[14]=pim_kkpipi[2];pdau[15]=pim_kkpipi[3];
2229 D0 = tKKpipi.
AMP(pdau,1);
2231 pdau[0]=-km_kkpipi[0]; pdau[1]=-km_kkpipi[1]; pdau[2]=-km_kkpipi[2]; pdau[3]=km_kkpipi[3];
2232 pdau[4]=-kp_kkpipi[0]; pdau[5]=-kp_kkpipi[1]; pdau[6]=-kp_kkpipi[2]; pdau[7]=kp_kkpipi[3];
2233 pdau[8]=-pim_kkpipi[0]; pdau[9]=-pim_kkpipi[1]; pdau[10]=-pim_kkpipi[2];pdau[11]=pim_kkpipi[3];
2234 pdau[12]=-pip_kkpipi[0];pdau[13]=-pip_kkpipi[1];pdau[14]=-pip_kkpipi[2];pdau[15]=pip_kkpipi[3];
2235 D0bar = tKKpipi.
AMP(pdau,1);
2239 r2D0 = std::norm(D0bar)/std::norm(D0);
2240 double temp = std::arg(D0)-std::arg(D0bar);
2241 log << MSG::INFO <<
"D0 calculation " << sqrt(r2D0) <<
" "<< temp << endmsg;
2242 while (temp < -TMath::Pi())
2244 temp += 2.0 * TMath::Pi();
2246 while (temp > TMath::Pi())
2248 temp -= 2.0 * TMath::Pi();
2253 r2D0 = std::norm(D0)/std::norm(D0bar);
2254 double temp = std::arg(D0bar)-std::arg(D0);
2255 while (temp < -TMath::Pi())
2257 temp += 2.0 * TMath::Pi();
2259 while (temp > TMath::Pi())
2261 temp -= 2.0 * TMath::Pi();
2266 }
else if( decay_mode == kK0KK ){
2269 HepLorentzVector kPlus = (kPlus_kkpipi.at(0));
2270 HepLorentzVector kMinus = (kMinus_kkpipi.at(0));
2272 vector<double> k0l;vector<double> kp;vector<double> km;
2273 k0l.clear();kp.clear();km.clear();
2274 k0l.push_back(k0[0]);k0l.push_back(k0[1]);k0l.push_back(k0[2]);k0l.push_back(k0[3]);
2275 kp.push_back(kPlus[0]);kp.push_back(kPlus[1]);kp.push_back(kPlus[2]);kp.push_back(kPlus[3]);
2276 km.push_back(kMinus[0]);km.push_back(kMinus[1]);km.push_back(kMinus[2]);km.push_back(kMinus[3]);
2282 D0 = tKSLKK.
Amp(k0l,kp,km,310,0);
2284 vector<double> cpk0l;vector<double> cpkp;vector<double> cpkm;
2285 cpk0l.clear();kp.clear();km.clear();
2286 cpk0l.push_back(-k0l[0]);cpk0l.push_back(-k0l[1]);cpk0l.push_back(-k0l[2]);cpk0l.push_back(k0l[3]);
2287 cpkm.push_back(-kPlus[0]);cpkm.push_back(-kPlus[1]);cpkm.push_back(-kPlus[2]);cpkm.push_back(kPlus[3]);
2288 cpkp.push_back(-kMinus[0]);cpkp.push_back(-kMinus[1]);cpkp.push_back(-kMinus[2]);cpkp.push_back(kMinus[3]);
2290 D0bar = tKSLKK.
Amp(cpk0l, cpkp, cpkm,310,0);
2295 D0 = tKSLKK.
Amp(k0l,kp,km,130,1);
2296 vector<double> cpk0l;vector<double> cpkp;vector<double> cpkm;
2297 cpk0l.clear();kp.clear();km.clear();
2298 cpk0l.push_back(-k0l[0]);cpk0l.push_back(-k0l[1]);cpk0l.push_back(-k0l[2]);cpk0l.push_back(k0l[3]);
2299 cpkm.push_back(-kPlus[0]);cpkm.push_back(-kPlus[1]);cpkm.push_back(-kPlus[2]);cpkm.push_back(kPlus[3]);
2300 cpkp.push_back(-kMinus[0]);cpkp.push_back(-kMinus[1]);cpkp.push_back(-kMinus[2]);cpkp.push_back(kMinus[3]);
2302 D0bar = tKSLKK.
Amp(cpk0l, cpkp, cpkm,130,1);
2307 r2D0 = std::norm(D0bar)/std::norm(D0);
2308 double temp = std::arg(D0)-std::arg(D0bar);
2309 log << MSG::INFO <<
"D0 calculation " << sqrt(r2D0) <<
" "<< temp << endmsg;
2310 while (temp < -TMath::Pi())
2312 temp += 2.0 * TMath::Pi();
2314 while (temp > TMath::Pi())
2316 temp -= 2.0 * TMath::Pi();
2319 deltaD0 = isKsKK ? deltaD0 : (deltaD0+
PI);
2323 r2D0 = std::norm(D0)/std::norm(D0bar);
2324 double temp = std::arg(D0bar)-std::arg(D0);
2325 while (temp < -TMath::Pi())
2327 temp += 2.0 * TMath::Pi();
2329 while (temp > TMath::Pi())
2331 temp -= 2.0 * TMath::Pi();
2334 deltaD0 = isKsKK ? deltaD0 : (deltaD0+
PI);
2339 else if(
num[ kLeptonPlus ] == 1 )
2341 decay_mode = kSLPlus ;
2347 else if(
num[ kLeptonMinus ] == 1 )
2349 decay_mode = kSLMinus ;
2356 else if( nDaughters == 3 &&
num[ kPiPlus ] == 1 &&
num[ kPiMinus ] == 1 &&
num[ kPi0 ] == 1
2359 if(m_debug)cout<<
"PiPiPi0 mode"<<endl;
2360 decay_mode = kPipPimPi0 ;
2363 HepLorentzVector pip1_4pi = (piPlus_4pi.at(0));
2364 HepLorentzVector pim1_4pi = (piMinus_4pi.at(0));
2365 HepLorentzVector pi01_p4 = (pi0_p4.at(0));
2366 pip1_4pi.boost(-0.011, 0, 0);
2367 pim1_4pi.boost(-0.011, 0, 0);
2368 pi01_p4.boost(-0.011, 0, 0);
2369 std::complex<double> D0, D0bar;
2374 std::vector<double> pip1; pip1.clear(); pip1.push_back(pip1_4pi[0]);pip1.push_back(pip1_4pi[1]);pip1.push_back(pip1_4pi[2]);pip1.push_back(pip1_4pi[3]);
2375 std::vector<double> pim1; pim1.clear(); pim1.push_back(pim1_4pi[0]);pim1.push_back(pim1_4pi[1]);pim1.push_back(pim1_4pi[2]);pim1.push_back(pim1_4pi[3]);
2376 std::vector<double> pi01; pi01.clear(); pi01.push_back(pi01_p4[0]);pi01.push_back(pi01_p4[1]);pi01.push_back(pi01_p4[2]);pi01.push_back(pi01_p4[3]);
2379 D0 = tpipipi0.
Amp(pip1,pim1,pi01);
2384 std::vector<double> cppip1; cppip1.clear(); cppip1.push_back(-pim1_4pi[0]);cppip1.push_back(-pim1_4pi[1]);cppip1.push_back(-pim1_4pi[2]);cppip1.push_back(pim1_4pi[3]);
2385 std::vector<double> cppim1; cppim1.clear(); cppim1.push_back(-pip1_4pi[0]);cppim1.push_back(-pip1_4pi[1]);cppim1.push_back(-pip1_4pi[2]);cppim1.push_back(pip1_4pi[3]);
2386 std::vector<double> cppi01; cppi01.clear(); cppi01.push_back(-pi01_p4[0]);cppi01.push_back(-pi01_p4[1]);cppi01.push_back(-pi01_p4[2]);cppi01.push_back(pi01_p4[3]);
2388 D0bar = (-1.0)*tpipipi0.
Amp(cppip1, cppim1, cppi01);
2392 r2D0 = std::norm(D0bar)/std::norm(D0);
2393 double temp = std::arg(D0)-std::arg(D0bar);
2394 while (temp < -TMath::Pi())
2396 temp += 2.0 * TMath::Pi();
2398 while (temp > TMath::Pi())
2400 temp -= 2.0 * TMath::Pi();
2404 double cosd =
cos(deltaD0);
2405 double sind =
sin(deltaD0);
2408 r2D0 = std::norm(D0)/std::norm(D0bar);
2409 double temp = std::arg(D0bar)-std::arg(D0);
2410 while (temp < -TMath::Pi())
2412 temp += 2.0 * TMath::Pi();
2414 while (temp > TMath::Pi())
2416 temp -= 2.0 * TMath::Pi();
2420 double cosd =
cos( deltaD0 ) ;
2421 double sind =
sin( deltaD0 ) ;
2424 if(m_debug)cout<<
"deltaD0="<<deltaD0<<endl;
2425 if(m_debug)cout<<
"r2D0="<<r2D0<<endl;
2430 ( nDaughters == 2 &&
2431 ( (
num[ kPiPlus ] == 1 &&
num[ kPiMinus ] == 1 ) ||
2433 num[ kNeutralScalar ] == 2 ||
2434 ( nUFP0 == 1 && nUFV0 == 1 ) ||
2435 (
num[ kKPlus ] == 1 &&
num[ kKMinus ] == 1 ) ||
2438 (
num[ kK0L ] == 1 && nUFP0 == 1 ) ||
2439 (
num[ kK0S ] == 1 &&
num[ kNeutralScalar ] == 1 ) ||
2440 (
num[ kK0L ] == 1 && nUFV0 == 1 ) ||
2441 (
num[ kUFVPlus ] ==1 &&
num [ kPiMinus ] == 1 ) ||
2442 (
num[ kUFVMinus ] ==1 &&
num [ kPiPlus ] == 1 ) ) ) ||
2443 ( nDaughters == 3 &&
2444 ( ( nCPPlusEig == 1 &&
num[ kPi0 ] == 2 ) ||
2445 (
num[ kK0S ] == 3 ) || (
num[ kK0S ] == 1 &&
num[ kK0L ] == 2 ) ||
2446 (
num[ kK0S ] == 1 &&
num[ kK0L ] == 1 && nUFP0 == 1 ) ||
2447 (
num[ kK0S ] == 1 && nUFP0 == 2 )
2449 ( nDaughters == 4 &&
2450 (
num[ kK0L ] == 1 && nUFP0 == 3 )||
2451 ( (
num[ kK0S ] == 2 ||
num[ kK0L ] == 2 ) && nUFP0 == 2 ) )
2454 decay_mode = kCPPlus ;
2462 ( nDaughters == 2 &&
2463 ( (
num[ kK0S ] == 1 && nUFP0 == 1 ) ||
2464 (
num[ kK0L ] == 1 &&
num[ kNeutralScalar ] == 1 ) ||
2465 (
num[ kK0S ] == 1 && nUFV0 == 1 ) ||
2466 (
num[ kNeutralScalar ] == 1 && nUFV0 == 1 ) ||
2467 ( nUFP0 == 1 &&
num[ kNeutralScalar ] == 1 ) ) ) ||
2468 ( nDaughters == 3 &&
2469 ( ( nCPMinusEig == 3 &&
num[ kPi0 ] == 2 ) ||
2470 (
num[ kPi0 ] == 3 ) ||
2471 (
num[ kK0L ] == 3 ) || (
num[ kK0S ] == 2 &&
num[ kK0L ] == 1 ) ||
2472 ( (
num[ kK0S ] == 2 ||
num[ kK0L ] == 2 ) && nUFP0 == 1 ) ||
2473 (
num[ kK0L ] == 1 && nUFP0 == 2 ) ) ) ||
2474 ( nDaughters == 4 &&
2475 (
num[ kK0S ] == 1 &&
num[ kPi0 ] == 3 )|| ( (
num[ kK0S ] == 1 &&
num[ kK0L ] == 1 ) && nUFP0 == 2 ) )
2478 decay_mode = kCPMinus ;
2484 else if( nStrange == nAntiStrange + 1 )
2486 if(m_debug)cout<< nDaughters <<endl;
2487 if(m_debug)cout<<
num[ kKMinus ]<<endl;
2488 if(m_debug)cout<<
num[ kPiMinus ]<<endl;
2489 if(m_debug)cout<<
num[ kPiPlus ]<<endl;
2492 if( (
num[ kKMinus ] == 1 &&
num[ kPiPlus ] == 2 &&
num[ kPiMinus ] == 1 ) && nDaughters == 4 ){
2493 if(m_debug)cout<<
"True K-3Pi "<<endl;
2494 decay_mode = kFlavoredCF_3 ;
2498 vector<double> kp; vector<double> pi1; vector<double>
pi2;vector<double> pi3;
2500 pi1.clear();
pi2.clear();pi3.clear();
2503 HepLorentzVector kp_kpipipi = (kMinus_kkpipi.at(0));
2504 HepLorentzVector pi1_kpipipi = (piPlus_4pi.at(0));
2505 HepLorentzVector pi2_kpipipi = (piPlus_4pi.at(1));
2506 HepLorentzVector pi3_kpipipi = (piMinus_4pi.at(0));
2508 kp.push_back( kp_kpipipi[0]); kp.push_back(kp_kpipipi[1]); kp.push_back(kp_kpipipi[2]); kp.push_back(kp_kpipipi[3]);
2509 pi1.push_back(pi1_kpipipi[0]);pi1.push_back(pi1_kpipipi[1]);pi1.push_back(pi1_kpipipi[2]);pi1.push_back(pi1_kpipipi[3]);
2510 pi2.push_back(pi2_kpipipi[0]);
pi2.push_back(pi2_kpipipi[1]);
pi2.push_back(pi2_kpipipi[2]);
pi2.push_back(pi2_kpipipi[3]);
2511 pi3.push_back(pi3_kpipipi[0]);pi3.push_back(pi3_kpipipi[1]);pi3.push_back(pi3_kpipipi[2]);pi3.push_back(pi3_kpipipi[3]);
2513 pdau[0]=kp[0]; pdau[1]=kp[1]; pdau[2]=kp[2] ; pdau[3]=kp[3];
2514 pdau[4]=pi1[0]; pdau[5]=pi1[1]; pdau[6]=pi1[2]; pdau[7]=pi1[3];
2515 pdau[8]=
pi2[0]; pdau[9]=
pi2[1]; pdau[10]=
pi2[2];pdau[11]=
pi2[3];
2516 pdau[12]=pi3[0];pdau[13]=pi3[1];pdau[14]=pi3[2];pdau[15]=pi3[3];
2519 D0 = tKpipipi.
AMP(pdau,1);
2522 std::complex<double> dcs_offset = 0.0601387 *
exp( std::complex<double>(0,1) * 1.04827 *
M_PI / 180. );
2523 D0bar = dcs_offset*tpiKpipi.
AMP(pdau,1);
2524 deltaD0 = ( std::arg(D0 * std::conj(D0bar)) + m_dCF_3 );
2525 r2D0 = std::norm(D0bar)/std::norm(D0);
2527 }
else if( (
num[ kKMinus ] == 1 &&
num[ kPiPlus ] == 1 &&
num[ kPi0 ] == 1 ) && nDaughters == 3 ){
2528 decay_mode = kFlavoredCF_1 ;
2530 r2D0 = pow(m_rCF_1,2) ;
2535 if(m_debug)cout<<
"True K-Pi "<<endl;
2536 decay_mode = kFlavoredCF_0 ;
2538 r2D0 = pow(m_rCF_0,2) ;
2545 if( (
num[ kKMinus ] == 1 &&
num[ kPiPlus ] == 2 &&
num[ kPiMinus ] == 1 ) && nDaughters == 4 ){
2546 decay_mode = kFlavoredCF_3 ;
2550 vector<double> kp; vector<double> pi1; vector<double>
pi2;vector<double> pi3;
2552 pi1.clear();
pi2.clear();pi3.clear();
2555 HepLorentzVector kp_kpipipi = (kMinus_kkpipi.at(0));
2556 HepLorentzVector pi1_kpipipi = (piPlus_4pi.at(0));
2557 HepLorentzVector pi2_kpipipi = (piPlus_4pi.at(1));
2558 HepLorentzVector pi3_kpipipi = (piMinus_4pi.at(0));
2560 kp.push_back( kp_kpipipi[0]); kp.push_back(kp_kpipipi[1]); kp.push_back(kp_kpipipi[2]); kp.push_back(kp_kpipipi[3]);
2561 pi1.push_back(pi1_kpipipi[0]);pi1.push_back(pi1_kpipipi[1]);pi1.push_back(pi1_kpipipi[2]);pi1.push_back(pi1_kpipipi[3]);
2562 pi2.push_back(pi2_kpipipi[0]);
pi2.push_back(pi2_kpipipi[1]);
pi2.push_back(pi2_kpipipi[2]);
pi2.push_back(pi2_kpipipi[3]);
2563 pi3.push_back(pi3_kpipipi[0]);pi3.push_back(pi3_kpipipi[1]);pi3.push_back(pi3_kpipipi[2]);pi3.push_back(pi3_kpipipi[3]);
2565 pdau[0]=kp[0]; pdau[1]=kp[1]; pdau[2]=kp[2] ; pdau[3]=kp[3];
2566 pdau[4]=pi1[0]; pdau[5]=pi1[1]; pdau[6]=pi1[2]; pdau[7]=pi1[3];
2567 pdau[8]=
pi2[0]; pdau[9]=
pi2[1]; pdau[10]=
pi2[2];pdau[11]=
pi2[3];
2568 pdau[12]=pi3[0];pdau[13]=pi3[1];pdau[14]=pi3[2];pdau[15]=pi3[3];
2571 D0 = tKpipipi.
AMP(pdau,1);
2574 std::complex<double> dcs_offset = 0.0601387 *
exp( std::complex<double>(0,1) * 1.04827 *
M_PI / 180. );
2575 D0bar = dcs_offset*tpiKpipi.
AMP(pdau,1);
2576 deltaD0 = - ( std::arg(D0 * std::conj(D0bar)) + m_dCF_3 );
2577 r2D0 = std::norm(D0)/std::norm(D0bar);
2579 }
else if( (
num[ kKMinus ] == 1 &&
num[ kPiPlus ] == 1 &&
num[ kPi0 ] == 1 ) && nDaughters == 3 ){
2580 decay_mode = kFlavoredCF_1 ;
2582 r2D0 = 1. / pow( m_rCF_1,2 ) ;
2587 decay_mode = kFlavoredCF_0 ;
2589 r2D0 = 1. / pow( m_rCF_0,2 ) ;
2595 else if( nAntiStrange == nStrange + 1 )
2599 if( (
num[ kKPlus ] == 1 &&
num[ kPiMinus ] == 2 &&
num[ kPiPlus ] == 1 ) && nDaughters == 4 ){
2600 decay_mode = kFlavoredCFBar_3 ;
2604 vector<double> kp; vector<double> pi1; vector<double>
pi2;vector<double> pi3;
2606 pi1.clear();
pi2.clear();pi3.clear();
2609 HepLorentzVector kp_kpipipi = (kPlus_kkpipi.at(0));
2610 HepLorentzVector pi1_kpipipi = (piMinus_4pi.at(0));
2611 HepLorentzVector pi2_kpipipi = (piMinus_4pi.at(1));
2612 HepLorentzVector pi3_kpipipi = (piPlus_4pi.at(0));
2614 kp.push_back( -kp_kpipipi[0]); kp.push_back(-kp_kpipipi[1]); kp.push_back(-kp_kpipipi[2]); kp.push_back(kp_kpipipi[3]);
2615 pi1.push_back(-pi1_kpipipi[0]);pi1.push_back(-pi1_kpipipi[1]);pi1.push_back(-pi1_kpipipi[2]);pi1.push_back(pi1_kpipipi[3]);
2616 pi2.push_back(-pi2_kpipipi[0]);
pi2.push_back(-pi2_kpipipi[1]);
pi2.push_back(-pi2_kpipipi[2]);
pi2.push_back(pi2_kpipipi[3]);
2617 pi3.push_back(-pi3_kpipipi[0]);pi3.push_back(-pi3_kpipipi[1]);pi3.push_back(-pi3_kpipipi[2]);pi3.push_back(pi3_kpipipi[3]);
2619 pdau[0]=kp[0]; pdau[1]=kp[1]; pdau[2]=kp[2] ; pdau[3]=kp[3];
2620 pdau[4]=pi1[0]; pdau[5]=pi1[1]; pdau[6]=pi1[2]; pdau[7]=pi1[3];
2621 pdau[8]=
pi2[0]; pdau[9]=
pi2[1]; pdau[10]=
pi2[2];pdau[11]=
pi2[3];
2622 pdau[12]=pi3[0];pdau[13]=pi3[1];pdau[14]=pi3[2];pdau[15]=pi3[3];
2625 D0 = tKpipipi.
AMP(pdau,1);
2628 std::complex<double> dcs_offset = 0.0601387 *
exp( std::complex<double>(0,1) * 1.04827 *
M_PI / 180. );
2629 D0bar = dcs_offset*tpiKpipi.
AMP(pdau,1);
2630 deltaD0 = ( std::arg(D0 * std::conj(D0bar)) + m_dCF_3 );
2631 r2D0 = std::norm(D0bar)/std::norm(D0);
2634 }
else if( (
num[ kKPlus ] == 1 &&
num[ kPiMinus ] == 1 &&
num[ kPi0 ] == 1 ) && nDaughters == 3 ){
2635 decay_mode = kFlavoredCFBar_1 ;
2637 r2D0 = pow(m_rCF_1,2) ;
2642 decay_mode = kFlavoredCFBar_0 ;
2644 r2D0 = pow(m_rCF_0,2) ;
2651 if( (
num[ kKPlus ] == 1 &&
num[ kPiMinus ] == 2 &&
num[ kPiPlus ] == 1 ) && nDaughters == 4 ){
2652 decay_mode = kFlavoredCFBar_3 ;
2656 vector<double> kp; vector<double> pi1; vector<double>
pi2;vector<double> pi3;
2658 pi1.clear();
pi2.clear();pi3.clear();
2661 HepLorentzVector kp_kpipipi = (kPlus_kkpipi.at(0));
2662 HepLorentzVector pi1_kpipipi = (piMinus_4pi.at(0));
2663 HepLorentzVector pi2_kpipipi = (piMinus_4pi.at(1));
2664 HepLorentzVector pi3_kpipipi = (piPlus_4pi.at(0));
2666 kp.push_back( -kp_kpipipi[0]); kp.push_back(-kp_kpipipi[1]); kp.push_back(-kp_kpipipi[2]); kp.push_back(kp_kpipipi[3]);
2667 pi1.push_back(-pi1_kpipipi[0]);pi1.push_back(-pi1_kpipipi[1]);pi1.push_back(-pi1_kpipipi[2]);pi1.push_back(pi1_kpipipi[3]);
2668 pi2.push_back(-pi2_kpipipi[0]);
pi2.push_back(-pi2_kpipipi[1]);
pi2.push_back(-pi2_kpipipi[2]);
pi2.push_back(pi2_kpipipi[3]);
2669 pi3.push_back(-pi3_kpipipi[0]);pi3.push_back(-pi3_kpipipi[1]);pi3.push_back(-pi3_kpipipi[2]);pi3.push_back(pi3_kpipipi[3]);
2671 pdau[0]=kp[0]; pdau[1]=kp[1]; pdau[2]=kp[2] ; pdau[3]=kp[3];
2672 pdau[4]=pi1[0]; pdau[5]=pi1[1]; pdau[6]=pi1[2]; pdau[7]=pi1[3];
2673 pdau[8]=
pi2[0]; pdau[9]=
pi2[1]; pdau[10]=
pi2[2];pdau[11]=
pi2[3];
2674 pdau[12]=pi3[0];pdau[13]=pi3[1];pdau[14]=pi3[2];pdau[15]=pi3[3];
2677 D0 = tKpipipi.
AMP(pdau,1);
2680 std::complex<double> dcs_offset = 0.0601387 *
exp( std::complex<double>(0,1) * 1.04827 *
M_PI / 180. );
2681 D0bar = dcs_offset*tpiKpipi.
AMP(pdau,1);
2682 deltaD0 = - ( std::arg(D0 * std::conj(D0bar)) + m_dCF_3 );
2683 r2D0 = std::norm(D0)/std::norm(D0bar);
2685 }
else if( (
num[ kKPlus ] == 1 &&
num[ kPiMinus ] == 1 &&
num[ kPi0 ] == 1 ) && nDaughters == 3 ){
2686 decay_mode = kFlavoredCFBar_1 ;
2688 r2D0 = 1. / pow( m_rCF_1,2 ) ;
2693 decay_mode = kFlavoredCFBar_0 ;
2695 r2D0 = 1. / pow( m_rCF_0,2 ) ;
2701 else if( nStrange == nAntiStrange )
2703 if( (
num[ kKPlus ] > 0 &&
2704 (
num[ kKPlus ] ==
num[ kFVMinus ] ||
2705 num[ kKPlus ] == nFV0Bar ) ) ||
2709 (
num[ kPiPlus ] > 0 &&
2710 num[ kPiPlus ] ==
num[ kUFVMinus ] ) )
2712 decay_mode = kFlavoredCS ;
2717 r2D0 = pow( m_rCS, 2 ) ;
2722 r2D0 = 1. / pow( m_rCS, 2 ) ;
2726 else if( (
num[ kKMinus ] > 0 && (
num[ kKMinus ] ==
num[ kFVPlus ] ||
num[ kKMinus ] == nFV0 ) ) ||
2727 ( nK0 > 0 && nFV0 != nFV0Bar && nK0 == nFV0 ) ||
2728 (
num[ kPiMinus ] > 0 &&
num[ kPiMinus ] ==
num[ kUFVPlus ] ) )
2730 decay_mode = kFlavoredCSBar ;
2735 r2D0 = pow( m_rCS, 2 ) ;
2740 r2D0 = 1. / pow( m_rCS, 2 ) ;
2748 else if( ( nDaughters >= 3 &&
num[ kPiPlus ] ==
num[ kPiMinus ] &&
2749 num[ kKPlus ] ==
num[ kKMinus ] && nChargedPiK + nCPEig == nDaughters ) ||
2750 nUFV0 == nDaughters ||
2751 (
num[ kKStar0 ] > 0 &&
num[ kKStar0 ] ==
num[ kKStar0Bar ] ) ||
2752 (
num[ kK10 ] > 0 &&
num[ kK10 ] ==
num[ kK10Bar ] ) ||
2753 (
num[ kUFVPlus ] == 1 &&
num[ kUFVMinus ] == 1 )
2757 log << MSG::DEBUG <<
" [ Self-conjugate mixed-CP ]" << endmsg ;
2759 if( RandFlat::shoot() > 0.5 )
2761 if( RandFlat::shoot() > 0.5 )
2763 decay_mode = kCPPlus ;
2771 decay_mode = kCPMinus ;
2788 cutoff = 1. - cutoff ;
2791 log << MSG::DEBUG <<
" [ cutoff = " << cutoff <<
" ]" << endmsg ;
2793 decay_mode = ( RandFlat::shoot() > cutoff ) ? kFlavoredCF_0 : kFlavoredCFBar_0 ;
2795 if( ( decay_mode == kFlavoredCF_0 && charm == 1 ) ||
2796 ( decay_mode == kFlavoredCFBar_0 && charm == -1 ) )
2800 r2D0 = sqrt( m_rCF_0 ) ;
2807 r2D0 = 1. / sqrt( m_rCF_0 ) ;
2818 cutoff = 1. - cutoff ;
2821 log << MSG::DEBUG <<
" [ cutoff = " << cutoff <<
" ]" << endmsg ;
2823 decay_mode = ( RandFlat::shoot() > cutoff ) ?
2824 kFlavoredCS : kFlavoredCSBar ;
2827 if( ( decay_mode == kFlavoredCS && charm == 1 ) ||
2828 ( decay_mode == kFlavoredCSBar && charm == -1 ) )
2830 r2D0 = sqrt( m_rCS ) ;
2835 r2D0 = 1. / sqrt( m_rCS ) ;
2843 if (
num[kUnknown] >= 1)
2845 cout <<
"decay mode " << decay_mode << endl ;
2846 cout <<
"D #" << charm << endl ;
2847 cout <<
"pi+: " <<
num[ kPiPlus ] << endl ;
2848 cout <<
"pi-: " <<
num[ kPiMinus ] << endl ;
2849 cout <<
"pi0: " <<
num[ kPi0 ] << endl ;
2850 cout <<
"eta: " <<
num[ kEta ] << endl ;
2851 cout <<
"eta': " <<
num[ kEtaPrime ] << endl ;
2852 cout <<
"f0/a0: " <<
num[ kNeutralScalar ] << endl ;
2853 cout <<
"UFV+: " <<
num[ kUFVPlus ] << endl ;
2854 cout <<
"UFV-: " <<
num[ kUFVMinus ] << endl ;
2855 cout <<
"rho0: " <<
num[ kRho0 ] << endl ;
2856 cout <<
"omega: " <<
num[ kOmega ] << endl ;
2857 cout <<
"phi: " <<
num[ kPhi ] << endl ;
2858 cout <<
"K+: " <<
num[ kKPlus ] << endl ;
2859 cout <<
"K-: " <<
num[ kKMinus ] << endl ;
2860 cout <<
"K0S: " <<
num[ kK0S ] << endl ;
2861 cout <<
"K0L: " <<
num[ kK0L ] << endl ;
2862 cout <<
"FV+: " <<
num[ kFVPlus ] << endl ;
2863 cout <<
"FV-: " <<
num[ kFVMinus ] << endl ;
2864 cout <<
"K*0: " <<
num[ kKStar0 ] << endl ;
2865 cout <<
"K*0b: " <<
num[ kKStar0Bar ] << endl ;
2866 cout <<
"K10: " <<
num[ kK10 ] << endl ;
2867 cout <<
"K10b: " <<
num[ kK10Bar ] << endl ;
2868 cout <<
"l+: " <<
num[ kLeptonPlus ] << endl ;
2869 cout <<
"l-: " <<
num[ kLeptonMinus ] << endl ;
2870 cout <<
"nu: " <<
num[ kNeutrino ] << endl ;
2871 cout <<
"gamma: " <<
num[ kGamma ] << endl ;
2872 cout <<
"Unknown: " <<
num[ 25 ] << endl ;
2876 d0_info[0]=decay_mode;
2883 d0_info[7]= double (isKsPiPi);