You asked
What are the alternatives to the pentax smc da 40mm f 2 8 xs?
Here is what the site says about that.
From Pentax smc DA 40mm f/2.8 XS: Pentax smc DA 40mm f/2.8 XS: A prime lens by Pentax for APS-C cameras, 40mm f/2.8. An ultra-thin pancake, even slimmer than the 40mm Limited. Specs - Maker: Pentax - Focal length: 40mm (prime) - Maximum aperture: f/2.8 - Made for: APS-C sensors - Mounts: Pentax K - Stabilised: no - Autofocus: yes What it frames like - On APS-C (Pentax K): like 60mm on full frame; f/2.8 gives about the depth of field of f/4.2 ...
From Focal length converter: Aperture and depth of field: The f-number sets exposure, and that doesn't change with sensor size: f/2.8 gives the same brightness on a phone as on medium format. Depth of field does change. At the same framing, multiply the f-number by the crop factor to get the full-frame aperture with the same depth of field: f/1.8 on APS-C gives about the background blur of f/2.7 on full frame, and f/1.8 on Micro Four Thirds about ...
Quoted from this site's pages.