Message: Bug in magnetic field transportation Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Bug in magnetic field transportation 

Forum: Fields: Magnetic and Otherwise
Date: 21 Jun, 2011
From: Vahe <Vahe>

I have a simple magnetic volume (box start z = 810 mm end z = 2810 mm). I defined the magnetic volume like this

logMagneticBox->SetFieldManager(fieldMgr, true);

where fieldMgr is an object of a class inherited from G4MagneticField. I output void BBMagneticField::GetFieldValue(const double Point[3], double* Bfield) const

Here is the output of the program when electron passes through the box (momentum direction nx = 0, ny = 0 , nz = 1).

*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0    0.000    0.000    0.000   499.489    0.000    0.000     0.000       World initStep
    1    0.000    0.000  810.000   499.489    0.000  810.000   810.000      Magnet Transportation
Point 0,1,2 = 0.0000 0.0000 810.0000
Point 0,1,2 = 0.0000 0.0000 250810.0000
Point 0,1,2 = 0.0000 0.0000 250810.0000
Point 0,1,2 = 0.0000 0.0000 500810.0000
Point 0,1,2 = 0.0000 0.0000 500810.0000
Point 0,1,2 = 0.0000 0.0000 750810.0000
Point 0,1,2 = 0.0000 0.0000 750810.0000
Point 0,1,2 = 0.0000 0.0000 1000810.0000
Point 0,1,2 = 0.0000 0.0000 500810.0000
Point 0,1,2 = 0.0000 0.0000 500810.0000
Point 0,1,2 = 0.0000 0.0000 1000810.0000
Point 0,1,2 = 0.0000 0.0000 810.0000
Point 0,1,2 = 0.0000 0.0000 1310.0000
Point 0,1,2 = 0.0000 0.0000 1310.0000
Point 0,1,2 = 0.0000 0.0000 1810.0000
Point 0,1,2 = 0.0000 0.0000 1810.0000
Point 0,1,2 = 0.0000 0.0000 2310.0000
Point 0,1,2 = 0.0000 0.0000 2310.0000
Point 0,1,2 = 0.0000 0.0000 2810.0000
Point 0,1,2 = 0.0000 0.0000 1810.0000
Point 0,1,2 = 0.0000 0.0000 1810.0000
Point 0,1,2 = 0.0000 0.0000 2810.0000
    2    0.000    0.000 2810.000   499.489    0.000 2000.000  2810.000       World Transportation
    3    0.000    0.000 20000.000   499.489    0.000 17190.000 20000.000  OutOfWorld Transportation
Run terminated.
Run Summary
  Number of events processed : 1

Line 2-11 show some crazy numbers for the track position printed from GetFieldValue. Is this a bug or I am doing something wrong?

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

1 None: Re: Bug in magnetic field transportation   (John Apostolakis - 22 Jun, 2011)
 Add Message Add Message
to: "Bug in magnetic field transportation"

 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 ]