A method of fabricating a detector that involves: forming a trench (302) in a substrate (300), the substrate having an upper surface; forming a first doped semiconductor layer (304) on the substrate and in the trench; forming a second semiconductor layer (306) on the first doped semiconductor layer and extending into the trench, the second semiconductor layer having a conductivity that is less than the conductivity of the first semiconductor layer; forming a third doped semiconductor layer (312) on the second semiconductor layer and extending into the trench; removing portions of the first, second and third layers that are above a plane defined by the surface of the substrate to produce an upper, substantially planar surface and expose an upper end of the first doped semiconductor in the trench; forming a first electrical contact to the first semiconductor doped layer; and forming a second electrical contact to the third semiconductor doped layer.