A semiconductor device has a semiconductor die with an encapsulant deposited over and around the semiconductor die. The light rail may include a plurality of ridges spaced from one another along a rail axis, the ridges being separated by grooves that are transverse to the rail axis. A fuel rail includes a socket for receiving the first end of the fuel injector. The device further includes a second optical detection module for detecting a nonlinear optical signal resulting from the interaction of the reflected excitation beam with the sample, and a processing module for processing the optical signals, detected by the first and second detection modules.