Lindblad and Input-Output Formalism in Quantum Optics

I'm confused about how to apply the Lindblad formalism and the input-output formalism in practice, and how one goes between the two.

Suppose I have a cavity (C) coupled to a reservoir (R), with the Hamiltonian governing the total system (C + R) given by

$$H = H_C + H_R + H_{CR},$$ where $$H_R = \int d\omega\,r^\dagger(\omega) r(\omega),\quad H_{CR} = \int d\omega\,\sqrt{\frac{\kappa(\omega)}{2\pi}} (a^\dagger r(\omega) + r^\dagger(\omega) a).$$ Here $$a,a^\dagger$$ are bosonic operators for the cavity mode while $$r, r^\dagger$$ are those for the continuum of bath modes. The cavity Hamiltonian can be left unspecified in what follows. I'll also make the Markov approximation $$\kappa(\omega)\approx \kappa$$ throughout to make things simpler.

Now, in the Lindblad formalism, we trace over the bath degrees of freedom to find a Master Equation for the density matrix of the cavity: $$\partial_t\rho = \mathcal{L}[\rho],$$ where the Liouvillian is defined as $$\mathcal{L}[\rho]\equiv i[\rho,H_C] + 2 L \rho L^\dagger - \{L^\dagger L,\rho\},$$ and the jump operator here is $$L = \sqrt{\frac{\kappa}{4}}a$$.

I understand that here we are working in the Schrodinger picture, but we can straightforwardly go to the Heisenberg picture to find that operators evolve under $$\partial_t A = \mathcal{L}^\dagger[A],$$ with $$\mathcal{L}^\dagger$$ the adjoint Liouvillian. With this, the equation of motion for $$a$$ is: $$\partial_t a = i[H_C,a] - \frac{\kappa}{2}a.$$

Alternatively, I could use the input-output formalism to derive a quantum Langevin equation for $$a$$, which is given by: $$\partial_t a = i[H_C,a] - \frac{\kappa}{2}a - \sqrt{\kappa} r_{in}(t)$$ where the input field is defined as the free evolution of the bath modes from some initial time $$t_0, $$r_{in}(t) \equiv \frac{i}{\sqrt{2\pi}} \int d\omega\,r_0(\omega) e^{-i\omega(t-t_0)}$$ with $$r_0(\omega)$$ defined as $$r(\omega)$$ evaluated at time $$t_0$$. The input-output relation then says that the output field $$r_{out}(t) \equiv \frac{i}{\sqrt{2\pi}} \int d\omega\,r_f(\omega) e^{-i\omega(t-t_f)},$$ with $$t_f>t$$ and $$r_f(\omega) = r(\omega)|_{t=t_f}$$, is simply given as $$r_{out}(t) = r_{in}(t) + \sqrt{\kappa} a(t).$$

Here are my questions:

1. If I start from the quantum Langevin equation and now try to derive a master equation, I see how the term $$-\kappa/2 a$$ would appear. However, I'm confused as to what the analogue of the term $$r_{in}$$ is in the Master equation. Does the master equation need to be modified to account for this somehow?

2. In practice, the input-output formalism suggests that calculating correlation functions of the cavity field alone is sufficient for understanding those of the output fields (assuming $$r_{in}$$ is coherent etc). But do I calculate correlation functions using the master equation? E.g. do I use $$\langle a^\dagger a \rangle = Tr[\rho a^\dagger a],$$ with $$\rho$$ the density matrix evaluated according to the Lindblad master equation? If so, why? And how to account for the "driving" term $$r_{in}$$ which appears in the quantum Langevin equation but not in the master equation?

EDIT: I can roughly see that if the input is taken as being coherent i.e., $$\langle r_{in} \rangle = \beta$$, then I could add a "driving" term to the system Hamiltonian $$H_C$$ of the form $$\beta (a + a^\dagger)$$, which reproduces the equation of motion for $$a$$ with $$r_{in}$$. But this line of reasoning seems too ad-hoc, since the input-output formalism was designed to capture correlations between the bath and the system.

Any help would be appreciated, including references to clear exposition regarding these formalisms and their equivalence (or lack thereof).