LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenBase - EvtNonresonantAmp.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 44 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 8 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             :  *  Author: Denis Dujmic, ddujmic@slac.stanford.edu               
       6             :  *  
       7             :  * Copyright (C) 2005 SLAC   
       8             :  *******************************************************************************/
       9             : 
      10             : #include <assert.h>
      11             : #include <math.h>
      12             : #include <iostream>
      13             : #include "EvtGenBase/EvtComplex.hh"
      14             : #include "EvtGenBase/EvtNonresonantAmp.hh"
      15             : #include "EvtGenBase/EvtDalitzCoord.hh"
      16             : #include "EvtGenBase/EvtdFunction.hh"
      17             : #include "EvtGenBase/EvtCyclic3.hh"
      18             : using std::endl;
      19             : using EvtCyclic3::Index;
      20             : using EvtCyclic3::Pair;
      21             : 
      22             : 
      23             : EvtNonresonantAmp::EvtNonresonantAmp(EvtDalitzPlot *dp, 
      24             :                                      EvtPto3PAmp::NumType type, 
      25             :                                      EvtCyclic3::Pair pair1, double par1, 
      26             :                                      EvtCyclic3::Pair pair2, double par2,
      27             :                                      EvtSpinType::spintype spin) :
      28           0 :   EvtAmplitude<EvtDalitzPoint>(),
      29           0 :   _type(type),
      30           0 :   _pair1(pair1),
      31           0 :   _pair2(pair2),
      32           0 :   _par1(par1),
      33           0 :   _par2(par2),
      34           0 :   _spin(spin)
      35           0 : {
      36           0 :   _dalitzSpace = dp;
      37           0 : }
      38             : 
      39             : 
      40             : 
      41             : EvtNonresonantAmp::EvtNonresonantAmp(const EvtNonresonantAmp& other) :
      42           0 :   EvtAmplitude<EvtDalitzPoint>(other),
      43           0 :   _type(other._type), 
      44           0 :   _pair1(other._pair1),
      45           0 :   _pair2(other._pair2),
      46           0 :   _par1(other._par1),
      47           0 :   _par2(other._par2),
      48           0 :   _spin(other._spin)
      49           0 : {
      50           0 :   _dalitzSpace = other._dalitzSpace;
      51           0 : }
      52             : 
      53             : 
      54           0 : EvtNonresonantAmp::~EvtNonresonantAmp() {}
      55             : 
      56             : 
      57             : 
      58             : EvtComplex 
      59             : EvtNonresonantAmp::amplitude(const EvtDalitzPoint &dalitzPoint) const {
      60             :   
      61             :   // flat model
      62           0 :   if (_type==EvtPto3PAmp::NONRES) { return 1; } 
      63             : 
      64             :   // "linear model" (prop. to m^2)
      65           0 :   else if (_type==EvtPto3PAmp::NONRES_LIN) { 
      66           0 :     return dalitzPoint.q(_pair1);  
      67             :   }
      68             : 
      69             :   // Chen-Chua-Soni 
      70           0 :   else if (_type==EvtPto3PAmp::NONRES_CCS) {
      71           0 :     double s    =  dalitzPoint.q(_pair1);
      72           0 :     double smin = _dalitzSpace->qAbsMin(_pair1);
      73           0 :     return sqrt(s-smin)/(s*log(s*_par1));  
      74             :   } 
      75             : 
      76             :   // exp{par*m^2) (Belle model, Garmash et al, PRD71)
      77           0 :   else if (_type==EvtPto3PAmp::NONRES_EXP) { 
      78           0 :     return exp( _par1*dalitzPoint.q(_pair1) );
      79             :   } 
      80             :   
      81             :   // exp(par1*m12^2 + par2*m13^2) (Belle model, Garmash et al, PRD71)
      82           0 :   else if (_type==EvtPto3PAmp::NONRES_EXP_ADD) { 
      83           0 :     return exp( _par1*dalitzPoint.q(_pair1) + _par2*dalitzPoint.q(_pair2) );
      84             :   } 
      85             : 
      86             :   // Laura model (P.Harrison et al, BAD806)
      87           0 :   else if (_type==EvtPto3PAmp::NONRES_LAURA) {
      88           0 :     double m    = sqrt( dalitzPoint.q(_pair1));
      89           0 :     double mmin = sqrt(_dalitzSpace->qAbsMin(_pair1));
      90           0 :     double dm = m-mmin;
      91           0 :     assert(dm>0);
      92             :     double cosTh = 1;
      93           0 :     int ispin = EvtSpinType::getSpin2(_spin);
      94           0 :     if (ispin>0) {
      95           0 :       cosTh = dalitzPoint.cosTh( EvtCyclic3::next(_pair1), _pair1);
      96           0 :       if (ispin>2) cosTh *= cosTh;
      97             :     }
      98           0 :     return   pow(dm,_par1) * exp( dm*_par2 ) * cosTh;  
      99             :   } 
     100             : 
     101           0 :   return 0;
     102           0 : }

Generated by: LCOV version 1.11