Worker with a handheld abrasive. He will cut a new track rail at the right length.
If you know the name of the articulated arm guide clamped on the rail, please post a comment.
View more photos of railroad workers replacing a Muni lightrail track section on Church street in San Francisco.