Particle acceleration, magnetic field generation, and emission in relativistic shocks