  We present a lattice QCD computation of the b-quark mass, the B and B_s decay
constants, the B-mixing bag parameters for the full four-fermion operator basis
as well as determinations for \xi and f_{Bq}\sqrt{B_i^{(q)}} extrapolated to
the continuum limit and to the physical pion mass. We used N_f = 2 twisted mass
Wilson fermions at four values of the lattice spacing with pion masses ranging
from 280 to 500 MeV. Extrapolation in the heavy quark mass from the charm to
the bottom quark region has been carried out on ratios of physical quantities
computed at nearby quark masses, exploiting the fact that they have an exactly
known infinite mass limit. Our results are m_b(m_b,
\overline{\rm{MS}})=4.29(12) GeV, f_{Bs}=228(8) MeV, f_{B}=189(8) MeV and
f_{Bs}/f_B=1.206(24). Moreover with our results for the bag-parameters we find
\xi=1.225(31), B_1^{(s)}/B_1^{(d)}=1.01(2), f_{Bd}\sqrt{\hat{B}_{1}^{(d)}} =
216(10) MeV and f_{Bs}\sqrt{\hat{B}_{1}^{(s)}} = 262(10) MeV. We also computed
the bag parameters for the complete basis of the four-fermion operators which
are required in beyond the SM theories. By using these results for the bag
parameters we are able to provide a refined Unitarity Triangle analysis in the
presence of New Physics, improving the bounds coming from B_{(s)}-\bar B_{(s)}
mixing.
