And, whenever I get stuck like this, I just plot all the bits and pieces of the equation. So plot GammaIn, and also GammaIn-s11mL, should be almost the same.

And plot S21K, should be almost 1 (0 dB).

And plot S22K, should be almost zero (-200 dB or something very small).

And plot S11 mL (should be almost zero).

Then GammaDetector should be almost GammaIn/(almost 1 +almost zero - almost zero).

Good to do this for intuition as to how all the parts fit together.