Suppose we are given a positive semi-definite matrix $C \in \mathbb{R}^{n \times n}$ and suppose we define the function $\sigma_{s}(\boldsymbol{x}) = [\max \lbrace x_1, s \rbrace, \cdots, \max \lbrace x_n, s \rbrace]^T$ that takes an input vector $\boldsymbol{x}$ and outputs a vector where $\max \lbrace x_i, s \rbrace$ is the $i^{th}$ component. I would like to show that the following function is convex for all $\boldsymbol{x} \in \mathbb{R}^n$ and any fixed $s \in \mathbb{R}$: $$f(\boldsymbol{x}) = \sigma_s(\boldsymbol{x})^T C \sigma_s(\boldsymbol{x})$$
I initially tried to go about this using common approaches for reasoning about convexity, namely by looking at the composition going on here and noticing that various of the functions in the composition are convex or whatnot. However, since I wish for $C$ to be an arbitrary positive semi-definite matrix, I have been running into issues using the typical techniques I am familiar with due to the non-smooth properties of $\sigma_s(\boldsymbol{x})$.
I have gone a different route that I feel may not technically work, but I will present it for you to comment on. Namely, one can observe (with some manipulations) that $\max\lbrace x, s \rbrace = \lim_{t\rightarrow\infty} \frac{1}{t} \log \left(\exp(ts) + \exp(tx)\right) = \lim_{t\rightarrow\infty} \alpha_s^t(x)$, where $\alpha_s^t(x) = \frac{1}{t} \log \left(\exp(ts) + \exp(tx)\right)$. My thought was to fix some arbitrary $t > 0$ and $s \in \mathbb{R}$ and then define $\bar{\sigma}_s^t(\boldsymbol{x})$ as $$\bar{\sigma}_s^t(\boldsymbol{x}) = \left[\alpha_s^t(x_1), \cdots, \alpha_s^t(x_n)\right]^T$$
and use this new definition to show that the below function is convex $$\bar{f}^t(\boldsymbol{x}) = \bar{\sigma}_s^t(\boldsymbol{x})^T C \bar{\sigma}_s^t(\boldsymbol{x})^T$$
We can notice that now the function is smooth and so we can reason about whether this function is convex by computing the hessian and seeing if it is positive semi-definite. If one goes through some calculations, we can find that the hessian of $\bar{f}$ is $$H_{\bar{f}^t}(\boldsymbol{x}) = 2J_{\bar{\sigma}_s^t}(\boldsymbol{x}) C J_{\bar{\sigma}_s^t}(\boldsymbol{x})$$
where $J_{\bar{\sigma}_s^t}(\boldsymbol{x})$ is the jacobian of $\bar{\sigma}_s^t$ and is symmetric and diagonal, in this case, due to the element-wise nature of $\bar{\sigma}_s^t$. This representation for the Hessian can be readily shown to be positive semi-definite, namely by observing that for any $\boldsymbol{x}$ and any $\boldsymbol{u} \neq \vec{0}$, we have that \begin{align} \boldsymbol{u}^T H_{\bar{f}^t}(\boldsymbol{x}) \boldsymbol{u} &= 2\boldsymbol{u}^T J_{\bar{\sigma}_s^t}(\boldsymbol{x}) C J_{\bar{\sigma}_s^t}(\boldsymbol{x}) \boldsymbol{u} \\ &= 2 \left(J_{\bar{\sigma}_s^t}(\boldsymbol{x}) \boldsymbol{u} \right)^T C \left(J_{\bar{\sigma}_s^t}(\boldsymbol{x}) \boldsymbol{u}\right) \\ &\geq 0 \tag{$C$ is positive semi-definite} \end{align}
Thus, we find that $\bar{f}^t$ is convex for a fixed $t > 0$ and $s \in \mathbb{R}$. Since these were chosen arbitrarily, it should imply that the function is convex for any $t > 0$ and all $s \in \mathbb{R}$. Now my issue is the following: as I take $t \rightarrow \infty$, $\bar{f} \rightarrow f$ and this seems to imply to me that $f$ is convex for any $s \in \mathbb{R}$.. but clearly the non-smoothness arises for non-finite $t$ so I am not sure if this implication is really correct.
If anyone has any comments on my reasoning or other suggestions, I would appreciate it.
Update
After thinking more about it, I think I found a way to rationalize this. For a fixed $t > 0$, the above work proved that \begin{align*} \bar{f}^t\left( \alpha \boldsymbol{u} + (1 - \alpha) \boldsymbol{v} \right) \leq \alpha \bar{f}^t\left(\boldsymbol{u}\right) + (1 - \alpha)\bar{f}^t\left( \boldsymbol{v} \right) \tag{$\forall \alpha \in [0,1]$} \end{align*}
If I take the limit on both sides as $t \rightarrow \infty$, we can obtain \begin{align*} \lim_{t\rightarrow\infty}\bar{f}^t\left( \alpha \boldsymbol{u} + (1 - \alpha) \boldsymbol{v} \right) &\leq \alpha \lim_{t\rightarrow\infty} \bar{f}^t\left(\boldsymbol{u}\right) + (1 - \alpha) \lim_{t\rightarrow\infty} \bar{f}^t\left( \boldsymbol{v} \right) \tag{$\forall \alpha \in [0,1]$} \\ \implies f\left( \alpha \boldsymbol{u} + (1 - \alpha) \boldsymbol{v} \right) &\leq \alpha f\left(\boldsymbol{u}\right) + (1 - \alpha)f\left( \boldsymbol{v} \right) \tag{$\forall \alpha \in [0,1]$} \end{align*}
which, unless I am doing something illegal here, should imply that $f$ is indeed convex.
Update 2
I realized there was a mistake in my claim that the smooth approximation $\bar{f}^t$, for some fixed positive integer $t$, is convex for any positive semidefinite matrix $C \in \mathbb{}R^{n \times n}$ and any $s \in \mathbb{R}$. The convexity is a function of both $s$ and $C$ and requires work to be understood to see what actually might work.