Message: Re: ucn spintracking precision  Not Logged In (login) 
Hi Max,
> If my calculations a correct, I would expect 2916 spinrotations after > 100 seconds. But I am only getting 2912.
> In G4Mag_SpinEqR the anomaly for neutrons is defined as 2.913042725. I > don't know why, because the real value is −1.913042725 * �_N, but > it kind of works. The spin tracking code was originally written with only the muon spin in mind. For the muon, a definition for an 'anomaly' makes sense. Not so, for the neutron. To track the spin of a neutron, the variable used in the code of G4Mag_SpinEqR and named 'anomaly' has to have a certain numerical value for the integration to come out correct. We discovered recently that the value 2.913042725 is not completely correct because, as you mentioned, the neutron magnetic moment is defined in terms of the nuclear magnetic moment (e.g. the proton mass) while the BMT equation uses the particle's mass (e.g. the neutron mass). The correct value is: gfactor, 3.82608545 (NIST data) m_n = 1.674 927 351 e27 kg m_p = 1.672 621 777 e27 kg g_n used in BMT = g_p * m_n/m_p using the formula anomaly = (g2)/2: (3.82608545*1.674927351/1.672621777)/2.  1 = 2.9156797
> I am guessing, that there might be numerical errors, since my ucn are > very slow and thus udb and there relativistic effects don't occur... Well, for one, perhaps, but I'd be also suspicious to use the full blown BMT equation to precess the spin in a constant magnetic field over many rotations. The integral is numerical RK and there will surely be rounding errors eventually. It's best to precess a particle's spin while it is in a const. field analytically.
> have seen here, that the nonrelativistic case was once discussed: > http://hypernews.slac.stanford.edu/HyperNews/geant4/get/emfields/88/3/1.html > , but changing the line to dSpin = (3.8260837/2.) * > omegac*(Spin.cross(BField)); produces a very wrong result. dSpin = (3.8260837/2.) * omegac*(Spin.cross(BField)); I have never verified that the 3.8260837/2. in this posting is the correct number for the neutron precession. In version G4.9.10 (beta) the code in G4Mag_SpinEqR will read correctly for any particle and ion:
charge = particleCharge.GetCharge(); mass = particleMass; magMoment = particleCharge.GetMagneticDipoleMoment(); spin = particleCharge.GetSpin();
omegac = (eplus/mass)*c_light;
G4double muB = 0.5*eplus*hbar_Planck/(mass/c_squared);
G4double g_BMT; if ( spin != 0. ) g_BMT = (magMoment/muB)/spin; else g_BMT = 2.;
anomaly = (g_BMT  2.)/2.; calculated from the PDG magnetic moment. If there is another correction patch for 9.6 I'll change the neutron's numerical value to 2.9156797. Greetings, Peter

Inline Depth:  Outline Depth:  Add message: 
to: 