[root] / trunk / geom / geom / src / TVirtualMagField.cxx Repository:
ViewVC logotype

Log of /trunk/geom/geom/src/TVirtualMagField.cxx

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

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: 2744 byte(s)
Diff to previous 27244
Added static getter for the global magnetic field and used it in ~TVirtualMagField to prevent creating an instance of the global field

Revision 27244 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 26 17:07:51 2009 UTC (5 years, 11 months ago) by rdm
File length: 2680 byte(s)
Diff to previous 27096
correct svn $Id$ 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: 2690 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.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9