Consider the following hierarchical Bayes model. We observe random variables $X_1, X_2, ..., X_n$ conditionally independent and having Poisson distributions $X_i \sim Poiss(m_i\theta_i)$, where $m_i$ are known multipliers and $\theta_i$ are unknown parameters. Assume that $\theta_1, ..., \theta_n$ are independet random variables with the same distribution $Gamma(\alpha, \lambda)$. Parameter $\lambda$ is a random variable with $Gamma(\beta, \sigma)$ distribution. Hyperparameters $\alpha, \beta, \sigma$ are known.
I would like to compute the the joint distribution.
Is the following computation correct?
$P(X_1, X_2, ..., X_n|\theta_1, \theta_2, ..., \theta_n) P(\theta_1, \theta_2, ..., \theta_n| \lambda) P(\lambda) =$ $= \prod \limits_{i=1}^n P(X_i|\theta_1, \theta_2, ..., \theta_n) \prod \limits_{i=1}^n P(\theta_i|\lambda) P(\lambda) = $ $ \prod \limits_{i=1}^n \frac{(m_i\theta_i)^{x_i}}{x_i!} e^{-m_i\theta_i} \prod \limits_{i=1}^n \frac{\lambda^{\alpha}}{\Gamma(\alpha)} \theta_i^{\alpha-1}e^{-\lambda\theta_i} \frac{\sigma^{\beta}}{\Gamma(\beta)} \lambda^{\beta-1} e^{-\sigma \lambda} $
(Next step is to propose Gibbs sampler.)