Message: Re: simultaneous B and E fields Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Warning Re: simultaneous B and E fields 

Keywords: magnetic field, electric field
Forum: Fields: Magnetic and Otherwise
Re: Question simultaneous B and E fields (Abigail Bickley)
Re: Feedback Re: simultaneous B and E fields (Gumplinger Peter)
Re: Question Re: simultaneous B and E fields (Abigail Bickley)
Date: 17 Jul, 2007
From: Gumplinger Peter <Gumplinger Peter>

Sorry, I gave the wrong advise! This constructor does NOT exist:

> new G4ElectroMagneticField(gbl_Bfield_x, gbl_Bfield_y, gbl_Bfield_z,
                           lcl_Efield_x, lcl_Efield_y, lcl_Efield_z);

Maybe, it should, to make life easy for situations with both a constant B and E field; or a class G4UniformElectroMagneticField.

Unfortunately, there is no example in /examples/extended/field that would show you how to go about this. The only example I found (but I didn't check/follow the code in detail) that might give you hints of what to do is:


where the MicrobeamEMField inherits from G4ElectroMagneticField. You now can write a constructor for 'your field class' with the above signature to initialize both constant B and E fields.

Also note, you MUST NOT get a new local field manager from:

  G4FieldManager* fLocalFieldManager = G4TransportationManager::GetTransportationManager()->GetFieldManager();

and then set:


This will just assign the fLocalField to the World (GlobalFieldManager which is what the G4TransporationManager returns) and hence replace the fGlobalField.

What you need to do is actually make a new FieldManager with:

fLocalFieldManager = new G4FieldManager();

Note, that the examples/field/field03 has this correct only since the G4.9 release.

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

1 Question: Re: simultaneous B and E fields   (Abigail Bickley - 19 Jul, 2007)
(_ Feedback: Re: simultaneous B and E fields   (Peter Gumplinger - 20 Jul, 2007)
(_ Warning: Re: simultaneous B and E fields   (Gumplinger Peter - 17 Sep, 2009)
 Add Message Add Message
to: "Re: simultaneous B and E fields"

 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 ]