|Message: Re: Local Electric Field: GetFieldValue() problem||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
My guess is that none of us will speculate what happens when you have overlapping volumes because it is a NO NO in Geant4, precisely because what the G4Navigator will do is unpredictable. You have to use special (G4) tools to test your geometry for overlaps. Please, see the documentation about that.
> The main concern is point which comes in at the GetFieldValue() > function.
point is 'time' - ergo, you can have a time dependent field.
> I have displayed point, point, point and calculated the > magnitude of this vector and in some instances it is larger than my > entire world volume
You can also turn on step-wise debugging (/tracking/verbose 1) to follow where your tracks go and since you seem to have a debugging print statement in your SetFieldValue method you can find out when it's called - should only be called when in your 'logicalVolume' - and at what global coordinate points. If you print Point[0,1,2] you should be able to verify whether Point is local or global. I think it is global - but I am not 100% sure. So, if you want to return a value easier calculated from the local system, you need to use a GlobalToLocal transform:
G4StepPoint* p = aStep->GetPreStepPoint();
const G4AffineTransform global2local = p->GetTouchable()->GetHistory()->GetTopTransform();
G4ThreeVector localPoint= global2local.TransformPoint(globalPoint);
Except I am at a loss how you get a handle to G4Step aStep in your SetFieldValue method. One lengthy way might be:
G4Step aStep = G4EventManager::GetEventManager()->GetTrackingManager()->GetSteppingManager()->GetStep();
> I guess I am curious about the coordinate system that point is > using... does it use the logicalVolume in which the fieldManager of > the field belongs to as the coordinate system, or is it with respect > to the global volume??
I am afraid it's the global coordinate system.
> is there something special about a volume that is made of Vacuum and > holds a field manager??
Not that I know off.
|Inline Depth:||Outline Depth:||Add message:|