; and (B) may evaluate applications on the safety profile of the existing crossing, 10-year history of accidents at such crossing, inclusion of the proposed project on a grade crossing safety action plan, average automobile traffic, freight train traffic, average daily number of crossing closures, and proximity of community resources, including schools, hospitals, fire stations, police stations, and emergency medical service facilities. (e) Federal share of total project costs (1) Total project costs The Secretary shall estimate the total costs of a project under this section based on the best available information, including any available engineering studies, studies of economic feasibility, environmental analysis, and information on the expected use of equipment or facilities. (2) Federal share (A) Projects over $40,000,000 For projects exceeding $40,000,000 in total project costs, the Federal share under this section for such project shall not exceed 65 percent. (B) Projects under $40,000,000 For projects not exceeding $40,000,000 in total project costs, the Federal share under this section for such project shall not exceed 85 percent. (f) Grant conditions An eligible entity may not receive a grant for a project under this section unless such project is in compliance with section 22905, except that 22905(b) shall only apply to a person that conducts rail operations. (g) Definitions In this section: (1) Eligible entity The term eligible entity means— (A) a State; (B) a public agency or publicly chartered authority; (C) a metropolitan planning organization; (D) a political subdivision of a State