A narrow, perfectly collimated beam attenuates exponentially with the linear attenuation coefficient μ and slab thickness x:
I(x) = I₀ · e^(−μx) (Beer–Lambert, narrow beam)
But a real detector behind a shield also picks up photons that Compton-scattered inside the material and happened to re-emerge heading roughly forward — they never left the "beam" in the sense that matters for dose. The true transmitted intensity is higher than Beer–Lambert predicts, by the buildup factor B(μx):
I_broad(x) = B(μx) · I₀ · e^(−μx)
B(μx) = 1 + a·(μx)·e^(b·μx) (Berger single-parameter fit, a,b per material)
This simulator fires individual photons at a slab and, at every small step ds, rolls the interaction probability p = 1 − e^(−μ·ds). On an interaction it samples whether the photon photoelectrically absorbs (removed, more likely at low energy / high Z) or Compton-scatters (keeps going in a new random forward-biased direction, losing some energy). Two virtual detectors behind the slab count: a narrow one that only accepts photons still on their original straight line, and a broad one that accepts everything that reaches the far side. Their ratio, averaged over many photons, converges to the buildup factor above.
- Material — sets the base attenuation coefficient (μ ∝ effective Z and density) and the Compton-vs-photoelectric split.
- Photon energy — higher energy means fewer photoelectric absorptions (more forward-scattered survivors, higher B) and a lower μ per material.
- Slab thickness — in mean free paths (mfp = 1/μ); thicker slabs both attenuate more and build up more, since scattered photons get more chances to still exit forward.
Real-world relevance: this is exactly why reactor and radiotherapy shielding calculations use tabulated buildup factors rather than raw Beer–Lambert — a "3 mean-free-path" concrete wall passes noticeably more dose than e^(−3) ≈ 5% alone would suggest.