  Accurate measurement of the cluster mass function is a crucial element in
efforts to constrain structure formation models, the normalisation of the
matter power spectrum and the cosmological matter density, and the nature and
evolution of dark energy. Large weak lensing surveys of ~20,000 galaxy clusters
and groups will be key tools in the observational pursuit of that goal. These
weak lensing studies often proceed by stacking the lensing signals of many
clusters and groups binned by mass-correlated observables such as richness and
luminosity; typically such analyses ignore the triaxial structure of dark
matter halos on the assumption that the averaging of many shear signals within
each mass bin makes its effects (as large as factors of two in mass model
parameter estimates from individual clusters) negligible. We test this
assumption and find that triaxiality can bias 3D virial mass estimates compared
to those for a spherical population by a few percent if suboptimal mass
estimators are used. This bias affects not only direct lensing constraints on
the mass function but can also affect the scatter and normalization of the
mass-observable relations derived from lensing that are so crucial to
constraining the cluster mass function with large samples. However, we
demonstrate that a careful choice of mass estimator can remove the bias very
effectively if the lensing signals from a sufficient number of triaxial halos
are averaged together, and further quantify that sufficient number for adequate
shape averaging. We thus show that by choosing observable bins to contain an
adequate number of halos and by utilizing a carefully chosen 3D mass estimator
stacked weak-lensing analyses can give unbiased constraints on the triaxial
mass function.
