  Studying the statistical properties of the large-scale structure in the
Universe with weak gravitational lensing is a prime goal of several current and
forthcoming galaxy surveys. The power that weak lensing has to constrain
cosmological parameters can be enhanced by considering statistics beyond
second-order shear correlation functions or power spectra. One such
higher-order probe that has proven successful in observational data is the
density split statistics (DSS), in which one analyses the mean shear profiles
around points that are classified according to their foreground galaxy density.
In this paper, we generalise the most accurate DSS model to allow for a broad
class of angular filter functions used for the classification of the different
local density regions. This approach is motivated by earlier findings showing
that an optimised filter can provide tighter constraints on model parameters
compared to the standard top-hat case. We build on large deviation theory
approaches and approximations thereof to model the matter density PDF, and on
perturbative calculations of higher-order moments of the density field. The
novel addition relies on the generalisation of these previously employed
calculations to allow for general filter functions and is validated on several
sets of numerical simulations. The revised model fits well the simulation
measurements, with a residual systematic offset that is small compared to the
statistical accuracy of current weak lensing surveys. The accuracy of the model
is slightly lower for a compensated filter than for a non-negative filter
function, and that it increases with the filter size. Using a Fisher matrix
approach, we find constraints comparable to the commonly used two-point cosmic
shear measures. Hence, our DSS model can be used in competitive analyses of
current cosmic shear data, while it may need refinements for forthcoming
lensing surveys.
