One should not confuse a particle with a point-like object. Photons are particles in the sense that they can be counted, have momentum, etc. They are however not point-like. Just like an electron in QM is extended in space, photons are extended in space. Their spatial structure is the mode structure of the electromagnetic field, of which they are excitations. In optical region the wave length of electromagnetic field is a few hundred nanometers, whereas the size of an atom is a fraction of a nanometer. Thus, one cannot meaningfully speak of a "photon passing through an atom".
On the other hand, one does frequently assume that an atom is interacting with an electromagnetic field that is constant in space - in other words, an atom can be viewed as a point-like object. In particular, atoms passing through cavities localuzing electromagnetic field is a rather common experimental and device setup, e.g., in the H-maser.
If we discuss such an atom passing through a cavity, the probability of it absorbing a photon can by calculated as
$$
P(\tau) = e^{-\Gamma \tau}$$
where $\Gamma$ is the absorption rate, calculated using the Fermi golden rule, whereas $\tau$ is the passage time, i.e., the time that the atom spends in the cavity. Note however, that using the Fermi golden rule assumes that the transition rate is small, and that the atom does not interact again with the field after emitting/absorbing the photon. If atoms spend long time in the cavity, as in actual masers/lasers, one needs to resort to more complex midels, such as Jaynes-Cummings or, in case of many atoms, Dicke model.