View Javadoc

1   package org.lcsim.recon.tracking.magfield;
2   
3   import org.lcsim.recon.tracking.spacegeom.SpacePoint;
4   import org.lcsim.recon.tracking.spacegeom.SpacePointTensor;
5   import org.lcsim.recon.tracking.spacegeom.SpacePointVector;
6   
7   /**
8    * AbstractMagneticField is a general magnetic field class which returns values
9    * interesting for tracking code. A magnetic field will generally have an
10   * internal representation optimized for speed which will need to be updated
11   * whenever the field is moved or rescaled. Important methods are:
12   * 
13   *
14   * SpacePointVector field( SpacePoint p); SpacePointVector field( SpacePoint p,
15   * SpacePointTensor g); return the field at p and calculates the gradient
16   * tensor. The returned field and the gradient are in the form of a value at the
17   * point p.
18   *
19   *
20   * Note regarding gradient tensor:
21   * 
22   * The gradient tensor is a matrix of covariant derivates, which can be defined,
23   * or its components extracted, in any standard coordinate system (namely,
24   * Cartesian, cylindrical, spherical).
25   * 
26   * In Cartesian coordinates, covariant derivatives is the same as ordinary
27   * partial derivatives:
28   * 
29   * Bi;j = Bi,j (i,j = x,y,z)
30   * 
31   * In Cylindrical coordinates, the physical components of the covariant gradient
32   * tensor are as follows:
33   * 
34   * Br;r = Br,r 
35   * Br;phi = (1/r)Br,phi - Bphi/r 
36   * Br:z = Br,z 
37   * Bphi;r = Bphi,r
38   * Bphi;phi = (1/r)Bphi,phi + Br/r 
39   * Bphi;z = Bphi,z 
40   * Bz;r = Bz,r 
41   * Bz;phi = (1/r)Bz,phi 
42   * Bz;z = Bz,phi
43   *
44   *
45   *
46   *
47   * @author Norman A Graf
48   *
49   * @version $Id:
50   */
51  public abstract class AbstractMagneticField
52  {
53      // given a space position, return a field object
54  
55      public abstract SpacePointVector field(SpacePoint p);
56      // given a space position, return a field object and calculate
57      // the covariant gradient.
58  
59      public abstract SpacePointVector field(SpacePoint p, SpacePointTensor g);
60  }