Revision
27106 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 9 07:55:28 2009 UTC (6 years ago) by
brun
File length: 2592 byte(s)
Diff to
previous 27098
From Ivana:
there is added setter/getter for TVirtualMagField
in TVirtualMC.
If the field object is set, the MCApplication::Field
is not used, if not, it is used as before, but there is issued
a warning that MCApplication::Field is now deprecated and user
should move to TVirtualMagField.
There is also included a correction in the new classes
headers, as there was a problem in compilation when using
include of uniform field. And added a setter/getter for
the field value in uniform field.
Revision
27096 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Wed Jan 7 11:09:44 2009 UTC (6 years ago) by
brun
File length: 2509 byte(s)
From Andrei:
New development for magnetic field description. The classes are described below:
TVirtualMagField - Abstract base class for magnetic fields. Derived field classes are encouraged to use the base class named constructor and have to implement the method:
void Field(const Double_t *x, Double_t *B);
where: x is an input array of 3 space coordinates and B is an output array of the 3 magnetic field components at x position.
Magnetic fields can be made global via the static pointer of the global field manager:
TGeoGlobalMagField::Instance()->SetField(field)
Important usage note:
---------------------
A global field is owned by the global field manager but can be replaced using the method above (or simply deleted if providing a NULL argument). Any replaced global field is deleted for safety reasons, while direct deletion of a global field or creation of a new global field manager while a global field is active aborts with <Fatal>. The global field is automatically cleaned up at the end of the root session. Non-global magnetic fields are managed by user.
TGeoUniformMagField - Provided implementation for a uniform magnetic field. Can be built using the three constant field components.
TGeoGlobalMagField - Manager for the global magnetic field. Should be accessed via its static access function:
TGeoGlobalMagField::Instance()
Use the setter to declare a magnetic field as global and the getter to retrieve it. Becomes owner of the global magnetic field which is cleaned up upon replacement or in the destructor. To get the magnetic field B[3] in a point x[3] one can use:
TGeoGlobalMagField::Instance()->Field(x,B)
Magnetic field classes can be used standalone or via VMC. Local fields can be connected to TGeoVolume objects.
Thanks to: R.Brun, F.Carminati, C.Cheshkov, A.Gheata, M.Gheata, P.Hristov, A.Morsch, R.Shahoyan