function [stopvalue, isterminal, direction] = LongjumpEvent(t,y,g,m,c,s,rho)

% find when the y-coordinate of the jump, i.e., y(2), is zero and stop

stopvalue = y(2);   % the value we want to make zero
isterminal = 1;     % stop when stopvalue is zero
direction = [];     % direction from which we approach zero doesn't matter
