Message: Electric Field does not change electron energy? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Electric Field does not change electron energy? 

Keywords: Electric Field does not change electron energy?
Forum: Fields: Magnetic and Otherwise
Date: 26 Oct, 2004
From: Emil Frlez <Emil Frlez>

 Dear GEANT4 practitioners,

 I have a question about charge particle tracking in
 a combined magnetic and electric field. Two years ago,
 with the GEANT4.4.2 version I was using the code to track
 1 MeV electron in a uniform magnetic field. Problem
 then was that e- was (nonphysically) changing energy
 while tracked in the B field.

 Now, I am using GEANT4.6.2.p01, and, after studying
 Fermilab Beam Tools classes and their MuCool example, 
 think that I know how to write a user code to track
 a particle in the combined EM field.

 When I examine the visualized electron track and
 dump the coordinates, energies, global times, etc
 at the each step into a file and study it offline,
 it seems that my code now does the proper tracking.
 Except for one thing: the kinetic energy is now
 always unchanged, even with the sizable electric field!

 I used the modified examples/extended/electromagnetic/TestEm5
 as a template. Beam Tools correspond to GEANT4.5 version,
 but my code compiles without any warning. I set explicitly
 fieldMgr->SetFieldChangesEnergy(true), as is done in
 Beam Tools, even though I cannot find SetFieldChangesEnergy
 function anywhere in the current sources ;8-(

 I will try to compile and run some Electric field examples
 in  ~/geant4.6.2.p01/examples/extended/field/*, but maybe
 there is someone out there who can point to my obvious 
 mistake and save me some time in debugging ;8-)
 Why 30 kV/cm electric field has no effect on the energy of
 1 MeV e- over several meters path?

					 Best Regards, Emil Frlez 

 Here is the summary, 1 MeV e- in E & B fields:

 In I define:

G4VPhysicalVolume* DetectorConstruction::Construct()
  // AbBA ElectroMagnetic field

    G4double newValue = 2.5E-1*mm;
    static G4bool fieldIsInitialized = false;
      abBAField* myField = new abBAField;

     G4EqMagElectricField *fEquationE = 
           new G4EqMagElectricField(myField);

     // Get transportation, field, and propagator  managers

     G4TransportationManager  *pTransportMgr= 

     G4FieldManager* fieldMgr = pTransportMgr->GetFieldManager();
     G4PropagatorInField *pFieldPropagator= 

     G4double newEpsMin=2.5e-7;
     G4double newEpsMax=0.05;

     // Need to SetFieldChangesEnergy to account for a electric field

     G4MagIntegratorStepper *pStepper = new G4ClassicalRK4(fEquationE,8);

     // Set the field


    // Create a cord finder providing the (global field, min step length,
     // a pointer to the stepper)

     G4ChordFinder* pChordFinder = new G4ChordFinder( myField,

    fieldIsInitialized = true;

I define field derived from G4MagneticField class in, namely

abBAField::abBAField() {;} abBAField::~abBAField() {;} void abBAField:: GetFieldValue(const double Point[4], double *Bfield) const {

  for (G4int kk=0; kk<6; kk++) Bfield[kk]=0.; // initialize field to zero

   Bfield[0] = 2. * tesla;
   Bfield[1] = 0.;
   Bfield[2] = 0.;

  Bfield[3] = 30.*kilovolt/cm;
  Bfield[4] = 0.*kilovolt/cm;
  Bfield[5] = 0.*kilovolt/cm;

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

 Add Message Add Message
to: "Electric Field does not change electron energy?"

 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 ]