00001 #ifndef __INCLUDE_PIPLUSPIPLUS_SQWELL_CC__
00002 #define __INCLUDE_PIPLUSPIPLUS_SQWELL_CC__
00003 #include "wavefunction.h"
00004
00005 using namespace std;
00006
00007 CWaveFunction_pipluspiplus_sqwell::CWaveFunction_pipluspiplus_sqwell(string parsfilename) : CWaveFunction(){
00008 ParsInit(parsfilename);
00009 m1=MPI;
00010 m2=MPI;
00011 IDENTICAL=1;
00012
00013 q1q2=1;
00014
00015 nchannels=2;
00016
00017 ellmax=2;
00018 InitArrays();
00019 printf("Arrays Initialized\n");
00020
00021 ell[0]=0;
00022 ell[1]=2;
00023
00024 InitWaves();
00025 printf("Partial Waves Initialized\n");
00026 nwells=new int[nchannels];
00027 nwells[0]=1;
00028 nwells[1]=1;
00029
00030 SquareWell_MakeArrays();
00031
00032 a[0][0]=0.188947;
00033 a[1][0]=0.452495;
00034
00035 V0[0][0]=52894.6;
00036 V0[1][0]=16468.6;
00037
00038 SquareWell_Init();
00039
00040 }
00041
00042 CWaveFunction_pipluspiplus_sqwell::~CWaveFunction_pipluspiplus_sqwell(){
00043 SquareWell_DeleteArrays();
00044 }
00045
00046
00047 double CWaveFunction_pipluspiplus_sqwell::CalcPsiSquared(int iq,double r,double ctheta){
00048 const double ROOT2=sqrt(2.0);
00049 double psisquared;
00050 double q=GetQ(iq);
00051 complex<double> psi,psia, psib, psisymm, psianti;
00052 psia=planewave[iq]->planewave(r,ctheta);
00053 psib=planewave[iq]->planewave(r,-ctheta);
00054 psisymm=(psia+psib)/ROOT2;
00055 psianti=(psia-psib)/ROOT2;
00056 double x;
00057 complex<double> DelPhi[5];
00058
00059 SquareWell_GetDelPhi(iq,r,DelPhi);
00060
00061 x=q*r/HBARC;
00062
00063 psi=psisymm;
00064 psi+=ROOT2*DelPhi[0]/x;
00065 psi-=ROOT2*5.0*SpherHarmonics::legendre(2,ctheta)*DelPhi[1]/x;
00066 psisquared=real(psi*conj(psi));
00067
00068 psisquared*=RelativisticCorrection(r,iq);
00069 return psisquared;
00070 }
00071
00072 #endif