I was reading Sakurai's Modern QM and it talks about Stern-Gerlach experiment in chapter 1. As silver atom passes through non-uniform magnetic field and enters detector downstream, a measurement is made and the atom collapses into either Sz+ or Sz- eigenstate.
Now I am a bit confused, does silver atom's wavefunction collapses as it enters B-field or the detector? The former doesn't make sense because there are magnetic field everywhere on earth so does it mean wavefunction is always collapsed (in the direction of local magnetic field gradient)? Sure the non-homogeneity of earth's magnetic field is orders of magnitude smaller than the apparatus in Stern-Gerlach experiment, but if magnitude of B-field gradient is the answer does it imply that that there exist a threshold magnetic gradient below which wavefunction won't collapse? That doesn't sound right either.
I am more inclined to think that the particle detector collapses the wavefunction. If that's the case, what's so special about the detector that causes wavefunction to collapse? I mean, particle detector like scintillators ultimately relies on EM interaction between silver atom and detector material to generate electric signal. If magnetic interaction with the magnet downstream doesn't collapse the wavefunction, how could EM interaction inside the detector collapse the wavefunction?