Period Function for a Family of Piecewise Planar Hamiltonian Systems