ROOTPWA
pipi.C
Go to the documentation of this file.
1 // Following Eef van Beveren & George Rupp
2 // arXiv:hep-ph/073286v1
3 
4 #include <complex>
5 #include <iostream>
6 #include <vector>
7 #include <map>
8 #include "TMath.h"
9 #include "TGraph.h"
10 #include "TCanvas.h"
11 #include "SpecFuncMathMore.h"
12 
13 using namespace ROOT::Math;
14 using namespace std;
15 
16 double const mpi=0.13957018;
17 double const mpi2=mpi*mpi;
18 double const mK=0.493677;
19 double const meta=0.547853;
20 double const mK2=mK*mK;
21 
22 typedef pair<double,double> tchannel;
23 
24 // confinement spectrum (Equation 1):
25 double confLevel(unsigned int n){
26  double omega=0.19; // strength of confinement potential
27  double E01 = 1.30; // zero point energy
28  return E01 + 2*n*omega;
29 }
30 
31 
32 double ladderSum(double E, unsigned int n=5){
33  double sum=0;
34  for(unsigned int i=0;i<n;++i){
35  double g0l=(i+1)*TMath::Power(4.0,-(double)i);
36  sum+= g0l/(confLevel(i)-E);
37  }
38  return sum;
39 }
40 
41 std::complex<double> sph_hankel1( unsigned int l, double x){
42  return std::complex<double>(sph_bessel(l,x),sph_neumann(l,x));
43 }
44 
45 std::complex<double> tscat(double E, const vector<tchannel>& channels,
46  unsigned int i){
47  const double a=2.90; // 1/GeV
48  const double lambda2=1.29*1.29;
49  const complex<double> ic(0,1);
50 
51  // loop over channels
52  complex<double> sum=0;
53  for(unsigned int iCh=0;iCh<channels.size();iCh++){
54  double m1=channels[iCh].first;
55  double m2=channels[iCh].second;
56  //if((m1+m2)>E)continue; // threshold!
57  double m22=m1+m2; m22=m22*m22;
58  double m12=m1*m2;
59  double p=sqrt(m12/m22*fabs((E*E-m22)));
60  //if((m1+m2)<E)p=sqrt(m12/m22*(E*E-m22));
61 
62  double m212=(m1*m1-m2*m2);
63  double mu=(E-m212*m212/(E*E*E))/4;
64  double ladder=ladderSum(E,15);
65  // cout << iCh << " "
66  // << m1 << " "
67  // << m2 << " "
68  // << E << " "
69  // << m22 << " "
70  // << m12 << " "
71  // << p << " "
72  // << m212 << " "
73  // << mu << " "
74  // << ladder << " " << endl;
75 
76  if(m1+m2<E){
77  sum+= - 2.*ic*lambda2*mu*p*a*sph_bessel(0,p*a)*sph_hankel1(0,p*a)*ladder;
78  }
79  else { // modify to account for imaginary breakup mumentum.
80  complex<double> k(0,p);
81  double sphBessC=TMath::SinH(p*a)/(p*a); // bessel function analytically cont
82  double sphHankelC=sphBessC - TMath::CosH(p*a)/(p*a);
83  sum+= 2.*lambda2*mu*a*p*sphBessC*sphHankelC*ladder;
84  }
85  }
86 
87  complex<double> Denom(1,0);
88  Denom+=sum;
89 
90  // choose input and ouput channel to be the same
91  unsigned int j=i;
92  double mi1=channels[i].first;
93  double mi2=channels[i].second;
94  double mi22=mi1+mi2; mi22=mi22*mi22;
95  double mi12=mi1*mi2;
96  double pi=sqrt(mi12/mi22*(E*E-mi22));
97  double mi212=(mi1*mi1-mi2*mi2);
98  double mui=(E-mi212*mi212/(E*E*E))/4;
99  double mj1=channels[j].first;
100  double mj2=channels[j].second;
101  double mj22=mj1+mj2; mj22=mj22*mj22;
102  double mj12=mj1*mj2;
103  double pj=sqrt(mj12/mj22*(E*E-mj22));
104  double mj212=(mj1*mj1-mj2*mj2);
105  double muj=(E-mj212*mj212/(E*E*E))/4;
106 
107  double Nom=2.*lambda2*a*sqrt(mui*muj*pi*pj)*ladderSum(E,15)*sph_bessel(0,pi*a)*sph_bessel(0,pj*a);
108  //double Nom=1;
109 
110  return Nom/Denom;
111 }
112 
113 std::complex<double> tprod(double E,double m1,double m2){
114  double m22=m1+m2; m22=m22*m22;
115  double m12=m1*m2;
116  double p=sqrt(m12/m22*(E*E-m22));
117 
118 
119  double mu=E/4.; //?????
120  double a=2.90; // 1/GeV
121  double lambda=1.29;
122  double lambda2=lambda*lambda;
123  double sum=ladderSum(E,100);
124 
125  std::complex<double> Denom(1,0);
126  std::complex<double> i(0,1);
127  std::complex<double> term=-2.*i*lambda2*mu*p*a*sph_bessel(0,p*a)*sph_hankel1(0,p*a)*sum;
128 
129  Denom+=term;
130 
131  double Nom=lambda*sph_bessel(0,p*a);
132 
133  return Nom/Denom;
134 }
135 
136 
137 
138 void pipi(){
139 
140  vector< tchannel > channels;
141  channels.push_back(tchannel(mpi,mpi));
142  // channels.push_back(tchannel(mpi,mK));
143  // channels.push_back(tchannel(mK,mK));
144  // channels.push_back(tchannel(mpi,meta));
145  // channels.push_back(tchannel(mK,meta));
146 
147  unsigned int npoints=400;
148  TGraph* gRe=new TGraph(npoints);
149  TGraph* gIm=new TGraph(npoints);
150  TGraph* gIntense=new TGraph(npoints);
151  TGraph* gPhase=new TGraph(npoints);
152  gRe->SetTitle("Scattering");
153  gIm->SetTitle("Scattering Imag");
154  gIntense->SetTitle("Scattering Intensity");
155 
156  TGraph* gReProd=new TGraph(npoints);
157  TGraph* gImProd=new TGraph(npoints);
158  TGraph* gIntenseProd=new TGraph(npoints);
159  TGraph* gPhaseProd=new TGraph(npoints);
160  TGraph* gArgandProd=new TGraph(npoints);
161 
162  gReProd->SetTitle("Production");
163  gImProd->SetTitle("Production Imag");
164  gIntenseProd->SetTitle("Prodcution Intensity");
165 
166  unsigned int channel=0;
167  double step=0.002;
168  double M=channels[channel].first+channels[channel].second+step;
169  for(unsigned int i=0;i<npoints; ++i){
170  complex<double> amp=tscat(M,channels,0);
171  complex<double> pamp=tprod(M,mpi,mpi);
172  double p=sqrt(M*M/4.-mpi2);
173  cout << "tscat("<<M<<")= "<< tscat(M,channels,0) << endl;
174  gRe->SetPoint(i,M,amp.real()*M/(2*p));
175  gIm->SetPoint(i,M,amp.imag()*M/(2*p));
176  gIntense->SetPoint(i,M,norm(amp));
177  gPhase->SetPoint(i,M,arg(amp));
178 
179  gReProd->SetPoint(i,M,pamp.real()*sqrt(p));
180  gImProd->SetPoint(i,M,pamp.imag()*sqrt(p));
181  gIntenseProd->SetPoint(i,M,norm(pamp)*2*p);
182  gPhaseProd->SetPoint(i,M,arg(pamp));
183  gArgandProd->SetPoint(i,pamp.real()*sqrt(p),pamp.imag()*sqrt(p));
184  M+=step;
185  }
186  cout << "finished" << endl;
187 
188  TCanvas* c=new TCanvas("cnew","c",10,10,800,800);
189  c->Divide(3,2);
190  c->cd(4);
191  gIntense->Draw("APL");
192  c->cd(5);
193  gPhase->Draw("APL");
194  c->cd(6);
195  gRe->Draw("APL");
196  gIm->Draw("PL same");
197 
198  c->cd(1);
199 
200  gIntenseProd->Draw("APL");
201  c->cd(2);
202 
203  gPhaseProd->Draw("APL");
204  c->cd(3);
205  gReProd->Draw("APL");
206  gImProd->Draw("PL same");
207  //gArgandProd->Draw("APL");
208 
209 }