  We analyze a class of non-Hermitian quadratic Hamiltonians, which are of the
form $ H = {\cal{A}}^{\dagger} {\cal{A}} + \alpha {\cal{A}} ^2 + \beta
{\cal{A}}^{\dagger 2} $, where $ \alpha, \beta $ are real constants, with $
\alpha \neq \beta $, and ${\cal{A}}^{\dagger}$ and ${\cal{A}}$ are generalized
creation and annihilation operators. Thus these Hamiltonians may be classified
as generalized Swanson models. It is shown that the eigenenergies are real for
a certain range of values of the parameters. A similarity transformation
$\rho$, mapping the non-Hermitian Hamiltonian $H$ to a Hermitian one $h$, is
also obtained. It is shown that $H$ and $h$ share identical energies. As
explicit examples, the solutions of a couple of models based on the
trigonometric Rosen-Morse I and the hyperbolic Rosen-Morse II type potentials
are obtained. We also study the case when the non-Hermitian Hamiltonian is
${\cal{PT}}$ symmetric.
