]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenBase/EvtPropBreitWigner.cpp
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenBase / EvtPropBreitWigner.cpp
1 #include "EvtGenBase/EvtPatches.hh"
2 /*******************************************************************************
3  * Project: BaBar detector at the SLAC PEP-II B-factory
4  * Package: EvtGenBase
5  *    File: $Id: EvtPropBreitWigner.cpp,v 1.3 2009-03-16 15:44:41 robbep Exp $
6  *  Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002
7  *
8  * Copyright (C) 2002 Caltech
9  *******************************************************************************/
10
11 #include <math.h>
12 #include "EvtGenBase/EvtConst.hh"
13 #include "EvtGenBase/EvtPropBreitWigner.hh"
14
15
16 EvtPropBreitWigner::EvtPropBreitWigner(double m0, double g0) 
17   : EvtPropagator(m0,g0) 
18 {}
19
20
21 EvtPropBreitWigner::EvtPropBreitWigner(const EvtPropBreitWigner& other) 
22   : EvtPropagator(other)
23 {}
24   
25  
26 EvtPropBreitWigner::~EvtPropBreitWigner() 
27 {}
28   
29
30 EvtAmplitude<EvtPoint1D>* EvtPropBreitWigner::clone() const
31
32   return new EvtPropBreitWigner(*this); 
33 }
34
35
36 EvtComplex EvtPropBreitWigner::amplitude(const EvtPoint1D& x) const
37 {
38   double m = x.value();
39   EvtComplex value = sqrt(_g0/EvtConst::twoPi)/(m-_m0-EvtComplex(0.0,_g0/2.));
40   return value;
41 }