n.$

The rest of the paper is organized as follows. In section \[sec pre\], we recall classical results, introduce our affine connections, fix the notations, and give the Ricci curvature under affine connections. In section \[sec Bochner\], we establish the Bochner formula and prove the main theorem, Theorem \[theo RF0\]. In section \[sec inequalities\], we prove the Heintze-Karcher type and the Minkowski type inequalities of Theorem \[thm ineq\]. In section \[sec Lich\], we prove the Poincare type and the Lichnerowicz type inequalities. In the [**Appendix**]{}, we prove Proposition \[thm Ricci\].  

Preliminaries and notations {#sec pre}
===========================

Classical results.
------------------

Let us first recall the classical Reilly’s formula [@Re1]. For a bounded domain $\O$ with boundary $\S$ in an $n$-dimensional smooth Riemannian manifold $(M, \bar g)$ and $\phi\in C^\infty(\bar \O)$, the classical Reilly’s formula reads as $$\begin{aligned}
&&\int_\O (\bd \phi)^2-|\bn^2 \phi|^2 -Ric(\bn \phi, \bn \phi) d\O=\int_\S H\phi_\nu^2+h(\n \phi, \n \phi)+ 2\phi_\nu\De \phi dA.\end{aligned}$$ Here and throughout this paper, $\bn$ and $\bd$ denote the gradient and the Laplacian on $\O$ respectively, $\n$ and $\De$ denote the gradient and the Laplacian on $\S$ respectively with respect to the induced metric from $\bar g$. $d\O$ and $dA$ are the Riemannian volume form of $\bar 