Transverse single spin asymmetries of heavy flavor electrons and charged pions in 200 GeV p + p ↑ collisions at midrapidity