Mechanic was installing an idler cap on Cat dozer 69. Mechanic was using a ball-peen hammer to adjust the roller cap. While swinging the hammer it glanced off of track above the roller cap striking a finger resulting in a cut. Mechanic was seen by onsite EMT, and then brought to a hospital for further evaluation. Received stitches to laceration.