MINT2
Flatte.cpp
Go to the documentation of this file.
1 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
2 // status: Mon 9 Feb 2009 19:18:04 GMT
3 #include "Mint/Flatte.h"
4 
7 
8 #include <cmath>
9 #include <iostream>
10 
11 using namespace std;
12 using namespace MINT;
13 
14 double Flatte::gPi()const{
15  return mumsFittableProperties().fitFlatte_gPi();
16 }
17 double Flatte::gK()const{
18  return mumsFittableProperties().fitFlatte_gK_by_gPi() * gPi();
19 }
20 
21 double Flatte::pdgMass(int PDG_ID) {
22  return ParticlePropertiesList::mass(PDG_ID);
23 }
24 double Flatte::mPi0(){
25  if (_pi0Mass <= 0){
26  _pi0Mass = pdgMass(111);
27  }
28  return _pi0Mass;
29 }
30 double Flatte::mPiPlus(){
31  if (_piPlusMass <= 0){
32  _piPlusMass = pdgMass(211);
33  }
34  return _piPlusMass;
35 }
36 double Flatte::mK0(){
37  if (_K0Mass <= 0){
38  _K0Mass = pdgMass(311);
39  }
40  return _K0Mass;
41 }
42 double Flatte::mKPlus(){
43  if (_KPlusMass <= 0){
44  _KPlusMass = pdgMass(321);
45  }
46  return _KPlusMass;
47 }
48 
49 std::complex<double> Flatte::aSqrtTerm( const double& m0, const double& m ){
50  const bool dbThis=false;
51 
52  const double a2 = 1.0 - (2*m0/m)*(2*m0/m);
53  std::complex<double> a;
54 
55  if( a2 < 0 ){
56  if(dbThis){
57  std::cout << "WARNING in Flatte::aSqrtTerm()"
58  << " sqrt( 1.0 - (2m0/m)^2 ) imaginary"
59  << " (returning an imaginary number)."
60  << std::endl;
61  }
62  const std::complex<double> i(0.0, 1.0);
63  a = i * sqrt(fabs(a2));
64  }else{
65  const std::complex<double> unit(1.0, 0.0);
66  a = ((std::complex<double>) sqrt(a2)) * unit;
67  }
68  return a;
69 }
70 
71 
72 std::complex<double> Flatte::complexGofM(){
73  bool dbThis=false;
74 
75  double m = BW_BW::mumsRecoMass();
76 
77  std::complex<double> Gpipi = (1./3.) * aSqrtTerm( mPi0(), m )
78  + (2./3.) * aSqrtTerm( mPiPlus(), m );
79 
80 
81  std::complex<double> GKK = (1./2.) * aSqrtTerm( mK0(), m )
82  + (1./2.) * aSqrtTerm( mKPlus(), m );
83 
84  std::complex<double> FlatteWidth = gPi() * Gpipi + gK() * GKK;
85  if(dbThis){
86  cout << "Flatte: compare Flatte Width = " << FlatteWidth
87  << " BW_BW::GofM() " << BW_BW::GofM()
88  << endl;
89  }
90  return FlatteWidth;
91 }
92 
93 double Flatte::GofM(){
94  cout << "ERROR Flatte::GofM() called should not have happenned!" <<endl;
95  std::complex<double> val = complexGofM();
96  return abs(val);
97 }
98 
99 std::complex<double> Flatte::BreitWigner() {
100  double mpdg = mumsMass();
101  std::complex<double> i(0.0, 1.0);
102  std::complex<double> invBW = (((std::complex<double>) mpdg*mpdg -
103  mumsRecoMass2()) - i * mpdg * complexGofM());
104  return 1.*GeV*GeV/invBW;
105 
106 }
107 
double mK0()
Definition: Flatte.cpp:36
static std::complex< double > aSqrtTerm(const double &a, const double &b)
Definition: Flatte.cpp:49
double mPi0()
Definition: Flatte.cpp:24
static double pdgMass(int PDG_ID)
Definition: Flatte.cpp:21
std::complex< double > complexGofM()
Definition: Flatte.cpp:72
virtual std::complex< double > BreitWigner()
Definition: Flatte.cpp:99
double gPi() const
Definition: Flatte.cpp:14
static const double m
static const double GeV
double mPiPlus()
Definition: Flatte.cpp:30
double gK() const
Definition: Flatte.cpp:17
virtual double GofM()
Definition: BW_BW.cpp:1035
double mKPlus()
Definition: Flatte.cpp:42
virtual double mumsRecoMass() const
Definition: BW_BW.cpp:631
virtual double GofM()
Definition: Flatte.cpp:93
static double mass(const std::string &name)