Log of /trunk/geom/geom/inc/TGeoGlobalMagField.h
Parent Directory
Revision
43012 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 15 10:40:58 2012 UTC (2 years, 11 months ago) by
agheata
File length: 2457 byte(s)
Diff to
previous 27191
Added static getter for the global magnetic field and used it in ~TVirtualMagField to prevent creating an instance of the global field
Revision
27191 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 20 08:09:20 2009 UTC (6 years ago) by
brun
File length: 2392 byte(s)
Diff to
previous 27096
From Andrei:
- Added possibility to lock the global field via the global field manager:
TGeoGlobalMagField::Instance()->SetField(myField)
TGeoGlobalMagField::Instance()->Lock();
Can be checked via IsLocked() method and unlocking is protected (similar to TGeoManager locking mechanism)
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: 2173 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
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.