The role of seven-membered ring in the photoisomerization and photodissociation of small aromatic molecules