Dirk, this is a good question about how HMC handles stepping out-of-bounds in the parameter space. No, it's not exactly like the MH accept/reject step, where if a MH sampler proposed value goes "out of bounds," then the proposal is automatically rejected, and the MH sampler proceeds to the next iteration (where it tries a different proposal value).
Rather, the HMC sampler creates trajectories (sequences of locations) through the (possibly multi-dimensional) parameter space. These trajectories are generated by generating a path approximately following the gradient of the log-likelihood surface, which is done using finite-sized steps (repeatedly calculating the gradient at each location, then taking a small "step" in the direction of the gradient). Therefore, a (self-tuning) parameter of the HMC sampler is the "stepsize" which is used when generating these trajectories. In the absence of any out-of-bounds steps, at the conclusion of generating a trajectory (a sequence locations in the parameter space), the HMC sampler selects one of the locations making up the trajectory as the "next sample" - the "next sample" is not necessarily the final location at the terminal end of the trajectory, but rather a random point selected from all locations making up the trajectory, which is selected in a random manner so as to maintain the forward/backward reversible nature of the HMC sampling process, ensuring a reversible Markov chain (as is necessary for valid MCMC sampling).
However, sometimes if the "stepsize" is too large, these finite-sized steps used to generate the trajectory might go out-of-bounds, reaching an invalid location in parameter space. In that event (in contrast to how the MH sampler operates), the HMC ceases extending the trajectory; some recent part of the trajectory (which itself might be in valid parameter space) may be immediately discarded, as is necessary to ensure reversibility; the "next sample" is selected (still in a random manner) from the remaining part of the trajectory. And finally, at the next adaptation step (which occurs periodically during the warm-up phase of the HMC sampler), the HMC's internal "stepsize" parameter may be adjusted to be smaller, to help avoid future steps going out-of-bounds.