Implicit in the question, "When do I have to shoot?" is the idea that you are going to avoid shooting whenever possible--which is good, because avoidance is almost always the best course of action, both during the encounter and for the legal battle after the encounter. Our hypothetical Tom is about to be in a shootout, and the problem is that a shootout always entails a high level of risk. For the shooting to be justified, Tom's own life must be in danger. To put it bluntly, the aggressor will have the same opportunity to shoot Tom as Tom has to shoot the aggressor. And regrettably, one very likely outcome of a gunfight is that both participants will end up killing each other. If we acknowledge that Tom's primary goal is to stay alive and, even better, uninjured, then we must note that Tom's odds are not good in a shootout. But if Tom was able to contrive such an advantage in this gun fight, if he found a way to give himself such an upperhand that he could shoot the aggressor without any real risk to himself, then Tom would be at risk from the legal system which will have to wonder, "If you were in such a position of safety, if you were not in danger, why did you have to shoot?" Either way, this course of action leaves Tom at great risk.
A solid principle of tactics is to follow the course of action which accomplishes the goal with minimal risk.