LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenBase - EvtPto3PAmpSmpResolution.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 19 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: D. Dujmic, ddujmic@slac.stanford.edu
       6             :  *
       7             :  * Copyright (C) 2005 SLAC
       8             :  *
       9             :  *******************************************************************************/
      10             : 
      11             : #include <assert.h>
      12             : #include <math.h>
      13             : #include <iostream>
      14             : #include "EvtGenBase/EvtComplex.hh"
      15             : #include "EvtGenBase/EvtPto3PAmpSmpResolution.hh"
      16             : #include "EvtGenBase/EvtPto3PAmp.hh"
      17             : #include "EvtGenBase/EvtDalitzCoord.hh"
      18             : #include "EvtGenBase/EvtCyclic3.hh"
      19             : using std::cout;
      20             : using std::endl;
      21             : using EvtCyclic3::Index;
      22             : using EvtCyclic3::Pair;
      23             : 
      24             : 
      25             : 
      26             : EvtPto3PAmpSmpResolution::EvtPto3PAmpSmpResolution(EvtDalitzPlot dp, Pair pairAng, Pair pairRes, 
      27             :                                                    EvtSpinType::spintype spin, 
      28             :                                                    const EvtPropagator& prop, NumType typeN) 
      29           0 :   : EvtPto3PAmp(dp, pairAng, pairRes, spin, prop, typeN)
      30           0 : {}
      31             : 
      32             : 
      33             : 
      34             : EvtPto3PAmpSmpResolution::EvtPto3PAmpSmpResolution(const EvtPto3PAmp& other) 
      35           0 :   : EvtPto3PAmp(other)
      36           0 : {}
      37             : 
      38             : 
      39             : EvtPto3PAmpSmpResolution::~EvtPto3PAmpSmpResolution()
      40           0 : {}
      41             : 
      42             : 
      43             : EvtComplex 
      44             : EvtPto3PAmpSmpResolution::evalPropagator(double m) const
      45             : {
      46           0 :   EvtComplex prop(0,0);
      47             :   
      48           0 :   if (_sigma>0) { // convolved
      49             :     int nconv=20;
      50           0 :     double min=m+_bias-_sigma*2.5;
      51           0 :     double max=m+_bias+_sigma*2.5;
      52           0 :     double dm=(max-min)/nconv;
      53           0 :     static double  sqrt2pi = sqrt(2*3.14159);
      54           0 :     double ifact = 1./(sqrt2pi*_sigma);
      55           0 :     for (int i=0;i<nconv; i++) {
      56           0 :       double mprime = min+dm*(i+0.5);
      57           0 :       double t = (mprime-m)/_sigma;
      58           0 :       prop += ifact * exp(-0.5*t*t)*EvtPto3PAmp::evalPropagator(m)*dm;
      59             :     }
      60           0 :   } else {
      61           0 :     prop = EvtPto3PAmp::evalPropagator(m);
      62             :   }
      63             : 
      64           0 :   return prop;
      65             : }

Generated by: LCOV version 1.11