.. _physics-mergerTreeFilter: Merger Tree Filters =================== Class providing merger tree filters---boolean predicates applied to a whole merger tree that determine whether it should be evolved and included in the simulation output. Filters allow trees to be selectively skipped based on e.g.\ their root halo mass, the presence of specific substructure, or random subsampling. This is useful for restricting expensive calculations to a subset of trees or for implementing importance sampling. **Default implementation:** ``mergerTreeFilterAlways`` Methods ------- ``passes`` → ``logical`` Return true if the given ``tree`` passes the filter. * ``type(mergerTree), intent(in ) :: tree`` .. _physics-mergerTreeFilterAll: ``mergerTreeFilterAll`` ----------------------- A merger tree filter class which is the ``all`` combination of a set of other filters. .. _physics-mergerTreeFilterAlways: ``mergerTreeFilterAlways`` -------------------------- A merger tree filter which always passes. (Used mostly for testing purposes.) **(Default implementation)** .. _physics-mergerTreeFilterAny: ``mergerTreeFilterAny`` ----------------------- A merger tree filter class which is the ``any`` combination of a set of other filters. .. _physics-mergerTreeFilterAnyNode: ``mergerTreeFilterAnyNode`` --------------------------- A merger tree filter which passes the entire tree if at least one node within it satisfies a given galactic node filter, allowing selection of trees containing particular galaxy types or halo properties. Optionally applies a label to passing nodes or their entire branch, configured via ``[label]`` and ``[applyToDescendants]``. **Parameters** * ``[label]`` (default ``var_str(' ')``) — A label to apply to nodes that pass the filter. * ``[labelBranch]`` (default ``.false.``) — If true apply the label to the entire branch of any node that passes the filter. * ``[labelDescription]`` — A human-readable description of the label applied to nodes that pass the galactic filter, used to document what physical property or criterion the label represents in this tree filter. .. _physics-mergerTreeFilterBaseNode: ``mergerTreeFilterBaseNode`` ---------------------------- A merger tree filter which passes if the base node in the tree passes the given galactic filter. .. _physics-mergerTreeFilterTreeIndex: ``mergerTreeFilterTreeIndex`` ----------------------------- A merger tree filter which passes only the merger tree whose unique integer index matches a specified value, enabling selective processing or analysis of a single tree from a larger ensemble. The target tree index is specified by the ``[index]`` parameter. **Parameters** * ``[mergerTreeIndex]`` — The index of the merger tree to pass.