Message: Accessing Step Information Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Accessing Step Information 

Keywords: Time Dependent Magnetic Field
Forum: Event and Track Management
Date: 15 Mar, 2005
From: Zach Hartwig <>

Hi all,
   I'm trying to implement a time dependent magnetic field based upon 
the proper and local time of the particle to be tracked through the 
magnetic field.  I derive my own magnetic field from G4MagneticField.  
Inside my derived magnetic field class, how can I gain access to the 
particle's properties?  I have tried

G4Track *track;
G4double localTime = track -> GetLocalTime();

but I get a segmentation fault once the particle enters my magnetic
field region.
   If this method is wrong, is there possibly a better way to implement 
a time dependent B-field?  The time component of the position 4-vector 
that gets passed to the GetFieldValue() doesn't seem change as the 
particle moves through the field region.

Many Thanks for all the good work!

~Zach Hartwig

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

1 None: Re: Accessing Step Information   (Makoto Asai - 15 Mar, 2005)
(_ Agree: Re: Accessing Step Information   (Zach Hartwig - 15 Mar, 2005)
(_ More: Re: Accessing Step Information   (Peter Gumplinger - 16 Mar, 2005)
 Add Message Add Message
to: "Accessing Step Information"

 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 ]