# What is the meaning of a Fourier Transform in an electric field $E(\omega,t)$?

There is this electric field in one dimension:

$$E(\omega,t) = E_0 \cos(\omega t)$$

It is reaching the surface of a semiconductor. The number of photons reaching the surface per unit of area is given by

$$\frac{N}{A} = \frac{|\tilde{E}(\omega)|^2 c}{\hbar \omega}$$

Where $\tilde{E}(\omega)$ is:

$$\tilde{E}(\omega') = \frac{1}{2 \pi} \displaystyle\int_{-\infty}^{\infty} E(\omega,t) e^{i \omega' t} \, dt$$

So, when I make the Fourier Transform, are $\omega$ and $\omega'$ the same?

It is important to understand that we can state the electric field either in the time domain or in the frequency domain, never in both. I would recommend to avoid the notation $E(\omega,t)$ and instead replace $\omega$ by $\omega_0$ and drop the functional dependence in order to avoid confusion. A monochromatic field in the time domain is given by $$E(t) = E_0 \cos\omega_0 t = \frac{E_0}{2} (e^{-i\omega_0 t}+e^{i\omega_0 t} )$$ Here it is clear that $\omega_0$ is a fixed number, i.e. a parameter. The expansion into exponential functions helps us to see, that the Fourier transform must consist of two delta functions, as the exponential function is the Kernel of the Fourier transform. The electric field in the fourier domain is then $$\tilde{E}(\omega) = \frac{E_0}{2}\left( \delta(\omega-\omega_0) + \delta(\omega+\omega_0) \right)$$ For now everything is fine. However one should note that your monochromatic field is somewhat problematic as it contains infinite energy as follows \begin{align} E_\mathrm{field} &\propto \int |E(t)|^2 \mathrm{d}t = \infty\\ & = \int |\tilde{E}(\omega)|^2 \mathrm{d}\omega \quad \text{(Parselval's theorem)} \end{align} If you look at the spectrum, i.e. $|\tilde{E}(\omega)|^2$, this is especially problematic because in a monochromatic wave all energy is focused into a single frequency, here $\omega_0$. Therefore your expression for the number of photons is simply undefined. So you just simply cannot assume a purely monochromatic wave in this case. Instead for example assume a finite wave packet with an electric field $$E(t) = E_0 \exp\left(-\frac{t^2}{2 \sigma_t^2}\right) \cos\omega_0t$$ With this field everything works out.
Another alternative is to change your expression for the number of photons by using the Poynting vector $\mathbf{S}$, which is the energy flux per unit area and is well defined even for monochromatic waves (the problem in your formula is that it assumes that the all the photons in the field are absorbed). $$\mathbf{S} = \frac{1}{\mu_0} \mathbf{E}(t) \times \mathbf{B}(t)$$