Message: When is called GetFieldValue() ? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question When is called GetFieldValue() ? 

Forum: Fields: Magnetic and Otherwise
Date: 25 Nov, 2014
From: Kayo Matsuura <Kayo Matsuura>

Dear G4 users,

I use geatn4.9.5.p02.
If non-uniform magneticfield is used, my field class must be defined bellow. 

class myField : public G4MagneticField
  void GetFieldValue(const double Point[4], double *pField) const;
void myField::GetFiledValue(const double Point[4], double *pField) const
  pFiled[0] = Bx;
  pField[1] = By;
  pField[2] = Bz; <- Bx, By, Bz are given as function of Position. 

So, I have a question about GetFieldValue().
When is called GetFieldValue()?
I think it is called at each step.
If this is right, what value is set to Point[4]? PreStepPoint, PostStepPoint or other value?
Thus, field transition along step is ignored? 

Best Regards,
 Kayo Matsuura

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

1 None: Re: When is called GetFieldValue() ?   (John Apostolakis - 25 Nov, 2014)
(_ Ok: Re: When is called GetFieldValue() ?   (Kayo Matsuura - 26 Nov, 2014)
 Add Message Add Message
to: "When is called GetFieldValue() ?"

 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 ]