00001 #ifndef __CWAVEFUNCTION_WF_KPLUSPIMINUS_PHASESHIFT_CC__ 00002 #define __CWAVEFUNCTION_WF_KPLUSPIMINUS_PHASESHIFT_CC__ 00003 #include "wavefunction.h" 00004 00005 CWaveFunction_kpluspiminus_phaseshift::CWaveFunction_kpluspiminus_phaseshift(string parsfilename) : CWaveFunction() { 00006 int iq,ichannel; 00007 double q; 00008 ParsInit(parsfilename); 00009 00010 m1=MKAON; 00011 m2=MPI; 00012 IDENTICAL=0; 00013 q1q2=-1; 00014 if(COULOMB==0) q1q2=0; 00015 nchannels=1; 00016 00017 ellmax=1; 00018 InitArrays(); 00019 printf("Arrays Initialized\n"); 00020 00021 ell[0]=1; 00022 00023 InitWaves(); 00024 printf("Partial Waves Initialized\n"); 00025 00026 channelweight[0]=3.0; 00027 00028 get_phaseshifts_kpluspiminus(); 00029 00030 for(ichannel=0;ichannel<nchannels;ichannel++){ 00031 for(iq=0;iq<nqmax;iq++){ 00032 q=qarray[iq]; 00033 00034 if(q1q2!=0) 00035 CoulWave::phaseshift_CoulombCorrect(ell[ichannel],q,eta[iq], 00036 delta[ichannel][iq],ddeltadq[ichannel][iq]); 00037 Wepsilon[ichannel][iq]=ddeltadq[ichannel][iq] 00038 -GetIW(ell[ichannel],epsilon,q,q1q2,eta[iq],delta[ichannel][iq]) 00039 +GetIW(ell[ichannel],epsilon,q,q1q2,eta[iq],0.0); 00040 Wepsilon[ichannel][iq]=3.0*Wepsilon[ichannel][iq] 00041 /(4.0*PI*pow(epsilon,3)); 00042 } 00043 } 00044 printf("Initialization finished\n"); 00045 } 00046 00047 double CWaveFunction_kpluspiminus_phaseshift::CalcPsiSquared(int iq,double r,double ctheta){ 00048 double psisquared,x,dpsi2,q; 00049 complex<double> psi,hstar,psi0; 00050 00051 q=qarray[iq]; 00052 if(iq>=nqmax){ 00053 printf("iq too large!\n"); 00054 exit(1); 00055 } 00056 psi0=planewave[iq]->planewave(r,ctheta); 00057 00058 if(STRONG==1){ 00059 if(r<epsilon){ 00060 psisquared=real(psi0*conj(psi0)); 00061 dpsi2=channelweight[0]*2.0*PI*Wepsilon[0][iq] 00062 *pow(HBARC,3)/(q*q); 00063 psisquared+=dpsi2; 00064 } 00065 else{ 00066 x=q*r/HBARC; 00067 00068 hstar=partwave[ell[0]][iq]->GetPhiIncoming(r)/x; 00069 psi=psi0+0.5*hstar*(Misc::ceiphi(-2.0*delta[0][iq])-1.0)*ci*(3.0)*ctheta; 00070 00071 psisquared=((2.0/3.0)*real(psi*conj(psi))) 00072 +((1.0/3.0)*real(psi0*conj(psi0))); 00073 00074 } 00075 } 00076 else psisquared=real(psi0*conj(psi0)); 00077 psisquared*=RelativisticCorrection(r,iq); 00078 return psisquared; 00079 00080 } 00081 00082 00083 void CWaveFunction_kpluspiminus_phaseshift::get_phaseshifts_kpluspiminus(){ 00084 double gamma0=50.0,mres=891.66,a=1.0/500.0; 00085 int ellres=1; 00086 double e1,e2,q,m,gamma,q0,mtest,tandelta,dtandeltadq,old=0.0; 00087 int iq; 00088 00089 q0=sqrt((pow(mres,4.0)+pow(m1,4.0)+pow(m2,4.0) 00090 -2*m1*m1*m2*m2-2*mres*mres*(m1*m1+m2*m2))/(4.0*mres*mres)); 00091 mtest=sqrt(m1*m1+q0*q0)+sqrt(m2*m2+q0*q0); 00092 printf("mtest=%g =? 891.66, q0=%g\n",mtest,q0); 00093 for(iq=0;iq<=nqmax;iq++){ 00094 q=qarray[iq]; 00095 gamma=gamma0*pow((q/q0)*(1.0+q0*q0*a*a)/(1.0+q*q*a*a),double(2*ellres+1)); 00096 e1=sqrt(m1*m1+q*q); 00097 e2=sqrt(m2*m2+q*q); 00098 m=e1+e2; 00099 tandelta=gamma/(mres-m); 00100 delta[0][iq]=atan2(gamma,mres-m); 00101 dtandeltadq=tandelta*3.0*((1.0/q)-2.0*q*a*a/(1.0+q*q*a*a)); 00102 dtandeltadq+=(tandelta/(mres-m))*((q/e1)+(q/e2)); 00103 ddeltadq[0][iq]=dtandeltadq/(1.0+tandelta*tandelta); 00104 00105 if(iq>0) old=delta[0][iq-1]; 00106 printf("q=%g, m=%g, delta=%g, ddeltadq=%g =? %g\n", 00107 q,m,delta[0][iq]*180.0/PI,ddeltadq[0][iq]*180.0/PI, 00108 (delta[0][iq]-old)*180.0/(delq*PI)); 00109 00110 } 00111 } 00112 00113 #endif