The best one I can recommand is a 17-55mm and/or the 24 mm wide angle..
I did a try on Canon,but now,I'm using Nikon,but Canon is almost the samething..(I Could come back on Canon next time I buy a camera
)
If Your's closer from few feet away from the trains,the 17-55mm will be the right one,but if you have a higher budget,you have the option to get the 24 mm wide angle or a 12 mm,(the 2 last ones does'nt have zoom)..
I remember when shooting with a 24 mm Wide-angle,I was on the bridge,and ,I was able to see the bridge grider where I was,and I was leaning my foot on the grider and 3 feet over it..