Studies on effects of geometry and minority carrier distribution pattern in bipolar transistors and pin diodes