A silicon transition radiation detector for space and accelerator applications