Gabriele, John,.. As part of the Neutrino Factory/Muon Collider effort, we are still very much interested in studying particle transport in Geant4, in presence of strong electric field. As I am sure you are aware, if I apply an electric field, I expect the particle to eventually change direction and *accelerate*. This does not occur if I use the following setup: (from my DetectorConstruction.cc). : ExN01EFieldSpaceCharge* fullEMField = new ExN01EFieldSpaceCharge(); G4EqMagElectricField *fEquationE = new G4EqMagElectricField(fullEMField); G4MagIntegratorStepper *pStepper = new G4ClassicalRK4 (fEquationE, 6); fieldMgr->SetDetectorField(fullEMField); G4ChordFinder* pChordFinder = new G4ChordFinder(fullEMField, 10 * mm , pStepper); fieldMgr->SetChordFinder(pChordFinder); fullEMField->SetTimeForEfield(0.); My private class ExN01EFieldSpaceCharge has as base class G4ElectroMagneticField and has a concrete implementation of the required GetFieldValue method. The codes runs fine, an Electric field change the trajctory, in the correct direction. (if I expressed the Electric field in the adhoc units, which I haven't quite figure it out, but that's a detail!). However, for field corresponding to many MeV/m, the scalar velocity of the particle does not chage. Looking at the code, in various files, I indeed found code related to this issue. But it commented out (G4transportation.cc): // fTransportEndKineticEnergy= aFieldTrack.GetEnergy(); // Energy is wrong #if 0 G4ThreeVector endVelocity = aFieldTrack.GetVelocity(); G4double veloc_sq = endVelocity.mag2(); fTransportEndKineticEnergy = 0.5 * restMass * veloc_sq / ( 1 - veloc_sq / c_squared ); // Lorentz correction #endif So my questions are: a. Is there an option, or entire set of class(es) I missed? b. if not, why can't we accelerate particles in G4 ? c. How difficult it would be to implement? Is someone working on it? So far, I have been very, very pleased with G4 product and the C++ language. G4 is indeed superior to G3, no doubt about it, and I believe we need it for our project. So we are willing to put some effort to solve this problem, however, it will be a change in the core transportation algorithm.. Thank you!. Paul Lebrun.
Answers: It does not appear that you missed entire set of class or options. You do not observe the acceleration because of a problem in returning the correct final energy of a particle. Q> How difficult it would be to implement? Is someone working on it? It is not a question of implementing new functionality, only of verifying/fixing the current implementation - and in particular how the energy is obtained from the integration of the velocity. I have started to do this now, and I will hand it over to Vladimir Grichine by Tuesday - as I will be away. But in the current implementation you will have to choose a value of the step length, such that the energy does not vary greatly during a step (as the interference with energy loss is not taken care of.)
New tag of Transportation transport-V03-00-00 improves the calculation of the energy from the velocity. Submitted to system Integration Testing.
The tag transport-V03-00-00 includes a modified G4Transportation.cc: which improves the calculation of energy from the final velocity. Submitted to system integration testing.
The transportation tag and subsequent improvements in this area were incorporated in the last public release of Geant4, release 3.1 in April 2001.