Message: How to make custom magnetic field class? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None How to make custom magnetic field class? 

Forum: Fields: Magnetic and Otherwise
Date: 25 May, 2005
From: Tim Chambers <Tim Chambers>

I am building a simulation that has a static magnetic 
field that is a function of the x,y,z coordinates;

B[0] = cos(x);  //just examples, the real functions are uglier
B[1] = y*y;

that sort of thing.

I have gathered that for a non-uniform magnetic field it is necessary to 
create your own magnetic field class.  By looking at the source code 
for G4UniformMagField I get the general idea of how this works, but 
I can't figure out how to make the magnetic field values depend on 
position.  Any advice will be greatly appreciated!

-Tim Chambers

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

1 Feedback: Re: How to make custom magnetic field class?   (Peter Gumplinger - 25 May, 2005)
3 None: Trajectories in a Magnetic field.   (Ryan Romero - 31 Jul, 2006)
 Add Message Add Message
to: "How to make custom magnetic field class?"

 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 ]