Tower Controller reported an MSAW alert and loss of separation resulted from misunderstanding of the traffic situation.
Synopsis
Tower Controller reported an MSAW alert and loss of separation resulted from misunderstanding of the traffic situation.
Narrative
I told Aircraft X to continue for Aircraft Y heavy that will be holding in position. Aircraft Z that departed Runway XXR requested to come back and land Runway XY for equipment issues and was handed off to me by basic check. As I took the handoff multiple situations arose: 1. Aircraft Z was flying towards Aircraft X and was issued traffic advisory; 2. simultaneously gave Aircraft Z a low altitude alert for being low; 3. instructed Aircraft Z to do a left 360 in order to avoid Aircraft X on final and terrain to the north along with ZZZ traffic on final. Aircraft Z reported Aircraft X in sight and was instructed to follow him. I suddenly remembered that Aircraft Y heavy was holding in position as Aircraft X was continuing Runway XY and cleared him for takeoff when Aircraft X was on about a 3 mile final. Aircraft X was then cleared to land Runway XY to which he reported he was going around with no explanation at the time; and started to climb. Aircraft X was instructed to descend back down and eventually instructed to fly runway heading to maintain 3000 ft. I issued traffic for Aircraft Y heavy that departed. Aircraft X was instructed to maintain visual separation from the departed heavy. Called over to give Aircraft X 90 heading. In summary; I was caught off guard with the unusual situation and didn't have the full picture before taking the handoff for Aircraft Z. In the future; a better coordination and communication with basic check with unusual situations especially with inclement weather.
Source: NASA Aviation Safety Reporting System (public domain). Reports are voluntary submissions and are not verified by NASA.