|Message: ucn spintracking precision||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
I am developing a spintracking simulation, using G4Mag_SpinEqRh and G4ClassicalRK4. My testfield is defined as G4UniformMagField(G4ThreeVector(0.,0.,1.e-6*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(1e-10*mm); //sets deltaonestep=val, deltaIntersection=0.4*deltaonestep //Min/Max EpsilonStep = relative error for each integrationstep fieldMgr->SetMinimumEpsilonStep(1e-10); fieldMgr->SetMaximumEpsilonStep(1e-10); //absolute error when interpolationg trajectory with linear chords fieldMgr->GetChordFinder()->SetDeltaChord(1e-4 * 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); //~1e-17 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!
|Inline Depth:||Outline Depth:||Add message:|