00001 #ifndef __INCLUDE_PIPLUSPIMINUS_SQWELL_CC__
00002 #define __INCLUDE_PIPLUSPIMINUS_SQWELL_CC__
00003 #include "wavefunction.h"
00004
00005 using namespace std;
00006
00007 CWaveFunction_pipluspiminus_sqwell::CWaveFunction_pipluspiminus_sqwell(string parsfilename) : CWaveFunction(){
00008 ParsInit(parsfilename);
00009
00010 m1=MPI;
00011 m2=MPI;
00012 IDENTICAL=0;
00013
00014 q1q2=-1;
00015
00016 nchannels=5;
00017
00018 ellmax=2;
00019 InitArrays();
00020 printf("Arrays Initialized\n");
00021
00022 ell[0]=0;
00023 ell[1]=2;
00024 ell[2]=1;
00025 ell[3]=0;
00026 ell[4]=2;
00027
00028 InitWaves();
00029
00030 nwells=new int[nchannels];
00031 nwells[0]=3;
00032 nwells[1]=1;
00033 nwells[2]=3;
00034 nwells[3]=1;
00035 nwells[4]=1;
00036
00037 SquareWell_MakeArrays();
00038
00039 a[0][0]=0.203102; a[0][1]=0.296759; a[0][2]=1.4936;
00040 a[1][0]=1.1511;
00041 a[2][0]=0.295393; a[2][1]=0.360841; a[2][2]=0.488933;
00042 a[3][0]=0.188947;
00043 a[4][0]=0.452495;
00044
00045 V0[0][0]=-28190.6; V0[0][1]=20006.6; V0[0][2]=61.6949;
00046 V0[1][0]=-245.695;
00047 V0[2][0]=-29369.6; V0[2][1]=671.979; V0[2][2]=7.1168;
00048 V0[3][0]=52894.6;
00049 V0[4][0]=16468.6;
00050
00051 SquareWell_Init();
00052
00053 }
00054
00055 CWaveFunction_pipluspiminus_sqwell::~CWaveFunction_pipluspiminus_sqwell(){
00056 SquareWell_DeleteArrays();
00057 }
00058
00059
00060 double CWaveFunction_pipluspiminus_sqwell::CalcPsiSquared(int iq,double r,double ctheta){
00061 const double ROOT2=sqrt(2.0);
00062 double psisquared;
00063 double P1,P2;
00064 double q=GetQ(iq);
00065 complex<double> psi,psia, psib, psisymm, psianti;
00066 psia=planewave[iq]->planewave(r,ctheta);
00067 psib=planewave[iq]->planewave(r,-ctheta);
00068 psisymm=(psia+psib)/ROOT2;
00069 psianti=(psia-psib)/ROOT2;
00070 double x;
00071 complex<double> DelPhi[5];
00072
00073 SquareWell_GetDelPhi(iq,r,DelPhi);
00074
00075
00076
00077 psisquared=0.0;
00078 x=q*r/HBARC;
00079 P1=SpherHarmonics::legendre(1,ctheta);
00080 P2=SpherHarmonics::legendre(2,ctheta);
00081
00082
00083 psi=psisymm;
00084 psi+=ROOT2*DelPhi[0]/x;
00085 psi-=ROOT2*5.0*P2*DelPhi[1]/x;
00086 psisquared+=(1.0/3.0)*real(psi*conj(psi));
00087
00088
00089 psi=psianti;
00090 psi-=ci*ROOT2*3.0*P1*DelPhi[2]/x;
00091 psisquared+=0.5*real(psi*conj(psi));
00092
00093
00094 psi=psisymm;
00095 psi+=ROOT2*DelPhi[3]/x;
00096 psi-=ROOT2*5.0*P2*DelPhi[4]/x;
00097 psisquared+=(1.0/6.0)*real(psi*conj(psi));
00098
00099 psisquared*=RelativisticCorrection(r,iq);
00100 return psisquared;
00101 }
00102
00103 #endif