Having ridden SEPTA trains for decades in and around Philadelphia, I can say that it's not that unusual for local kids to toss rocks at passing trains. It always sounds very loud, but is relatively harmless except for putting lots of dents in the sides of the rail cars.
What if it hit the engine’s windshield ? Might that cause the engineer to slam on the brakes ?