The photochemistry of hydrocarbons in the atmosphere of Titan