Theory of photoacoustic signal generation for optimized photoacoustic cells