The normal thing to say is "You got a haircut!"
This differs from "You have been having a haircut!" in 3 ways:
- get vs. have: Typically you get a haircut, rather than have a haircut.
- were getting vs. got: You were getting a haircut? Oh, that's why you couldn't take my call.
- have been vs. were: You have been getting a haircut? Oh, in that case your high pulse is probably due to your aichmophobia.
#1 uses "get" rather than "have" because it is more standard. This is best learned case by case (as a phrase) for common activities. You get a haircut, get exercise, have (or go for) a swim, have fun, get or have a meal, get or have rabies, etc. The distinction between "get" and "have" (when both are possible) can depend on the thing being gotten or had, so there is no universal rule. There are probably regional variations too.
#2 uses "were getting" because it focuses on a point in time in the past (indicated by "were"), which happened during the activity (marked by "-ing"). It helps set the scene for the point in time under discussion. In the example above, the point in time being discussed is when I called.
#3 uses "have been" to focus on a duration (perhaps intermittent) of recent time. The only specific time point being referenced is "now" (because "have" is in the present). It is a statement about now, describing the current state as the expected result of the thing that has been going on. In the example above, the current state is the high pulse rate, which is a predictable result of the activity of getting a haircut if scissors make you panic.
When does it make sense to use the present perfect continuous for a haircut?
First of all, if the activity is still going on, but we mainly want to emphasize that it has been going on for a while already, then the present perfect continuous is exactly right. "Where are you now?" "I told you, I'm getting a haircut." "Still? You've been getting a haircut for two hours!"
If the activity has stopped, then it becomes much harder to make a realistic example for "have been getting a haircut". How could we have a statement about the current point in time, that needs, as context, the information that for a recent duration of time you were receiving a haircut? Is there anything that happens during a haircut, such that if that thing has been happening, then we will see a result now? The obvious "hairs were being cut" does not make a good example -- nobody would use a complicated, wordy tense just to avoid communicating that one entire haircut took place, when in fact it did. There needs to be an activity which was going on, which we don't think of as encapsulated into a stand-alone instance, which led to things being how they are now. For example if you are afraid of scissors, then maybe you were getting more and more stressed out during the haircut. If we're focusing on your stress, it doesn't even matter whether the haircut got finished or not. The point is just that it was an activity involving scissors. If I know you well and I see you are sweating and I measure your pulse and it is very high, I might start to worry, but if I suddenly realize what the cause was, I might express this with "Oh! You've been getting a haircut!" Saying it this way shows that I am focused on the ongoing activity that was recently taking place, and on how that activity relates to the present state of affairs.
This is similar to your rain example. As you point out, in both examples, there was something happening, and now you see the result. The thing that was happening is being described as a type of thing that can happen off and on, and recently it was happening. It is not being described as a complete single instance of anything. But if the precipitation in your region consists of isolated 20-minute downpours that only happen once a month or so, then you wouldn't say "Oh, it's been raining," but rather, "Oh, we had a rainstorm!", because you would be thinking of the wet ground's cause as a single encapsulated event. This is analogous to "Oh, you got a haircut!"