Re: Constant magnetic field instead Solenoid Field maps [message #14917 is a reply to message #14911] |
Wed, 03 July 2013 09:37 |
Mohammad Al-Turany
Messages: 518 Registered: April 2004 Location: GSI, Germany
|
first-grade participant |
From: *gsi.de
|
|
Hallo,
let me try to explain you what is the problem here, before telling you that it is now completely solved in svn 20585!
The method GetFieldValue is called from VMC (simulation) so we have to keep the name and argument as they are. However some time one is interested in only one component of the field, that is why we implement the GetBx, GetBy and GetBz methods, now each of these methods check the boundary of the field map so when you need all of them it make no sense to check the same boundary three times, that is why we introduce the GetBxyz for the field maps but never for the constant field.
Now since Anastasia is mixing a constant field with maps this problem show up and exactly in the function PndMultiField::GetFieldValue as she find out, normally or till now we did not need to implement the GetBxyz for the constant field (we never have this use case), most of the people are using the scale of the field to change the whole map if needed, maybe this is also an option for you to test! you can simply use
void PndFieldMap::SetScale(Double_t factor)
This will scale the field map you use by this factor (all field components will be scaled for the map)
In any case one should also implement the function for GetBxyz for the const field also to solve the problem in your use case. This is all done now and I also change the output to have more meaningful warnings!
best regards,
Mohammad
|
|
|