Trapping of an electromagnetic wave by the boundary of created plasma