OP says he got the question answered, though doesn't specify. So idk. But I will add a few of my own thoughts. Just recently had a Varus game where I went 10/9/17 and got an S-. Now just looking at KDA, that game was pretty bad. I myself wondered how I got an S at all for that game. I then had a Vayne game where I went 9/1/12 I got an A+ for that one. That Vayne game, I had a couple just really lame condemns where the target would end up a unit or two from the wall. I may have hit a total of 2 condemns all game. My farm was pretty weak, 147 in a 21 minute game. and my one death was to a tower being overly aggressive. The Varus game, I hit every single ult, I missed maybe 2 Q's all game, my teamfight prescence was just about all it could be under the circumstances. And my deaths were to a freakin heavy heavy dive composition ignoring my whole team and diving me. Not to mention I had about 270 farm in 30 minutes.
So those games (as well as many others I haven't listed here) tell me a few things. It takes into account your accuracy and use of your abilities. If you are blitzcrank and you go 3/0/20 but have a 12% hook accuracy, you probably won't get an S. It takes into account the effectiveness of your abilities I believe too, for instance as Sejuani, are you detonating your frozen targets? or just using abilities and running away. It absolutely takes into account your farm, more so for mid/top/adc. I "think" it takes into account "how" you died. Did you die to enemy dive tanks/assassins with your whole team surrounding you unable to peel? Or are you dying by yourself extended with no wards trying to kill enemy gromp? I think "key" stats also play a factor. For assassins kills/assists would be important, not as much OVERALL damage, but if they were bursting right targets. For adc overall damage and farm are two biggest factors. For support its deaths, gold per minute, ability accuracy. Mid, ability accuracy and farm. Tank, damage taken, ability accuracy, %kill participation. Lastly but definitely not least, I believe that the overall average for game plays a part. Let's take a bronze game for example. One guy might have 35 farm by 20 minutes, the other guy has 60. The guy with 60 farm at 20 minutes has 9 deaths, and is the lowest deaths on his team by a large margin. While in a game with normal people, 60 cs and 9 deaths at 20 minutes is gonna guarantee you DONT get an S. In this case though, this person is actually likely got get an S because for their level of play, they are playing "above average".
While some aspects of the system seem somewhat flawed (it's hard to account for feeders, afks, and trolls) , when truly thinking about all the games I have gotten S I feel they were deserved in some way or another. All the games where I didn't get S, there was a valid reason for it. Maybe my farm was slacking slightly, maybe I played teamfights a little too scared, maybe I got caught in dumb positions.