Minimum of a constant and a random variable Let $X$ be a random variable and I now assume for simplicity that it is uniformly distributed on $[0,1]$.
Now fix $t \in [0,1]$ and let $Y_t$ be the random variable $Y_t:=\min \{t,X\}$.
I have problems computing for example the density
Computing the cdf is easy: 
Of course $P(Y_t \leq y)= 1- P(t>y,X>y)$. Now I tried to split this apart as if $t$ was just random variable independet of $X$ and this gives $P(Y_t \leq y)=y$ if $y<t$ and $1$ if $y\geq t$. 
However, I feel that taking the derivative is not the appropriate her since $Y_t$ attains
the value $t$ with positive probability. So $Y_t$ seems to be a random variable that is neither a discrete nor a continuous random variable. So maybe a density does not make sense.
However, in order to be able to compute expectation and so on, I would need a density.
In fact I guess everything becomes easy if I knew on which space $Y_t$ actually lived.
However, I have problems formalizing that. Can anybody help.
Maybe for the uniform distribution everything is easy by direct arguments. But I would like to see a general approach which is valid for $X$ having an continuous distribution.

Some probability distributions are discrete, some are continuous, and some are neither. If you want to use one integral-like formula for all, you can use the Riemann-Stieltjes integral.
Alternatively, every "reasonable" random variable (see discussion in the comments below) is a convex combination of a discrete random variable (formed by taking all its atoms, points with positive probability) and a continuous random variable (the rest). Whatever it is that you're calculating is a convex combination of the same thing on both parts, and for the latter you already know how to calculate things like expectation.
For example, suppose that $0 \leq t \leq 1$. Then $Y_t$ is a convex combination of the constant $t$ r.v. (with probability $1-t$), and of a uniform $[0,t]$ r.v. (with probability $t$). Hence its expectation is $$(1-t)t + t(t/2) = t-t^2/2.$$
