EnDecay=6.812; (*1n-decay ((for )^10)Be, MeV*)
(*ERes=3.368;(*Resonance energy ((of )^10)Be, MeV*)*)
p=197.327;
(*MBe9=4 Mp+5 Mn-9Ebind (*mass ((of )^9)Be, MeV*)*)
MBe9=845.557472;
 Rch=2.5(*radius ((of )^10)Be, fm*)
U=-48.270895716356556;

F0[r_,k_]:=F0[r,k]=(k (r/p)) SphericalBesselJ[0,((k r)/p)];
G0[r_,k_]:=G0[r,k]=-(k (r/p)) SphericalBesselY[0,((k r)/p)];
f0[r_,q_]:=f0[r,q]=(q (r/p)) SphericalBesselJ[0,((q r)/p)];

df0[r_,qq_]=D[(qq (r/p)) SphericalBesselJ[0,((qq r)/p)],{r,1}];
dF0[r_,kk_]=D[(kk (r/p)) SphericalBesselJ[0,((kk r)/p)],{r,1}];
dG0[r_,kk_]=D[-(kk (r/p)) SphericalBesselY[0,((kk r)/p)],{r,1}];

δ0[kk_,qq_]:=δ0[kk,qq]=ArcTan[(-f0[Rch,qq] dF0[Rch,kk]+df0[Rch,qq] F0[Rch,kk])/(-df0[Rch,qq] G0[Rch,kk]+dG0[Rch,kk] f0[Rch,qq])];

A0[kk_,qq_]:=A0[kk,qq]=(F0[Rch,kk] Cos[δ0[kk,qq]]+G0[Rch,kk] Sin[δ0[kk,qq]])/f0[Rch,qq];

F1[r_,k_]:=F1[_,k]=(k (r/p)) SphericalBesselJ[1,((k r)/p)];
G1[r_,k_]:=G1[r,k]=-(k (r/p)) SphericalBesselY[1,((k r)/p)];
f1[r_,q_]:=f1[r,q]=(q (r/p)) SphericalBesselJ[1,((q r)/p)];

df1[r_,qq_]=D[(qq (r/p)) SphericalBesselJ[1,((qq r)/p)],{r,1}];
dF1[r_,kk_]=D[(kk (r/p)) SphericalBesselJ[1,((kk r)/p)],{r,1}];
dG1[r_,kk_]=D[-(kk (r/p)) SphericalBesselY[1,((kk r)/p)],{r,1}];

δ1[kk_,qq_]:=δ1[kk,qq]=ArcTan[(((f1[Rch,qq] dF1[Rch,kk]-df1[Rch,qq] F1[Rch,kk]))/(df1[Rch,qq] G1[Rch,kk]-dG1[Rch,kk] f1[Rch,qq]))];

A1[kk_,qq_]:=A1[kk,qq]=((F1[Rch,kk] Cos[δ1[kk,qq]]+G1[Rch,kk] Sin[δ1[kk,qq]])/(f1[Rch,qq]));

F2[r_,k_]:=F2[r,k]=(k (r/p)) SphericalBesselJ[2,((k r)/p)];
G2[r_,k_]:=G2[r,k]=-(k (r/p)) SphericalBesselY[2,((k r)/p)];
f2[r_,q_]:=f2[r,q]=(q (r/p)) SphericalBesselJ[2,((q r)/p)];

df2[r_,qq_]=D[(qq (r/p)) SphericalBesselJ[2,((qq r)/p)],{r,1}];
dF2[r_,kk_]=D[(kk (r/p)) SphericalBesselJ[2,((kk r)/p)],{r,1}];
dG2[r_,kk_]=D[-(kk (r/p)) SphericalBesselY[2,((kk r)/p)],{r,1}];

δ2[kk_,qq_]:=δ2[kk,qq]=ArcTan[(f2[Rch,qq] dF2[Rch,kk]-df2[Rch,qq] F2[Rch,kk])/(df2[Rch,qq] G2[Rch,kk]-dG2[Rch,kk] f2[Rch,qq])];

A2[kk_,qq_]:=A2[kk,qq]=(1/(f2[Rch,qq]))(F2[Rch,kk] Cos[δ2[kk,qq]]+G2[Rch,kk] Sin[δ2[kk,qq]]);

F3[r_,k_]:=F3[r,k]=(k (r/p)) SphericalBesselJ[3,((k r)/p)];
G3[r_,k_]:=G3[r,k]=-(k (r/p)) SphericalBesselY[3,((k r)/p)];
f3[r_,q_]:=f3[r,q]=(q (r/p)) SphericalBesselJ[3,((q r)/p)];

df3[r_,qq_]=D[(qq (r/p)) SphericalBesselJ[3,((qq r)/p)],{r,1}];
dF3[r_,kk_]=D[(kk (r/p)) SphericalBesselJ[3,((kk r)/p)],{r,1}];
dG3[r_,kk_]=D[-(kk (r/p)) SphericalBesselY[3,((kk r)/p)],{r,1}];

δ3[kk_,qq_]:=δ3[kk,qq]=ArcTan[(f3[Rch,qq] dF3[Rch,kk]-df3[Rch,qq] F3[Rch,kk])/(df3[Rch,qq] G3[Rch,kk]-dG3[Rch,kk] f3[Rch,qq])];

A3[kk_,qq_]:=A3[kk,qq]=(1/(f3[Rch,qq]))(F3[Rch,kk] Cos[δ3[kk,qq]]+G3[Rch,kk] Sin[δ3[kk,qq]]);

F4[r_,k_]:=F4[r,k]=(k (r/p)) SphericalBesselJ[4,((k r)/p)];
G4[r_,k_]:=G4[r,k]=-(k (r/p)) SphericalBesselY[4,((k r)/p)];
f4[r_,q_]:=f4[r,q]=(q (r/p)) SphericalBesselJ[4,((q r)/p)];

df4[r_,qq_]=D[(qq (r/p)) SphericalBesselJ[4,((qq r)/p)],{r,1}];
dF4[r_,kk_]=D[(kk (r/p)) SphericalBesselJ[4,((kk r)/p)],{r,1}];
dG4[r_,kk_]=D[-(kk (r/p)) SphericalBesselY[4,((kk r)/p)],{r,1}];

δ4[kk_,qq_]:=δ4[kk,qq]=ArcTan[(f4[Rch,qq] dF4[Rch,kk]-df4[Rch,qq] F4[Rch,kk])/(df4[Rch,qq] G4[Rch,kk]-dG4[Rch,kk] f4[Rch,qq])];

A4[kk_,qq_]:=A4[kk,qq]=(1/(f4[Rch,qq]))(F4[Rch,kk] Cos[δ4[kk,qq]]+G4[Rch,kk] Sin[δ4[kk,qq]]);

F5[r_,k_]:=F5[r,k]=(k (r/p)) SphericalBesselJ[5,((k r)/p)];
G5[r_,k_]:=G5[r,k]=-(k (r/p)) SphericalBesselY[5,((k r)/p)];
f5[r_,q_]:=f5[r,q]=(q (r/p)) SphericalBesselJ[5,((q r)/p)];

df5[r_,qq_]=D[(qq (r/p)) SphericalBesselJ[5,((qq r)/p)],{r,1}];
dF5[r_,kk_]=D[(kk (r/p)) SphericalBesselJ[5,((kk r)/p)],{r,1}];
dG5[r_,kk_]=D[-(kk (r/p)) SphericalBesselY[5,((kk r)/p)],{r,1}];

δ5[kk_,qq_]:=δ5[kk,qq]=ArcTan[(f5[Rch,qq] dF5[Rch,kk]-df5[Rch,qq] F5[Rch,kk])/(df5[Rch,qq] G5[Rch,kk]-dG5[Rch,kk] f5[Rch,qq])];

A5[kk_,qq_]:=A5[kk,qq]=(1/(f5[Rch,qq]))(F5[Rch,kk] Cos[δ5[kk,qq]]+G5[Rch,kk] Sin[δ5[kk,qq]]);

F6[r_,k_]:=F6[r,k]=(k (r/p)) SphericalBesselJ[6,((k r)/p)];
G6[r_,k_]:=G6[r,k]=-(k (r/p)) SphericalBesselY[6,((k r)/p)];
f6[r_,q_]:=f6[r,q]=(q (r/p)) SphericalBesselJ[6,((q r)/p)];

df6[r_,qq_]=D[(qq (r/p)) SphericalBesselJ[6,((qq r)/p)],{r,1}];
dF6[r_,kk_]=D[(kk (r/p)) SphericalBesselJ[6,((kk r)/p)],{r,1}];
dG6[r_,kk_]=D[-(kk (r/p)) SphericalBesselY[6,((kk r)/p)],{r,1}];

δ6[kk_,qq_]:=δ6[kk,qq]=ArcTan[(f6[Rch,qq] dF6[Rch,kk]-df6[Rch,qq] F6[Rch,kk])/(df6[Rch,qq] G6[Rch,kk]-dG6[Rch,kk] f6[Rch,qq])];

A6[kk_,qq_]:=A6[kk,qq]=(1/(f6[Rch,qq]))(F6[Rch,kk] Cos[δ6[kk,qq]]+G6[Rch,kk] Sin[δ6[kk,qq]]);

qCou=0;
Nq=3;
qIn=150.;
qFin=1000.;
qStep=((qFin-qIn)/Nq);
kCou=0;
Nk=3;
kIn=0.0001;
kFin=700.+0.0001;
kStep=((kFin-kIn)/Nk);
TMatr={}
 While[kCou<Nk,kPar=kIn+kCou*kStep;While[qCou<Nq,qPar=qIn+qCou*qStep;TMatr=Append[TMatr,{kPar,qPar, (1/(4 Pi))(((8 Pi (MBe9/p)))^2) (((((p  U)/( kPar qPar))))^2)((2 0+1) (((NIntegrate[A0[kPar,qPar] f0[r,qPar] F0[r,kPar],{r,0,Rch}]))^2)+(2 1+1) (((NIntegrate[A1[kPar,qPar] f1[r,qPar] F1[r,kPar],{r,0,Rch}]))^2)+(2 2+1) (((NIntegrate[A2[kPar,qPar] f2[r,qPar] F2[r,kPar],{r,0,Rch}]))^2)+(2 3+1) (((NIntegrate[A3[kPar,qPar] f3[r,qPar] F3[r,kPar],{r,0,Rch}]))^2)+(2 4+1) (((NIntegrate[A4[kPar,qPar] f4[r,qPar] F4[r,kPar],{r,0,Rch}]))^2)+(2 5+1) (((NIntegrate[A5[kPar,qPar] f5[r,qPar] F5[r,kPar],{r,0,Rch}]))^2)+(2 6+1)(((NIntegrate[A6[kPar,qPar] f6[r,qPar] F6[r,kPar],{r,0,Rch}]))^2))}];qCou++];qCou=1;kCou++]

TMatr

TMatrii1=Reap[Do[Sow[{kPar,qPar, (1/(4 Pi))(((8 Pi (MBe9/p)))^2) (((((p  U)/( kPar qPar))))^2)((2 0+1) (((NIntegrate[A0[kPar,qPar] f0[r,qPar] F0[r,kPar],{r,0,Rch}]))^2)+(2 1+1) (((NIntegrate[A1[kPar,qPar] f1[r,qPar] F1[r,kPar],{r,0,Rch}]))^2)+(2 2+1) (((NIntegrate[A2[kPar,qPar] f2[r,qPar] F2[r,kPar],{r,0,Rch}]))^2)+(2 3+1) (((NIntegrate[A3[kPar,qPar] f3[r,qPar] F3[r,kPar],{r,0,Rch}]))^2)+(2 4+1) (((NIntegrate[A4[kPar,qPar] f4[r,qPar] F4[r,kPar],{r,0,Rch}]))^2)+(2 5+1) (((NIntegrate[A5[kPar,qPar] f5[r,qPar] F5[r,kPar],{r,0,Rch}]))^2)+(2 6+1)(((NIntegrate[A6[kPar,qPar] f6[r,qPar] F6[r,kPar],{r,0,Rch}]))^2))}],{kPar, 0.0001,175.0001,5.},{qPar,150.,1000.,5.}]][[2]][[1]];

TMatrii1

TMatrii2=Reap[Do[Sow[{kPar,qPar, (1/(4 Pi))(((8 Pi (MBe9/p)))^2) (((((p  U)/( kPar qPar))))^2)((2 0+1) (((NIntegrate[A0[kPar,qPar] f0[r,qPar] F0[r,kPar],{r,0,Rch}]))^2)+(2 1+1) (((NIntegrate[A1[kPar,qPar] f1[r,qPar] F1[r,kPar],{r,0,Rch}]))^2)+(2 2+1) (((NIntegrate[A2[kPar,qPar] f2[r,qPar] F2[r,kPar],{r,0,Rch}]))^2)+(2 3+1) (((NIntegrate[A3[kPar,qPar] f3[r,qPar] F3[r,kPar],{r,0,Rch}]))^2)+(2 4+1) (((NIntegrate[A4[kPar,qPar] f4[r,qPar] F4[r,kPar],{r,0,Rch}]))^2)+(2 5+1) (((NIntegrate[A5[kPar,qPar] f5[r,qPar] F5[r,kPar],{r,0,Rch}]))^2)+(2 6+1)(((NIntegrate[A6[kPar,qPar] f6[r,qPar] F6[r,kPar],{r,0,Rch}]))^2))}],{kPar, 175.0001,350.0001,5.},{qPar,150.,1000.,5.}]][[2]][[1]];

TMatrii2

TMatrii3=Reap[Do[Sow[{kPar,qPar, (1/(4 Pi))(((8 Pi (MBe9/p)))^2) (((((p  U)/( kPar qPar))))^2)((2 0+1) (((NIntegrate[A0[kPar,qPar] f0[r,qPar] F0[r,kPar],{r,0,Rch}]))^2)+(2 1+1) (((NIntegrate[A1[kPar,qPar] f1[r,qPar] F1[r,kPar],{r,0,Rch}]))^2)+(2 2+1) (((NIntegrate[A2[kPar,qPar] f2[r,qPar] F2[r,kPar],{r,0,Rch}]))^2)+(2 3+1) (((NIntegrate[A3[kPar,qPar] f3[r,qPar] F3[r,kPar],{r,0,Rch}]))^2)+(2 4+1) (((NIntegrate[A4[kPar,qPar] f4[r,qPar] F4[r,kPar],{r,0,Rch}]))^2)+(2 5+1) (((NIntegrate[A5[kPar,qPar] f5[r,qPar] F5[r,kPar],{r,0,Rch}]))^2)+(2 6+1)(((NIntegrate[A6[kPar,qPar] f6[r,qPar] F6[r,kPar],{r,0,Rch}]))^2))}],{kPar, 350.0001,525.0001,5.},{qPar,150.,1000.,5.}]][[2]][[1]];

TMatrii3

TMatrii4=Reap[Do[Sow[{kPar,qPar, (1/(4 Pi))(((8 Pi (MBe9/p)))^2) (((((p  U)/( kPar qPar))))^2)((2 0+1) (((NIntegrate[A0[kPar,qPar] f0[r,qPar] F0[r,kPar],{r,0,Rch}]))^2)+(2 1+1) (((NIntegrate[A1[kPar,qPar] f1[r,qPar] F1[r,kPar],{r,0,Rch}]))^2)+(2 2+1) (((NIntegrate[A2[kPar,qPar] f2[r,qPar] F2[r,kPar],{r,0,Rch}]))^2)+(2 3+1) (((NIntegrate[A3[kPar,qPar] f3[r,qPar] F3[r,kPar],{r,0,Rch}]))^2)+(2 4+1) (((NIntegrate[A4[kPar,qPar] f4[r,qPar] F4[r,kPar],{r,0,Rch}]))^2)+(2 5+1) (((NIntegrate[A5[kPar,qPar] f5[r,qPar] F5[r,kPar],{r,0,Rch}]))^2)+(2 6+1)(((NIntegrate[A6[kPar,qPar] f6[r,qPar] F6[r,kPar],{r,0,Rch}]))^2))}],{kPar, 525.0001,700.0001,5.},{qPar,150.,1000.,5.}]][[2]][[1]];

TMatrii4

TMatrii1

TMatriii1=TMatrii1;
TMatriii2=TMatrii2;
Do[TMatriii1=Append[TMatriii1,TMatriii2[[i]]],{i,1,Length[TMatriii2]}]

TMatriii1

TMatriii3=TMatrii3;
Do[TMatriii1=Append[TMatriii1,TMatriii3[[i]]],{i,1,Length[TMatriii2]}]

TMatriii1

TMatriii4=TMatrii4;
Do[TMatriii1=Append[TMatriii1,TMatriii4[[i]]],{i,1,Length[TMatriii4]}]

TMatriii1

ListPlot3D[TMatriii1]

Export["Tmatrix.txt", TMatriii1,"Table"]