Device for positioning and retaining optical components