00001 #ifndef __CWAVEFUNCTION_WF_PLAMBDA_PHASESHIFT_CC__
00002 #define __CWAVEFUNCTION_WF_PLAMBDA_PHASESHIFT_CC__
00003 #include "wavefunction.h"
00004
00005 CWaveFunction_plambda_phaseshift::CWaveFunction_plambda_phaseshift(string parsfilename) : CWaveFunction() {
00006 int iq,ichannel;
00007 double q;
00008 ParsInit(parsfilename);
00009
00010 m1=MPROTON;
00011 m2=MLAMBDA;
00012 IDENTICAL=0;
00013 q1q2=0;
00014 nchannels=1;
00015 ellmax=0;
00016 InitArrays();
00017 printf("Arrays Initialized\n");
00018
00019 ell[0]=0;
00020
00021 InitWaves();
00022 printf("Partial Waves Initialized\n");
00023
00024
00025 channelweight[0]=1.0;
00026 get_phaseshifts();
00027
00028 for(ichannel=0;ichannel<nchannels;ichannel++){
00029 for(iq=0;iq<nqmax;iq++){
00030 q=qarray[iq];
00031
00032
00033
00034 Wepsilon[ichannel][iq]=ddeltadq[ichannel][iq]
00035 -GetIW(ell[ichannel],epsilon,q,q1q2,eta[iq],delta[ichannel][iq])
00036 +GetIW(ell[ichannel],epsilon,q,q1q2,eta[iq],0.0);
00037 Wepsilon[ichannel][iq]=3.0*Wepsilon[ichannel][iq]
00038 /(4.0*PI*pow(epsilon,3));
00039 }
00040 }
00041 printf("Initialization finished\n");
00042 }
00043
00044 double CWaveFunction_plambda_phaseshift::CalcPsiSquared(int iq,double r,double ctheta){
00045 double psisquared,x,dpsi2,q,theta;
00046 complex<double> psi,hstar0,psi0;
00047 complex<double> Xlm00;
00048 int ichannel;
00049
00050 q=qarray[iq];
00051 if(iq>=nqmax){
00052 printf("iq too large!\n");
00053 exit(1);
00054 }
00055 psi0=planewave[iq]->planewave(r,ctheta);
00056
00057 if(STRONG==1){
00058 if(r<epsilon){
00059 psisquared=real(psi0*conj(psi0));
00060 for(ichannel=0;ichannel<nchannels;ichannel++){
00061 dpsi2=channelweight[ichannel]*2.0*PI*Wepsilon[ichannel][iq]
00062 *pow(HBARC,3)/(q*q);
00063 psisquared+=dpsi2;
00064 }
00065 }
00066 else{
00067 theta=acos(ctheta);
00068 x=q*r/HBARC;
00069
00070 hstar0=partwave[0][iq]->GetPhiIncoming(r)/x;
00071
00072 Xlm00=0.5*sqrt(4.0*PI)*SpherHarmonics::Ylm(0,0,theta,0.0)*hstar0;
00073
00074
00075 psi=psi0;
00076
00077 psi+=Xlm00*(Misc::ceiphi(-2.0*delta[0][iq])-1.0);
00078 psisquared=real(psi*conj(psi));
00079 }
00080 }
00081 else psisquared=real(psi0*conj(psi0));
00082 psisquared*=RelativisticCorrection(r,iq);
00083 return psisquared;
00084
00085 }
00086
00087 void CWaveFunction_plambda_phaseshift::get_phaseshifts(){
00088 double q,a,Reff,tandel;
00089 int iq;
00090 a=-1.9;
00091 Reff=3.4;
00092 for(iq=0;iq<nqmax;iq++){
00093 q=qarray[iq];
00094 tandel=1.0/(-HBARC/(q*a)+0.5*Reff*q/HBARC);
00095 delta[0][iq]=atan(tandel);
00096 ddeltadq[0][iq]=-(HBARC/(q*q*a)+0.5*Reff/HBARC)
00097 *tandel*tandel/(1+tandel*tandel);
00098
00099 }
00100 }
00101
00102 #endif