(* Input *)
(*kin = 20.;*)
mass= 939.;
range = 3;

sps={{Dashing[None],RGBColor[0,0,0]}, {Dashing[Large],RGBColor[1,0,0]},{Dashing[Medium],RGBColor[0,0,1]},{Dashing[None],RGBColor[0,1,0]},{Dashing[None],RGBColor[0,1,1]}};

kIn[e_] := ((Sqrt[2*mass*e])/197.327)

kOut[e_,U0_] := ((Sqrt[2 mass (e- U0)])/197.327)

ang = 0;
Plot[{e*SphericalBesselJ[ang,e],Sin[e-ang*(Pi/2)]},{e,0,50},PlotStyle->sps]

Plot[{-e*SphericalBesselY[ang,e],Cos[e-ang*(Pi/2)]},{e,0,50},PlotStyle->sps]

δ[e_,ang_,r_,u0_]:= ArcCot[(SphericalBesselY[ang,kIn[e] r]D[SphericalBesselJ[ang,kOut[e,u0]r],r] - SphericalBesselJ[ang,kOut[e,u0]r]D[SphericalBesselY[ang,kIn[e] r],r])/(SphericalBesselJ[ang,kIn[e]r]D[SphericalBesselJ[ang,kOut[e,u0]r],r] - SphericalBesselJ[ang,kOut[e,u0]r]D[SphericalBesselJ[ang,kIn[e]r],r]) ]

myDelta[e_,ang_,u0_]:= Simplify[δ[e,ang,r,u0]/.r->range]

myU = -20;
myAng = 0;
Plot[{myDelta[e,myAng,-2],myDelta[e,myAng,-5],myDelta[e,myAng,-7]},{e,0,40},PlotRange->All,PlotStyle->sps]

CS[e_,ang_,u0_]:=((4 π )/(2mass e 100)) *197.327*197.327*(2ang +1) (((Sin[myDelta[e,ang,u0]]))^2)

csAng = 1;
Plot[{CS[ee,csAng,-5],CS[ee,csAng,-10],CS[ee,csAng,-15],CS[ee,csAng,-20]},{ee,-0.1,20},PlotRange->All,PlotStyle->sps]

A[e_,ang_,u0_]:=((kIn[e] SphericalBesselJ[ang,kIn[e]range]Sin[myDelta[e,ang,u0]] +kIn[e] SphericalBesselY[ang,kIn[e] range]Cos[myDelta[e,ang,u0]])/(kOut[e,u0]SphericalBesselJ[ang,kOut[e,u0]range]))

fOut[e_,r_,ang_,u0_]:=A[e,ang,u0]kOut[e,u0]r SphericalBesselJ[ang,kOut[e,u0]r]

fIn[e_,r_,ang_,u0_]:=kIn[e]r SphericalBesselJ[ang,kIn[e]r]Sin[myDelta[e,ang,u0]] + kIn[e]r SphericalBesselY[ang,kIn[e]r]Cos[myDelta[e,ang,u0]]

myE = 15;
myU = -15;
myAng = 1;
Plot[{fIn[myE,rr,myAng,myU],fOut[myE,rr,myAng,myU]},{rr,0.1,10},PlotRange->All,PlotStyle->sps]

myR = 5;
myU = -15;
myAng = 1;
Plot[{fIn[ee,myR,myAng,myU],fOut[ee,myR,myAng,myU]},{ee,0.1,15},PlotRange->All,PlotStyle->sps]

TmatriX[e_,ang_,u0_]:=(RefLink[Integrate, paclet:ref/Integrate])[Exp[-I kOut[e,u0]r]u0 fOut[e,r,ang,u0],{r,0,range},Assumptions->kOut[e]>0 && u0<0 && ang>0]

myR = 5;
myU = -15;
myAng = 1;
Plot[TmatriX[e,myAng,myU],{e,0,15}]