Let $f : \Bbb R^n \to R \cup\{+ \infty\}$ be a piece-wise convex function, in the sense that $f$ admits the following representation (for simplicity consider only two pieces)
$$f(x)=\left\{\begin{matrix} f_1 (x)& x \in P_1\\ f_2 (x)& x \in P_2\\ + \infty& \rm{otherwise} \end{matrix}\right.$$
Where $f_i$ are $C^2$ and convex on whole $\Bbb R^n$, (equivalently have PSD hessian everywhere) and $P_i$ are convex polyhedrals whose union is convex polyhedral as well.
I'm looking for conditions on $f_1 , f_2 $ in terms of their Hessian which characterize the convexity of $f(x)$.
"For a first order-type condition look at When a Piece-wise convex function is convex? "
As an example of piecewise convex function which is not convex ; $f(x) = - |x|.$.In this example the monotonicity of the slopes of pieces fail. So I believe this characterization may pass through the monotonicity of gradients of pieces.
Even In particular cases when $f_i$ are linear or quadratic what can we say?