  We perform population synthesis studies of different types of neutron stars
(thermally emitting isolated neutron stars, normal radio pulsars, magnetars)
taking into account the magnetic field decay and using results from the most
recent advances in neutron star cooling theory. For the first time, we confront
our results with observations using {\it simultaneously} the Log N -- Log S
distribution for nearby isolated neutron stars, the Log N -- Log L distribution
for magnetars, and the distribution of radio pulsars in the $P$ -- $\dot P$
diagram. For this purpose, we fix a baseline neutron star model (all
microphysics input), and other relevant parameters to standard values (velocity
distribution, mass spectrum, birth rates ...), allowing to vary the initial
magnetic field strength. We find that our theoretical model is consistent with
all sets of data if the initial magnetic field distribution function follows a
log-normal law with $<\log (B_0/[G])>\sim 13.25$ and $\sigma_{\log B_0}\sim
0.6$. The typical scenario includes about 10% of neutron stars born as
magnetars, significant magnetic field decay during the first million years of a
NS life (only about a factor of 2 for low field neutron stars but more than an
order of magnitude for magnetars), and a mass distribution function dominated
by low mass objects. This model explains satisfactorily all known populations.
Evolutionary links between different subclasses may exist, although robust
conclusions are not yet possible.

High Energy Astrophysical Phenomena