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

          Line data    Source code
       1             : /*******************************************************************************
       2             :  * Project: BaBar detector at the SLAC PEP-II B-factory 
       3             :  * Package: EvtGenBase 
       4             :  *  Author: Denis Dujmic, ddujmic@slac.stanford.edu               
       5             :  *  
       6             :  * Copyright (C) 2005 SLAC   
       7             :  *******************************************************************************/
       8             : 
       9             : #include <assert.h>
      10             : #include <math.h>
      11             : #include <iostream>
      12             : #include "EvtGenBase/EvtComplex.hh"
      13             : #include "EvtGenBase/EvtLASSAmp.hh"
      14             : #include "EvtGenBase/EvtDalitzCoord.hh"
      15             : #include "EvtGenBase/EvtdFunction.hh"
      16             : #include "EvtGenBase/EvtCyclic3.hh"
      17             : using std::endl;
      18             : using EvtCyclic3::Index;
      19             : using EvtCyclic3::Pair;
      20             : 
      21             : 
      22             : EvtLASSAmp::EvtLASSAmp(EvtDalitzPlot *dp, 
      23             :                        EvtCyclic3::Pair pair,
      24             :                        double m0, double g0,
      25             :                        double a, double r, double cutoff, std::string subtype) :
      26           0 :   EvtAmplitude<EvtDalitzPoint>(),
      27           0 :   _pair(pair),
      28           0 :   _m0(m0),
      29           0 :   _g0(g0),
      30           0 :   _r(r),
      31           0 :   _a(a),
      32           0 :   _cutoff(cutoff),
      33           0 :   _subtype(subtype)
      34           0 : {
      35           0 :   _dalitzSpace = dp;
      36           0 :   double ma = dp->m( first(pair) );
      37           0 :   double mb = dp->m( second(pair) );
      38           0 :   double E0a  = 0.5 * (_m0*_m0 + ma*ma - mb*mb) / _m0;
      39           0 :   _q0 = E0a*E0a - ma*ma;
      40           0 :   assert(_q0>0);
      41           0 :   _q0 = sqrt(_q0);
      42           0 : }
      43             : 
      44             : 
      45             : 
      46             : EvtLASSAmp::EvtLASSAmp(const EvtLASSAmp& other) :
      47           0 :   EvtAmplitude<EvtDalitzPoint>(other),
      48           0 :   _pair(other._pair),
      49           0 :   _m0(other._m0),
      50           0 :   _g0(other._g0),
      51           0 :   _q0(other._q0),
      52           0 :   _r(other._r),
      53           0 :   _a(other._a),
      54           0 :   _cutoff(other._cutoff),
      55           0 :   _subtype(other._subtype)
      56             : 
      57           0 : {  
      58           0 :   _dalitzSpace = other._dalitzSpace;
      59           0 : }
      60             : 
      61             : 
      62           0 : EvtLASSAmp::~EvtLASSAmp() {}
      63             : 
      64             : 
      65             : 
      66             : EvtComplex 
      67             : EvtLASSAmp::amplitude(const EvtDalitzPoint &dalitzPoint) const {
      68             :   
      69             :   /*
      70             : 
      71             :     Parameterization of Kpi S-wave using LASS scattering data.
      72             :     - Nucl.Phys.B296, 493 (1988)
      73             :     - W.Dunwoodie,http://www.slac.stanford.edu/~wmd/kpi_swave/kpi_swave_fit.note
      74             : 
      75             :             m                                     m0^2*Gamma0/q0
      76             :     ----------------- + exp(2*i*delta) * --------------------------------
      77             :     q*cot(delta)-i*q                     m0^2-m^2 - i*m0*Gamma0*q/m*m0/q0
      78             : 
      79             : 
      80             :     where q = momentum of K or pi in Kpi system
      81             :           
      82             :           q*cot(delta) = 1/ a   + 1/2 * [ r * q**2 ]
      83             : 
      84             :           a = scattering length
      85             : 
      86             :           r = effective range
      87             : 
      88             :   */
      89             : 
      90           0 :   double s = dalitzPoint.q(_pair);
      91           0 :   double m = sqrt(s);
      92           0 :   double q = dalitzPoint.p(first(_pair), _pair);
      93             : 
      94             :   // elastic scattering 
      95           0 :   double qcotd = 1./_a + 0.5*_r*q*q;
      96           0 :   EvtComplex lass_elastic = m<_cutoff ? m / ( qcotd - EvtComplex(0,q) ) : 0;
      97             : 
      98             :   // relative phase
      99             :   double cosd=1;
     100             :   double sind=0;
     101           0 :   if (q>0) {
     102           0 :     cosd = qcotd*qcotd/(q*q);
     103           0 :     cosd = sqrt( cosd/(1+cosd) );
     104           0 :     sind = sqrt( 1-cosd*cosd );
     105           0 :   }
     106           0 :   EvtComplex lass_phase( cosd, sind);
     107           0 :   lass_phase *= lass_phase;
     108             : 
     109             :   // K*(1430)
     110           0 :   double gamma = _g0 * q/m * _m0/_q0;
     111           0 :   EvtComplex lass_Kstar = (_m0*_m0)*(_g0/_q0)/(_m0*_m0-m*m-EvtComplex(0.,_m0*gamma));   
     112             : 
     113           0 :   EvtComplex theAmplitude(0.0, 0.0);
     114             : 
     115           0 :   if (_subtype == "LASS_ELASTIC") {
     116             : 
     117           0 :     theAmplitude = lass_elastic;
     118             : 
     119           0 :   } else if (_subtype == "LASS_RESONANT") {
     120             : 
     121           0 :     theAmplitude = lass_phase * lass_Kstar;
     122             : 
     123           0 :   } else {
     124             : 
     125           0 :     theAmplitude = lass_phase * lass_Kstar + lass_elastic;
     126             : 
     127             :   }
     128             : 
     129             :   return theAmplitude;
     130             :  
     131           0 : }

Generated by: LCOV version 1.11