Is it OK to mount a smoke detector vertically?
You can mount them vertically, but they have to be installed 4-12 inches (spacing usually on the instructions) from the ceiling.  So it might be better to put in on the column than the beam, depending on how large that beam is.

More information from FEMA