Message: Re: Help setting up an Electric Field Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Help setting up an Electric Field 

Forum: Fields: Magnetic and Otherwise
Re: None Help setting up an Electric Field (Adam)
Re: Feedback Re: Help setting up an Electric Field (Gumplinger Peter)
Re: None Re: Help setting up an Electric Field (Adam)
Date: 10 Jul, 2007
From: John Apostolakis <John Apostolakis>

Dear Adam,

In an application in which you need a local electric field, you should 
have two field managers:
  - a global field manager, which holds no field
  - a local field manager, which holds the electric field and the 
classes which define the equation of motion for charged particles.

If you have copied examples/extended/field/field02 you will need to 
modify it so that it does not use the GlobalFieldManager, but instead 
creates only a localFieldManager.

You can see this in the field03 example too - but it suffices simply to 
the calls to GetGlobalFieldManager() in the Setup method and instead add 
a localFieldManager object in the setup method and create such an object.

After that it does not matter in what class you set the logical volume's 
field manager - so long as it has access to both of  xenon_log and the 
field manager.  But a logical place (no pun intended) is to use your 
detector Construction.

Best regards,
John.

> I added the line:
>
> ExN02ElectricFieldSetup* field = new ExN02ElectricFieldSetup();
>
> to my main. When the simulation starts, it seems as though particles are
> leaving the xenon and keep going on forever until they exit the world
> volume, which gives me a segmentation fault. I know that to isolate the
> field to only the xenon cylinder, I need to use the line:
>
> xenon_log->SetFieldManager(field->GetGlobalFieldManager(), false);
>
>   

Although I would change
> Is this right? If it is right, in what class do I put this line? The
> documentation isn't very specific about this.


Adam wrote:
> *** Discussion title: Fields: Magnetic and Otherwise
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/emfields/124/1/1"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
>
> The segmentation fault is gone. How do I confine the field to inside the
> cylinder without having it outside?
>   

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

1 None: Re: Help setting up an Electric Field   (Adam - 11 Jul, 2007)
1 Warning: Re: Help setting up an Electric Field   (Peter Gumplinger - 11 Jul, 2007)
3 None: Re: Help setting up an Electric Field   (John Apostolakis - 13 Jul, 2007)
1 None: Re: Help setting up an Electric Field   (Adam - 13 Jul, 2007)
...
 Add Message Add Message
to: "Re: Help setting up an 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 ]