Let $\{x_i\mid i\in \mathbb{Z}\}$ be a partition of $\mathbb{R}$ with equal distance $h>0$, and a given function $f\in L^2(\mathbb{R})$. I approximate $f$ by $P_hf$, the $L^2$ projection of $f$ on piecewise constant function defined as $$P_hf(x)=\sum_j a_j 1_{(x_j,x_{j+1}]}(x),\; x\in \mathbb{R},\quad a_j=\frac{1}{h}\int_{x_j}^{x_{j+1}}f(y)\,dy.$$
I have shown $h\to 0$, $\|P_hf-f\|_{L^2(\mathbb{R})}\to 0$. Moreover, if $f\in H^1(\mathbb{R})$, using Poincare inequality on each subinterval, I get a order 1 convergence. If I require $f$ has higher regularity, is it possible to get a convergence rate higher than 1?
I asked the same question on MSE. But I haven't got any response yet.
What I have tried:
By using Cauchy-schwarz on each subinterval and summizing them up (basically the proof of Poincare inequality), I get $$\|P_hf-f\|_{L^2(\mathbb{R})}\le h\|f\|_{H^1(\mathbb{R})},$$ but I am not sure whether this is the best approximation rate I can get. Is there any reference about this problem?