Message: Re: How can i construct local Electric field? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: How can i construct local Electric field?  

Forum: Fields: Magnetic and Otherwise
Re: Question How can i construct local Electric field? (HyeonDeok Seo)
Date: 23 Jan, 2015
From: John Apostolakis <John Apostolakis>


Unfortunately there is no specific example for local electric field.  

To create and use one, you need to combine what you do for two cases - the global electric field and the local magnetic field.
Here is a guideline how to do it: 

 A. similarly to the global electric field:  
     1) construct your field object - either an existing class ( Uniform ) or as an instance of your own non-uniform class
     2) construct the equation of motion for this case ( the one that has both electric and magnetic fields )
     3) create a chord finder and field manager

 B. similarly to the local magnetic field:
     1) you need to assign the field manager to the logical volume (or potentially region) which you wish to use it in.

Note that the Electric field will be in *global* coordinates.  Both the position given as input and the field returned must be in global coordinates. Maybe this is what is cause you problems. 

The term "local" electric field refers to the fact that it is used in one logical volume  ( or potentially a region ) to override a field which is used for the whole setup / geometry.  

In case you need to use the local coordinates instead of the global coordinates, it is possible to use the local to global transformation from current G4TouchableHistory to make this transformation in your local EM field class.  Look the the PreStepPoint's touchable.  You can get this from the current step, which is available from the G4SteppingManager which is a singleton.

You can find the details in the Users Guide for Application Developers.

I hope that these suggestions resolve your issue(s).  In case you are still stuck, please explain where.

Best regards,
John Apostolakis,  PH Department, CERN
SFT (SoFTware for Experiments) Group

> On 23 Jan 2015, at 07:37, HyeonDeok Seo <> wrote:
> *** Discussion title: Fields: Magnetic and Otherwise
> Hello ~^^
> I've tried for few weeks to construct Local Electric field, But i can't.
> I can implemented Global&Local Magnetic Field and Global Electric field,
> except Local electric field.
> Also, I Can not fine example for local electric field.
> Do you guys know examples for implementing local electric field??
> Please let me know &#12640;&#12640;
> -------------------------------------------------------------
> Visit this GEANT4 at message (to reply or unsubscribe) at: 

 Add Message Add Message
to: "Re: How can i construct local Electric field? "

 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 ]