Flight Crew Private
ATC Issue All Types; Conflict NMAC
Air Traffic Control Issued Advisory / Alert; Flight Crew Took Evasive Action; Flight Crew Returned To Clearance
Human Factors
This seems to be a lesson I keep relearning through close calls; 'Towers don't always alert you about traffic.' I had to fly through ZZZ Class D airspace. Shortly after repeating the transition approval to Tower; I 'relaxed' and started admiring the city below me and think about a recent competition while flying south bound. I was at least 4 miles east of the airport.Aircraft Y landed [later on] but it was about to make the evening news few moments before that. I estimated that we were about 3 seconds from a midair collision. What woke me up from daydreaming was the Tower calling Aircraft Y about traffic at 1 o'clock while they are on the left downwind of XX. Tower was not talking to me but I had that feeling that he was talking about me in a very calm voice. I looked up and saw an airplane getting bigger in my windshield. I immediately replied to Tower that traffic in sight and I'm descending. I must have dropped about 500 ft. Then I continued my boring flight afterwards.
C-150 Private Pilot reported executing a successful evasive maneuver due to an NMAC event.