SACRAMENTO — Eight projects with a rail component, including extension of Caltrain service to downtown San Francisco and overhauls of the state’s bilevel railcar fleet, have received funding from the California State Transportation Agency, or CalSTA.