; and (ii) selecting the winning eligible entity based on criteria determined by the Secretary under subparagraph (C). (C) Criteria for selection The Secretary shall establish criteria for the selection of an eligible entity under subparagraph (B) that shall include the requirement that the winning eligible entity— (i) is audited for food safety by an independent third party; and (ii) donates food to individuals in need. (3) Priority of eligible products In carrying out paragraph (1)(A), a State shall prioritize eligible products that are fresh and primarily produced in the State or region, as applicable. (4) Use of funds (A) Reimbursement for costs In carrying out paragraph (1), a State may reimburse an agricultural producer or an eligible entity, as appropriate, participating in a farm to food bank program for eligible costs, as determined by the Secretary, including the cost of— (i) producing an eligible product that is a dairy product; (ii) harvesting an eligible product; (iii) storing an eligible product; (iv) minimally processing an eligible product; (v) packing an eligible product; and (vi) transporting an eligible product to an eligible entity. (B) Formula A State that receives funds under subsection (c)(1) shall distribute funds to eligible entities participating in a farm to food bank program in the State according to a formula— (i) determined by the State in consultation with the eligible entity partnering with that State; or (ii) described in section 251.3(h) of title 7, Code of Federal Regulations (as in effect on the date of enactment of this section). (e) Funding (1) Allocation of funds In carrying out subsection (c)(1), the Secretary shall allocate funding to each State— (A) according to the formula described in section 251.3(h) of title 7, Code of Federal Regulations (as in effect on the date of enactment of this section)