Message: =?UTF-8?B?QnVnPz8=?= A question of G4EqEMFieldWithSpin.cc Not Logged In (login)

## =?UTF-8?B?QnVnPz8=?= A question of G4EqEMFieldWithSpin.cc

Forum: Fields: Magnetic and Otherwise
Date: 04 Nov, 2009
From: Hiromi Iinuma <Hiromi Iinuma>

 Hello, I am checking spin direction as a function of time in electromagnetic field. G4EqEMFieldWithSpin.cc includes Thomas-BMT equation as follows: http://www-geant4.kek.jp/lxr/source//geometry/magneticfield/src/ G4EqEMFieldWithSpin.cc#L27 ------snip--------- 128 G4ThreeVector BField(Field,Field,Field); 129 G4ThreeVector EField(Field,Field,Field); 130 131 G4ThreeVector u(y, y, y); 132 u *= pModuleInverse; 133 134 G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u); 135 G4double ucb = (anomaly+1./gamma)/beta; 136 G4double uce = anomaly + 1./(gamma+1.); 137 138 G4ThreeVector Spin(y,y,y); 139 140 G4ThreeVector dSpin 141 = ParticleCharge*omegac*( ucb*(Spin.cross(BField))-udb*(Spin. cross(u)) 142 // from Jackson 143 // -uce*Spin.cross(u.cross(EField)) ); 144 // but this form has one less operation 145 - uce*(u*(Spin*EField) - EField*(Spin *u)) ); 146 ----snip-------- I think "EField" or "usb" should be divided by "c_light". Relativistic charged particle feels electric field as magnetic field via "\vec{B} =\vec{beta} x \vec{E} /light_c". In the source code (G4EqEMFieldWithSpin.cc), dimension does not match. "EField [volt/m]=[kg*m/(sec^3*A)]" "BField[tesla]=[kg/(sec^2*A)]" Without applying "EField *=1/light_c " or "uce = uce/light_c", simulated spin rotation frequency do not agree with the correct frequency from Thomas-BMT equation. If you look at a different part of "G4EqEMFieldWithSpin.cc", this problem may be clear. -----snip------- 101 G4double cof2 = Energy/c_light ; -----snip-------- 117 dydx = cof1*(cof2*Field + (y*Field - y*Field)) ; 118 119 dydx = cof1*(cof2*Field + (y*Field - y*Field)) ; 120 121 dydx = cof1*(cof2*Field + (y*Field - y*Field)) ; ------snip-------- In this part, Electric field; Field[3-5] is multiplied by 1/c_light. Here, 128 G4ThreeVector BField(Field,Field,Field); 129 G4ThreeVector EField(Field,Field,Field); Does anybody has such a problem? Thanks in advance, Hiromi 

1 Re: =?UTF-8?B?QnVnPz8=?= A question of G4EqEMFieldWithSpin.cc   (Kevin Lynch - 05 Nov, 2009)  Re: =?UTF-8?B?QnVnPz8=?= A question of G4EqEMFieldWithSpin.cc   (Hiromi Iinuma - 05 Nov, 2009)  Re: =?UTF-8?B?QnVnPz8=?= A question of G4EqEMFieldWithSpin.cc   (Kevin Lynch - 06 Nov, 2009)
 to: "=?UTF-8?B?QnVnPz8=?= A question of G4EqEMFieldWithSpin.cc"
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 ]