Let's assume that we have a standard Brownian motion $B_t$, and the piecewise linear barrier function
$$ g(t) = \begin{cases} R - \alpha t, & t\in[0, T)\\ (R-\alpha T) - \beta(t-T) & t\in[T, \infty) \end{cases} $$
for some $R, \alpha, \beta, T > 0$.
Define
$$\tau := \inf \{t \geq 0 : B_t = g(t) \} $$
What is the density of $\tau$?
I know already that if $\alpha = \beta$, i.e. we just have a linear barrier, the density is
$$\rho_{\tau}(t) = \frac{R}{\sqrt{4\pi t^3}} e^{-(R - \alpha t)^2 / (2t)}$$
but I'm not sure how to generalise that to the case where it's piecewise. While looking for references on similar problems, Girsanov's theorem came up a few times, but I'm not sufficiently familiar with it to apply it here. Does an explicit density even exist?