Message: ucn spintracking precision  Not Logged In (login) 
Hi,
I am developing a spintracking simulation, using G4Mag_SpinEqRh and G4ClassicalRK4. My testfield is defined as G4UniformMagField(G4ThreeVector(0.,0.,1.e6*tesla)); If my calculations a correct, I would expect 2916 spinrotations after 100 seconds. But I am only getting 2912. I already tried altering the step sizes, but nothing changed. I am using these at the moment: fieldMgr>SetAccuraciesWithDeltaOneStep(1e10*mm); //sets deltaonestep=val, deltaIntersection=0.4*deltaonestep //Min/Max EpsilonStep = relative error for each integrationstep fieldMgr>SetMinimumEpsilonStep(1e10); fieldMgr>SetMaximumEpsilonStep(1e10); //absolute error when interpolationg trajectory with linear chords fieldMgr>GetChordFinder()>SetDeltaChord(1e4 * mm); 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. Later in the code the spin is calculated as follows: G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u); //~1e17 G4double ucb = (anomaly+1./gamma)/beta; //~1e8 dSpin = omegac*(ucb*(Spin.cross(BField))udb*(Spin.cross(u))); 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... I 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. Has anyone an idea why the code is providing wrong results? Thanks in advance! Greetings, Max

Inline Depth:  Outline Depth:  Add message: 
to: 