A right and left truncated gamma distribution with application to the stars