We define the leafwise 2-jet of a differential function on a Riemannian
foliated manifold

. If

is endowed with a linear connection

then we define the Mastrogiacomo cohomology group with respect to

for homogeneous leafwise 2-jets. This group is isomorphic with the
1-dimensional Cech cohomology group with coefficients in the sheaf of
germs of differentiable functions on

whose gradient is parallel with
respect to the connections induced by

on the leaves.