wits
plural your ability to think quickly and make sensible decisionsquick wits: a young hero admired for his courage and quick wits
gather/collect your wits (=try to start thinking clearly): Claudia paused, trying to gather her wits enough to reply.
keep/have your wits about you: Keep your wits about you at all times.