The Code

A Gaussian1 density field is generated on a grid, in a way much similar to that used to generate the initial conditions for an N-body simulation. The number of grid points per side is assumed to be a power of two, so as to use Fast Fourier Transforms (FFT) (the extension to FFT that use numbers that are not power of two is in progress).

PINOCCHIO consists of two step:

    Accretion: If a collapsing particle is not a local maximum of the collapse redshift, we check whether any of its neighbors has already been assigned to a halo. If the point neighbors a single halo, then we compute from its Zel'dovich velocity the position of the halo and of the mass particle at the collapse redshift, and their mutual distance. If the mass element falls within a fraction of its typical radius (equal in grid units to the cubic root of the number of particles) from the center of mass of the halo, then we accrete the particle onto that halo. This criterion selects haloes with roughly fixed overdensity.

Merging: If some of the neighbors of a collapsing particle belong to different haloes, then we merge these haloes if their distance (calculated as described above) is smaller than a fraction of the largest of their typical radii. Moreover, we use the previous condition to check whether the particle is to be accreted on one of the groups.

    Filaments: Collapsed mass elements which are not local maxima and do not accrete onto a halo are assigned to a filament group. Note that filaments have indeed undergone orbit-crossing, although they do not belong to relaxed haloes. Later, filament points are still accreted onto a halo if they neighbor an accreting point.



1 For all technical details we refer to the articles: Monaco et al. (2002a), Taffoni et al. (2002) and Monaco et al. (2002b) and Monaco et al. (2013).