Add a round-half spherical edge to a cylinder surface
Select the area where you want to add the semisphere (the same selected vertices in your picture).
Move the 3D cursor to the center of the selection.
Move the camera so that you're looking at the area from the side.
Select the left-most vertex of the previously selected area.
Use the spin tool to generate an 90 degree arc. You should get something like this:

Move the camera to the top of the cylinder.
With the vertices of the arc selected, use the spin tool again, now rotating 360 degrees and using as many steps as the number of vertices on the face of the cylinder. The result should look like this:

Select everything, and use "remove doubles".