Message: ucn spintracking precision Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question ucn spintracking precision 

Forum: Fields: Magnetic and Otherwise
Date: 15 May, 2013
From: Max <Max>

Hi,

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 &#8722;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!

Greetings, Max

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Warning: Re: ucn spintracking precision   (Gumplinger Peter - 16 May, 2013)
(_ Ok: Re: ucn spintracking precision   (Max - 17 May, 2013)
 Add Message Add Message
to: "ucn spintracking precision"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]