(* 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[Small],RGBColor[0,1,0]},{Dashing[Tiny],RGBColor[0,1,1]}};

kIn[ee1_] := ((Sqrt[2*mass*ee1])/197.327)

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

phiIn[A_,kk_,rr_] := A SphericalBesselJ[1,kk rr] kk rr

phiOut[del_,qq_,rr_] := SphericalBesselJ[1,qq rr] qq rr Sin[del] + qq rr SphericalBesselY[1, qq rr]Cos[del]

phiIn1[A_,kk_,rr_] := D[phiIn[A,kk,rr]  , rr]

phiOut1[del_,qq_,rr_] := D[phiOut[del,qq,rr],rr]

δ[ee1_,ang_,r_,U0_]:=Simplify[ArcTan[(kOut[ee1,U0] SphericalBesselJ[ang,kIn[ee1]] D[SphericalBesselJ[ang,kOut[ee1,U0]r],r] - kIn[ee1]SphericalBesselJ[ang,kOut[ee1,U0]]D[SphericalBesselJ[ang,kIn[ee1]r],r])/(kIn[ee1]D[SphericalBesselJ[ang,kIn[ee1]r],r]SphericalBesselY[ang,kOut[ee1,U0]] - kOut[ee1,U0]SphericalBesselJ[ang,kIn[ee1]]D[SphericalBesselY[ang,kOut[ee1,U0]r],r])]]

myDelta[ee1_,ang_,U0_]:= Simplify[δ[ee1,ang,r,U0]/.r->3]

Clear[ee1]

Plot[{ee1*SphericalBesselY[2,ee1],Cos[ee1]},{ee1,0,50},PlotStyle->sps]

myU = -20;

Plot[{myDelta[e,0,myU],myDelta[e,1,myU],myDelta[e,2,myU],myDelta[e,3,myU]},{e,0,50},PlotRange->All,PlotStyle->sps]

δ0[k_,q_,r_]:=Simplify[ArcTan[(( k Sin[q r](k r Cos[k r] - Sin[k r]) - q Sin[k r] (q r Cos[q r]- Sin[q r]))/(k Cos[q r](k r Cos[k r] - Sin[k r]) + q Sin[k r](q r Sin[q r] + Cos[q r])))]]

δ0[eIn_] := δ0[kIn[eIn],kOut[eIn,myU],3]

Plot[δ0[eIn],{eIn,0,50},PlotRange->All]

TotalSec[eIn_,ang_]:=((4 π)/((kIn[eIn])^2)) (2ang +1) (((Sin[myDelta[eIn,ang,myU]]))^2)

Plot[TotalSec[e,2],{e,-0.00002,0.00002}]