Analysis and control of ultrafast photoinduced reactions