LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenBase - EvtPropGounarisSakurai.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 53 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 13 0.0 %

          Line data    Source code
       1             : #include "EvtGenBase/EvtPatches.hh"
       2             : /*******************************************************************************
       3             :  * Project: BaBar detector at the SLAC PEP-II B-factory
       4             :  * Package: EvtGenBase
       5             :  *    File: $Id: EvtPropGounarisSakurai.cpp,v 1.1 2009-03-16 16:47:03 robbep Exp $
       6             :  *  Author: Matt Graham 
       7             :  *  modified from EvtPropBreitWignerRel...this should be used for rho's
       8             :  *******************************************************************************/
       9             : 
      10             : #include <math.h>
      11             : #include "EvtGenBase/EvtPropGounarisSakurai.hh"
      12             : 
      13             : 
      14             : EvtPropGounarisSakurai::EvtPropGounarisSakurai(EvtDalitzPlot *dp, 
      15             :               EvtCyclic3::Pair pair, double m0, double g0) 
      16           0 :   : EvtPropagator(m0,g0),_pair(pair),_gbase(g0)
      17           0 : {
      18           0 :   _dalitzSpace = dp;
      19           0 :   _m1= dp->m(EvtCyclic3::first(_pair));
      20           0 :   _m2= dp->m(EvtCyclic3::second(_pair));
      21           0 : }
      22             : 
      23             : 
      24             : EvtPropGounarisSakurai::EvtPropGounarisSakurai(const EvtPropGounarisSakurai& other) 
      25           0 :   : EvtPropagator(other), _pair(other._pair), _gbase(other._gbase), 
      26           0 :     _m1(other._m1), _m2(other._m2)
      27           0 : {
      28           0 : _dalitzSpace = other._dalitzSpace;
      29           0 : }
      30             : 
      31             : 
      32             : EvtPropGounarisSakurai::~EvtPropGounarisSakurai() 
      33           0 : {}
      34             :   
      35             : 
      36             : EvtAmplitude<EvtPoint1D>* EvtPropGounarisSakurai::clone() const
      37             : { 
      38           0 :   return new EvtPropGounarisSakurai(*this); 
      39           0 : }
      40             : 
      41             : 
      42             : EvtComplex EvtPropGounarisSakurai::amplitude(const EvtPoint1D& x) const
      43             : {
      44           0 :   double m = x.value();
      45           0 :   double s = m*m;
      46           0 :   double m2=_m0*_m0;
      47           0 :   double _width=_gbase;
      48             :   double _mass=_m0;
      49             : 
      50           0 :   double A = ( 1 + dFun( m2 )*_width/_mass );
      51           0 :   double B = s - m2 - fsFun( s );
      52             :   //  double C = sqrt(s)*_g0;//wrong!
      53           0 :   double C = sqrt(m2)*_g0;//correct!
      54           0 :   double D = B*B + C*C;
      55             : 
      56           0 :   EvtComplex rpt( A*B/D, - A*C/D );
      57             :   return rpt;
      58             : 
      59             : 
      60           0 : }
      61             : 
      62             : //  adapted from RhoPiTools
      63             : double EvtPropGounarisSakurai::fsFun( double s ) const
      64             : {
      65           0 :   double m2=_m0*_m0;
      66             : 
      67           0 :   EvtTwoBodyKine vd(_m1,_m2,sqrt(s));
      68           0 :   EvtTwoBodyKine vR(_m1,_m2,_m0);
      69           0 :   double k_s   = vd.p();
      70           0 :   double k_Am2 = vR.p();
      71             :   //  
      72           0 :   double f     = _gbase * m2 / pow( k_Am2, 3 )
      73           0 :                    * ( 
      74           0 :                        pow( k_s, 2 ) * (hFun( s ) - hFun( m2 ))
      75           0 :                        + (m2 - s) * pow( k_Am2, 2 ) * dh_dsFun( m2 )
      76             :                      );
      77             : 
      78             :   return f;
      79           0 : }
      80             : 
      81             : 
      82             : double EvtPropGounarisSakurai::hFun( double s ) const
      83             : {
      84           0 :   double sm    = _m1 + _m2;
      85           0 :   double SQRTs = sqrt(s);
      86           0 :   EvtTwoBodyKine vd(_m1,_m2,sqrt(s));
      87           0 :   double k_s   = vd.p();
      88             : 
      89           0 :   return 2/EvtConst::pi * (k_s/SQRTs) * log( (SQRTs + 2*k_s)/(sm) );
      90           0 : }
      91             : 
      92             : double EvtPropGounarisSakurai::dh_dsFun( double s ) const
      93             : {  
      94           0 :   EvtTwoBodyKine vd(_m1,_m2,sqrt(s));
      95           0 :   double k_s   = vd.p();
      96             :  
      97           0 :   return hFun(s) * ( 1/(8*pow( k_s, 2)) - 1/(2*s) ) + 1/(2*EvtConst::pi*s);
      98           0 : }
      99             : 
     100             : double EvtPropGounarisSakurai::dFun( double s ) const
     101             : {
     102           0 :   double sm   = _m1 + _m2;
     103           0 :   double sm24 = sm*sm/4;
     104           0 :   double m    = sqrt(s);
     105           0 :   EvtTwoBodyKine vd(_m1,_m2,sqrt(s));
     106           0 :   double k_m2   = vd.p();
     107           0 :   double _pi=EvtConst::pi;
     108             : 
     109           0 :   return 3.0/_pi * sm24/pow( k_m2, 2 ) * log( (m + 2*k_m2)/sm ) 
     110           0 :          + m/(2*_pi*k_m2) - sm24*m/(_pi * pow( k_m2, 3 ));
     111           0 : }
     112             : 

Generated by: LCOV version 1.11