1D square well

(* solve continuity conditions *)
Clear[a, V0]
{a, 
        V0} = {a, V0}
Clear[A, B, R, T, z1, 
      z2]
equations = {
1 + R == 
          A + B, 
k*(1 - R) == 
          q*(A - B), 
A*z2 + B/z2 == 
          T*z1, 
q (A*z2 - B/z2) == 
          k*T*z1}
solutions = 
      Solve[equations, {A, B, R, T}]

(* simplify the answer *)
Clear[Rout, 
        Ramp]
Rout = (R  /.  
            solutions)[[1]]
Rnum = 
      Numerator[Rout]/z2  /.  
        z2 -> Exp[I*phi]
Rnum = 
      ComplexExpand[Rnum] // Simplify
Rden = 
      Denominator[Rout]/z2  /.  
        z2 -> Exp[I*phi]
Rden = 
      ComplexExpand[Rden] // Simplify
Ramp[k1_, 
        q1_] := Rnum/Rden  /.  {k -> k1, q -> q1, 
          phi -> q*a}
Ramp[k, q]

(* Reflection Probability *)
Clear[
        Prefl]
nn = 
      Numerator[Ramp[k, q]]
nn2 = 
      ComplexExpand[nn*Conjugate[nn]] // 
        Simplify
dd = 
      Denominator[Ramp[k, q]]
dd2 = 
      ComplexExpand[dd*Conjugate[dd]] // 
        Simplify
Prefl[k1_, q1_] := 
        nn2/dd2   /. {k -> k1, 
            q -> q1};
Prefl[k, 
      q]

(* example plot *)
{a, W0} = {5, 
          1}
Plot[
      Prefl[Sqrt[En], Sqrt[En + W0]], 
{En, 0, 10}, 
      PlotRange -> {{0, 10}, {0, 0.2}}]