evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
EvtPto3PAmpSmpResolution.cpp
Go to the documentation of this file.
1 
2 /***********************************************************************
3 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4 * *
5 * This file is part of EvtGen. *
6 * *
7 * EvtGen is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * EvtGen is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19 ***********************************************************************/
20 
22 
23 #include "EvtGenBase/EvtComplex.hh"
24 #include "EvtGenBase/EvtCyclic3.hh"
26 #include "EvtGenBase/EvtPatches.hh"
28 
29 #include <assert.h>
30 #include <iostream>
31 #include <math.h>
32 using EvtCyclic3::Index;
33 using EvtCyclic3::Pair;
34 using std::cout;
35 using std::endl;
36 
38  Pair pairAng, Pair pairRes,
40  const EvtPropagator& prop,
41  NumType typeN ) :
42  EvtPto3PAmp( dp, pairAng, pairRes, spin, prop, typeN )
43 {
44 }
45 
47 {
48  EvtComplex prop( 0, 0 );
49 
50  if ( _sigma > 0 ) { // convolved
51  int nconv = 20;
52  double min = m + _bias - _sigma * 2.5;
53  double max = m + _bias + _sigma * 2.5;
54  double dm = ( max - min ) / nconv;
55  static double sqrt2pi = sqrt( 2 * 3.14159 );
56  double ifact = 1. / ( sqrt2pi * _sigma );
57  for ( int i = 0; i < nconv; i++ ) {
58  double mprime = min + dm * ( i + 0.5 );
59  double t = ( mprime - m ) / _sigma;
60  prop += ifact * exp( -0.5 * t * t ) *
62  }
63  } else {
64  prop = EvtPto3PAmp::evalPropagator( m );
65  }
66 
67  return prop;
68 }
virtual EvtComplex evalPropagator(double m) const
Definition: EvtPto3PAmp.hh:84
EvtPto3PAmpSmpResolution(EvtDalitzPlot dp, EvtCyclic3::Pair pairAng, EvtCyclic3::Pair pairRes, EvtSpinType::spintype spin, const EvtPropagator &prop, NumType typeN)
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:240
EvtComplex evalPropagator(double m) const override