We prove the existence of a compactly supported, continuous (except at finitely many points) function g I,m : [0, ∞) −→ R for all monomial prime ideals I of R of height one where (R, m) is the homogeneous coordinate ring associated to a projectively normal toric pair (X, D), such that ∞ 0 g I,m (λ)dλ = β(I, m), where β(I, m) is the second coefficient of the Hilbert-Kunz function of I with respect to the maximal ideal m, as proved by Huneke-McDermott-Monsky [HMM]. Using the above result, for standard graded normal affine monoid rings we give a complete description of the class map τ m : Cl(R) −→ R introduced in [HMM] to prove the existence of the second coefficient of the Hilbert-Kunz function. Moreover, we show the function g I,m is multiplicative on Segre products with the expression involving the first two coefficients of the Hilbert plolynomial of the rings and the ideals.