wear (one's particular profession's) hat
To act as one would in one's particular profession while in a different setting. Bobby, I know you're off duty, but can you please wear your doctor's hat for five minutes and tell me what's wrong with my arm? I don't want to have to go to the hospital. My wife was still wearing her judge's hat when she tried to intervene with our neighbor's arguing kids.