Template class for taking absorbtion probability into account