In this paper we develop an algorithm to calculate the prices and Greeks of
barrier options in a hyper-exponential additive model with piecewise constant
parameters. We obtain an explicit semi-analytical expression for the
first-passage probability. The solution rests on a randomization and an
explicit matrix Wiener-Hopf factorization. Employing this result we derive
explicit expressions for the Laplace-Fourier transforms of the prices and
Greeks of barrier options.